コード例 #1
0
 /**
  * The default action - show the home page
  */
 public function indexAction()
 {
     $this->_helper->viewRenderer->setNoRender();
     Zend_Layout::startMvc(array('layout' => 'cms', 'layoutPath' => '../application/zoolu/layouts'));
     $objLayout = Zend_Layout::getMvcInstance();
     $objLayout->assign('navigation', $this->view->action('index', 'Navigation', 'cms'));
     $objLayout->assign('userinfo', $this->view->action('userinfo', 'User', 'users'));
     $objLayout->assign('modules', $this->view->action('navtop', 'Modules', 'core', array('module' => $this->core->sysConfig->modules->cms)));
     $this->view->assign('jsVersion', $this->core->sysConfig->version->js);
     $this->view->assign('cssVersion', $this->core->sysConfig->version->css);
     $this->view->assign('rootLevelTypeId', $this->core->sysConfig->root_level_types->portals);
     $this->view->assign('module', $this->core->sysConfig->modules->cms);
     $strMapsKey = '';
     $objThemeData = $this->getModelFolders()->getThemeByDomain($_SERVER['SERVER_NAME']);
     if (count($objThemeData) > 0) {
         $objTheme = $objThemeData->current();
         $strMapsKey = $objTheme->mapsKey;
     }
     /*
      * Load Plugin JS
      */
     $strJsPlugin = '';
     foreach ($this->core->sysConfig->pluginsJs as $key => $value) {
         $strJsPlugin .= '<script type="text/javascript" src="' . str_replace('{MAPSKEY}', $strMapsKey, $value) . '"></script>';
     }
     $this->view->assign('jsPlugins', $strJsPlugin);
 }
コード例 #2
0
ファイル: Default.php プロジェクト: ao-lab/ao-zend
 public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request)
 {
     $layout = Zend_Layout::startMvc();
     $layout->setLayoutPath(APP_PATH . '/default/views/scripts/layouts');
     $layout->setLayout('default');
     parent::dispatchLoopShutdown();
 }
コード例 #3
0
ファイル: Plugin.php プロジェクト: lynguyetvan88/kemsakura
 public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request)
 {
     $moduleName = $request->getModuleName();
     Zend_Layout::startMvc();
     $layout = Zend_Layout::getMvcInstance();
     switch ($moduleName) {
         case 'admin':
             $layout->setLayoutPath(APPLICATION_PATH . '/layouts/scripts/' . $moduleName);
             $layout->setLayout('admin');
             break;
         case 'login':
             $layout->setLayoutPath(APPLICATION_PATH . '/layouts/scripts/' . $moduleName);
             $layout->setLayout('login');
             break;
         default:
             $layout->setLayoutPath(APPLICATION_PATH . '/layouts/scripts/default');
             $layout->setLayout('layout');
             break;
     }
     $frontController = Zend_Controller_Front::getInstance();
     $frontController->setBaseUrl('http://local.kemsakura/');
     $view = Zend_Layout::getMvcInstance()->getView();
     $view->addHelperPath(APPLICATION_PATH . "/layouts/helpers");
     $wew = new Zend_View();
     $wew->baseUrl();
 }
