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 } // 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 == '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'); } // error_log(__METHOD__); // error_log(get_class($this)); // drct_CommModule.aspより // ログイン処理 $this->_auth = Zend_Auth::getInstance(); if (!$this->_auth->hasIdentity() && $controllerName != 'auth') { // ログインしていない $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}; $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より // TODO config.iniで社内直入、カリッと等のタイトル読み分け $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 = $DealershipMasterOne->{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}; // itp_drct_CommModule.asp 360 初期値いれてあるのでelse不要 if(isset($UsedCarStockDataCnt->{UsedCarStockData::COL_DEALERSHIPCD})) { $this->_psPublicCount = $UsedCarStockDataCnt->cnt; $this->_psStockCount = $UsedCarStockDataCnt->TotalCnt; } 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($this->_config); $this->view->assign('DealershipMasterOne', $DealershipMasterOne); $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); } /** * 車両の情報を取得 * */ public function setCarDetailData() { } /** * listに画像と価格を追加する * * @param unknown_type $lists * @return unknown */ public function getCarImgAndPriceData($lists) { foreach($lists as $obj) { $obj = $this->_makeDisplayImg($obj); $obj = $this->_makeDisplayStringPrice($obj); } return $lists; } /** * 画像の取得 * * @param unknown_type $obj */ protected function _makeDisplayImg($obj) { //TODO 一旦今の部分から画像を呼び出すために、URLを変えておく。 $file = ROOT_PATH . "htdocs/www/" . $this->_config->mjnet->path->ucarphoto . $UsedCarPhotoDataOne->{ImageFileData::COL_IMAGEFILECD}.".jpg"; if(file_exists ($file)){ $obj->file = 'http://'.$this->_config->mjnet->host->www . '/' . $this->_config->mjnet->path->ucarphoto . $UsedCarPhotoDataOne->{ImageFileData::COL_IMAGEFILECD}.".jpg"; }else{ $obj->file = PICPATH . $UsedCarPhotoDataOne->{ImageFileData::COL_UCARDFILENAME}.".jpg"; } return $obj; } /** * 価格内の表示を作成 * * @param unknown_type $obj */ protected function _makeDisplayStringPrice($obj) { // if(!isset($obj->{Itp_UsedCarListData::COL_PRICE})){ // throw new Exception('need param '. Itp_UsedCarListData::COL_PRICE .' is not set!'); // } // if(!isset($obj->{Itp_UsedCarListData::COL_TAXEXCLUDEDPRICE})){ // throw new Exception('need param '. Itp_UsedCarListData::COL_TAXEXCLUDEDPRICE .' is not set!'); // } // // if(!isset($obj->{Itp_BukkenState::COL_BUKKENSTATECD})){ // throw new Exception('need param '. Itp_BukkenState::COL_BUKKENSTATECD .' is not set!'); // } // 車両からとってきた。itp_zaiko_advise.aspの1250~1256行 // if (Not (IsNull(rec.Fields("Price")))) or (rec.Fields("Price") <> "") Then // PRICE=rec.Fields("Price") // HIKAZEIFLG = 0 // elseif (Not (IsNull(rec.Fields("TaxExcludedPrice")))) or (rec.Fields("TaxExcludedPrice") <> "") Then // PRICE=rec.Fields("TaxExcludedPrice") // HIKAZEIFLG = 1 // end if // MjnetCarDataListの価格を作成し、非課税のフラグを作成する。 if(isset($obj->{Itp_UsedCarListData::COL_PRICE}) || $obj->{Itp_UsedCarListData::COL_PRICE} <> ""){ $sPrice = $obj->{Itp_UsedCarListData::COL_PRICE}; $hikazeiFlg = false; }elseif(isset($obj->{Itp_UsedCarListData::COL_TAXEXCLUDEDPRICE}) || $obj->{Itp_UsedCarListData::COL_TAXEXCLUDEDPRICE} <> ""){ $sPrice = $obj->{Itp_UsedCarListData::COL_TAXEXCLUDEDPRICE}; $hikazeiFlg = true; } $sTaxMsg = ""; $sTaxMsg2 = ""; //前データ // If rec.Fields("非課税flag")=true Then // sTaxMsg = "
(非課税)" // End If // 非課税のフラグを判定し、非課税のデータならデータとして格納しておく。 if($hikazeiFlg == true){ $sTaxMsg = "(非課税)"; } //前データ // if rec.Fields("price") <> "" and rec.Fields("price") <> "0" and OTHERDATACDATE >= TOUROKUDAY then // if rec.Fields("price")=99999 then // sPrice2="売約済" // else // if rec.Fields("価格") = "-1" then // sPrice2="ASK" // else // sPrice2=CStr(CDbl(rec.Fields("価格") / 10)) // end if // end if // if rec.Fields("price")=99998 then // sPrice2=sPrice2 & "
(商談中)" // end if // sPrice2=sPrice2 & sTaxMsg // else // if rec.Fields("SoldFlag")=0 then // if rec.Fields("価格") = "-1" then // sPrice2="ASK" // else // sPrice2=CStr(CDbl(rec.Fields("価格") / 10)) // end if // else // sPrice2="売約済" // end if // end if //aArgument = "itp_zaiko_youtube.asp?dealerid=" & DEALERID & "&id=" & DATAID & "&usedcarcd=" & BUKKENID & "&aproved=&list_cnt=" & sList_cnt & "&pictup=1&order=" & oValue //価格内の表示を作成。 //現在はItp_BukkenStateに変更し、ID重複が起きないため最後の判定を省いております。 if($obj->{Itp_BukkenState::COL_BUKKENSTATECD} <> "" && $obj->{Itp_BukkenState::COL_BUKKENSTATECD} <> "0"){ //売約済みかの判定はdbo.otherdata.price=99999で行っていたが、BukkenStateCD=2と同じ if($obj->{Itp_BukkenState::COL_BUKKENSTATECD} == "2"){ $sPrice2 = '売約済'; $obj->sSortBase_Price = 99999999; }else{ if($sPrice == '-1'){ $sPrice2 = 'ASK'; $obj->sSortBase_Price = 99999998; }else{ $sPrice2 = round($sPrice / 10,1).'万円'; $obj->sSortBase_Price = $sPrice; } } //商談中の判定はdbo.otherdata.price=99998で行っていたが、BukkenStateCD=3と同じ if($obj->{Itp_BukkenState::COL_BUKKENSTATECD} == "3"){ $sTaxMsg2 = $sTaxMsg2 . "(商談中)"; } // sPrice2=sPrice2 & sTaxMsg はsTaxMsgがすでにhtmlとして分かれているため、必要ない。 }else{ if($obj->{Itp_BukkenState::COL_BUKKENSTATECD} <> "2"){ if($sPrice == '-1'){ $sPrice2 = 'ASK'; $obj->sSortBase_Price = 99999998; }else{ $sPrice2 = round($sPrice / 10,1).'万円'; $obj->sSortBase_Price = $sPrice; } }else{ $sPrice2 = '売約済'; $obj->sSortBase_Price = 99999999; } } $obj->sPreparedHikazeiFlg = $hikazeiFlg; $obj->sPreparedPrice = $sPrice; $obj->sPrice2 = $sPrice2; $obj->sTaxMsg = $sTaxMsg2 . $sTaxMsg; // aArgument は使用していないため、いらない。 return $obj; } protected function _makeDisplayStringModelYear($obj) { $obj->sPreparedModelYear = ''; // Itp_UsedCarListData::COL_BRANDCDが2000番以上が輸入車 2000番以下は国産車 if((int)$obj->{Itp_UsedCarListData::COL_BRANDCD} > 1999 && $obj->{Itp_UsedCarListData::COL_BRANDCD} != "") { $obj->sPreparedModelYear = $obj->{Itp_UsedCarListData::COL_MODELYEAR}; }else{ $obj->sPreparedModelYear = $obj->{Itp_UsedCarListData::COL_YEAR_JP}; } return $obj; } protected function _makeDisplayStringColorChg($obj) { if($obj->{Itp_UsedCarListData::COL_COLORCHGFLAG} == '1'){ $obj->sPreparedColorChgName = "(色替)"; }else{ $obj->sPreparedColorChgName = ""; } return $obj; } protected function _makeDisplayStringShaken($obj) { if($obj->{Itp_UsedCarListData::COL_SAFETYCHEK_MONTH} == '0'){ if($obj->{Itp_UsedCarListData::COL_SAFETYCHEK_YEAR} == '0'){ if($obj->{Itp_UsedCarListData::COL_SAFTY_TYPE} == '1'){ $obj->sPreparedSyaken = '車整付'; }elseif($obj->{Itp_UsedCarListData::COL_SAFTY_TYPE} == '2'){ $obj->sPreparedSyaken = '車整別'; }elseif($obj->{Itp_UsedCarListData::COL_SAFTY_TYPE} == '3'){ $obj->sPreparedSyaken = '車整無'; }elseif($obj->{Itp_UsedCarListData::COL_SAFTY_TYPE} == '4'){ $obj->sPreparedSyaken = '国内未'; }elseif($obj->{Itp_UsedCarListData::COL_SAFTY_TYPE} == '5'){ $obj->sPreparedSyaken = '新車未'; }else{ $obj->sPreparedSyaken = '検無'; } }elseif($obj->{Itp_UsedCarListData::COL_SAFETYCHEK_YEAR} == '12'){ $obj->sPreparedSyaken = '検1付'; }elseif($obj->{Itp_UsedCarListData::COL_SAFETYCHEK_YEAR} == '24'){ $obj->sPreparedSyaken = '検2付'; }elseif($obj->{Itp_UsedCarListData::COL_SAFETYCHEK_YEAR} == '36'){ $obj->sPreparedSyaken = '検3付'; } }else{ if(isset($obj->{Itp_UsedCarListData::COL_SAFETYCHEK_YEAR}) && $obj->{Itp_UsedCarListData::COL_SAFETYCHEK_YEAR} != ""){ $obj->sPreparedSyaken = $obj->{Itp_UsedCarListData::COL_WAREKI} . "/" . $obj->{Itp_UsedCarListData::COL_SAFETYCHEK_MONTH}; } } return $obj; } protected function _setStyleListBgColor($obj) { /* // Select Case CInt(pRs.Fields("UsedCarState").Value) // Case 1 // '---公開[Mjネット更新済] // sMsg = "[公開]" // if DataType = "3" then 'トラックデータ // if pRs.Fields("UsedTruckGenreMasterID").Value = "0" or ISNULL(pRs.Fields("UsedTruckGenreMasterID").Value) then // '---非公開[Mjネット削除済] // sLineWriteColor = sLineColor(0, lCount mod 2) // sMsg = "トラック非公開" // end if // end if // Case 0 // '---非公開[Mjネット削除済] // sLineWriteColor = sLineColor(0, lCount mod 2) // sMsg = "非公開" // Case -1 // '---削除[Mjネット削除済] // sLineWriteColor = sLineColor(2, lCount mod 2) // sMsg = "削除" // Case 3 // '---削除[Mjネット削除済] // sLineWriteColor = sLineColor(4, lCount mod 2) // sMsg = "一時保存" // Case Else // '---その他[通常なし] // sLineWriteColor = sLineColor(2, lCount mod 2) // End select //'---公開待----(黄色系) //sLineColor(0,0) = "#FDF5E6" //sLineColor(0,1) = "#FDF5E6" //sLineColor(0,2) = "" //'---公開済(車輌)----(青系) //sLineColor(1,0) = "#F0FFFF" //sLineColor(1,1) = "#F0F8FF" //sLineColor(1,2) = "" //'---削除済---(グレー系) //sLineColor(2,0) = "#DCDCDC" //sLineColor(2,1) = "#D3D3D3" //sLineColor(2,2) = "" //'---公開済(トラック)----(緑系) //sLineColor(3,0) = "#66ddcc" //sLineColor(3,1) = "#66dd99" //sLineColor(3,2) = "" //'---一時保存----(ピンク系) //sLineColor(4,0) = "#FF99CC" //sLineColor(4,1) = "#FF99CC" //sLineColor(4,2) = "" */ if($obj->{Itp_UsedCarListData::COL_DATATYPE} == '3'){//'トラックデータ $obj->sPreparedListClassNm = "green"; }else{//'車輌、パーツデータ $obj->sPreparedListClassNm = "blue"; } if($obj->{Itp_UsedCarListData::COL_USEDCARSTATE} == '1'){ $obj->sPreparedCarStateNm = "公開"; $obj->sPreparedCarClassNm = "runIco"; if ($obj->{Itp_UsedCarListData::COL_DATATYPE} == "3" ){ if ($obj->{Itp_UsedCarListData::COL_USEDTRUCKGENREMASTERID} == "0" || !isset($obj->{Itp_UsedCarListData::COL_USEDTRUCKGENREMASTERID}) ){ // '---非公開[Mjネット削除済] // sLineWriteColor = sLineColor(0, lCount mod 2) $obj->sPreparedCarStateNm = "トラック非公開"; $obj->sPreparedCarClassNm = ""; $obj->sPreparedListClassNm = "yellow"; } } }elseif($obj->{Itp_UsedCarListData::COL_USEDCARSTATE} == '0'){ $obj->sPreparedCarStateNm = "非公開"; $obj->sPreparedCarClassNm = "xIco"; $obj->sPreparedListClassNm = "yellow"; }elseif($obj->{Itp_UsedCarListData::COL_USEDCARSTATE} == '-1'){ $obj->sPreparedCarStateNm = "削除"; $obj->sPreparedCarClassNm = ""; $obj->sPreparedListClassNm = "grey"; }elseif($obj->{Itp_UsedCarListData::COL_USEDCARSTATE} == '3'){ $obj->sPreparedCarStateNm = "一時保存"; $obj->sPreparedCarClassNm = "tempIco"; $obj->sPreparedListClassNm = "pink"; }else{ } //'=====Mjネット更新処理状態の設定[上記公開状態に上書き]=============== If($pnCorporatCD == 0) { if($obj->{Itp_UsedCarListData::COL_DATAUPDATESTATE} == 0) { //'--処理完了[状態変更なし] }elseif($obj->{Itp_UsedCarListData::COL_DATAUPDATESTATE} == 3){ //'---更新待ち状態 $obj->sPreparedCarStateNm = $obj->sPreparedCarStateNm & "
更新待"; }elseif($obj->{Itp_UsedCarListData::COL_DATAUPDATESTATE} == 5){ $obj->sPreparedCarClassNm = "xIco"; $obj->sPreparedCarStateNm = '承認待'; $obj->sPreparedListClassNm = "yellow"; } } return $obj; } protected function _makeDisplayStringPriceList($obj) { if ($obj->{Itp_UsedCarListData::COL_PRICE} != "-1" ){ $obj->sPreparedPrice = round($obj->{Itp_UsedCarListData::COL_PRICE} / 10,1); } if ($obj->{Itp_UsedCarListData::COL_TOTALPRICE} == "-1"){ $obj->sPreparedTotalPrice = "ASK"; }elseif( $obj->{Itp_UsedCarListData::COL_TOTALPRICE} != "" && $obj->{Itp_UsedCarListData::COL_TOTALPRICE} != "0"){ $obj->sPreparedTotalPrice = round($obj->{Itp_UsedCarListData::COL_TOTALPRICE} / 10,1); }else{ $obj->sPreparedTotalPrice = "-"; } return $obj; } /** * UsedCarCDの新規生成 * * @return string {DealershipCD}_{YmdHis} */ protected function _genUsedCarCD() { $date = new DateTime(); //sDataID = psLogin_DealrShipCode & "_" & right("000" & Year(Now),4) & right("00" & Month(Now),2) & right("00" & Day(Now),2) & right("00" & hour(Now),2) & right("00" & minute(Now),2) & right("00" & second(now),2) return $this->_dealershipCD . "_" . $date->format('YmdHis'); } /** * ImageFileCDの新規生成 * * @return string {Ymd}_{His}_{psLogin_StaffCode} */ protected function _genImageFileCD() { $date = new DateTime(); //'--- 年月日(8) + 時分秒(6) + スタッフコード(10) ----(24桁) //sImageFileCD = Right("00" & Year(Now),4) & Right("0" & Month(Now),2) & Right("0" & Day(Now),2) & "_" & Right("0" & hour(Now),2) & Right("0" & minute(Now),2) & Right("0" & second(now),2) & "_" & psLogin_StaffCode $microtime = substr(microtime(),0,8); return $date->format('Ymd') . '_' . $date->format('His') . '_' . $microtime . '_' . $this->_psLogin_StaffCode; } /** * パンくずリストとタイトルの生成 * * @return string */ protected function _getBreadcrumbs() { $pages = array( 'title' => 'セルフTOP', 'label' => 'セルフTOP', 'module' => 'front', 'controller' => 'index', 'action' => 'index', 'pages' => array( array( 'title' => '車両インデックス', 'label' => '車両インデックス', 'module' => 'front', 'controller' => 'ucar', 'action' => 'index'), array( 'title' => '車両リスト', 'label' => '車両リスト', 'module' => 'front', 'controller' => 'ucar', 'action' => 'list'), array( 'title' => '車両入力・更新', 'label' => '車両入力・更新', 'module' => 'front', 'controller' => 'ucarin', 'action' => 'update'), array( 'title' => 'トラック入力・更新', 'label' => 'トラック入力・更新', 'module' => 'front', 'controller' => 'truckin', 'action' => 'update'), ) ); $container = new Zend_Navigation(); $this->view->navigation($container); $container->addPage($pages); $html = ''; if ($active = $this->view->navigation()->breadcrumbs()->findActive($container)) { $active = $active['page']; if ($this->view->navigation()->breadcrumbs()->getLinkLast()) { $html = '
  • ' . $this->view->navigation()->breadcrumbs()->htmlify($active) . '
  • ' . PHP_EOL; } else { $html = $active->getLabel(); //if ($this->breadcrumbs()->getUseTranslator() && $t = $this->breadcrumbs()->getTranslator()) { //$html = $t->translate($html); //} $html = '
  • ' . $this->view->escape($html) . '
  • ' . PHP_EOL; } $this->view->assign('title',$active->getTitle()); // walk back to root error_log($active->getTitle()); while (($parent = $active->getParent()) != null) { if ($parent instanceof Zend_Navigation_Page) { // prepend crumb to html $html = '
  • ' . $this->view->navigation()->breadcrumbs()->htmlify($parent) . '
  • ' . PHP_EOL . $html; } if ($parent === $container) { // at the root of the given container break; } $active = $parent; } } //$this->view->assign('breadcrumbs',$this->view->navigation()->breadcrumbs()->renderStraight()); return $html; } protected function _setCountUpNextStockNo($DealerShipCD, $currentStockNo , $loopCnt=0) { // COL_NEXTSTOCKNOを繰り上げ null or 0も (int)で強制的に0にする $no = (int)$currentStockNo + 1; // 999以上は再利用 if($no > 999) { $no = 1; } // UsedCarStockData で既に使われていないか確認 $UsedCarStockData = new UsedCarStockData(); $where_stock_data = array( UsedCarStockData::COL_DEALERSHIPCD => $DealerShipCD, UsedCarStockData::COL_STOCKNO => $no ); $UsedCarStockDataOne = $UsedCarStockData->findOne($where_stock_data); if(isset($UsedCarStockDataOne->{UsedCarStockData::COL_USEDCARCD})) { // 使用済み // 1カウントアップ $no++; $loopCnt++; // 再帰的に呼び出し if($loopCnt > 999) throw new Exception(); $this->_setCountUpNextStockNo($DealerShipCD, $no, $loopCnt); }else{ // 未使用 // TODO 空き番号の取得(UCARdUseStockNumber)から ニューズライン(くるまる)と仕様の差があり $DealershipMaster = new DealershipMaster(); // ----次に使用できる登録番号を販売店マスタに書き込む-------------- $data_dealer = array( DealershipMaster::COL_NEXTSTOCKNO => $no, DealershipMaster::COL_DEALERSHIPCD => $DealerShipCD, ); $DealershipMaster->updateFromPostRequest($data_dealer, $where); } } } ?>