| 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/b2c.hellogtx.com/application/controllers/helpers/ |
Upload File : |
<?php
class Application_Controller_Helper_Layout extends Zend_Layout_Controller_Action_Helper_Layout
{
public function preDispatch()
{
$options = Zend_Controller_Front::getInstance()->getParam('bootstrap')->getOption('bootstrap');
$object = Zend_Controller_Front::getInstance();
$controller = $object->getRequest()->getControllerName();
$modulename = $object->getRequest()->getModuleName();
$getTemplateId = isset($options["TemplateType"]) ? $options["TemplateType"] : 0;
$controller = $object->getRequest()->getControllerName();
$action = $object->getRequest()->getActionName();
if ($controller === 'flight' && $action === 'flight-search') {
parent::disableLayout();
if ($controller == 'flight') {
parent::setLayout('layout-flight')->setLayoutPath(APPLICATION_PATH . '/layouts/template7');
} else {
parent::setLayout('layout')->setLayoutPath(APPLICATION_PATH . '/layouts/template7');
}
} else {
if ($getTemplateId == 1 && $modulename != 'admin') {
parent::disableLayout();
if ($controller == 'flight') {
parent::setLayout('layout-flight')->setLayoutPath(APPLICATION_PATH . '/layouts/template1');
} else {
parent::setLayout('layout')->setLayoutPath(APPLICATION_PATH . '/layouts/template1');
}
} elseif ($getTemplateId == 3 && $modulename != 'admin') {
parent::disableLayout();
if ($controller == 'flight') {
parent::setLayout('layout-flight')->setLayoutPath(APPLICATION_PATH . '/layouts/template3');
} else {
parent::setLayout('layout')->setLayoutPath(APPLICATION_PATH . '/layouts/template3');
}
} elseif ($getTemplateId == 4 && $modulename != 'admin') {
parent::disableLayout();
if ($controller == 'flight') {
parent::setLayout('layout-flight')->setLayoutPath(APPLICATION_PATH . '/layouts/template4');
} else {
parent::setLayout('layout')->setLayoutPath(APPLICATION_PATH . '/layouts/template4');
}
} elseif ($getTemplateId == 5 && $modulename != 'admin') {
parent::disableLayout();
if ($controller == 'flight') {
parent::setLayout('layout-flight')->setLayoutPath(APPLICATION_PATH . '/layouts/template5');
} else {
parent::setLayout('layout')->setLayoutPath(APPLICATION_PATH . '/layouts/template5');
}
} elseif ($getTemplateId == 6 && $modulename != 'admin') {
parent::disableLayout();
if ($controller == 'flight') {
parent::setLayout('layout-flight')->setLayoutPath(APPLICATION_PATH . '/layouts/template6');
} else {
parent::setLayout('layout')->setLayoutPath(APPLICATION_PATH . '/layouts/template6');
}
} elseif ($getTemplateId == 7 && $modulename != 'admin') {
parent::disableLayout();
if ($controller == 'flight') {
parent::setLayout('layout-flight')->setLayoutPath(APPLICATION_PATH . '/layouts/template7');
} else {
parent::setLayout('layout')->setLayoutPath(APPLICATION_PATH . '/layouts/template7');
}
}elseif ($getTemplateId == 8 && $modulename != 'admin') {
parent::disableLayout();
if ($controller == 'flight') {
parent::setLayout('layout-flight')->setLayoutPath(APPLICATION_PATH . '/layouts/template8');
} else {
parent::setLayout('layout')->setLayoutPath(APPLICATION_PATH . '/layouts/template8');
}
}elseif ($getTemplateId == 9 && $modulename != 'admin') {
parent::disableLayout();
if($modulename == 'hotelsinv'){
parent::setLayout('layout-hotels-inv')->setLayoutPath(APPLICATION_PATH . '/layouts/scripts');
}else{
if ($controller == 'flight') {
parent::setLayout('layout-flight')->setLayoutPath(APPLICATION_PATH . '/layouts/newinquryform');
} else {
parent::setLayout('layout')->setLayoutPath(APPLICATION_PATH . '/layouts/newinquryform');
}
}
}
}
}
}