Changeset 1624 for temp/trunk
- Timestamp:
- 2006/08/24 13:32:18 (20 years ago)
- Location:
- temp/trunk
- Files:
-
- 2 edited
-
data/Smarty/templates/admin/products/test.tpl (modified) (previous)
-
html/admin/products/index.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
temp/trunk/html/admin/products/index.php
r1621 r1624 1 1 <?php 2 3 require_once("../../require.php"); 2 require_once("../require.php"); 4 3 require_once("./index_csv.php"); 5 //require_once("../../require2.php");6 4 7 5 class LC_Page { 8 var $arrForm;9 var $arrHidden;10 var $arrProducts;11 var $arrPageMax;12 6 function LC_Page() { 13 $this->tpl_mainpage = 'products/index.tpl'; 14 // $this->tpl_mainpage="products/test.tpl"; 15 16 $this->tpl_mainno = 'products'; 17 $this->tpl_subnavi = 'products/subnavi.tpl'; 7 $this->tpl_mainpage = 'order/index.tpl'; 8 $this->tpl_subnavi = 'order/subnavi.tpl'; 9 $this->tpl_mainno = 'order'; 18 10 $this->tpl_subno = 'index'; 19 11 $this->tpl_pager = ROOT_DIR . 'data/Smarty/templates/admin/pager.tpl'; 20 $this->tpl_subtitle = '¾¦ÉÊ¥Þ¥¹¥¿'; 21 12 $this->tpl_subtitle = '¼õÃí´ÉÍý'; 13 global $arrORDERSTATUS; 14 $this->arrORDERSTATUS = $arrORDERSTATUS; 15 global $arrORDERSTATUS_COLOR; 16 $this->arrORDERSTATUS_COLOR = $arrORDERSTATUS_COLOR; 17 global $arrSex; 18 $this->arrSex = $arrSex; 22 19 global $arrPageMax; 23 20 $this->arrPageMax = $arrPageMax; 24 global $arrDISP;25 $this->arrDISP = $arrDISP;26 global $arrSTATUS;27 $this->arrSTATUS = $arrSTATUS;28 global $arrPRODUCTSTATUS_COLOR;29 $this->arrPRODUCTSTATUS_COLOR = $arrPRODUCTSTATUS_COLOR;30 31 21 } 32 22 } 33 23 24 $conn = new SC_DBConn(); 34 25 $objPage = new LC_Page(); 35 26 $objView = new SC_AdminView(); 36 27 $objSess = new SC_Session(); 37 $objDate = new SC_Date(); 38 39 40 // ÅÐÏ¿¡¦¹¹¿·¸¡º÷³«»Ïǯ 41 $objDate->setStartYear(RELEASE_YEAR); 42 $objDate->setEndYear(DATE("Y")); 43 $objPage->arrStartYear = $objDate->getYear(); 44 $objPage->arrStartMonth = $objDate->getMonth(); 45 $objPage->arrStartDay = $objDate->getDay(); 46 // ÅÐÏ¿¡¦¹¹¿·¸¡º÷½ªÎ»Ç¯ 47 $objDate->setStartYear(RELEASE_YEAR); 48 $objDate->setEndYear(DATE("Y")); 49 $objPage->arrEndYear = $objDate->getYear(); 50 $objPage->arrEndMonth = $objDate->getMonth(); 51 $objPage->arrEndDay = $objDate->getDay(); 52 53 // ǧ¾Ú²ÄÈݤÎȽÄê 54 $objSess = new SC_Session(); 55 sfIsSuccess($objSess); 56 //¥¥ã¥ó¥Ú¡¼¥ó¤ÎÊÔ½¸»þ 57 if(sfIsInt($_POST['campaign_id']) && $_POST['mode'] == "camp_search") { 58 $objQuery = new SC_Query(); 59 $search_data = $objQuery->get("dtb_campaign", "search_condition", "campaign_id = ? ", array($_POST['campaign_id'])); 60 $arrSearch = unserialize($search_data); 61 foreach ($arrSearch as $key => $val) { 62 $_POST[$key] = $val; 63 } 64 } 65 66 // POSTÃͤΰú¤·Ñ¤® 67 $objPage->arrForm = $_POST; 28 // ¥Ñ¥é¥á¡¼¥¿´ÉÍý¥¯¥é¥¹ 29 $objFormParam = new SC_FormParam(); 30 // ¥Ñ¥é¥á¡¼¥¿¾ðÊó¤Î½é´ü²½ 31 lfInitParam(); 32 $objFormParam->setParam($_POST); 33 34 $objFormParam->splitParamCheckBoxes('search_order_sex'); 35 $objFormParam->splitParamCheckBoxes('search_payment_id'); 68 36 69 37 // ¸¡º÷¥ï¡¼¥É¤Î°ú¤·Ñ¤® 70 38 foreach ($_POST as $key => $val) { 71 if (ereg("^search_", $key) || ereg("^campaign_", $key)) {39 if (ereg("^search_", $key)) { 72 40 switch($key) { 73 case 'search_ product_flag':74 case 'search_ status':41 case 'search_order_sex': 42 case 'search_payment_id': 75 43 $objPage->arrHidden[$key] = sfMergeParamCheckBoxes($val); 76 if(!is_array($val)) {77 $objPage->arrForm[$key] = split("-", $val);78 }79 44 break; 80 45 default: 81 46 $objPage->arrHidden[$key] = $val; 82 47 break; 83 } 48 } 84 49 } 85 50 } … … 88 53 $objPage->arrHidden['search_pageno'] = $_POST['search_pageno']; 89 54 90 // ¾¦Éʺï½ü 91 if ($_POST['mode'] == "delete") { 92 if($_POST['category_id'] != "") { 93 // ¥é¥ó¥¯ÉÕ¤¥ì¥³¡¼¥É¤Îºï½ü 94 $where = "category_id = " . addslashes($_POST['category_id']); 95 sfDeleteRankRecord("dtb_products", "product_id", $_POST['product_id'], $where); 96 } else { 97 sfDeleteRankRecord("dtb_products", "product_id", $_POST['product_id']); 98 } 99 // »Ò¥Æ¡¼¥Ö¥ë(¾¦Éʵ¬³Ê)¤Îºï½ü 100 $objQuery = new SC_Query(); 101 $objQuery->delete("dtb_products_class", "product_id = ?", array($_POST['product_id'])); 102 103 // ·ï¿ô¥«¥¦¥ó¥È¥Ð¥Ã¥Á¼Â¹Ô 104 sfCategory_Count($objQuery); 105 } 106 107 108 if ($_POST['mode'] == "search" || $_POST['mode'] == "csv" || $_POST['mode'] == "delete" || $_POST['mode'] == "delete_all" || $_POST['mode'] == "camp_search") { 109 // ÆþÎÏʸ»ú¤Î¶¯À©ÊÑ´¹ 110 lfConvertParam(); 111 // ¥¨¥é¡¼¥Á¥§¥Ã¥¯ 112 $objPage->arrErr = lfCheckError(); 113 114 $where = "delete = 0"; 115 116 // ÆþÎÏ¥¨¥é¡¼¤Ê¤· 55 // ǧ¾Ú²ÄÈݤÎȽÄê 56 sfIsSuccess($objSess); 57 58 if($_POST['mode'] == 'delete') { 59 if(sfIsInt($_POST['order_id'])) { 60 $objQuery = new SC_Query(); 61 $where = "order_id = ?"; 62 $sqlval['delete'] = '1'; 63 $objQuery->update("dtb_order", $sqlval, $where, array($_POST['order_id'])); 64 } 65 } 66 67 switch($_POST['mode']) { 68 case 'delete': 69 case 'csv': 70 case 'delete_all': 71 case 'search': 72 // ÆþÎÏÃͤÎÊÑ´¹ 73 $objFormParam->convParam(); 74 $objPage->arrErr = lfCheckError($arrRet); 75 $arrRet = $objFormParam->getHashArray(); 76 // ÆþÎϤʤ· 117 77 if (count($objPage->arrErr) == 0) { 118 119 foreach ($objPage->arrForm as $key => $val) { 120 121 $val = sfManualEscape($val); 122 78 $where = "delete = 0"; 79 foreach ($arrRet as $key => $val) { 123 80 if($val == "") { 124 81 continue; 125 82 } 83 $val = sfManualEscape($val); 126 84 127 85 switch ($key) { 128 case 'search_product_id': 129 $where .= " AND product_id = ?"; 130 $arrval[] = $val; 131 break; 132 case 'search_product_class_id': 133 $where .= " AND product_id IN (SELECT product_id FROM dtb_products_class WHERE product_class_id = ?)"; 134 $arrval[] = $val; 135 break; 136 case 'search_name': 137 $where .= " AND name ILIKE ?"; 86 case 'search_order_name': 87 $where .= " AND order_name01||order_name02 ILIKE ?"; 88 $nonsp_val = ereg_replace("[ ¡¡]+","",$val); 89 $arrval[] = "%$nonsp_val%"; 90 break; 91 case 'search_order_kana': 92 $where .= " AND order_kana01||order_kana02 ILIKE ?"; 93 $nonsp_val = ereg_replace("[ ¡¡]+","",$val); 94 $arrval[] = "%$nonsp_val%"; 95 break; 96 case 'search_order_id1': 97 $where .= " AND order_id >= ?"; 98 $arrval[] = $val; 99 break; 100 case 'search_order_id2': 101 $where .= " AND order_id <= ?"; 102 $arrval[] = $val; 103 break; 104 case 'search_order_sex': 105 $tmp_where = ""; 106 foreach($val as $element) { 107 if($element != "") { 108 if($tmp_where == "") { 109 $tmp_where .= " AND (order_sex = ?"; 110 } else { 111 $tmp_where .= " OR order_sex = ?"; 112 } 113 $arrval[] = $element; 114 } 115 } 116 117 if($tmp_where != "") { 118 $tmp_where .= ")"; 119 $where .= " $tmp_where "; 120 } 121 break; 122 case 'search_order_tel': 123 $where .= " AND (order_tel01||order_tel02||order_tel03) ILIKE ?"; 124 $nonmark_val = ereg_replace("[()-]+","",$val); 125 $arrval[] = "$nonmark_val%"; 126 break; 127 case 'search_order_email': 128 $where .= " AND order_email ILIKE ?"; 138 129 $arrval[] = "%$val%"; 139 130 break; 140 case 'search_category_id': 141 list($tmp_where, $tmp_arrval) = sfGetCatWhere($val); 131 case 'search_payment_id': 132 $tmp_where = ""; 133 foreach($val as $element) { 134 if($element != "") { 135 if($tmp_where == "") { 136 $tmp_where .= " AND (payment_id = ?"; 137 } else { 138 $tmp_where .= " OR payment_id = ?"; 139 } 140 $arrval[] = $element; 141 } 142 } 143 142 144 if($tmp_where != "") { 143 $ where.= " AND $tmp_where";144 $ arrval = array_merge($arrval, $tmp_arrval);145 $tmp_where .= ")"; 146 $where .= " $tmp_where "; 145 147 } 146 148 break; 147 case 'search_product_code': 148 $where .= " AND product_id IN (SELECT product_id FROM dtb_products_class WHERE product_code ILIKE ? GROUP BY product_id)"; 149 $arrval[] = "%$val%"; 149 case 'search_total1': 150 $where .= " AND total >= ?"; 151 $arrval[] = $val; 152 break; 153 case 'search_total2': 154 $where .= " AND total <= ?"; 155 $arrval[] = $val; 150 156 break; 151 157 case 'search_startyear': … … 155 161 break; 156 162 case 'search_endyear': 157 $date = sfGetTimestamp($_POST['search_endyear'], $_POST['search_endmonth'], $_POST['search_endday'] );163 $date = sfGetTimestamp($_POST['search_endyear'], $_POST['search_endmonth'], $_POST['search_endday'], true); 158 164 $where.= " AND update_date <= ?"; 159 165 $arrval[] = $date; 160 166 break; 161 case 'search_product_flag': 162 global $arrSTATUS; 163 $search_product_flag = sfSearchCheckBoxes($val); 164 if($search_product_flag != "") { 165 $where.= " AND product_flag LIKE ?"; 166 $arrval[] = $search_product_flag; 167 } 168 break; 169 case 'search_status': 170 $tmp_where = ""; 171 foreach ($val as $element){ 172 if ($element != ""){ 173 if ($tmp_where == ""){ 174 $tmp_where.="AND (status LIKE ? "; 175 }else{ 176 $tmp_where.="OR status LIKE ? "; 177 } 178 $arrval[]=$element; 179 } 180 } 181 if ($tmp_where != ""){ 182 $tmp_where.=")"; 183 $where.= "$tmp_where"; 184 } 167 case 'search_sbirthyear': 168 $date = sfGetTimestamp($_POST['search_sbirthyear'], $_POST['search_sbirthmonth'], $_POST['search_sbirthday']); 169 $where.= " AND order_birth >= ?"; 170 $arrval[] = $date; 171 break; 172 case 'search_ebirthyear': 173 $date = sfGetTimestamp($_POST['search_ebirthyear'], $_POST['search_ebirthmonth'], $_POST['search_ebirthday'], true); 174 $where.= " AND order_birth <= ?"; 175 $arrval[] = $date; 176 break; 177 case 'search_order_status': 178 $where.= " AND status = ?"; 179 $arrval[] = $val; 185 180 break; 186 181 default: … … 188 183 } 189 184 } 190 185 191 186 $order = "update_date DESC"; 192 $objQuery = new SC_Query();193 187 194 188 switch($_POST['mode']) { … … 196 190 // ¥ª¥×¥·¥ç¥ó¤Î»ØÄê 197 191 $option = "ORDER BY $order"; 192 198 193 // CSV½ÐÎÏ¥¿¥¤¥È¥ë¹Ô¤ÎºîÀ® 199 $arrOutput = sfSwapArray(sfgetCsvOutput(1, " WHERE csv_id = 1 AND status = 1")); 200 201 if (count($arrOutput) <= 0) break; 202 203 $arrOutputCols = $arrOutput['col']; 204 $arrOutputTitle = $arrOutput['disp_name']; 205 206 $head = sfGetCSVList($arrOutputTitle); 207 208 $data = lfGetProductsCSV($where, $option, $arrval, $arrOutputCols); 209 194 $arrCsvOutput = sfSwapArray(sfgetCsvOutput(3, " WHERE csv_id = 3 AND status = 1")); 195 196 if (count($arrCsvOutput) <= 0) break; 197 198 $arrCsvOutputCols = $arrCsvOutput['col']; 199 $arrCsvOutputTitle = $arrCsvOutput['disp_name']; 200 $head = sfGetCSVList($arrCsvOutputTitle); 201 $data = lfGetCSV("dtb_order", $where, $option, $arrval, $arrCsvOutputCols); 202 210 203 // CSV¤òÁ÷¿®¤¹¤ë¡£ 211 204 sfCSVDownload($head.$data); … … 214 207 case 'delete_all': 215 208 // ¸¡º÷·ë²Ì¤ò¤¹¤Ù¤Æºï½ü 216 $where = "product_id IN (SELECT product_id FROM vw_products_nonclass WHERE $where)";217 209 $sqlval['delete'] = 1; 218 $objQuery->update("dtb_products", $sqlval, $where, $arrval); 210 $objQuery = new SC_Query(); 211 $objQuery->update("dtb_order", $sqlval, $where, $arrval); 219 212 break; 220 213 default: 221 214 // ÆÉ¤ß¹þ¤àÎó¤È¥Æ¡¼¥Ö¥ë¤Î»ØÄê 222 $col = "product_id, name, category_id, main_list_image, status, product_code, price01, price02, stock, stock_unlimited"; 223 $from = "vw_products_nonclass"; 224 215 $col = "*"; 216 $from = "dtb_order"; 217 218 $objQuery = new SC_Query(); 225 219 // ¹Ô¿ô¤Î¼èÆÀ 226 220 $linemax = $objQuery->count($from, $where, $arrval); 227 221 $objPage->tpl_linemax = $linemax; // ²¿·ï¤¬³ºÅö¤·¤Þ¤·¤¿¡£É½¼¨ÍÑ 228 222 229 223 // ¥Ú¡¼¥¸Á÷¤ê¤Î½èÍý 230 224 if(is_numeric($_POST['search_page_max'])) { … … 233 227 $page_max = SEARCH_PMAX; 234 228 } 235 229 236 230 // ¥Ú¡¼¥¸Á÷¤ê¤Î¼èÆÀ 237 231 $objNavi = new SC_PageNavi($_POST['search_pageno'], $linemax, $page_max, "fnNaviSearchPage", NAVI_PMAX); 238 232 $startno = $objNavi->start_row; 239 $objPage->arrPagenavi = $objNavi->arrPagenavi; 240 241 //¥¥ã¥ó¥Ú¡¼¥ó¾¦Éʸ¡º÷»þ¤Ï¡¢Á´·ë²Ì¤Î¾¦ÉÊID¤òÊÑ¿ô¤Ë³ÊǼ¤¹¤ë 242 if($_POST['search_mode'] == 'campaign') { 243 $arrRet = $objQuery->select($col, $from, $where, $arrval); 244 if(count($arrRet) > 0) { 245 $arrRet = sfSwapArray($arrRet); 246 $pid = implode("-", $arrRet['product_id']); 247 $objPage->arrHidden['campaign_product_id'] = $pid; 248 } 249 } 250 233 $objPage->arrPagenavi = $objNavi->arrPagenavi; 234 251 235 // ¼èÆÀÈϰϤλØÄê(³«»Ï¹ÔÈֹ桢¹Ô¿ô¤Î¥»¥Ã¥È) 252 236 $objQuery->setlimitoffset($page_max, $startno); … … 254 238 $objQuery->setorder($order); 255 239 // ¸¡º÷·ë²Ì¤Î¼èÆÀ 256 $objPage->arrProducts = $objQuery->select($col, $from, $where, $arrval); 257 // $arrProducts = $objQuery->select($col, $from, $where, $arrval); 258 259 // $objPage->arrTest = $arrProducts; 260 261 $objPage->tpl_mainpage="products/test.tpl"; 262 263 break; 240 $objPage->arrResults = $objQuery->select($col, $from, $where, $arrval); 264 241 } 265 242 } 266 } 267 /* 268 $arrProducts = Array 269 ( 270 '0' => Array 271 ( 272 'product_id' => '18', 273 'name' => 'test', 274 'category_id' => '11', 275 'main_list_image' => '08172054_44e458f942afc.gif', 276 'status' => '1', 277 'product_code' => 'cd 01', 278 'price01' => '500', 279 'price02' => '500', 280 'stock' => '43', 281 'stock_unlimited' => "" 282 ), 283 284 '1' => Array 285 ( 286 'product_id' => '14', 287 'name' => 'LPO¥¨¥Ó¥¹', 288 'category_id' => '10', 289 'main_list_image' => '08171740_44e42b7f67953.gif', 290 'status' => '1', 291 'product_code' => 'LPO', 292 'price01' => '15000', 293 'price02' => '15000', 294 'stock' => '14999', 295 'stock_unlimited' => "" 296 ), 297 298 '2' => Array 299 ( 300 'product_id' => '16', 301 'name' => 'LPO¥¨¥Ó¥¹', 302 'category_id' => '10', 303 'main_list_image' => '08181941_44e59975c535d.gif', 304 'status' => '1', 305 'product_code' => 'LPO', 306 'price01' => '15000', 307 'price02' => '15000', 308 'stock' => '14927', 309 'stock_unlimited' => "" 310 ), 311 312 '3' => Array 313 ( 314 'product_id' => '15', 315 'name' => 'LPO¥¨¥Ó¥¹', 316 'category_id' => '10', 317 'main_list_image' => '08171740_44e42b7f67953.gif', 318 'status' => '1', 319 'product_code' => 'LPO', 320 'price01' => '15000', 321 'price02' => '15000', 322 'stock' => '14998', 323 'stock_unlimited' => "" 324 ), 325 '4' => Array 326 ( 327 'product_id' => '17', 328 'name' => 'LPO¥¨¥Ó¥¹', 329 'category_id' => '15', 330 'main_list_image' => '08171740_44e42b7f67953.gif', 331 'status' => '1', 332 'product_code' => 'LPO', 333 'price01' => '15000', 334 'price02' => '15000', 335 'stock' => '0', 336 'stock_unlimited' => "" 337 ), 338 339 '5' => Array 340 ( 341 'product_id' => '13', 342 'name' => 'LPO¥¨¥Ó¥¹', 343 'category_id' => '10', 344 'main_list_image' => '08171740_44e42b7f67953.gif', 345 'status' => '1', 346 'product_code' => 'LPO', 347 'price01' => '15000', 348 'price02' => '15000', 349 'stock' => '15000', 350 'stock_unlimited' => "" 351 ), 352 353 '6' => Array 354 ( 355 'product_id' => '12', 356 'name' => 'LPO¥¨¥Ó¥¹', 357 'category_id' => '10', 358 'main_list_image' => '08171740_44e42b7f67953.gif', 359 'status' => '1', 360 'product_code' => 'LPO', 361 'price01' => '15000', 362 'price02' => '15000', 363 'stock' => '15000', 364 'stock_unlimited' => "" 365 ), 366 367 '7' => Array 368 ( 369 'product_id' => '11', 370 'name' => 'LPO¥¨¥Ó¥¹', 371 'category_id' => '10', 372 'main_list_image' => '08171740_44e42b7f67953.gif', 373 'status' => '1', 374 'product_code' => 'LPO', 375 'price01' => '15000', 376 'price02' => '15000', 377 'stock' => '15000', 378 'stock_unlimited' => "" 379 ), 380 '8' => Array 381 ( 382 'product_id' => '10', 383 'name' => 'LPO¥¨¥Ó¥¹', 384 'category_id' => '10', 385 'main_list_image' => '08171740_44e42b7f67953.gif', 386 'status' => '1', 387 'product_code' => 'LPO', 388 'price01' => '15000', 389 'price02' => '15000', 390 'stock' => '15000', 391 'stock_unlimited' => "" 392 ), 393 394 '9' => Array 395 ( 396 'product_id' => '9', 397 'name' => 'LPO¥¨¥Ó¥¹', 398 'category_id' => '10', 399 'main_list_image' => '08171740_44e42b7f67953.gif', 400 'status' => '1', 401 'product_code' => 'LPO', 402 'price01' => '15000', 403 'price02' => '15000', 404 'stock' => '15000', 405 'stock_unlimited' => "" 406 ) 407 408 ); 409 410 411 $objPage->arrProducts = $arrProducts; 412 */ 413 414 // ¥«¥Æ¥´¥ê¤ÎÆÉ¹þ 415 $objPage->arrCatList = sfGetCategoryList(); 416 $objPage->arrCatIDName = lfGetIDName($objPage->arrCatList); 417 418 // ²èÌ̤Îɽ¼¨ 243 break; 244 245 default: 246 break; 247 } 248 249 $objDate = new SC_Date(); 250 // ÅÐÏ¿¡¦¹¹¿·Æü¸¡º÷ÍÑ 251 $objDate->setStartYear(RELEASE_YEAR); 252 $objDate->setEndYear(DATE("Y")); 253 $objPage->arrRegistYear = $objDate->getYear(); 254 // À¸Ç¯·îÆü¸¡º÷ÍÑ 255 $objDate->setStartYear(BIRTH_YEAR); 256 $objDate->setEndYear(DATE("Y")); 257 $objPage->arrBirthYear = $objDate->getYear(); 258 // ·îÆü¤ÎÀßÄê 259 $objPage->arrMonth = $objDate->getMonth(); 260 $objPage->arrDay = $objDate->getDay(); 261 262 // ÆþÎÏÃͤμèÆÀ 263 $objPage->arrForm = $objFormParam->getFormParamList(); 264 // »Ùʧ¤¤ÊýË¡¤Î¼èÆÀ 265 $arrRet = sfGetPayment(); 266 $objPage->arrPayment = sfArrKeyValue($arrRet, 'payment_id', 'payment_method'); 267 419 268 $objView->assignobj($objPage); 420 269 $objView->display(MAIN_FRAME); 421 270 422 //--------------------------------------------------------------------------------------------------------------------------------------------------------- 423 424 // ¼èÆÀʸ»úÎó¤ÎÊÑ´¹ 425 function lfConvertParam() { 426 global $objPage; 427 /* 428 * ʸ»úÎó¤ÎÊÑ´¹ 429 * K : ¡ÖȾ³Ñ(Êݶ¸)ÊÒ²¾Ì¾¡×¤ò¡ÖÁ´³ÑÊÒ²¾Ì¾¡×¤ËÊÑ´¹ 430 * C : ¡ÖÁ´³Ñ¤Ò¤é²¾Ì¾¡×¤ò¡ÖÁ´³Ñ¤«¤¿²¾Ì¾¡×¤ËÊÑ´¹ 431 * V : ÂùÅÀÉÕ¤¤Îʸ»ú¤ò°ìʸ»ú¤ËÊÑ´¹¡£"K","H"¤È¶¦¤Ë»ÈÍѤ·¤Þ¤¹ 432 * n : ¡ÖÁ´³Ñ¡×¿ô»ú¤ò¡ÖȾ³Ñ(Êݶ¸)¡×¤ËÊÑ´¹ 433 */ 434 $arrConvList['search_name'] = "KVa"; 435 $arrConvList['search_product_code'] = "KVa"; 271 //----------------------------------------------------------------------------------------------------------------------------------- 272 /* ¥Ñ¥é¥á¡¼¥¿¾ðÊó¤Î½é´ü²½ */ 273 function lfInitParam() { 274 global $objFormParam; 275 $objFormParam->addParam("¼õÃíÈÖ¹æ1", "search_order_id1", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 276 $objFormParam->addParam("¼õÃíÈÖ¹æ2", "search_order_id2", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 277 $objFormParam->addParam("Âбþ¾õ¶·", "search_order_status", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 278 $objFormParam->addParam("¸ÜµÒ̾", "search_order_name", STEXT_LEN, "KVa", array("MAX_LENGTH_CHECK")); 279 $objFormParam->addParam("¸ÜµÒ̾(¥«¥Ê)", "search_order_kana", STEXT_LEN, "KVCa", array("KANA_CHECK","MAX_LENGTH_CHECK")); 280 $objFormParam->addParam("ÀÊÌ", "search_order_sex", INT_LEN, "n", array("MAX_LENGTH_CHECK")); 281 $objFormParam->addParam("ǯÎð1", "search_age1", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 282 $objFormParam->addParam("ǯÎð2", "search_age2", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 283 $objFormParam->addParam("¥á¡¼¥ë¥¢¥É¥ì¥¹", "search_order_email", STEXT_LEN, "KVa", array("MAX_LENGTH_CHECK")); 284 $objFormParam->addParam("TEL", "search_order_tel", STEXT_LEN, "KVa", array("MAX_LENGTH_CHECK")); 285 $objFormParam->addParam("»Ùʧ¤¤ÊýË¡", "search_payment_id", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 286 $objFormParam->addParam("¹ØÆþ¶â³Û1", "search_total1", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 287 $objFormParam->addParam("¹ØÆþ¶â³Û2", "search_total2", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 288 $objFormParam->addParam("ɽ¼¨·ï¿ô", "search_page_max", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 289 $objFormParam->addParam("³«»ÏÆü", "search_startyear", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 290 $objFormParam->addParam("³«»ÏÆü", "search_startmonth", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 291 $objFormParam->addParam("³«»ÏÆü", "search_startday", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 292 $objFormParam->addParam("½ªÎ»Æü", "search_endyear", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 293 $objFormParam->addParam("½ªÎ»Æü", "search_endmonth", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 294 $objFormParam->addParam("½ªÎ»Æü", "search_endday", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 295 $objFormParam->addParam("³«»ÏÆü", "search_sbirthyear", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 296 $objFormParam->addParam("³«»ÏÆü", "search_sbirthmonth", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 297 $objFormParam->addParam("³«»ÏÆü", "search_sbirthday", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 298 $objFormParam->addParam("½ªÎ»Æü", "search_ebirthyear", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 299 $objFormParam->addParam("½ªÎ»Æü", "search_ebirthmonth", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 300 $objFormParam->addParam("½ªÎ»Æü", "search_ebirthday", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 301 } 302 303 /* ÆþÎÏÆâÍÆ¤Î¥Á¥§¥Ã¥¯ */ 304 function lfCheckError() { 305 global $objFormParam; 306 // ÆþÎϥǡ¼¥¿¤òÅϤ¹¡£ 307 $arrRet = $objFormParam->getHashArray(); 308 $objErr = new SC_CheckError($arrRet); 309 $objErr->arrErr = $objFormParam->checkError(); 436 310 437 // ʸ»úÊÑ´¹ 438 foreach ($arrConvList as $key => $val) { 439 // POST¤µ¤ì¤Æ¤¤¿ÃͤΤßÊÑ´¹¤¹¤ë¡£ 440 if(isset($objPage->arrForm[$key])) { 441 $objPage->arrForm[$key] = mb_convert_kana($objPage->arrForm[$key] ,$val); 442 } 443 } 444 } 445 446 // ¥¨¥é¡¼¥Á¥§¥Ã¥¯ 447 // ÆþÎÏ¥¨¥é¡¼¥Á¥§¥Ã¥¯ 448 function lfCheckError() { 449 $objErr = new SC_CheckError(); 311 // ÆÃ¼ì¹àÌÜ¥Á¥§¥Ã¥¯ 312 $objErr->doFunc(array("¼õÃíÈÖ¹æ1", "¼õÃíÈÖ¹æ2", "search_order_id1", "search_order_id2"), array("GREATER_CHECK")); 313 $objErr->doFunc(array("ǯÎð1", "ǯÎð2", "search_age1", "search_age2"), array("GREATER_CHECK")); 314 $objErr->doFunc(array("¹ØÆþ¶â³Û1", "¹ØÆþ¶â³Û2", "search_total1", "search_total2"), array("GREATER_CHECK")); 450 315 $objErr->doFunc(array("³«»ÏÆü", "search_startyear", "search_startmonth", "search_startday"), array("CHECK_DATE")); 451 316 $objErr->doFunc(array("½ªÎ»Æü", "search_endyear", "search_endmonth", "search_endday"), array("CHECK_DATE")); 452 317 $objErr->doFunc(array("³«»ÏÆü", "½ªÎ»Æü", "search_startyear", "search_startmonth", "search_startday", "search_endyear", "search_endmonth", "search_endday"), array("CHECK_SET_TERM")); 318 319 $objErr->doFunc(array("³«»ÏÆü", "search_sbirthyear", "search_sbirthmonth", "search_sbirthday"), array("CHECK_DATE")); 320 $objErr->doFunc(array("½ªÎ»Æü", "search_ebirthyear", "search_ebirthmonth", "search_ebirthday"), array("CHECK_DATE")); 321 $objErr->doFunc(array("³«»ÏÆü", "½ªÎ»Æü", "search_sbirthyear", "search_sbirthmonth", "search_sbirthday", "search_ebirthyear", "search_ebirthmonth", "search_ebirthday"), array("CHECK_SET_TERM")); 322 453 323 return $objErr->arrErr; 454 324 } 455 325 456 // ¥Á¥§¥Ã¥¯¥Ü¥Ã¥¯¥¹ÍÑWHEREʸºîÀ®457 function lfGetCBWhere($key, $max) {458 $str = "";459 $find = false;460 for ($cnt = 1; $cnt <= $max; $cnt++) {461 if ($_POST[$key . $cnt] == "1") {462 $str.= "1";463 $find = true;464 } else {465 $str.= "_";466 }467 }468 if (!$find) {469 $str = "";470 }471 return $str;472 }473 474 // ¥«¥Æ¥´¥êID¤ò¥¡¼¡¢¥«¥Æ¥´¥ê̾¤òÃͤˤ¹¤ëÇÛÎó¤òÊÖ¤¹¡£475 function lfGetIDName($arrCatList) {476 $max = count($arrCatList);477 for ($cnt = 0; $cnt < $max; $cnt++ ) {478 $key = $arrCatList[$cnt]['category_id'];479 $val = $arrCatList[$cnt]['category_name'];480 $arrRet[$key] = $val;481 }482 return $arrRet;483 }484 326 485 327 ?>
Note: See TracChangeset
for help on using the changeset viewer.
