- Timestamp:
- 2012/02/06 11:05:15 (14 years ago)
- Location:
- branches/version-2_12-dev/data/class/pages/admin/contents
- Files:
-
- 7 edited
-
LC_Page_Admin_Contents.php (modified) (4 diffs)
-
LC_Page_Admin_Contents_CSV.php (modified) (4 diffs)
-
LC_Page_Admin_Contents_CsvSql.php (modified) (16 diffs)
-
LC_Page_Admin_Contents_FileManager.php (modified) (7 diffs)
-
LC_Page_Admin_Contents_FileView.php (modified) (1 diff)
-
LC_Page_Admin_Contents_Recommend.php (modified) (3 diffs)
-
LC_Page_Admin_Contents_RecommendSearch.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/pages/admin/contents/LC_Page_Admin_Contents.php
r21420 r21441 137 137 //---- 指定表示順位移動 138 138 $input_pos = $this->getPostRank($news_id); 139 if (SC_Utils_Ex::sfIsInt($input_pos)) {139 if (SC_Utils_Ex::sfIsInt($input_pos)) { 140 140 $objDb->sfMoveRank("dtb_news", "news_id", $news_id, $input_pos); 141 141 $this->objDisplay->reload(); … … 250 250 */ 251 251 function checkLinkMethod($link_method){ 252 if (strlen($link_method) == 0){252 if (strlen($link_method) == 0) { 253 253 $link_method = 1; 254 254 } … … 265 265 $table = 'dtb_news'; 266 266 $order = 'rank DESC'; 267 if (strlen($news_id) == 0){267 if (strlen($news_id) == 0) { 268 268 $where = 'del_flg = 0'; 269 269 $arrval = array(); 270 } else{270 } else { 271 271 $where = 'del_flg = 0 AND news_id = ?'; 272 272 $arrval = array($news_id); … … 343 343 */ 344 344 function getPostRank($news_id){ 345 if (strlen($news_id) > 0 && is_numeric($news_id) == true){345 if (strlen($news_id) > 0 && is_numeric($news_id) == true) { 346 346 $key = "pos-".$news_id; 347 347 $input_pos = $_POST[$key]; -
branches/version-2_12-dev/data/class/pages/admin/contents/LC_Page_Admin_Contents_CSV.php
r21420 r21441 89 89 // 入力パラメーターチェック 90 90 $this->arrErr = $objFormParam->checkError(); 91 if (SC_Utils_Ex::isBlank($this->arrErr)) {91 if (SC_Utils_Ex::isBlank($this->arrErr)) { 92 92 // 更新 93 93 $this->tpl_is_update = $this->lfUpdCsvOutput($this->tpl_csv_id, $objFormParam->getValue('output_list')); … … 132 132 function lfGetCSVColumn($csv_id, $csv_status_flg = '', $order ='rank, no') { 133 133 $objCSV = new SC_Helper_CSV_Ex(); 134 if (SC_Utils_Ex::sfIsInt($csv_id)) {135 if ($csv_status_flg !="") {134 if (SC_Utils_Ex::sfIsInt($csv_id)) { 135 if ($csv_status_flg !="") { 136 136 $arrData = $objCSV->sfGetCsvOutput($csv_id, 'status = ?' , array($csv_status_flg), $order); 137 } else{137 } else { 138 138 $arrData = $objCSV->sfGetCsvOutput($csv_id, '', array(), $order); 139 139 } 140 140 $arrData = SC_Utils_Ex::sfSwapArray($arrData); 141 } else{141 } else { 142 142 $arrData = array(); 143 143 } … … 194 194 $arrKey = array_keys($objCSV->arrSubnavi,$subno_csv); 195 195 $csv_id = $arrKey[0]; 196 if (!SC_Utils_Ex::sfIsInt($csv_id)) {196 if (!SC_Utils_Ex::sfIsInt($csv_id)) { 197 197 //初期値取りだし 198 198 $arrKey = array_keys($objCSV->arrSubnavi); … … 237 237 $where .= " AND no = ?"; 238 238 $arrUpdVal = array('status' => '1'); 239 foreach ($arrData as $key => $val){239 foreach ($arrData as $key => $val) { 240 240 $arrWhereVal = array($csv_id, $val); 241 241 $arrUpdVal['rank'] = $key + 1; -
branches/version-2_12-dev/data/class/pages/admin/contents/LC_Page_Admin_Contents_CsvSql.php
r21420 r21441 76 76 $objFormParam->convParam(); 77 77 $this->arrForm = $objFormParam->getHashArray(); 78 switch ($this->getMode()) {78 switch ($this->getMode()) { 79 79 // データの登録 80 80 case 'confirm': 81 81 $this->arrErr = $this->lfCheckConfirmError($objFormParam); 82 if (SC_Utils_Ex::isBlank($this->arrErr)) {82 if (SC_Utils_Ex::isBlank($this->arrErr)) { 83 83 // データの更新 84 84 $this->arrForm['sql_id'] = $this->lfUpdData($objFormParam->getValue('sql_id'), $objFormParam->getDbArray()); … … 90 90 case 'preview': 91 91 $this->arrErr = $this->lfCheckPreviewError($objFormParam); 92 if (SC_Utils_Ex::isBlank($this->arrErr)) {92 if (SC_Utils_Ex::isBlank($this->arrErr)) { 93 93 $this->sqlerr = $this->lfCheckSQL($objFormParam->getValue('csv_sql')); 94 94 } … … 104 104 case 'delete': 105 105 $this->arrErr = $this->lfCheckDeleteError($objFormParam); 106 if (SC_Utils_Ex::isBlank($this->arrErr)) {106 if (SC_Utils_Ex::isBlank($this->arrErr)) { 107 107 $this->lfDelData($objFormParam->getValue('sql_id')); 108 108 SC_Response_Ex::reload(); … … 113 113 case "csv_output": 114 114 $this->arrErr = $this->lfCheckOutputError($objFormParam); 115 if (SC_Utils_Ex::isBlank($this->arrErr)) {115 if (SC_Utils_Ex::isBlank($this->arrErr)) { 116 116 $this->lfDoCsvOutput($objFormParam->getValue('csv_output_id')); 117 117 exit; … … 120 120 default: 121 121 $this->arrErr = $objFormParam->checkError(); 122 if (SC_Utils_Ex::isBlank($this->arrErr)) {122 if (SC_Utils_Ex::isBlank($this->arrErr)) { 123 123 // 設定内容を取得する 124 124 $this->arrForm = $this->lfGetSqlData($objFormParam); … … 163 163 $objErr->doFunc( array("SQL文", "csv_sql", "30000"), array("EXIST_CHECK", "MAX_LENGTH_CHECK") ); 164 164 $objErr->doFunc( array('SQL文には読み込み関係以外のSQLコマンドおよび";"記号', 'csv_sql', $this->lfGetSqlDenyList()), array("PROHIBITED_STR_CHECK")); 165 if (!SC_Utils_Ex::isBlank($objErr->arrErr)) {165 if (!SC_Utils_Ex::isBlank($objErr->arrErr)) { 166 166 $arrErr = array_merge($arrErr, $objErr->arrErr); 167 167 } 168 168 // SQL文自体の確認、エラーが無い時のみ実行 169 if (SC_Utils_Ex::isBlank($arrErr)) {169 if (SC_Utils_Ex::isBlank($arrErr)) { 170 170 $sql_error = $this->lfCheckSQL($objFormParam->getValue('csv_sql')); 171 if (!SC_Utils_Ex::isBlank($sql_error)) {171 if (!SC_Utils_Ex::isBlank($sql_error)) { 172 172 $arrErr["csv_sql"] = "※ SQL文が不正です。SQL文を見直してください"; 173 173 } … … 189 189 $objErr->doFunc( array("SQL文", "csv_sql", "30000"), array("EXIST_CHECK", "MAX_LENGTH_CHECK") ); 190 190 $objErr->doFunc( array('SQL文には読み込み関係以外のSQLコマンドおよび";"記号', 'csv_sql', $this->lfGetSqlDenyList()), array("PROHIBITED_STR_CHECK")); 191 if (!SC_Utils_Ex::isBlank($objErr->arrErr)) {191 if (!SC_Utils_Ex::isBlank($objErr->arrErr)) { 192 192 $arrErr = array_merge($arrErr, $objErr->arrErr); 193 193 } … … 207 207 $objErr = new SC_CheckError_Ex($objFormParam->getHashArray()); 208 208 $objErr->doFunc( array("SQL ID", "sql_id"), array("EXIST_CHECK") ); 209 if (!SC_Utils_Ex::isBlank($objErr->arrErr)) {209 if (!SC_Utils_Ex::isBlank($objErr->arrErr)) { 210 210 $arrErr = array_merge($arrErr, $objErr->arrErr); 211 211 } … … 225 225 $objErr = new SC_CheckError_Ex($objFormParam->getHashArray()); 226 226 $objErr->doFunc( array("CSV出力対象SQL ID", "csv_output_id"), array("EXIST_CHECK") ); 227 if (!SC_Utils_Ex::isBlank($objErr->arrErr)) {227 if (!SC_Utils_Ex::isBlank($objErr->arrErr)) { 228 228 $arrErr = array_merge($arrErr, $objErr->arrErr); 229 229 } … … 249 249 // 実テーブル上のカラム設定を見に行く仕様に変更 ref #476 250 250 $arrTable = $objQuery->listTables(); 251 if (SC_Utils_Ex::isBlank($arrTable)) {251 if (SC_Utils_Ex::isBlank($arrTable)) { 252 252 return array(); 253 253 } 254 254 $arrRet = array(); 255 foreach ($arrTable as $table) {256 if (substr($table, 0, 4) == 'dtb_') {255 foreach ($arrTable as $table) { 256 if (substr($table, 0, 4) == 'dtb_') { 257 257 $arrRet[ $table ] = 'データテーブル: ' . $table; 258 }else if (substr($table, 0, 4) == 'mtb_') {258 }else if (substr($table, 0, 4) == 'mtb_') { 259 259 $arrRet[ $table ] = 'マスターテーブル: ' . $table; 260 }else if (substr($table, 0, 3) == 'vw_') {260 }else if (substr($table, 0, 3) == 'vw_') { 261 261 $arrRet[ $table ] = 'ビュー: ' . $table; 262 262 } … … 272 272 */ 273 273 function lfGetColList($table){ 274 if (SC_Utils_Ex::isBlank($table)) {274 if (SC_Utils_Ex::isBlank($table)) { 275 275 return array(); 276 276 } … … 308 308 $sql = "SELECT " . $sql . " "; 309 309 $objErrMsg = $objQuery->query($sql); 310 if (PEAR::isError($objErrMsg)) {310 if (PEAR::isError($objErrMsg)) { 311 311 $err = $objErrMsg->message . "\n" . $objErrMsg->userinfo; 312 312 } … … 327 327 } 328 328 $sql_id = $objFormParam->getValue('sql_id'); 329 if (!SC_Utils_Ex::isBlank($sql_id)) {329 if (!SC_Utils_Ex::isBlank($sql_id)) { 330 330 $arrData = $this->lfGetSqlList('sql_id = ?', array($sql_id)); 331 331 return $arrData[0]; … … 348 348 349 349 $arrHeader = array(); 350 if (!preg_match("/ LIMIT /", $sql)) {350 if (!preg_match("/ LIMIT /", $sql)) { 351 351 $head_sql = $sql . " LIMIT 0"; 352 } else{352 } else { 353 353 $head_sql = $sql; 354 354 } 355 355 $arrData = $objQuery->getQueryDefsFields($head_sql, array(), true); 356 if (!SC_Utils_Ex::isBlank($arrData)) {357 foreach ($arrData as $key => $val) {356 if (!SC_Utils_Ex::isBlank($arrData)) { 357 foreach ($arrData as $key => $val) { 358 358 $arrHeader[] = $key; 359 359 } … … 380 380 $where = "sql_id = ?"; 381 381 $objQuery->update($table, $arrSqlVal, $where, array($sql_id)); 382 } else{382 } else { 383 383 //新規作成 384 384 $sql_id = $objQuery->nextVal('dtb_csv_sql_sql_id'); … … 400 400 $table = "dtb_csv_sql"; 401 401 $where = "sql_id = ?"; 402 if (SC_Utils_Ex::sfIsInt($sql_id)) {402 if (SC_Utils_Ex::sfIsInt($sql_id)) { 403 403 $objQuery->delete($table, $where, array($sql_id)); 404 404 return true; -
branches/version-2_12-dev/data/class/pages/admin/contents/LC_Page_Admin_Contents_FileManager.php
r21420 r21441 84 84 $objFileManager = new SC_Helper_FileManager_Ex(); 85 85 86 switch ($this->getMode()) {86 switch ($this->getMode()) { 87 87 // フォルダ移動 88 88 case 'move': … … 108 108 $this->arrErr = $objFormParam->checkError(); 109 109 if (SC_Utils_Ex::isBlank($this->arrErr)) { 110 if ($this->tryView($objFormParam)){110 if ($this->tryView($objFormParam)) { 111 111 $file_url = htmlspecialchars(ereg_replace($objFormParam->getValue('top_dir'), "", $objFormParam->getValue('select_file'))); 112 112 $tpl_onload = "win02('./file_view.php?file=". $file_url ."', 'user_data', '600', '400');"; … … 125 125 $this->arrErr = $objFormParam->checkError(); 126 126 if (SC_Utils_Ex::isBlank($this->arrErr)) { 127 if (is_dir($objFormParam->getValue('select_file'))) {127 if (is_dir($objFormParam->getValue('select_file'))) { 128 128 $disp_error = "※ ディレクトリをダウンロードすることは出来ません。<br/>"; 129 129 $this->setDispError('select_file', $disp_error); … … 156 156 $this->arrErr = $objFormParam->checkError(); 157 157 if (SC_Utils_Ex::isBlank($this->arrErr)) { 158 if (!$this->tryCreateDir($objFileManager, $objFormParam)){158 if (!$this->tryCreateDir($objFileManager, $objFormParam)) { 159 159 $disp_error = "※ ".htmlspecialchars($objFormParam->getValue('create_file'), ENT_QUOTES)."の作成に失敗しました。<br/>"; 160 160 $this->setDispError('create_file', $disp_error); … … 317 317 $create_dir = ereg_replace("/$", "", $objFormParam->getValue('now_dir')); 318 318 // ファイル作成 319 if ($objFileManager->sfCreateFile($create_dir."/".$objFormParam->getValue('create_file'), 0755)) {319 if ($objFileManager->sfCreateFile($create_dir."/".$objFormParam->getValue('create_file'), 0755)) { 320 320 $create_dir_flg = true; 321 321 } … … 426 426 $arrDir = explode('/', $dir); 427 427 array_pop($arrDir); 428 foreach ($arrDir as $val) {428 foreach ($arrDir as $val) { 429 429 $parent_dir .= "$val/"; 430 430 } … … 455 455 $arrTree = $objFileManager->sfGetFileTree($objFormParam->getValue('top_dir'), $objFormParam->getValue('tree_status')); 456 456 $tpl_javascript .= "arrTree = new Array();\n"; 457 foreach ($arrTree as $arrVal) {457 foreach ($arrTree as $arrVal) { 458 458 $tpl_javascript .= "arrTree[".$arrVal['count']."] = new Array(".$arrVal['count'].", '".$arrVal['type']."', '".$arrVal['path']."', ".$arrVal['rank'].","; 459 459 if ($arrVal['open']) { -
branches/version-2_12-dev/data/class/pages/admin/contents/LC_Page_Admin_Contents_FileView.php
r21420 r21441 63 63 */ 64 64 function action() { 65 switch ($this->getMode()){65 switch ($this->getMode()) { 66 66 default: 67 67 // フォーム操作クラス -
branches/version-2_12-dev/data/class/pages/admin/contents/LC_Page_Admin_Contents_Recommend.php
r21420 r21441 83 83 $this->insertRecommendProduct($arrPost,$member_id); 84 84 $arrItems = $this->getRecommendProducts(); 85 } else{85 } else { 86 86 $arrItems = $this->setProducts($arrPost, $arrItems); 87 87 $this->checkRank = $arrPost['rank']; … … 164 164 165 165 $arrReturnProducts = array(); 166 foreach ( $arrProducts as $data ){166 foreach ($arrProducts as $data ) { 167 167 $arrReturnProducts[$data['rank']] = $data; 168 168 } … … 228 228 if (count($arrProduct) > 0) { 229 229 $rank = $arrPost['rank']; 230 foreach ( $arrProduct as $key => $val){230 foreach ($arrProduct as $key => $val) { 231 231 $arrItems[$rank][$key] = $val; 232 232 } -
branches/version-2_12-dev/data/class/pages/admin/contents/LC_Page_Admin_Contents_RecommendSearch.php
r21423 r21441 147 147 $bind = array(); 148 148 foreach ($arrForm as $key => $val) { 149 if ($val == "") {149 if ($val == "") { 150 150 continue; 151 151 } … … 158 158 case 'search_category_id': 159 159 list($tmp_where, $tmp_bind) = $objDb->sfGetCatWhere($val); 160 if ($tmp_where != "") {160 if ($tmp_where != "") { 161 161 $where.= " AND alldtl.product_id IN (SELECT product_id FROM dtb_product_categories WHERE " . $tmp_where . ")"; 162 162 $bind = array_merge((array)$bind, (array)$tmp_bind);
Note: See TracChangeset
for help on using the changeset viewer.