コード例 #4
0
function configureTheme($theme = APPLICATION_THEME, $layoutName = 'index', $layoutPath = '/themes/core/layouts')
{
    global $baseUrl;
    $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
    if ($layoutName == 'integration') {
        $viewRenderer->view->themeUrl = str_replace("index.php", "", BASE_URL) . '/public/' . $theme;
        $viewRenderer->view->themeImages = $viewRenderer->view->themeUrl . "/images";
    } else {
        $viewRenderer->view->themeUrl = str_replace("index.php", "", BASE_URL) . "/themes/" . $theme;
        $viewRenderer->view->themesUrl = str_replace("index.php", "", BASE_URL) . "/themes/";
        $viewRenderer->view->themeImages = $viewRenderer->view->themeUrl . "/images";
    }
    $viewRenderer->view->theme = $theme;
    $viewRenderer->view->asset = new Joobsbox_Helpers_AssetHelper();
    $viewRenderer->view->css = new Joobsbox_Helpers_CssHelper();
    $viewRenderer->view->js = new Joobsbox_Helpers_JsHelper();
    $viewRenderer->view->addScriptPath(APPLICATION_DIRECTORY . '/themes/core/views/scripts');
    $viewRenderer->view->addScriptPath(APPLICATION_DIRECTORY . '/themes/' . $theme . '/views/scripts');
    $viewRenderer->view->setEncoding("UTF-8");
    $viewRenderer->view->addHelperPath(APPLICATION_DIRECTORY . '/Joobsbox/Helpers', "Joobsbox_Helpers");
    $conf = Zend_Registry::get("conf");
    Zend_Registry::set("theme", $theme);
    $viewRenderer->view->conf = $conf;
    if ($conf->general->standalone) {
        if ($layout = Zend_Layout::getMvcInstance()) {
            $layout->setLayoutPath(APPLICATION_DIRECTORY . $layoutPath);
            $layout->setLayout($layoutName);
        } else {
            Zend_Layout::startMvc(array('layoutPath' => APPLICATION_DIRECTORY . $layoutPath, 'layout' => $layoutName));
        }
    }
}
コード例 #5
0
ファイル: LayoutTest.php プロジェクト: lortnus/zf1
 public function testHelperMethodFetchesLayoutObject()
 {
     $layout = Zend_Layout::startMvc();
     $helper = new Zend_View_Helper_Layout();
     $received = $helper->layout();
     $this->assertSame($layout, $received);
 }
コード例 #6
0
ファイル: Layout.php プロジェクト: blackskaarj/webgr
 public function routeShutdown(Zend_Controller_Request_Abstract $request)
 {
     //starten des Zend_Layouts
     $layout = Zend_Layout::startMvc(array('layoutPath' => '../application/modules/default/views/layouts'));
     $contollerName = $request->getControllerName();
     $modulName = $request->getModuleName();
     if ($contollerName == 'make' and $modulName == 'annotation' or $contollerName == 'browse' and $modulName == 'annotation' and $request->getActionName() != 'index') {
         $layout->disableLayout();
         //setLayout('flexlayout');
     } elseif ($modulName == 'service') {
         $layout->disableLayout();
     } elseif ($modulName == 'image' and $contollerName == 'index') {
         $layout->disableLayout();
     } else {
         $layout->setLayout('layout');
     }
     // der view Voreinstellungen übergeben
     $view = $layout->getView();
     $view->doctype('XHTML1_TRANSITIONAL');
     $view->headLink(array('href' => '/styles/index.css', 'rel' => 'stylesheet', 'type' => 'text/css', 'media' => 'screen'));
     $view->headLink(array('href' => '/images/website/favicon.ico', 'rel' => 'shortcut icon'));
     $view->headTitle(Zend_Registry::get('APP_NAME'));
     //??$view->headMeta()->appendName('http-equiv','text/html; charset=utf-8');
     // register the MESSAGE key
     $registry = Zend_Registry::getInstance();
     $registry->MESSAGE = '';
 }
