Changeset 20168
- Timestamp:
- 2011/02/15 17:31:03 (13 years ago)
- Location:
- branches/version-2_5-dev/data/class/pages/admin/basis
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis.php
r20166 r20168 80 80 function action() { 81 81 $objSess = new SC_Session(); 82 $objQuery =& SC_Query::getSingletonInstance();83 82 84 83 // 認証可否の判定 85 84 SC_Utils_Ex::sfIsSuccess($objSess); 86 85 87 $cnt = $ objQuery->count("dtb_baseinfo");86 $cnt = $this->lfGetBaseInfoCount(); 88 87 89 88 if ($cnt > 0) { … … 123 122 } else { 124 123 $arrCol = $this->lfGetCol(); 125 $col 126 $arrRet = $ objQuery->select($col, "dtb_baseinfo");124 $col = SC_Utils_Ex::sfGetCommaList($arrCol); 125 $arrRet = $this->lfGetBaseInfoData($col); 127 126 $this->arrForm = $arrRet[0]; 128 127 … … 140 139 function destroy() { 141 140 parent::destroy(); 141 } 142 143 /** 144 * 基本情報の登録数を取得する 145 * 146 * @return int 147 */ 148 function lfGetBaseInfoCount() { 149 $objQuery =& SC_Query::getSingletonInstance(); 150 151 return $objQuery->count("dtb_baseinfo"); 152 } 153 154 /** 155 * 基本情報のデータを取得する 156 * 157 * @return array 158 */ 159 function lfGetBaseInfoData($col) { 160 $objQuery =& SC_Query::getSingletonInstance(); 161 162 return $objQuery->select($col, "dtb_baseinfo"); 142 163 } 143 164 -
branches/version-2_5-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_Delivery.php
r20164 r20168 71 71 function action() { 72 72 $objSess = new SC_Session(); 73 $objQuery =& SC_Query::getSingletonInstance();74 73 $objDb = new SC_Helper_DB_Ex(); 75 74 … … 95 94 } 96 95 97 // 配送業者一覧の取得 96 $this->arrDelivList = $this->lfGetDelivList(); 97 } 98 99 /** 100 * 配送業者一覧の取得 101 * 102 * @return array 103 */ 104 function lfGetDelivList() { 105 $objQuery =& SC_Query::getSingletonInstance(); 106 98 107 $col = "deliv_id, name, service_name"; 99 108 $where = "del_flg = 0"; 100 109 $table = "dtb_deliv"; 101 110 $objQuery->setOrder("rank DESC"); 102 $this->arrDelivList = $objQuery->select($col, $table, $where); 111 112 return $objQuery->select($col, $table, $where); 103 113 } 104 114 -
branches/version-2_5-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_Holiday.php
r20164 r20168 68 68 function action() { 69 69 $objSess = new SC_Session(); 70 $objQuery =& SC_Query::getSingletonInstance();71 70 $objDb = new SC_Helper_DB_Ex(); 72 71 … … 110 109 // 編集前処理 111 110 case 'pre_edit': 112 // 編集項目を DBより取得する。113 $ where = "holiday_id = ?";114 $arrRet = $objQuery->select("title, month, day", "dtb_holiday", $where, array($_POST['holiday_id'])); 111 // 編集項目を取得する。 112 $arrHolidayData = $this->lfGetHolidayDataByHolidayID($_POST['holiday_id']); 113 115 114 // 入力項目にカテゴリ名を入力する。 116 $this->arrForm['title'] = $arr Ret[0]['title'];117 $this->arrForm['month'] = $arr Ret[0]['month'];118 $this->arrForm['day'] = $arr Ret[0]['day'];115 $this->arrForm['title'] = $arrHolidayData[0]['title']; 116 $this->arrForm['month'] = $arrHolidayData[0]['month']; 117 $this->arrForm['day'] = $arrHolidayData[0]['day']; 119 118 // POSTデータを引き継ぐ 120 119 $this->tpl_holiday_id = $_POST['holiday_id']; … … 134 133 } 135 134 136 // 規格の読込 135 $this->arrHoliday = $this->lfGetHolidayList(); 136 } 137 138 /** 139 * デストラクタ. 140 * 141 * @return void 142 */ 143 function destroy() { 144 parent::destroy(); 145 } 146 147 function lfGetHolidayDataByHolidayID($holiday_id) { 148 $objQuery =& SC_Query::getSingletonInstance(); 149 150 $where = "holiday_id = ?"; 151 return $objQuery->select("title, month, day", "dtb_holiday", $where, array($holiday_id)); 152 } 153 154 function lfGetHolidayList() { 155 $objQuery =& SC_Query::getSingletonInstance(); 156 137 157 $where = "del_flg <> 1"; 138 158 $objQuery->setOrder("rank DESC"); 139 $this->arrHoliday = $objQuery->select("holiday_id, title, month, day", "dtb_holiday", $where); 140 } 141 142 /** 143 * デストラクタ. 144 * 145 * @return void 146 */ 147 function destroy() { 148 parent::destroy(); 159 return $objQuery->select("holiday_id, title, month, day", "dtb_holiday", $where); 149 160 } 150 161 -
branches/version-2_5-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_Kiyaku.php
r20164 r20168 68 68 function action() { 69 69 $objSess = new SC_Session(); 70 $objQuery =& SC_Query::getSingletonInstance();71 70 $objDb = new SC_Helper_DB_Ex(); 72 71 … … 106 105 // 編集前処理 107 106 case 'pre_edit': 108 // 編集項目を DBより取得する。109 $ where = "kiyaku_id = ?";110 $arrRet = $objQuery->select("kiyaku_text, kiyaku_title", "dtb_kiyaku", $where, array($_POST['kiyaku_id'])); 107 // 編集項目を取得する。 108 $arrKiyakuData = $this->lfGetKiyakuDataByKiyakuID($_POST['kiyaku_id']); 109 111 110 // 入力項目にカテゴリ名を入力する。 112 $this->arrForm['kiyaku_title'] = $arr Ret[0]['kiyaku_title'];113 $this->arrForm['kiyaku_text'] = $arr Ret[0]['kiyaku_text'];111 $this->arrForm['kiyaku_title'] = $arrKiyakuData[0]['kiyaku_title']; 112 $this->arrForm['kiyaku_text'] = $arrKiyakuData[0]['kiyaku_text']; 114 113 // POSTデータを引き継ぐ 115 114 $this->tpl_kiyaku_id = $_POST['kiyaku_id']; … … 129 128 } 130 129 131 // 規格の読込 132 $where = "del_flg <> 1"; 133 $objQuery->setOrder("rank DESC"); 134 $this->arrKiyaku = $objQuery->select("kiyaku_title, kiyaku_text, kiyaku_id", "dtb_kiyaku", $where); 130 $this->arrKiyaku = $this->lfGetKiyakuList(); 135 131 } 136 132 … … 158 154 $ret = $objQuery->insert("dtb_kiyaku", $sqlval); 159 155 return $ret; 156 } 157 158 function lfGetKiyakuDataByKiyakuID($kiyaku_id) { 159 $objQuery =& SC_Query::getSingletonInstance(); 160 161 $where = "kiyaku_id = ?"; 162 return $objQuery->select("kiyaku_text, kiyaku_title", "dtb_kiyaku", $where, array($kiyaku_id)); 163 } 164 165 function lfGetKiyakuList() { 166 $objQuery =& SC_Query::getSingletonInstance(); 167 168 $where = "del_flg <> 1"; 169 $objQuery->setOrder("rank DESC"); 170 return $objQuery->select("kiyaku_title, kiyaku_text, kiyaku_id", "dtb_kiyaku", $where); 160 171 } 161 172 -
branches/version-2_5-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_Mail.php
r20164 r20168 67 67 */ 68 68 function action() { 69 $objQuery =& SC_Query::getSingletonInstance(); 69 70 70 $objSess = new SC_Session(); 71 71 $masterData = new SC_DB_MasterData_Ex(); … … 81 81 82 82 if ( SC_Utils_Ex::sfCheckNumLength( $_POST['template_id']) ){ 83 $sql = "SELECT * FROM dtb_mailtemplate WHERE template_id = ?"; 84 $result = $objQuery->getAll($sql, array($_POST['template_id']) ); 83 $result = $this->lfGetMailTemplateByTemplateID($_POST['template_id']); 85 84 if ( $result ){ 86 85 $this->arrForm = $result[0]; … … 103 102 } else { 104 103 // 正常 105 $this->lfRegist($ objQuery, $this->arrForm);104 $this->lfRegist($this->arrForm); 106 105 107 106 // 完了メッセージ … … 125 124 } 126 125 127 function lfRegist(&$objQuery, $data ){ 126 function lfGetMailTemplateByTemplateID($template_id) { 127 $objQuery =& SC_Query::getSingletonInstance(); 128 129 $sql = "SELECT * FROM dtb_mailtemplate WHERE template_id = ?"; 130 return $objQuery->getAll($sql, array($template_id) ); 131 } 132 133 function lfRegist($data ){ 134 $objQuery =& SC_Query::getSingletonInstance(); 128 135 129 136 $data['creator_id'] = $_SESSION['member_id']; -
branches/version-2_5-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_Point.php
r20166 r20168 73 73 function action() { 74 74 $objSess = new SC_Session(); 75 $objQuery =& SC_Query::getSingletonInstance();76 75 77 76 // 認証可否の判定 … … 85 84 $this->objFormParam->setParam($_POST); 86 85 87 $cnt = $objQuery->count("dtb_baseinfo"); 88 86 $cnt = $this->lfGetBaseInfoCount(); 89 87 if ($cnt > 0) { 90 88 $this->tpl_mode = "update"; … … 116 114 $arrCol = $this->objFormParam->getKeyList(); // キー名一覧を取得 117 115 $col = SC_Utils_Ex::sfGetCommaList($arrCol); 118 // DB値の取得 119 $arrRet = $objQuery->select($col, "dtb_baseinfo"); 116 $arrRet = $this->lfGetBaseInfoData($col); 120 117 $this->objFormParam->setParam($arrRet[0]); 121 118 } … … 131 128 function destroy() { 132 129 parent::destroy(); 130 } 131 132 /** 133 * 基本情報の登録数を取得する 134 * 135 * @return int 136 */ 137 function lfGetBaseInfoCount() { 138 $objQuery =& SC_Query::getSingletonInstance(); 139 140 return $objQuery->count("dtb_baseinfo"); 141 } 142 143 /** 144 * 基本情報のデータを取得する 145 * 146 * @return array 147 */ 148 function lfGetBaseInfoData($col) { 149 $objQuery =& SC_Query::getSingletonInstance(); 150 151 return $objQuery->select($col, "dtb_baseinfo"); 133 152 } 134 153 -
branches/version-2_5-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_Tradelaw.php
r20166 r20168 76 76 function action() { 77 77 $objSess = new SC_Session(); 78 $objQuery =& SC_Query::getSingletonInstance();79 78 80 79 // 認証可否の判定 … … 88 87 $this->objFormParam->setParam($_POST); 89 88 90 $cnt = $ objQuery->count("dtb_baseinfo");89 $cnt = $this->lfGetBaseInfoCount(); 91 90 92 91 if ($cnt > 0) { … … 119 118 $arrCol = $this->objFormParam->getKeyList(); // キー名一覧を取得 120 119 $col = SC_Utils_Ex::sfGetCommaList($arrCol); 121 // DB値の取得 122 $arrRet = $objQuery->select($col, "dtb_baseinfo"); 120 $arrRet = $this->lfGetBaseInfoData($col); 123 121 $this->objFormParam->setParam($arrRet[0]); 124 122 } … … 134 132 function destroy() { 135 133 parent::destroy(); 134 } 135 136 /** 137 * 基本情報の登録数を取得する 138 * 139 * @return int 140 */ 141 function lfGetBaseInfoCount() { 142 $objQuery =& SC_Query::getSingletonInstance(); 143 144 return $objQuery->count("dtb_baseinfo"); 145 } 146 147 /** 148 * 基本情報のデータを取得する 149 * 150 * @return array 151 */ 152 function lfGetBaseInfoData($col) { 153 $objQuery =& SC_Query::getSingletonInstance(); 154 155 return $objQuery->select($col, "dtb_baseinfo"); 136 156 } 137 157 -
branches/version-2_5-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_ZipInstall.php
r20164 r20168 90 90 */ 91 91 function action() { 92 $objQuery =& SC_Query::getSingletonInstance();93 92 94 93 SC_Utils_Ex::sfIsSuccess(new SC_Session); … … 110 109 // 自動登録 111 110 case 'auto': 112 $objQuery->begin(); 113 $objQuery->delete('mtb_zip'); 114 $this->insertMtbZip(); 115 $objQuery->commit(); 111 $this->lfAutoCommit(); 116 112 break; 117 113 // 手動登録 … … 126 122 // 手動削除 127 123 case 'delete': 128 $ objQuery->delete('mtb_zip');124 $this->lfDeleteZip(); 129 125 130 126 // 進捗・完了画面を表示しない … … 145 141 function destroy() { 146 142 parent::destroy(); 143 } 144 145 function lfAutoCommit() { 146 $objQuery =& SC_Query::getSingletonInstance(); 147 148 $objQuery->begin(); 149 $objQuery->delete('mtb_zip'); 150 $this->insertMtbZip(); 151 $objQuery->commit(); 152 } 153 154 function lfDeleteZip() { 155 $objQuery =& SC_Query::getSingletonInstance(); 156 157 $objQuery->delete('mtb_zip'); 147 158 } 148 159
Note: See TracChangeset
for help on using the changeset viewer.