403Webshell
Server IP : 103.234.187.230  /  Your IP : 216.73.216.216
Web Server : Apache
System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/ptcfinance/application/controllers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/ptcfinance/application/controllers/IndexController.php
<?php

/* * *************************************************************
 * Catabatic Technology Pvt. Ltd.
 * File Name :IndexController.php
 * File Description :Index controller for manage home page
 * Created By : Praveen Kumar
 * Created Date: 10-September-2014
 * ************************************************************* */

class IndexController extends Zend_Controller_Action {

    public function init() { 
        /* Initialize action controller here */
        //$aConfig = $this->getInvokeArg('bootstrap')->getOptions();
        //$this->deviceBasePath = $aConfig['deviceBasePath'];
        
        $cms = new Application_Model_Cms();
        $menu = new Application_Model_Menu();
        
        $page_details = $cms->getPageDetails();
        $this->page_title = $page_details['page_title'];
        $this->page_description = $page_details['page_description'];
        $this->page_keywords = $page_details['page_keywords'];
        
        //Start Code for tiled list menu on home page
        $headerMenuData = $menu->getAllTopMenuList('content_menu');

        $this->view->headerMenu = $headerMenuData;
        
        $footerMenuData = $menu->getAllTopMenuList('footer_menu_column1');
//        echo "<pre>";print_r($footerMenuData);die;
        $this->view->footerMenu = $footerMenuData;
    }

    public function indexAction() {
         //$this->_helper->layout()->disableLayout('');
        $this->view->headTitle()->prepend($this->page_title);
        $this->view->headMeta()->appendName("description", $this->page_description);
        $this->view->headMeta()->appendName("keyword", $this->page_keywords);
       
        //Start Code for home slider
        
        $slider = new Application_Model_Slider();
        $this->view->slider_list = $slider->getAllSliderList('slider');
        $this->view->home_content = $slider->getAllHomeContentData();
        
        $this->view->press_releases = $slider->getLatestPressReleaseData('press-releases');
        $this->view->news_update = $slider->getLatestPressReleaseData('news-update');
        $this->view->product_services = $slider->getLatestCmsData('debt-financing');
        $this->view->annual_report = $slider->getLatestCmsData('annual-reports');
        
        $this->view->logo_list = $slider->getAllSliderList('logo');
//        echo '<pre>';        print_r($this->view->logo_list); die;

    }

    /**
     * email() method is used to send email
     * @param Null
     * @return Array 
     */
    public function emailAction() {
        $this->_helper->layout()->disableLayout('');

        $form = new Application_Form_Shareemail();
        $this->view->form = $form;


        if ($this->getRequest()->isPost()) {
            $getData = $this->getRequest()->getPost();
            //echo "<pre>";print_r($getData);die;
            if ($form->isValid($getData)) {

                //Start code for send mail  
                if ($getData['emailto'] && $getData['emailfrom']) {

                    $email = $getData['emailto'];
                    $sender = ucfirst($getData['sender']);
                    $emailfrom = $getData['emailfrom'];
                    $subject = ucwords($getData['subject']);
                    $email_message = $getData['message'];

                    $message = "Hi $sender, <br><br>";
                    $message .= "E-mail Details:<br><br>";
                    $message .= "Email: $emailfrom <br>";
                    $message .= "Message: $email_message <br><br>";
                    $message .= "Thanks,<br>";
                    $message .= "PTC Team";

                    //Start code fot smtp mail details                         
                    $config_details = array('auth' => 'login',
                        'port' => $this->smtpPort,
                        'username' => $this->smtpUserName,
                        'password' => $this->smtpPassword
                    );

                    //require_once $this->deviceBasePath.'library/Zend/Zend/Mail.php';
                    //require_once $this->deviceBasePath.'library/Zend/Mail/Transport/Smtp.php';
                    $transport = new Zend_Mail_Transport_Smtp($this->smtpHost, $config_details);
                    
                    $arr_email = array($email);
                    foreach($arr_email as $val)
                    { 
                        $mail = new Zend_Mail("utf-8");
                        $mail->setBodyHtml($message);
                        $mail->setFrom($emailfrom, $this->fromName);
                        $mail->addTo($email, "$sender");
                        $mail->setSubject($subject);
                        try {
                         $mail->send($transport);
                        }
                        catch(Exception $e) {
                              $e->getMessage();
                        }
                    }   
                }
                //End code for send mail
                $this->view->successMessage = "Email sent successfully.";
            }
        }
    }

}


Youez - 2016 - github.com/yon3zu
LinuXploit