コード例 #7
0
 public function indexAction()
 {
     $translate = Zend_Registry::get('Zend_Translate');
     $this->view->title = 'Thống kê tháng - ' . $translate->_('TEXT_DEFAULT_TITLE');
     $this->view->headTitle($this->view->title);
     $layoutPath = APPLICATION_PATH . '/templates/' . TEMPLATE_USED;
     $option = array('layout' => '1_column/layout', 'layoutPath' => $layoutPath);
     Zend_Layout::startMvc($option);
     $date = new Zend_Date();
     $date->subMonth(1);
     $thang = $this->_getParam('thang', $date->toString("M"));
     $nam = $this->_getParam('nam', $date->toString("Y"));
     $auth = Zend_Auth::getInstance();
     $identity = $auth->getIdentity();
     $em_id = $identity->em_id;
     $holidaysModel = new Front_Model_Holidays();
     $list_holidays = $holidaysModel->fetchData(array(), 'hld_order ASC');
     $xinnghiphepModel = new Front_Model_XinNghiPhep();
     $list_nghi_phep = $xinnghiphepModel->fetchByDate($em_id, "{$nam}-{$thang}-01 00:00:00", "{$nam}-{$thang}-31 23:59:59");
     $chamcongModel = new Front_Model_ChamCong();
     $cham_cong = $chamcongModel->fetchOneData(array('c_em_id' => $em_id, 'c_thang' => $thang, 'c_nam' => $nam));
     $khenthuongModel = new Front_Model_KhenThuong();
     $khen_thuong = $khenthuongModel->fetchByDate($em_id, "{$nam}-{$thang}-01 00:00:00", "{$nam}-{$thang}-31 23:59:59");
     $kyluatModel = new Front_Model_KyLuat();
     $ky_luat = $kyluatModel->fetchByDate($em_id, "{$nam}-{$thang}-01 00:00:00", "{$nam}-{$thang}-31 23:59:59");
     $this->view->cham_cong = $cham_cong;
     $this->view->thang = $thang;
     $this->view->nam = $nam;
     $this->view->list_holidays = $list_holidays;
     $this->view->list_nghi_phep = $list_nghi_phep;
     $this->view->khen_thuong = $khen_thuong;
     $this->view->ky_luat = $ky_luat;
 }
コード例 #8
0
 public function init()
 {
     //Duong dan den layout
     $option = array('layout' => 'layout', 'layoutPath' => LAYOUT_PATH . '/tmpdaugia');
     Zend_Layout::startMvc($option);
     $this->_SESSION = new Zend_Session_Namespace();
 }
コード例 #9
0
ファイル: UserController.php プロジェクト: habbash18/netefct
 public function init()
 {
     Zend_Layout::startMvc(array('layoutPath' => APPLICATION_PATH . '/admin/layouts', 'layout' => 'layout'));
     $this->db = Zend_Db_Table::getDefaultAdapter();
     $this->user = new Application_Model_User();
     $this->baseurl = Zend_Controller_Front::getInstance()->getBaseUrl();
     //actual base url function
     $this->language_id = Zend_Registry::get('lang_id');
     //get the instance of database adapter
     $this->user_session = new Zend_Session_Namespace("user_session");
     // default namespace
     $this->filter = new Zend_Filter_StripTags();
     //Zend_Registry::set('lang_id',2);
     ini_set("max_execution_time", 0);
     $auth = Zend_Auth::getInstance();
     //if not loggedin redirect to login page
     if (!$auth->hasIdentity()) {
         $this->_redirect('/admin/index/login');
     }
     /* if(isset($this->user_session->role_id)){
     		
     			$role = array('1' => 'Admin','2' => 'Payment Manager','3' => 'Content Manager','4' => 'Listing Manager', '3' => 'Deals Manager' );
     				$this->view->user = array(
     					'user_id' => $this->user_session->user_id,
     					'email' => $this->user_session->email,
     					'role_id' => $this->user_session->role_id,
     					'role_name'	=> $role[$this->user_session->role_id],
     					'user_name'	=>$this->user_session->firstname,
     					);
     } */
 }
コード例 #10
0
 function start($environment = "dev")
 {
     try {
         require_once 'Zend/Loader/PluginLoader.php';
         Zend_Loader::registerAutoload();
         # Inicializa o Config
         $fConfig = new Zend_Config_Ini($this->_basepath . "/application/config/config.ini", $environment);
         # start a session app
         Zend_Session::start();
         # load env data
         $db = $fConfig->application->db;
         # Register the session
         Zend_Registry::set("db", $db);
         # start the front
         $front = Zend_Controller_Front::getInstance();
         //Set the Layout
         Zend_Layout::startMvc(array("layoutPath" => $this->_basepath . "/application/layout/"));
         $front->throwExceptions(true);
         $front->setParam('noViewRendred', true);
         $front->setParam('noErrorHandler', true);
         $front->setControllerDirectory($this->_basepath . "/application/modules/default/controllers/");
         $front->dispatch();
     } catch (Exception $e) {
         $contentType = "text/html";
         header("Content-Type: {$contentType}; charset=utf-8");
         var_dump($e->getMessage());
     }
 }
