- Timestamp:
- 2007/07/20 15:58:59 (17 years ago)
- Location:
- branches/feature-module-update
- Files:
-
- 1 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-module-update
-
Property
svn:ignore
set to
.cache
.settings
.projectOptions
-
Property
svn:ignore
set to
-
branches/feature-module-update/html/admin/contents/campaign_create_tag.php
r12157 r15078 14 14 $this->tpl_mainpage = 'contents/campaign_create_tag.tpl'; 15 15 $this->tpl_mainno = 'create'; 16 $this->tpl_subtitle = ' ¾¦ÉÊÀßÄê';16 $this->tpl_subtitle = '商品設定'; 17 17 /* 18 session_start »þ¤Îno-cache¥Ø¥Ã¥À¡¼¤òÍÞÀ©¤¹¤ë¤³¤È¤Ç19 ¡ÖÌá¤ë¡×¥Ü¥¿¥ó»ÈÍÑ»þ¤Î͸ú´ü¸ÂÀÚ¤ìɽ¼¨¤òÍÞÀ©¤¹¤ë¡£20 private-no-expire: ¥¯¥é¥¤¥¢¥ó¥È¤Î¥¥ã¥Ã¥·¥å¤òµö²Ä¤¹¤ë¡£18 session_start時のno-cacheヘッダーを抑制することで 19 「戻る」ボタン使用時の有効期限切れ表示を抑制する。 20 private-no-expire:クライアントのキャッシュを許可する。 21 21 */ 22 22 session_cache_limiter('private-no-expire'); … … 29 29 $objQuery = new SC_Query(); 30 30 31 // ǧ¾Ú²ÄÈݤÎȽÄê31 // 認証可否の判定 32 32 sfIsSuccess($objSess); 33 33 34 34 switch($_POST['mode']) { 35 35 36 // ¾¦Éʸ¡º÷36 // 商品検索 37 37 case 'search': 38 // POST Ãͤΰú¤·Ñ¤®38 // POST値の引き継ぎ 39 39 $objPage->arrForm = $_POST; 40 // ÆþÎÏʸ»ú¤Î¶¯À©ÊÑ´¹40 // 入力文字の強制変換 41 41 lfConvertParam(); 42 42 43 43 $where = "del_flg = 0"; 44 44 45 // where ¶çÀ¸À®45 // where句生成 46 46 foreach ($objPage->arrForm as $key => $val) { 47 47 if($val == "") { … … 55 55 break; 56 56 case 'search_category_id': 57 // »Ò¥«¥Æ¥´¥êID¤Î¼èÆÀ57 // 子カテゴリIDの取得 58 58 $arrRet = sfGetChildsID("dtb_category", "parent_category_id", "category_id", $val); 59 59 $tmp_where = ""; … … 82 82 $order = "update_date DESC, product_id DESC "; 83 83 84 // Æɤ߹þ¤àÎó¤È¥Æ¡¼¥Ö¥ë¤Î»ØÄê84 // 読み込む列とテーブルの指定 85 85 $col = "product_id, name, category_id, main_list_image, status, product_code, price01, stock, stock_unlimited"; 86 86 $from = "vw_products_nonclass AS noncls "; 87 87 88 // ¹Ô¿ô¤Î¼èÆÀ88 // 行数の取得 89 89 $linemax = $objQuery->count("dtb_products", $where, $arrval); 90 $objPage->tpl_linemax = $linemax; // ²¿·ï¤¬³ºÅö¤·¤Þ¤·¤¿¡£É½¼¨ÍÑ90 $objPage->tpl_linemax = $linemax; // 何件が該当しました。表示用 91 91 92 // ¥Ú¡¼¥¸Á÷¤ê¤Î½èÍý92 // ページ送りの処理 93 93 if(is_numeric($_POST['search_page_max'])) { 94 94 $page_max = $_POST['search_page_max']; … … 97 97 } 98 98 99 // ¥Ú¡¼¥¸Á÷¤ê¤Î¼èÆÀ99 // ページ送りの取得 100 100 $objNavi = new SC_PageNavi($_POST['search_pageno'], $linemax, $page_max, "fnNaviSearchOnlyPage", NAVI_PMAX); 101 $objPage->tpl_strnavi = $objNavi->strnavi; // ɽ¼¨Ê¸»úÎó101 $objPage->tpl_strnavi = $objNavi->strnavi; // 表示文字列 102 102 $startno = $objNavi->start_row; 103 103 104 // ¼èÆÀÈϰϤλØÄê(³«»Ï¹ÔÈֹ桢¹Ô¿ô¤Î¥»¥Ã¥È)104 // 取得範囲の指定(開始行番号、行数のセット) 105 105 if(DB_TYPE != "mysql") $objQuery->setlimitoffset($page_max, $startno); 106 // ɽ¼¨½ç½ø106 // 表示順序 107 107 $objQuery->setorder($order); 108 108 109 // view ¤â¹Ê¹þ¤ß¤ò¤«¤±¤ë(mysqlÍÑ)109 // viewも絞込みをかける(mysql用) 110 110 sfViewWhere("&&noncls_where&&", $where, $arrval, $objQuery->order . " " . $objQuery->setlimitoffset($page_max, $startno, true)); 111 111 112 // ¸¡º÷·ë²Ì¤Î¼èÆÀ112 // 検索結果の取得 113 113 $objPage->arrProducts = $objQuery->select($col, $from, $where, $arrval); 114 114 break; 115 115 116 // ¥¿¥°É½¼¨116 // タグ表示 117 117 case 'view': 118 118 119 // ¥¿¥°¤òÀ¸À®119 // タグを生成 120 120 $create_tag = lfGetCreateTag($_POST['product_id']); 121 121 $objPage->tpl_create_tag = $create_tag; … … 123 123 } 124 124 125 // ¥«¥Æ¥´¥ê¼èÆÀ125 // カテゴリ取得 126 126 $objPage->arrCatList = sfGetCategoryList(); 127 127 128 //---- ¡¡¥Ú¡¼¥¸É½¼¨128 //---- ページ表示 129 129 $objView->assignobj($objPage); 130 130 $objView->display($objPage->tpl_mainpage); … … 132 132 //--------------------------------------------------------------------------------------------------------------------------------------------------------- 133 133 134 /* ¼èÆÀʸ»úÎó¤ÎÊÑ´¹*/134 /* 取得文字列の変換 */ 135 135 function lfConvertParam() { 136 136 global $objPage; 137 137 /* 138 * ʸ»úÎó¤ÎÊÑ´¹139 * K : ¡ÖȾ³Ñ(Êݶ¸)ÊÒ²¾Ì¾¡×¤ò¡ÖÁ´³ÑÊÒ²¾Ì¾¡×¤ËÊÑ´¹140 * C : ¡ÖÁ´³Ñ¤Ò¤é²¾Ì¾¡×¤ò¡ÖÁ´³Ñ¤«¤¿²¾Ì¾¡×¤ËÊÑ´¹141 * V : ÂùÅÀÉÕ¤¤Îʸ»ú¤ò°ìʸ»ú¤ËÊÑ´¹¡£"K","H"¤È¶¦¤Ë»ÈÍѤ·¤Þ¤¹142 * n : ¡ÖÁ´³Ñ¡×¿ô»ú¤ò¡ÖȾ³Ñ(Êݶ¸)¡×¤ËÊÑ´¹138 * 文字列の変換 139 * K : 「半角(ハンカク)片仮名」を「全角片仮名」に変換 140 * C : 「全角ひら仮名」を「全角かた仮名」に変換 141 * V : 濁点付きの文字を一文字に変換。"K","H"と共に使用します 142 * n : 「全角」数字を「半角(ハンカク)」に変換 143 143 */ 144 144 $arrConvList['search_name'] = "KVa"; 145 145 $arrConvList['search_product_code'] = "KVa"; 146 146 147 // ʸ»úÊÑ´¹147 // 文字変換 148 148 foreach ($arrConvList as $key => $val) { 149 // POST ¤µ¤ì¤Æ¤¤¿ÃͤΤßÊÑ´¹¤¹¤ë¡£149 // POSTされてきた値のみ変換する。 150 150 if(isset($objPage->arrForm[$key])) { 151 151 $objPage->arrForm[$key] = mb_convert_kana($objPage->arrForm[$key] ,$val); … … 154 154 } 155 155 156 /* ¥¿¥°¤òÀ¸À®*/156 /* タグを生成 */ 157 157 function lfGetCreateTag($product_id) { 158 158 159 159 global $objQuery; 160 160 161 // ½ñ¤¹þ¤ß¥¿¥°161 // 書き込みタグ 162 162 $read_file = file_get_contents(CAMPAIGN_BLOC_PATH . "cart_tag.tpl"); 163 163 $read_file = ereg_replace("<{assign_product_id}>", $product_id, $read_file); 164 // ¥«¡¼¥È¥¿¥°ÊݸÍÑ¥Õ¥¡¥¤¥ëºîÀ®165 $create_tag .= "<!--{* ¢§¾¦ÉÊID$product_id *}-->\n";164 // カートタグ保存用ファイル作成 165 $create_tag .= "<!--{* ▼商品ID$product_id *}-->\n"; 166 166 $create_tag .= $read_file; 167 167
Note: See TracChangeset
for help on using the changeset viewer.