getRequest(); $moduleName = $req->getModuleName(); $actionName = $req->getActionName(); $controllerName = $req->getControllerName(); $this->_config = new Zend_Config_Ini(ROOT_PATH . 'src/config.ini' , APP_INI_SECTION ); //コンフィグで読み込んでいるセクション名を取得 $sectionNm = $this->_config->getSectionName(); if(strpos($sectionNm,"newsline")=== false){ $this->_pnSystemGlobalCD = 0; // aic }else{ $this->_pnSystemGlobalCD = 1; // newsline } if(strpos($sectionNm,"production") === false) $this->_isProduct = FALSE; if(strpos($sectionNm,"production") !== false) $this->_isProduct = TRUE; if(strpos($sectionNm,"staging") === false) $this->_isStaging = FALSE; if(strpos($sectionNm,"staging") !== false) $this->_isStaging = TRUE; // css の id $pageIdName = $req->getControllerName(); // side.tpl.htmlの名前 // ex ./about/about_inc_side.tpl.html $sideTplName = './' . $controllerName . '/' . $controllerName . '_inc_side.tpl.html'; $cssTplName = './' . $controllerName . '/' . $controllerName . '_inc_css.tpl.html'; $smarty_param = array( 'config_dir' => "./configs/", 'cache_dir' => ROOT_PATH . "var/cache/templates_c/" . $moduleName ."", 'compile_dir' => ROOT_PATH . "var/cache/templates_c/" . $moduleName ."", 'compile_dir' => ROOT_PATH . "var/cache/templates_c/" . $moduleName ."", 'left_delimiter' => '', 'template_dir' => ROOT_PATH . "src/app/" . $moduleName ); $this->view = new Pricer_View_Smarty(ROOT_PATH . 'src/app/' , $smarty_param, SYS_IS_DEBUG); $common_tpl = 'inc/inc_common'; $viewRenderer = $this->_helper->getHelper('viewRenderer'); if(($moduleName == 'admin' && $actionName == 'index' && $controllerName == 'photo') || ($moduleName == 'admin' && $actionName == 'index' && $controllerName == 'page-manage' && $req->noheader == "1") || ($moduleName == 'admin' && $actionName == 'update-price' && $controllerName == 'ucar') || ($moduleName == 'admin' && $actionName == 'mini-album' && $controllerName == 'photo')){ $viewRenderer ->setView($this->view) ->setViewBasePathSpec($this->view->_smarty->template_dir) ->setViewScriptPathSpec(':controller/:controller_:action.:suffix') // ->setViewScriptPathSpec($common_tpl . '.:suffix') ->setViewScriptPathNoControllerSpec(':action.:suffix') ->setViewSuffix('tpl.html'); }else{ $viewRenderer ->setView($this->view) ->setViewBasePathSpec($this->view->_smarty->template_dir) // ->setViewScriptPathSpec(':module/:controller/:controller_:action.:suffix') ->setViewScriptPathSpec($common_tpl . '.:suffix') ->setViewScriptPathNoControllerSpec(':action.:suffix') ->setViewSuffix('tpl.html'); } // drct_CommModule.aspより // ログイン処理 $this->_auth = Zend_Auth::getInstance(); if (!$this->_auth->hasIdentity()) { if($controllerName != 'auth') { if($controllerName == 'redirect' && $actionName == 'auth') { }else{ // ログインしていない $this->_redirect('/auth/permission-denied/'); } } } // drct_CommModule.asp // なんか毎回DBアクセスのコストかかるんで、ログイン時にセットしたのでいいんじゃない? // あかんのかね・・・ええでしょ・・・てことでauthAdapter行きになりました。 $this->_authIdentity = $this->_auth->getIdentity(); $UsedCarStockDataCnt = $this->_authIdentity->{UsedCarStockData::TBL_NAME}; $StaffMasterOne = $this->_authIdentity->{StaffMaster::TBL_NAME}; $DealershipMasterOne = $this->_authIdentity->{DealershipMaster::TBL_NAME}; $DealershipAdditionalDataOne = $this->_authIdentity->{DealershipAdditionalData::TBL_NAME}; $DealershipAdditionalData_43 = $this->_authIdentity->{DealershipAdditionalData::TBL_NAME . "_43"}; $Itp_NdAclOne = $this->_authIdentity->{Itp_NdAcl::TBL_NAME}; // $this->_dealershipCDが空等の判定はログイン後に済んでいる為不必要 $this->_dealershipCD = $DealershipMasterOne->{DealershipMaster::COL_DEALERSHIPCD}; // スタッフコード取得 $this->_psLogin_StaffCode = $StaffMasterOne->{StaffMaster::COL_SYSTEMSTAFFCD}; //社内直入れは5桁以下の判定。 // drct_CommModule.aspより // StaffMasterのCompanyCDが0の場合には社内直入画面 if($StaffMasterOne->{StaffMaster::COL_COMPANYCD} == "0") $this->_isSelf = FALSE; // var_dump($this->_isSelf); // DealershipMaster::COL_DATAMANAGEMENTCDからノンセルフ店、セルフ店のフラグ取得 $this->_pnSystemFlag = $DealershipMasterOne->{DealershipMaster::COL_DATAMANAGEMENTCD}; $this->_psSystemFlag = $DealershipMasterOne->{DealershipMaster::COL_DATAMANAGEMENTCD}; $this->_psPublicPermitCount = $DealershipMasterOne->{DealershipMaster::COL_PUBLICPERMITCOUNT}; $this->_psStockPermitCount = $DealershipMasterOne->{DealershipMaster::COL_STOCKPERMITCOUNT}; $this->_psTruckViewFlg = $Itp_NdAclOne->{DealershipMaster::COL_TRUCKVIEWFLG}; // itp_car1_itp.asp 46~91 Itp_NdAcl,Itp_Ndからのデータ取得とフラグのセット // this->_psTruckViewFlg _pnSystemFlagを使用する //$this->_TruckFlag $this->_SystemFlag $this->_pnAssessmentFlag = $Itp_NdAclOne->{Itp_Nd::COL_ASSESSMENTFLAG}; // itp_car1_itp.asp 93~103 // _psCsOnlyFlag=1 CSのみ店はMjの契約がないので車輌登録とか写真のアップとかできない。 $this->_psCsOnlyFlag = $DealershipAdditionalDataOne->{DealershipAdditionalData::COL_FLAGDATA}; // $psSQL = "SELECT UsedCarStockData.DealerShipCD,COUNT(UsedCarStockData.UsedCarState) AS cnt,A.cnt AS TotalCnt "; // $psSQL = $psSQL . " FROM UsedCarStockData LEFT OUTER JOIN (SELECT DealerShipCD,COUNT(UsedCarCD) AS cnt"; // $psSQL = $psSQL . " FROM UsedCarStockData"; // $psSQL = $psSQL . " WHERE (UsedCarState = 0 OR UsedCarState = 1)"; // $psSQL = $psSQL . " AND (DealerShipCD = N'" . $this->_dealershipCD . "')"; // $psSQL = $psSQL . " GROUP BY DealerShipCD) as A "; // $psSQL = $psSQL . " ON UsedCarStockData.DealerShipCD = A.DealerShipCD"; // $psSQL = $psSQL . " WHERE (UsedCarStockData.UsedCarState = 1)"; // $psSQL = $psSQL . " AND (UsedCarStockData.DealerShipCD = N'" . $this->_dealershipCD . "')"; // $psSQL = $psSQL . " AND (NOT (UsedCarStockData.UsedCarCD IN (SELECT UsedCarCD "; // $psSQL = $psSQL . " FROM Itp_BukkenState"; // $psSQL = $psSQL . " WHERE (DealershipCD = N'" . $this->_dealershipCD . "')"; // $psSQL = $psSQL . " AND (BukkenStateCD = 2))))"; // $psSQL = $psSQL . " GROUP BY UsedCarStockData.DealerShipCD, A.cnt"; // // $model = new Model(); // $stmt = $model->query($psSQL); // $UsedCarStockDataCnt = $stmt->fetch(); //var_dump($UsedCarStockDataCnt); $this->_psPublicCount = $UsedCarStockDataCnt->cnt; $this->_psStockCount = $UsedCarStockDataCnt->TotalCnt; // itp_drct_CommModule.asp 360 初期値いれてあるのでelse不要 if(is_null($this->_psPublicPermitCount) || $this->_psPublicPermitCount == "") $this->_psPublicPermitCount = 0; if(is_null($this->_psStockPermitCount) || $this->_psStockPermitCount == "") $this->_psStockPermitCount = 0; if(is_null($this->_psPublicCount) || $this->_psPublicCount == "") $this->_psPublicCount = 0; if(is_null($this->_psStockCount) || $this->_psStockCount == "") $this->_psStockCount = 0; if(is_null($this->_psCsOnlyFlag) || $this->_psCsOnlyFlag == "") $this->_psCsOnlyFlag = 0; $this->view->assign('moduleName',$moduleName); $this->view->assign('actionName',$actionName); $this->view->assign('controllerName',$controllerName); $this->view->assign('sideTplName',$sideTplName); $this->view->assign('cssTplName',$cssTplName); $this->view->assign('req',$req->getParams()); $this->view->assign('currentTplName', $controllerName . '/' . $controllerName . '_' . $actionName . '.tpl.html'); $this->view->assign('breadcrumbs',$this->_getBreadcrumbs()); $this->view->assign('baseUrl',$this->_config->server->host->www); $this->view->assign('config',$this->_config); //var_dump($Itp_NdAclOne); $this->view->assign('DealershipMasterOne', $DealershipMasterOne); $this->view->assign('DealershipAdditionalDataOne', $DealershipAdditionalDataOne); $this->view->assign('DealershipAdditionalData_43', $DealershipAdditionalData_43); $this->view->assign('Itp_NdAclOne', $Itp_NdAclOne); $this->view->assign('pnSystemFlag', $this->_pnSystemFlag); $this->view->assign('psSystemFlag', $this->_psSystemFlag); $this->view->assign('pnSystemGlobalCD', $this->_pnSystemGlobalCD); $this->view->assign('psLogin_StaffCode', $this->_psLogin_StaffCode); $this->view->assign('psTruckViewFlg', $this->_psTruckViewFlg); $this->view->assign('psPublicPermitCount', $this->_psPublicPermitCount); $this->view->assign('psStockPermitCount', $this->_psStockPermitCount); $this->view->assign('psPublicCount', $this->_psPublicCount); $this->view->assign('psStockCount', $this->_psStockCount); $this->view->assign('psCsOnlyFlag', $this->_psCsOnlyFlag); $this->view->assign('isSelf', $this->_isSelf); } /** * 車両の情報を取得 * */ public function setCarDetailData() { } } ?>