コード例 #11
0
 /**
  * Reescreve o método init()
  * @access public
  * @param void
  * @return void
  */
 public function init()
 {
     // configurações do layout padrão
     Zend_Layout::startMvc(array('layout' => 'layout_login'));
     parent::init();
     // chama o init() do pai GenericControllerNew
 }
コード例 #12
0
 public function init()
 {
     //$option = array('layout' => 'layout', 'layoutPath' => LAYOUT_PATH . '/' . $page->templates);
     //Duong dan den layout
     $option = array('layout' => 'layout', 'layoutPath' => LAYOUT_PATH . '/tmpstore');
     Zend_Layout::startMvc($option);
 }
コード例 #13
0
ファイル: DiachiController.php プロジェクト: hungnv0789/vhtm
		function init()
		{
			@session_start();
			if (isset($_SESSION['role_id']))
			{
			$layoutPath = APPLICATION_PATH  . '/templates/admin';
		      $option = array ('layout' => 'index', 
		                   'layoutPath' => $layoutPath );
		      Zend_Layout::startMvc ( $option );
			  $this->mDiachi = new Admin_Model_Mdiachi();
			  
			  if(isset($_SESSION['role']))
			  	$this->role = $_SESSION['role'];
			  else {
				  $this->_redirect($this->view->baseUrl().'/../admin');
			  }
			  if(isset($_SESSION['user_id']))
			 	 $this->user_id = $_SESSION['user_id'];
			  else {
				  $this->_redirect($this->view->baseUrl().'/../admin');
			  }
			  $_SESSION["backend_current_menu"]="menu-diachilienket";
			}
			else $this->_redirect($this->view->baseUrl().'/../admin');
		}
コード例 #14
0
 public function indexAction()
 {
     $translate = Zend_Registry::get('Zend_Translate');
     $this->view->title = 'Danh sách thành viên - ' . $translate->_('TEXT_DEFAULT_TITLE');
     $this->view->headTitle($this->view->title);
     $layoutPath = APPLICATION_PATH . '/templates/' . TEMPLATE_USED;
     $option = array('layout' => 'donvi/layout', 'layoutPath' => $layoutPath);
     Zend_Layout::startMvc($option);
     $auth = Zend_Auth::getInstance();
     $identity = $auth->getIdentity();
     $em_id = $identity->em_id;
     $emModel = new Front_Model_Employees();
     $phongbanModel = new Front_Model_Phongban();
     $my_info = $emModel->fetchRow('em_id=' . $em_id . ' and em_status=1');
     $phong_ban_id = $list_phongban = $phong_ban = array();
     if ($my_info) {
         $phong_ban_id[] = $my_info->em_phong_ban;
         $list_phongban = $phongbanModel->fetchDataStatus($my_info->em_phong_ban, $phong_ban);
     }
     if (sizeof($list_phongban)) {
         foreach ($list_phongban as $phong_ban_info) {
             $phong_ban_id[] = $phong_ban_info->pb_parent;
         }
     }
     //$phong_ban_id = implode(',', $phong_ban_id);
     $list_nhan_vien = $emModel->getListNhanVienTheoChucVu($phong_ban_id);
     $this->view->list_nhan_vien = $list_nhan_vien;
 }
コード例 #15
0
ファイル: Layout.php プロジェクト: ocpyosep78/Booking
 public function preDispatch(Zend_Controller_Request_Abstract $request)
 {
     $module = $request->getModuleName();
     $module = "admin";
     $options = array('layoutPath' => BASE_PATH . DIRECTORY_SEPARATOR . 'layouts' . DIRECTORY_SEPARATOR . $module);
     Zend_Layout::startMvc()->setLayoutPath($options);
 }
