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/b2bzend/application/controllers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/b2bzend/application/controllers/PlanController.php
<?php
/**
 * Catabatic Technology Pvt. Ltd.
 * File Name    : PlanController.php
 * Created By   : Pooja Choudhary
 * Created Date : 07/07/2016 15:30
 */

class PlanController extends Zend_Controller_Action {

    public function init() {
        $aConfig = $this->getInvokeArg('bootstrap')->getOptions();
        $this->siteUrl = $aConfig['bootstrap']['siteUrl'];
    }

    public function indexAction() {
        $objDept = new Travel_Model_TblAgencyUserplan();
        $this->view->userplanList = $objDept->getUserplanList();
        $this->view->messages = $this->_helper->flashMessenger->getMessages();
    }

    public function addUserplanAction() {
        
        /*
       [PlanSysId]
      ,[UserSysId]
      ,[AgencySysId]
      ,[PlanTitel]
      ,[PlanStatusTupe]
      ,[Details]
      ,[Url]
      ,[CustomerName]
      ,[CustomerContact]
      ,[CustomerEmail]
      ,[CustomerSysId]
      ,[IsProtected]
      ,[Password]
      ,[UpdateDate]
      ,[CreaterDate]
      ,[IsMarkForDel]
      ,[IsActive]
      ,[IsApproved]
         */
        
        $agency                     = new Travel_Model_TblLead();       
        $this->view->agencyArray    = $agency->getAgencyList();
        if ($this->getRequest()->isPost()) 
        {
            $getData    = $this->getRequest()->getPost();
            
            //if (!$userplan->isAgencyUserplanExists(trim($getData['userplan']))) 
            if(1==1)
            {
//                $date   = new Zend_Date();
                $currentDate = date('Y-m-d H:i:s');
                
                $dafaForAddDept = array(
                    'OrgSysId'      => CURRENT_AGENCY_SYS_ID, // agency id(CURRENT_AGENCY_SYS_ID) static for now
                    'PlanTitel'     => $this->sanitize_data($getData['plantitle']),
                    'IsActive'      => $getData['status'],
                    'IsMarkForDel'  => 0,
                    'CreatedDate'   => $currentDate
                );
                //Insert agency userplan
                $userplan   = new Travel_Model_TblAgencyUserplan();
                $objDeptRes = $userplan->addAgencyDept($dafaForAddDept);
                if($objDeptRes)
                {
                    $this->_helper->flashMessenger->addMessage("Userplan added successfully.");
                    //$this->_redirect("/userplan");
                }
                else
                {
                    $this->_helper->flashMessenger->addMessage("Userplan addtion failed.");
                }
            }
            else
            {
               $this->view->message = 'Userplan already exists.'; 
            }
        }
    }

    public function editDepartmentAction() {
        $DeptSysId = base64_decode($this->getRequest()->getParam('id'));
        
        $objDept = new Travel_Model_TblAgencyDept();
        $result = $objDept->getDataByDepartment($DeptSysId);
        $this->view->deptData = $result;

        if ($this->getRequest()->isPost()) {
            $getData = $this->getRequest()->getPost();
            $DeptSysId = base64_decode($getData['depId']);
            $objDept = new Travel_Model_TblAgencyDept();
            if (!$objDept->isAgencyDeptExists(trim($getData['department']), $DeptSysId)) {
                $dataForAddDept = array(
                    'DeptTitle' => $this->sanitize_data($getData['department']),
                    'IsActive' => $getData['status'],
                );
                //update agency department
                $objDeptRes = $objDept->updateAgencyDeptData($dataForAddDept, $DeptSysId);
                $this->_helper->flashMessenger->addMessage("Department updated successfully.");
                $this->_redirect("/department");
            } else {
                $this->view->message = 'Department already exists.';
            }
        } 
    }

    public function departmentExistsAction() {
        $this->_helper->layout->disableLayout();
        $this->_helper->viewRenderer->setNoRender(true);

        $deptTitle = $this->getRequest()->getParam('department');
        $depId = base64_decode($this->getRequest()->getParam('depId'));

        $objDept = new Travel_Model_TblAgencyDept();
        if ($objDept->isAgencyDeptExists(trim($deptTitle), $depId)) {
            // echo true;
            echo json_encode(false);
        } else {
            echo json_encode(true);
        }
    }

    public function sanitize_data($input_data) {
        $searchArr = array("document", "write", "alert", "%", "$", ";", "+", "|", "#", "<", ">", ")", "(", "'", "\'", ",", "AND", "JAVASCRIPT");
        $input_data = str_replace("script", "", $input_data);
        $input_data = str_replace("iframe", "", $input_data);
        $input_data = str_replace($searchArr, "", $input_data);

        return htmlentities(stripslashes($input_data), ENT_QUOTES);
    }

}

Youez - 2016 - github.com/yon3zu
LinuXploit