| 1 | <?php |
|---|
| 2 | /* |
|---|
| 3 | * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved. |
|---|
| 4 | * |
|---|
| 5 | * http://www.lockon.co.jp/ |
|---|
| 6 | */ |
|---|
| 7 | require_once("../require.php"); |
|---|
| 8 | require_once("./index_csv.php"); |
|---|
| 9 | |
|---|
| 10 | class LC_Page { |
|---|
| 11 | var $arrForm; |
|---|
| 12 | var $arrHidden; |
|---|
| 13 | var $arrProducts; |
|---|
| 14 | var $arrPageMax; |
|---|
| 15 | function LC_Page() { |
|---|
| 16 | $this->tpl_mainpage = 'products/index.tpl'; |
|---|
| 17 | $this->tpl_mainno = 'products'; |
|---|
| 18 | $this->tpl_subnavi = 'products/subnavi.tpl'; |
|---|
| 19 | $this->tpl_subno = 'index'; |
|---|
| 20 | $this->tpl_pager = DATA_PATH . 'Smarty/templates/admin/pager.tpl'; |
|---|
| 21 | $this->tpl_subtitle = '¾¦ÉÊ¥Þ¥¹¥¿'; |
|---|
| 22 | |
|---|
| 23 | global $arrPageMax; |
|---|
| 24 | $this->arrPageMax = $arrPageMax; |
|---|
| 25 | global $arrDISP; |
|---|
| 26 | $this->arrDISP = $arrDISP; |
|---|
| 27 | global $arrSTATUS; |
|---|
| 28 | $this->arrSTATUS = $arrSTATUS; |
|---|
| 29 | global $arrPRODUCTSTATUS_COLOR; |
|---|
| 30 | $this->arrPRODUCTSTATUS_COLOR = $arrPRODUCTSTATUS_COLOR; |
|---|
| 31 | /* |
|---|
| 32 | session_start»þ¤Îno-cache¥Ø¥Ã¥À¡¼¤òÍÞÀ©¤¹¤ë¤³¤È¤Ç |
|---|
| 33 | ¡ÖÌá¤ë¡×¥Ü¥¿¥ó»ÈÍÑ»þ¤Î͸ú´ü¸ÂÀÚ¤ìɽ¼¨¤òÍÞÀ©¤¹¤ë¡£ |
|---|
| 34 | private-no-expire:¥¯¥é¥¤¥¢¥ó¥È¤Î¥¥ã¥Ã¥·¥å¤òµö²Ä¤¹¤ë¡£ |
|---|
| 35 | */ |
|---|
| 36 | session_cache_limiter('private-no-expire'); |
|---|
| 37 | } |
|---|
| 38 | } |
|---|
| 39 | |
|---|
| 40 | //$conn = new SC_DBConn(); |
|---|
| 41 | $objPage = new LC_Page(); |
|---|
| 42 | $objView = new SC_AdminView(); |
|---|
| 43 | |
|---|
| 44 | $objDate = new SC_Date(); |
|---|
| 45 | |
|---|
| 46 | // ÅÐÏ¿¡¦¹¹¿·¸¡º÷³«»Ïǯ |
|---|
| 47 | $objDate->setStartYear(RELEASE_YEAR); |
|---|
| 48 | $objDate->setEndYear(DATE("Y")); |
|---|
| 49 | $objPage->arrStartYear = $objDate->getYear(); |
|---|
| 50 | $objPage->arrStartMonth = $objDate->getMonth(); |
|---|
| 51 | $objPage->arrStartDay = $objDate->getDay(); |
|---|
| 52 | // ÅÐÏ¿¡¦¹¹¿·¸¡º÷½ªÎ»Ç¯ |
|---|
| 53 | $objDate->setStartYear(RELEASE_YEAR); |
|---|
| 54 | $objDate->setEndYear(DATE("Y")); |
|---|
| 55 | $objPage->arrEndYear = $objDate->getYear(); |
|---|
| 56 | $objPage->arrEndMonth = $objDate->getMonth(); |
|---|
| 57 | $objPage->arrEndDay = $objDate->getDay(); |
|---|
| 58 | |
|---|
| 59 | // ǧ¾Ú²ÄÈݤÎȽÄê |
|---|
| 60 | $objSess = new SC_Session(); |
|---|
| 61 | sfIsSuccess($objSess); |
|---|
| 62 | |
|---|
| 63 | //¥¥ã¥ó¥Ú¡¼¥ó¤ÎÊÔ½¸»þ |
|---|
| 64 | if(sfIsInt($_POST['campaign_id']) && $_POST['mode'] == "camp_search") { |
|---|
| 65 | $objQuery = new SC_Query(); |
|---|
| 66 | $search_data = $objQuery->get("dtb_campaign", "search_condition", "campaign_id = ? ", array($_POST['campaign_id'])); |
|---|
| 67 | $arrSearch = unserialize($search_data); |
|---|
| 68 | foreach ($arrSearch as $key => $val) { |
|---|
| 69 | $_POST[$key] = $val; |
|---|
| 70 | } |
|---|
| 71 | } |
|---|
| 72 | |
|---|
| 73 | // POSTÃͤΰú¤·Ñ¤® |
|---|
| 74 | $objPage->arrForm = $_POST; |
|---|
| 75 | |
|---|
| 76 | // ¸¡º÷¥ï¡¼¥É¤Î°ú¤·Ñ¤® |
|---|
| 77 | foreach ($_POST as $key => $val) { |
|---|
| 78 | if (ereg("^search_", $key) || ereg("^campaign_", $key)) { |
|---|
| 79 | switch($key) { |
|---|
| 80 | case 'search_product_flag': |
|---|
| 81 | case 'search_status': |
|---|
| 82 | $objPage->arrHidden[$key] = sfMergeParamCheckBoxes($val); |
|---|
| 83 | if(!is_array($val)) { |
|---|
| 84 | $objPage->arrForm[$key] = split("-", $val); |
|---|
| 85 | } |
|---|
| 86 | break; |
|---|
| 87 | default: |
|---|
| 88 | $objPage->arrHidden[$key] = $val; |
|---|
| 89 | break; |
|---|
| 90 | } |
|---|
| 91 | } |
|---|
| 92 | } |
|---|
| 93 | |
|---|
| 94 | // ¥Ú¡¼¥¸Á÷¤êÍÑ |
|---|
| 95 | $objPage->arrHidden['search_pageno'] = $_POST['search_pageno']; |
|---|
| 96 | |
|---|
| 97 | // ¾¦Éʺï½ü |
|---|
| 98 | if ($_POST['mode'] == "delete") { |
|---|
| 99 | |
|---|
| 100 | if($_POST['category_id'] != "") { |
|---|
| 101 | // ¥é¥ó¥¯ÉÕ¤¥ì¥³¡¼¥É¤Îºï½ü |
|---|
| 102 | $where = "category_id = " . addslashes($_POST['category_id']); |
|---|
| 103 | sfDeleteRankRecord("dtb_products", "product_id", $_POST['product_id'], $where); |
|---|
| 104 | } else { |
|---|
| 105 | sfDeleteRankRecord("dtb_products", "product_id", $_POST['product_id']); |
|---|
| 106 | } |
|---|
| 107 | // »Ò¥Æ¡¼¥Ö¥ë(¾¦Éʵ¬³Ê)¤Îºï½ü |
|---|
| 108 | $objQuery = new SC_Query(); |
|---|
| 109 | $objQuery->delete("dtb_products_class", "product_id = ?", array($_POST['product_id'])); |
|---|
| 110 | |
|---|
| 111 | // ·ï¿ô¥«¥¦¥ó¥È¥Ð¥Ã¥Á¼Â¹Ô |
|---|
| 112 | sfCategory_Count($objQuery); |
|---|
| 113 | } |
|---|
| 114 | |
|---|
| 115 | |
|---|
| 116 | if ($_POST['mode'] == "search" || $_POST['mode'] == "csv" || $_POST['mode'] == "delete" || $_POST['mode'] == "delete_all" || $_POST['mode'] == "camp_search") { |
|---|
| 117 | // ÆþÎÏʸ»ú¤Î¶¯À©ÊÑ´¹ |
|---|
| 118 | lfConvertParam(); |
|---|
| 119 | // ¥¨¥é¡¼¥Á¥§¥Ã¥¯ |
|---|
| 120 | $objPage->arrErr = lfCheckError(); |
|---|
| 121 | |
|---|
| 122 | $where = "del_flg = 0"; |
|---|
| 123 | $view_where = "del_flg = 0"; |
|---|
| 124 | |
|---|
| 125 | // ÆþÎÏ¥¨¥é¡¼¤Ê¤· |
|---|
| 126 | if (count($objPage->arrErr) == 0) { |
|---|
| 127 | |
|---|
| 128 | $arrval = array(); |
|---|
| 129 | foreach ($objPage->arrForm as $key => $val) { |
|---|
| 130 | $val = sfManualEscape($val); |
|---|
| 131 | |
|---|
| 132 | if($val == "") { |
|---|
| 133 | continue; |
|---|
| 134 | } |
|---|
| 135 | |
|---|
| 136 | switch ($key) { |
|---|
| 137 | case 'search_product_id': // ¾¦ÉÊID |
|---|
| 138 | $where .= " AND product_id = ?"; |
|---|
| 139 | $view_where .= " AND product_id = ?"; |
|---|
| 140 | $arrval[] = $val; |
|---|
| 141 | break; |
|---|
| 142 | case 'search_product_class_name': //µ¬³Ê̾¾Î |
|---|
| 143 | $where_in = " (SELECT classcategory_id FROM dtb_classcategory WHERE class_id IN (SELECT class_id FROM dtb_class WHERE name LIKE ?)) "; |
|---|
| 144 | $where .= " AND product_id IN (SELECT product_id FROM dtb_products_class WHERE classcategory_id1 IN " . $where_in; |
|---|
| 145 | $where .= " OR classcategory_id2 IN" . $where_in . ")"; |
|---|
| 146 | $view_where .= " AND product_id IN (SELECT product_id FROM dtb_products_class WHERE classcategory_id1 IN " . $where_in; |
|---|
| 147 | $view_where .= " OR classcategory_id2 IN" . $where_in . ")"; |
|---|
| 148 | $arrval[] = "%$val%"; |
|---|
| 149 | $arrval[] = "%$val%"; |
|---|
| 150 | $view_where = $where; |
|---|
| 151 | break; |
|---|
| 152 | case 'search_name': // ¾¦ÉÊ̾ |
|---|
| 153 | $where .= " AND name ILIKE ?"; |
|---|
| 154 | $view_where .= " AND name ILIKE ?"; |
|---|
| 155 | $arrval[] = "%$val%"; |
|---|
| 156 | break; |
|---|
| 157 | case 'search_category_id': // ¥«¥Æ¥´¥ê¡¼ |
|---|
| 158 | list($tmp_where, $tmp_arrval) = sfGetCatWhere($val); |
|---|
| 159 | if($tmp_where != "") { |
|---|
| 160 | $where.= " AND $tmp_where"; |
|---|
| 161 | $view_where.= " AND $tmp_where"; |
|---|
| 162 | $arrval = array_merge((array)$arrval, (array)$tmp_arrval); |
|---|
| 163 | } |
|---|
| 164 | break; |
|---|
| 165 | case 'search_product_code': // ¾¦ÉÊ¥³¡¼¥É |
|---|
| 166 | $where .= " AND product_id IN (SELECT product_id FROM dtb_products_class WHERE product_code ILIKE ? GROUP BY product_id)"; |
|---|
| 167 | $view_where .= " AND EXISTS (SELECT product_id FROM dtb_products_class as cls WHERE cls.product_code ILIKE ? AND dtb_products.product_id = cls.product_id GROUP BY cls.product_id )"; |
|---|
| 168 | $arrval[] = "%$val%"; |
|---|
| 169 | break; |
|---|
| 170 | case 'search_startyear': // ÅÐÏ¿¹¹¿·Æü¡ÊFROM¡Ë |
|---|
| 171 | $date = sfGetTimestamp($_POST['search_startyear'], $_POST['search_startmonth'], $_POST['search_startday']); |
|---|
| 172 | $where.= " AND update_date >= '" . $_POST['search_startyear'] . "/" . $_POST['search_startmonth']. "/" .$_POST['search_startday'] . "'"; |
|---|
| 173 | $view_where.= " AND update_date >= '" . $_POST['search_startyear'] . "/" . $_POST['search_startmonth']. "/" .$_POST['search_startday'] . "'"; |
|---|
| 174 | break; |
|---|
| 175 | case 'search_endyear': // ÅÐÏ¿¹¹¿·Æü¡ÊTO¡Ë |
|---|
| 176 | $date = sfGetTimestamp($_POST['search_endyear'], $_POST['search_endmonth'], $_POST['search_endday']); |
|---|
| 177 | $date = date('Y/m/d', strtotime($date) + 86400); |
|---|
| 178 | $where.= " AND update_date < date('" . $date . "')"; |
|---|
| 179 | $view_where.= " AND update_date < date('" . $date . "')"; |
|---|
| 180 | break; |
|---|
| 181 | case 'search_product_flag': //¼ïÊÌ |
|---|
| 182 | global $arrSTATUS; |
|---|
| 183 | $search_product_flag = sfSearchCheckBoxes($val); |
|---|
| 184 | if($search_product_flag != "") { |
|---|
| 185 | $where.= " AND product_flag LIKE ?"; |
|---|
| 186 | $view_where.= " AND product_flag LIKE ?"; |
|---|
| 187 | $arrval[] = $search_product_flag; |
|---|
| 188 | } |
|---|
| 189 | break; |
|---|
| 190 | case 'search_status': // ¥¹¥Æ¡¼¥¿¥¹ |
|---|
| 191 | $tmp_where = ""; |
|---|
| 192 | foreach ($val as $element){ |
|---|
| 193 | if ($element != ""){ |
|---|
| 194 | if ($tmp_where == ""){ |
|---|
| 195 | $tmp_where.="AND (status LIKE ? "; |
|---|
| 196 | }else{ |
|---|
| 197 | $tmp_where.="OR status LIKE ? "; |
|---|
| 198 | } |
|---|
| 199 | $arrval[]=$element; |
|---|
| 200 | } |
|---|
| 201 | } |
|---|
| 202 | if ($tmp_where != ""){ |
|---|
| 203 | $tmp_where.=")"; |
|---|
| 204 | $where.= " $tmp_where"; |
|---|
| 205 | $view_where.= " $tmp_where"; |
|---|
| 206 | } |
|---|
| 207 | break; |
|---|
| 208 | default: |
|---|
| 209 | break; |
|---|
| 210 | } |
|---|
| 211 | } |
|---|
| 212 | |
|---|
| 213 | $order = "update_date DESC, product_id DESC"; |
|---|
| 214 | $objQuery = new SC_Query(); |
|---|
| 215 | |
|---|
| 216 | switch($_POST['mode']) { |
|---|
| 217 | case 'csv': |
|---|
| 218 | // ¥ª¥×¥·¥ç¥ó¤Î»ØÄê |
|---|
| 219 | $option = "ORDER BY $order"; |
|---|
| 220 | // CSV½ÐÎÏ¥¿¥¤¥È¥ë¹Ô¤ÎºîÀ® |
|---|
| 221 | $arrOutput = sfSwapArray(sfgetCsvOutput(1, " WHERE csv_id = 1 AND status = 1")); |
|---|
| 222 | |
|---|
| 223 | if (count($arrOutput) <= 0) break; |
|---|
| 224 | |
|---|
| 225 | $arrOutputCols = $arrOutput['col']; |
|---|
| 226 | $arrOutputTitle = $arrOutput['disp_name']; |
|---|
| 227 | |
|---|
| 228 | $head = sfGetCSVList($arrOutputTitle); |
|---|
| 229 | |
|---|
| 230 | $data = lfGetProductsCSV($where, $option, $arrval, $arrOutputCols); |
|---|
| 231 | |
|---|
| 232 | // CSV¤òÁ÷¿®¤¹¤ë¡£ |
|---|
| 233 | sfCSVDownload($head.$data); |
|---|
| 234 | exit; |
|---|
| 235 | break; |
|---|
| 236 | case 'delete_all': |
|---|
| 237 | // ¸¡º÷·ë²Ì¤ò¤¹¤Ù¤Æºï½ü |
|---|
| 238 | $where = "product_id IN (SELECT product_id FROM vw_products_nonclass AS noncls WHERE $where)"; |
|---|
| 239 | $sqlval['del_flg'] = 1; |
|---|
| 240 | $objQuery->update("dtb_products", $sqlval, $where, $arrval); |
|---|
| 241 | break; |
|---|
| 242 | default: |
|---|
| 243 | // ÆÉ¤ß¹þ¤àÎó¤È¥Æ¡¼¥Ö¥ë¤Î»ØÄê |
|---|
| 244 | $col = "product_id, name, category_id, main_list_image, status, product_code, price01, price02, stock, stock_unlimited"; |
|---|
| 245 | $from = "vw_products_nonclass AS noncls "; |
|---|
| 246 | |
|---|
| 247 | // ¹Ô¿ô¤Î¼èÆÀ |
|---|
| 248 | $linemax = $objQuery->count("dtb_products", $view_where, $arrval); |
|---|
| 249 | $objPage->tpl_linemax = $linemax; // ²¿·ï¤¬³ºÅö¤·¤Þ¤·¤¿¡£É½¼¨ÍÑ |
|---|
| 250 | |
|---|
| 251 | // ¥Ú¡¼¥¸Á÷¤ê¤Î½èÍý |
|---|
| 252 | if(is_numeric($_POST['search_page_max'])) { |
|---|
| 253 | $page_max = $_POST['search_page_max']; |
|---|
| 254 | } else { |
|---|
| 255 | $page_max = SEARCH_PMAX; |
|---|
| 256 | } |
|---|
| 257 | |
|---|
| 258 | // ¥Ú¡¼¥¸Á÷¤ê¤Î¼èÆÀ |
|---|
| 259 | $objNavi = new SC_PageNavi($_POST['search_pageno'], $linemax, $page_max, "fnNaviSearchPage", NAVI_PMAX); |
|---|
| 260 | $startno = $objNavi->start_row; |
|---|
| 261 | $objPage->arrPagenavi = $objNavi->arrPagenavi; |
|---|
| 262 | |
|---|
| 263 | //¥¥ã¥ó¥Ú¡¼¥ó¾¦Éʸ¡º÷»þ¤Ï¡¢Á´·ë²Ì¤Î¾¦ÉÊID¤òÊÑ¿ô¤Ë³ÊǼ¤¹¤ë |
|---|
| 264 | if($_POST['search_mode'] == 'campaign') { |
|---|
| 265 | $arrRet = $objQuery->select($col, $from, $where, $arrval); |
|---|
| 266 | if(count($arrRet) > 0) { |
|---|
| 267 | $arrRet = sfSwapArray($arrRet); |
|---|
| 268 | $pid = implode("-", $arrRet['product_id']); |
|---|
| 269 | $objPage->arrHidden['campaign_product_id'] = $pid; |
|---|
| 270 | } |
|---|
| 271 | } |
|---|
| 272 | |
|---|
| 273 | // ¼èÆÀÈϰϤλØÄê(³«»Ï¹ÔÈֹ桢¹Ô¿ô¤Î¥»¥Ã¥È) |
|---|
| 274 | if(DB_TYPE != "mysql") $objQuery->setlimitoffset($page_max, $startno); |
|---|
| 275 | // ɽ¼¨½ç½ø |
|---|
| 276 | $objQuery->setorder($order); |
|---|
| 277 | |
|---|
| 278 | // view¤â¹Ê¹þ¤ß¤ò¤«¤±¤ë(mysqlÍÑ) |
|---|
| 279 | sfViewWhere("&&noncls_where&&", $view_where, $arrval, $objQuery->order . " " . $objQuery->setlimitoffset($page_max, $startno, true)); |
|---|
| 280 | |
|---|
| 281 | // ¸¡º÷·ë²Ì¤Î¼èÆÀ |
|---|
| 282 | $objPage->arrProducts = $objQuery->select($col, $from, $where, $arrval); |
|---|
| 283 | |
|---|
| 284 | break; |
|---|
| 285 | } |
|---|
| 286 | } |
|---|
| 287 | } |
|---|
| 288 | |
|---|
| 289 | // ¥«¥Æ¥´¥ê¤ÎÆÉ¹þ |
|---|
| 290 | $objPage->arrCatList = sfGetCategoryList(); |
|---|
| 291 | $objPage->arrCatIDName = lfGetIDName($objPage->arrCatList); |
|---|
| 292 | |
|---|
| 293 | // ²èÌ̤Îɽ¼¨ |
|---|
| 294 | $objView->assignobj($objPage); |
|---|
| 295 | $objView->display(MAIN_FRAME); |
|---|
| 296 | |
|---|
| 297 | //--------------------------------------------------------------------------------------------------------------------------------------------------------- |
|---|
| 298 | |
|---|
| 299 | // ¼èÆÀʸ»úÎó¤ÎÊÑ´¹ |
|---|
| 300 | function lfConvertParam() { |
|---|
| 301 | global $objPage; |
|---|
| 302 | /* |
|---|
| 303 | * ʸ»úÎó¤ÎÊÑ´¹ |
|---|
| 304 | * K : ¡ÖȾ³Ñ(Êݶ¸)ÊÒ²¾Ì¾¡×¤ò¡ÖÁ´³ÑÊÒ²¾Ì¾¡×¤ËÊÑ´¹ |
|---|
| 305 | * C : ¡ÖÁ´³Ñ¤Ò¤é²¾Ì¾¡×¤ò¡ÖÁ´³Ñ¤«¤¿²¾Ì¾¡×¤ËÊÑ´¹ |
|---|
| 306 | * V : ÂùÅÀÉÕ¤¤Îʸ»ú¤ò°ìʸ»ú¤ËÊÑ´¹¡£"K","H"¤È¶¦¤Ë»ÈÍѤ·¤Þ¤¹ |
|---|
| 307 | * n : ¡ÖÁ´³Ñ¡×¿ô»ú¤ò¡ÖȾ³Ñ(Êݶ¸)¡×¤ËÊÑ´¹ |
|---|
| 308 | */ |
|---|
| 309 | $arrConvList['search_name'] = "KVa"; |
|---|
| 310 | $arrConvList['search_product_code'] = "KVa"; |
|---|
| 311 | |
|---|
| 312 | // ʸ»úÊÑ´¹ |
|---|
| 313 | foreach ($arrConvList as $key => $val) { |
|---|
| 314 | // POST¤µ¤ì¤Æ¤¤¿ÃͤΤßÊÑ´¹¤¹¤ë¡£ |
|---|
| 315 | if(isset($objPage->arrForm[$key])) { |
|---|
| 316 | $objPage->arrForm[$key] = mb_convert_kana($objPage->arrForm[$key] ,$val); |
|---|
| 317 | } |
|---|
| 318 | } |
|---|
| 319 | } |
|---|
| 320 | |
|---|
| 321 | // ¥¨¥é¡¼¥Á¥§¥Ã¥¯ |
|---|
| 322 | // ÆþÎÏ¥¨¥é¡¼¥Á¥§¥Ã¥¯ |
|---|
| 323 | function lfCheckError() { |
|---|
| 324 | $objErr = new SC_CheckError(); |
|---|
| 325 | $objErr->doFunc(array("¾¦ÉÊID", "search_product_id"), array("NUM_CHECK")); |
|---|
| 326 | $objErr->doFunc(array("³«»ÏÆü", "search_startyear", "search_startmonth", "search_startday"), array("CHECK_DATE")); |
|---|
| 327 | $objErr->doFunc(array("½ªÎ»Æü", "search_endyear", "search_endmonth", "search_endday"), array("CHECK_DATE")); |
|---|
| 328 | $objErr->doFunc(array("³«»ÏÆü", "½ªÎ»Æü", "search_startyear", "search_startmonth", "search_startday", "search_endyear", "search_endmonth", "search_endday"), array("CHECK_SET_TERM")); |
|---|
| 329 | return $objErr->arrErr; |
|---|
| 330 | } |
|---|
| 331 | |
|---|
| 332 | // ¥Á¥§¥Ã¥¯¥Ü¥Ã¥¯¥¹ÍÑWHEREʸºîÀ® |
|---|
| 333 | function lfGetCBWhere($key, $max) { |
|---|
| 334 | $str = ""; |
|---|
| 335 | $find = false; |
|---|
| 336 | for ($cnt = 1; $cnt <= $max; $cnt++) { |
|---|
| 337 | if ($_POST[$key . $cnt] == "1") { |
|---|
| 338 | $str.= "1"; |
|---|
| 339 | $find = true; |
|---|
| 340 | } else { |
|---|
| 341 | $str.= "_"; |
|---|
| 342 | } |
|---|
| 343 | } |
|---|
| 344 | if (!$find) { |
|---|
| 345 | $str = ""; |
|---|
| 346 | } |
|---|
| 347 | return $str; |
|---|
| 348 | } |
|---|
| 349 | |
|---|
| 350 | // ¥«¥Æ¥´¥êID¤ò¥¡¼¡¢¥«¥Æ¥´¥ê̾¤òÃͤˤ¹¤ëÇÛÎó¤òÊÖ¤¹¡£ |
|---|
| 351 | function lfGetIDName($arrCatList) { |
|---|
| 352 | $max = count($arrCatList); |
|---|
| 353 | for ($cnt = 0; $cnt < $max; $cnt++ ) { |
|---|
| 354 | $key = $arrCatList[$cnt]['category_id']; |
|---|
| 355 | $val = $arrCatList[$cnt]['category_name']; |
|---|
| 356 | $arrRet[$key] = $val; |
|---|
| 357 | } |
|---|
| 358 | return $arrRet; |
|---|
| 359 | } |
|---|
| 360 | |
|---|
| 361 | ?> |
|---|