コード例 #16
0
 public function deleteAction()
 {
     $translate = Zend_Registry::get('Zend_Translate');
     $this->view->title = 'Quản lý thông báo - ' . $translate->_('TEXT_DEFAULT_TITLE');
     $this->view->headTitle($this->view->title);
     $layoutPath = APPLICATION_PATH . '/templates/' . TEMPLATE_USED;
     $option = array('layout' => 'canhan/layout', 'layoutPath' => $layoutPath);
     Zend_Layout::startMvc($option);
     $auth = Zend_Auth::getInstance();
     $identity = $auth->getIdentity();
     $em_id = $identity->em_id;
     $tb_id = $this->_getParam('id', 0);
     $thongbaoModel = new Front_Model_ThongBao();
     $thong_bao = $thongbaoModel->fetchOneRow(array('tb_to' => $em_id, 'tb_id' => $tb_id));
     $error_message = array();
     if (!$thong_bao) {
         $error_message[] = 'Không tìm thấy thông tin.';
     }
     if ($this->_request->isPost()) {
         $del = $this->getRequest()->getPost('del');
         if ($del == 'Yes') {
             $id = $this->getRequest()->getPost('id');
             $thongbaoModel->delete('tb_id = ' . $id . ' and tb_to=' . $em_id);
         }
         $this->_redirect('canhan/thongbao/index/page/' . $this->_page);
     }
     $this->view->thong_bao = $thong_bao;
     $this->view->page = $this->_page;
     $this->view->error_message = $error_message;
 }
コード例 #17
0
		function init()
		{
			@session_start();
			if (isset($_SESSION['role_id']))
			{
				$layoutPath = APPLICATION_PATH  . '/templates/admin';
			    $option = array ('layout' => 'index', 
			                   'layoutPath' => $layoutPath );
			    Zend_Layout::startMvc ($option);
				$this->mTruongban = new Admin_Model_Mtruongban();
				$this->mChuyenmuc = new Admin_Model_Mchuyenmuc();
				$this->mUser=new Admin_Model_Muser();
				$this->listParent = $this->mChuyenmuc->getListParent();
				$this->listChild = $this->mChuyenmuc->getListChild();
				
				if(isset($_SESSION['role']))
				  	$this->role = $_SESSION['role'];
				else {
					$this->_redirect($this->view->baseUrl().'/../admin');
				}
				if(isset($_SESSION['user']))
					$this->user = $_SESSION['user'];
				else {
					$this->_redirect($this->view->baseUrl().'/../admin');
				}
				$_SESSION['backend_current_menu']="menu-quanlychung";
			}
			else $this->_redirect($this->view->baseUrl().'/../admin');
		}
コード例 #18
0
ファイル: Bootstrap.php プロジェクト: pccnf/proj_instag
 protected function _initView()
 {
     //INICIAR PLUGIN PARA CADA MODULE TER SEU LAYOUT
     $view = new Zend_View();
     $view->setEncoding('UTF-8');
     Zend_Layout::startMvc(array('layoutPath' => APPLICATION_PATH . '/modules/default/layouts/scripts', 'layout' => 'default', 'pluginClass' => 'App_Plugins_SetLayout'));
 }
コード例 #19
0
ファイル: TintucController.php プロジェクト: hungnv0789/vhtm
		function init()
		{
			@session_start();
			
			if (isset($_SESSION['role_id']))
			{
				//=======clear array ====================
				$this->title=array();
				$this->description=array();
				$this->link=array();
				$this->date=array();
				$this->source=array();
				$this->content=array();
				
				$layoutPath = APPLICATION_PATH  . '/templates/admin';
				$option = array ('layout' => 'index', 
				                   'layoutPath' => $layoutPath );
				Zend_Layout::startMvc ( $option );
				$this->mChuyenmuc = new Admin_Model_Mchuyenmuc();
				$this->listParent = $this->mChuyenmuc->getListParent();
				$this->listChild = $this->mChuyenmuc->getListChild();
				$this->mtintuc=new Admin_Model_Mtintuc();
				$this->mRss=new Admin_Model_Mrss();
				$this->mdanhmuc=new Admin_Model_Mchuyenmuc();
				$this->mtimkiem=new Admin_Model_Mtimkiem();
				$this->mComment=new Admin_Model_Mcomment();
				
				$this->view->headTitle('UNC - Admin website');
				$this->view->headLink()->appendStylesheet($this->view->baseUrl().'/application/templates/admin/css/layout.css');
				$this->view->headScript()->appendFile($this->view->baseUrl().'/application/templates/admin/js/jquery-1.7.2.min.js','text/javascript');
				$this->view->headScript()->appendFile($this->view->baseUrl().'/application/templates/admin/js/hideshow.js','text/javascript');
				$_SESSION["backend_current_menu"]="menu-quanlytin";
			}
			else $this->_redirect($this->view->baseUrl().'/../admin');
		}
