| 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/dcb/application/controllers/ |
Upload File : |
<?php
class ErrorController extends Zend_Controller_Action
{
public function init()
{
/* Initialize action controller here */
$cms = new Application_Model_Cms();
$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'];
}
public function errorAction() {
//Call Model Here
$menu = new Application_Model_Menu();
//Start Code for quick menu
$quickLinkColumn1Data = $menu->getQuickLinkColumn123DataList($type='quick_link_column1');
//echo "<pre>";print_r($quickLinkColumn1Data);die;
$this->view->quickLinkColumn1 = $quickLinkColumn1Data;
$quickLinkColumn2Data = $menu->getQuickLinkColumn123DataList($type='quick_link_column2');
$this->view->quickLinkColumn2 = $quickLinkColumn2Data;
$quickLinkColumn3Data = $menu->getQuickLinkColumn123DataList($type='quick_link_column3');
$this->view->quickLinkColumn3 = $quickLinkColumn3Data;
//End Code for quick menu
//Start sitemap code here
// $this->view->headTitle()->prepend($this->page_title);
// $this->view->headMeta()->appendName("description", $this->page_description);
// $this->view->headMeta()->appendName("keyword", $this->page_keywords);
$errors = $this->_getParam('error_handler');
echo "<pre>";print_r($errors);exit;
if (!$errors || !$errors instanceof ArrayObject) {
$this->view->message = 'You have reached the error page';
return;
}
switch ($errors->type) {
case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ROUTE:
case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:
case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:
// 404 error -- controller or action not found
$this->getResponse()->setHttpResponseCode(404);
$priority = Zend_Log::NOTICE;
$this->view->error_code = $this->getResponse()->getHttpResponseCode();
$this->view->message = "Page Not Found ";
$this->renderScript('error/error_404.phtml');
break;
default:
// application error
$this->getResponse()->setHttpResponseCode(500);
$priority = Zend_Log::CRIT;
$this->view->error_code = $this->getResponse()->getHttpResponseCode();
$this->view->request = $errors->request;
$this->view->error_code = $this->getResponse()->getHttpResponseCode();
$this->renderScript('error/error_500.phtml');
break;
}
// conditionally display exceptions
if ($this->getInvokeArg('displayExceptions') == true) {
$this->view->exception = $errors->exception;
}
$this->view->request = $errors->request;
//Start Code for footer menu
$footerMenuColumn1Data = $menu->getQuickLinkColumn123DataList($type='footer_menu_column1');
$this->view->footerMenuColumn1 = $footerMenuColumn1Data;
$footerMenuColumn2Data = $menu->getQuickLinkColumn123DataList($type='footer_menu_column2');
$this->view->footerMenuColumn2 = $footerMenuColumn2Data;
$footerMenuColumn3Data = $menu->getQuickLinkColumn123DataList($type='footer_menu_column3');
$this->view->footerMenuColumn3 = $footerMenuColumn3Data;
//End Code for footer menu
}
}