Changeset 21802 for branches/version-2_12-dev/data
- Timestamp:
- 2012/05/01 15:17:59 (12 years ago)
- Location:
- branches/version-2_12-dev/data
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/Smarty/templates/admin/contents/recommend.tpl
r21539 r21802 64 64 } 65 65 66 function lfnSortItem(mode,data){ 67 var flag = true; 68 var checkRank = '<!--{$checkRank|h}-->'; 69 if ( checkRank ){ 70 if( ! window.confirm('さきほど選択した<!--{$checkRank|h}-->位の情報は破棄されます。宜しいでしょうか')){ 71 flag = false; 72 } 73 } 74 75 if ( flag ){ 76 document.form1["mode"].value = mode; 77 document.form1["rank"].value = data; 78 document.form1.submit(); 79 } 80 } 81 66 82 //--> 67 83 </script> 68 69 84 70 85 <!--{section name=cnt loop=$tpl_disp_max}--> … … 81 96 <th>編集</th> 82 97 <th>削除</th> 98 <th>並び替え</th> 83 99 </tr> 84 100 … … 137 153 <!--{/if}--> 138 154 </td> 155 <td> 156 <!--{* 移動 *}--> 157 <!--{if $smarty.section.cnt.iteration != 1 && $arrItems[$smarty.section.cnt.iteration].product_id}--> 158 <a href="?" onclick="lfnSortItem('up',<!--{$arrItems[$smarty.section.cnt.iteration].rank}-->); return false;">上へ</a><br> 159 <!--{/if}--> 160 <!--{if $smarty.section.cnt.iteration != $tpl_disp_max && $arrItems[$smarty.section.cnt.iteration].product_id}--> 161 <a href="?" onclick="lfnSortItem('down',<!--{$arrItems[$smarty.section.cnt.iteration].rank}-->); return false;">下へ</a> 162 <!--{/if}--> 163 </td> 139 164 </tr> 140 165 -
branches/version-2_12-dev/data/class/pages/admin/contents/LC_Page_Admin_Contents_Recommend.php
r21743 r21802 69 69 */ 70 70 function action() { 71 72 71 $objFormParam = new SC_FormParam_Ex(); 73 72 $this->lfInitParam($objFormParam); 74 73 $objFormParam->setParam($_POST); 75 74 $objFormParam->convParam(); 75 $objQuery =& SC_Query_Ex::getSingletonInstance(); 76 $objDb = new SC_Helper_DB_Ex(); 76 77 77 78 switch ($this->getMode()) { 79 case 'down': //商品の並び替えをする。おすすめはデータベースの登録が昇順なので、Modeを逆にする。 80 $arrRet = $objQuery->select("best_id", "dtb_best_products", "rank = ?", array($_POST["rank"])); //おすすめidの取得 81 $best_id = $arrRet[0]["best_id"]; 82 $objDb->sfRankUp('dtb_best_products','best_id',$best_id); 83 $arrPost = $objFormParam->getHashArray(); 84 $arrItems = $this->getRecommendProducts(); 85 break; 86 87 case 'up': //商品の並び替えをする。おすすめのみデータベースの登録が昇順なので、Modeを逆にする。 88 $arrRet = $objQuery->select("best_id", "dtb_best_products", "rank = ?", array($_POST["rank"])); //おすすめidの取得 89 $best_id = $arrRet[0]["best_id"]; 90 $objDb->sfRankDown('dtb_best_products','best_id',$best_id); 91 $arrPost = $objFormParam->getHashArray(); 92 $arrItems = $this->getRecommendProducts(); 93 break; 94 78 95 case 'regist': // 商品を登録する。 79 96 $this->arrErr = $this->lfCheckError($objFormParam);
Note: See TracChangeset
for help on using the changeset viewer.