コード例 #20
0
 protected function _initView()
 {
     $view = new Zend_View();
     $view->headTitle('test test');
     $view->docType('XHTML1_STRICT');
     Zend_Layout::startMvc(array('layoutPath' => APPLICATION_PATH . '/layouts'));
 }
コード例 #21
0
 public function init()
 {
     Zend_Layout::startMvc(APPLICATION_PATH . '/layouts/scripts');
     $response = $this->getResponse();
     $response->insert('logo', '/global/images/logo.jpg');
     $this->_helper->layout->setLayout('layout')->setLayoutPath(APPLICATION_PATH . '/layouts/scripts/system');
 }
コード例 #22
0
ファイル: Login.php プロジェクト: dafik/dfi
 public function preDispatch(Zend_Controller_Request_Abstract $request)
 {
     Zend_Auth::getInstance()->setStorage(new Dfi_Auth_Storage_Cookie('user'));
     /** @var Zend_Controller_Request_Http $request */
     $request = $this->getRequest();
     $bypass = $this->isBypassRequest($request->getModuleName(), $request->getControllerName(), $request->getActionName());
     if (!Zend_Auth::getInstance()->hasIdentity() && !$bypass) {
         if ($request->isXmlHttpRequest()) {
             $response = $this->getResponse();
             $data = array('auth' => true);
             $output = json_encode($data);
             $response->setHeader('Content-Type', 'application/json', true);
             $this->getResponse()->setBody($output);
             $this->getResponse()->sendResponse();
             exit;
         } else {
             if ($request->getControllerName() == 'index' && $request->getActionName() == 'index') {
                 if (!Zend_Layout::getMvcInstance()) {
                     $layoutPath = Dfi_App_Config::get('layout.layoutPath');
                     Zend_Layout::startMvc($layoutPath);
                 }
             }
             $request->setControllerName('login');
             $request->setActionName('index');
             $request->setModuleName('default');
         }
     }
 }
コード例 #23
0
ファイル: TimkiemController.php プロジェクト: hungnv0789/vhtm
	function init()
	{
		@session_start();
		$this->setAccess();
		$_SESSION['home'] = 'home';
		$_SESSION['page'] = 'tintuc';
		$_SESSION['page'] = 'video';
		$this->view->headScript()->appendFile($this->view->baseUrl().'/application/templates/front/js/switch_news.js',"text/javascript");

		$layoutPath = APPLICATION_PATH  . '/templates/front';
		$option = array ('layout' => 'index', 
                   'layoutPath' => $layoutPath );
		Zend_Layout::startMvc ( $option );
		$this->mTimkiem=new Default_Model_Mtimkiem();
		$this->mDefault=new Default_Model_Mdf();
		$this->mTintuc=new Default_Model_Mtintuc();
		$this->mDiachi=new Default_Model_Mdiachi();
		$this->mVideo = new Default_Model_Mvideo();
		$this->mHinhanh = new Default_Model_Mhinhanh();
		$this->view->headScript()->appendFile($this->view->baseUrl().'/application/templates/front/js/switch_news.js',"text/javascript");
		
		$listThreadForum = $this->mDefault->getListThread();
				$this->listThreadTitle = array();
		//var_dump($listThreadForum);die();
		foreach($listThreadForum as $thread)
		{
			$content = file_get_contents('http://localhost/unc/forum/showthread.php?'.$thread['threadid']);
			$preg1 = preg_match_all('#<span class="threadtitle">.*</span>#',$content,$match);
			$this->listThreadTitle[] = $thread['threadid'].strip_tags($match[0][0]);
		}
	}
