Changeset 20171
- Timestamp:
- 2011/02/16 14:12:30 (13 years ago)
- Location:
- branches/version-2_5-dev/data/class
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/class/helper/SC_Helper_DB.php
r20167 r20171 138 138 * 139 139 * @param boolean $force 強制的にDB取得するか 140 * @param string $col 取得カラムを指定する 140 141 * @return array 店舗基本情報の配列 141 142 */ 142 function sfGetBasisData($force = false ) {143 function sfGetBasisData($force = false, $col = "") { 143 144 static $data; 144 145 145 146 if ($force || !isset($data)) { 146 147 $objQuery =& SC_Query::getSingletonInstance(); 147 $arrRet = $objQuery->select('*', 'dtb_baseinfo'); 148 149 if ($col === "") { 150 $arrRet = $objQuery->select('*', 'dtb_baseinfo'); 151 } else { 152 $arrRet = $objQuery->select($col, "dtb_baseinfo"); 153 } 148 154 149 155 if (isset($arrRet[0])) { … … 153 159 } 154 160 } 155 156 161 return $data; 157 162 } 163 164 /** 165 * 基本情報の登録数を取得する 166 * 167 * @return int 168 */ 169 function sfGetBasisCount() { 170 $objQuery =& SC_Query::getSingletonInstance(); 171 172 return $objQuery->count("dtb_baseinfo"); 173 } 174 158 175 159 176 /* 選択中のアイテムのルートカテゴリIDを取得する */ -
branches/version-2_5-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis.php
r20168 r20171 84 84 SC_Utils_Ex::sfIsSuccess($objSess); 85 85 86 $cnt = $this->lfGetBaseInfoCount(); 87 86 $objDb = new SC_Helper_DB_Ex(); 87 88 $cnt = $objDb->sfGetBasisCount(); 88 89 if ($cnt > 0) { 89 90 $this->tpl_mode = "update"; … … 123 124 $arrCol = $this->lfGetCol(); 124 125 $col = SC_Utils_Ex::sfGetCommaList($arrCol); 125 $arrRet = $ this->lfGetBaseInfoData($col);126 $this->arrForm = $arrRet [0];126 $arrRet = $objDb->sfGetBasisData(true, $col); 127 $this->arrForm = $arrRet; 127 128 128 129 $regular_holiday_ids = explode('|', $this->arrForm['regular_holiday_ids']); … … 139 140 function destroy() { 140 141 parent::destroy(); 141 }142 143 /**144 * 基本情報の登録数を取得する145 *146 * @return int147 */148 function lfGetBaseInfoCount() {149 $objQuery =& SC_Query::getSingletonInstance();150 151 return $objQuery->count("dtb_baseinfo");152 }153 154 /**155 * 基本情報のデータを取得する156 *157 * @return array158 */159 function lfGetBaseInfoData($col) {160 $objQuery =& SC_Query::getSingletonInstance();161 162 return $objQuery->select($col, "dtb_baseinfo");163 142 } 164 143 -
branches/version-2_5-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_Point.php
r20168 r20171 77 77 SC_Utils_Ex::sfIsSuccess($objSess); 78 78 79 $objDb = new SC_Helper_DB_Ex(); 80 79 81 // パラメータ管理クラス 80 82 $this->objFormParam = new SC_FormParam(); … … 84 86 $this->objFormParam->setParam($_POST); 85 87 86 $cnt = $ this->lfGetBaseInfoCount();88 $cnt = $objDb->sfGetBasisCount(); 87 89 if ($cnt > 0) { 88 90 $this->tpl_mode = "update"; … … 114 116 $arrCol = $this->objFormParam->getKeyList(); // キー名一覧を取得 115 117 $col = SC_Utils_Ex::sfGetCommaList($arrCol); 116 $arrRet = $ this->lfGetBaseInfoData($col);117 $this->objFormParam->setParam($arrRet [0]);118 $arrRet = $objDb->sfGetBasisData(true, $col); 119 $this->objFormParam->setParam($arrRet); 118 120 } 119 121 … … 128 130 function destroy() { 129 131 parent::destroy(); 130 }131 132 /**133 * 基本情報の登録数を取得する134 *135 * @return int136 */137 function lfGetBaseInfoCount() {138 $objQuery =& SC_Query::getSingletonInstance();139 140 return $objQuery->count("dtb_baseinfo");141 }142 143 /**144 * 基本情報のデータを取得する145 *146 * @return array147 */148 function lfGetBaseInfoData($col) {149 $objQuery =& SC_Query::getSingletonInstance();150 151 return $objQuery->select($col, "dtb_baseinfo");152 132 } 153 133 -
branches/version-2_5-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_Tradelaw.php
r20168 r20171 80 80 SC_Utils_Ex::sfIsSuccess($objSess); 81 81 82 $objDb = new SC_Helper_DB_Ex(); 83 82 84 // パラメータ管理クラス 83 85 $this->objFormParam = new SC_FormParam(); … … 87 89 $this->objFormParam->setParam($_POST); 88 90 89 $cnt = $this->lfGetBaseInfoCount(); 90 91 $cnt = $objDb->sfGetBasisCount(); 91 92 if ($cnt > 0) { 92 93 $this->tpl_mode = "update"; … … 118 119 $arrCol = $this->objFormParam->getKeyList(); // キー名一覧を取得 119 120 $col = SC_Utils_Ex::sfGetCommaList($arrCol); 120 $arrRet = $ this->lfGetBaseInfoData($col);121 $this->objFormParam->setParam($arrRet [0]);121 $arrRet = $objDb->sfGetBasisData(true, $col); 122 $this->objFormParam->setParam($arrRet); 122 123 } 123 124 … … 132 133 function destroy() { 133 134 parent::destroy(); 134 }135 136 /**137 * 基本情報の登録数を取得する138 *139 * @return int140 */141 function lfGetBaseInfoCount() {142 $objQuery =& SC_Query::getSingletonInstance();143 144 return $objQuery->count("dtb_baseinfo");145 }146 147 /**148 * 基本情報のデータを取得する149 *150 * @return array151 */152 function lfGetBaseInfoData($col) {153 $objQuery =& SC_Query::getSingletonInstance();154 155 return $objQuery->select($col, "dtb_baseinfo");156 135 } 157 136
Note: See TracChangeset
for help on using the changeset viewer.