コード例 #24
0
		function init()
		{
			@session_start();
			if (isset($_SESSION['role_id']))
			{
				$layoutPath = APPLICATION_PATH  . '/templates/admin';
			    $option = array ('layout' => 'index', 
			                   'layoutPath' => $layoutPath );
			    Zend_Layout::startMvc ( $option );
			    $this->mUser=new Admin_Model_Muser();
				$this->mChuyenmuc = new Admin_Model_Mchuyenmuc();
				$this->listParent = $this->mChuyenmuc->getListParent();
				$this->listChild = $this->mChuyenmuc->getListChild();
				  
				if(isset($_SESSION['role']))
				  	$this->role = $_SESSION['role'];
				else {
					$this->_redirect($this->view->baseUrl().'/../admin');
				}
				if(isset($_SESSION['user']))
					$this->user = $_SESSION['user'];
				else {
					$this->_redirect($this->view->baseUrl().'/../admin');
				}
				$_SESSION['backend_current_menu']="menu-quanlychung";
				
				$this->view->headTitle('UNC - Admin website');
				$this->view->headLink()->appendStylesheet($this->view->baseUrl().'/application/templates/admin/css/layout.css');
				$this->view->headScript()->appendFile($this->view->baseUrl().'/application/templates/admin/js/jquery-1.7.2.min.js','text/javascript');
				$this->view->headScript()->appendFile($this->view->baseUrl().'/application/templates/admin/js/hideshow.js','text/javascript');
			}
			else $this->_redirect($this->view->baseUrl().'/../admin');
		}
コード例 #25
0
ファイル: Bootstrap.php プロジェクト: beesheer/freehdfootage
 /**
  * Set up layout according to different areas.
  *
  * @return void
  */
 protected function _initLayout()
 {
     $layout = 'client-default';
     if ($layout) {
         Zend_Layout::startMvc(array('layoutPath' => APPLICATION_PATH . 'layouts', 'layout' => $layout));
     }
 }
コード例 #26
0
ファイル: Layout.php プロジェクト: test3metizsoft/test
 /**
  * Retrieve layout object
  *
  * @return Zend_Layout
  */
 public function getLayout()
 {
     if (null === $this->_layout) {
         $this->_layout = Zend_Layout::startMvc($this->getOptions());
     }
     return $this->_layout;
 }
コード例 #27
0
 public function init()
 {
     $option = array("layout" => "layout", "layoutPath" => APPLICATION_PATH . "/layouts/scripts/");
     Zend_Layout::startMvc($option);
     $this->sessionGlobal = new Zend_Session_Namespace('username');
     $Sessioonlecturer_id = $this->sessionGlobal->lecturer_id;
 }
コード例 #28
0
ファイル: Layout.php プロジェクト: juancarlosjco/yaz
 function init()
 {
     $bootstrap = $this->getBootstrap();
     $bootstrap->bootstrap('view');
     $options = $this->getOptions();
     $this->_initPlaceHolders($options);
     Zend_Layout::startMvc($options['params']);
 }
コード例 #29
0
 public function init()
 {
     // Start the zend layout engine and load the cms admin layout
     Zend_Layout::startMvc();
     $this->_helper->layout->setLayout('default');
     require_once 'gChart.php';
     // Include the gChart
 }
コード例 #30
0
ファイル: Modulate.php プロジェクト: ao-lab/ao-zend
 public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request)
 {
     $file = APP_PATH . '/' . $this->getRequest()->getModuleName() . '/views/scripts/layouts';
     $layout = Zend_Layout::startMvc();
     $layout->setLayoutPath(file_exists($file) ? $file : APP_PATH . '/default/views/scripts/layouts');
     $layout->setLayout('default');
     parent::dispatchLoopShutdown();
 }