Changeset 19353
- Timestamp:
- 2010/11/07 01:47:20 (13 years ago)
- Location:
- branches/camp/camp-2_5-C/data
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/camp/camp-2_5-C/data/Smarty/templates/admin/products/index.tpl
r19350 r19353 222 222 <!--{$arrProducts[cnt].price02_min|number_format}--><br />~ <!--{$arrProducts[cnt].price02_max|number_format}--> 223 223 <!--{else}--> 224 <input type="text" name="price02_edit_<!--{$arrProducts[cnt].product_id}-->" size="8" value="<!--{$arrProducts[cnt].price02_min}-->" onchange="jQuery.post('./index.php', {'mode':'price02_edit','price02_edit_id':'<!--{$arrProducts[cnt].product_id}-->','price02_edit_value':this.value}, function(result){if(result!='ok'){alert('エラー:変更できませんでした');};});" ">224 <input type="text" name="price02_edit_<!--{$arrProducts[cnt].product_id}-->" size="8" value="<!--{$arrProducts[cnt].price02_min}-->" onchange="jQuery.post('./index.php', {'mode':'price02_edit','price02_edit_id':'<!--{$arrProducts[cnt].product_id}-->','price02_edit_value':this.value}, function(result){if(result!='ok'){alert('エラー:変更できませんでした');};});"> 225 225 <!--{/if}--> 226 226 </td> … … 236 236 無制限 237 237 <!--{else}--> 238 <input type="text" name="stock_edit_<!--{$arrProducts[cnt].product_id}-->" size="8" value="<!--{$arrProducts[cnt].stock_min}-->" onchange="jQuery.post('./index.php', {'mode':'stock_edit','stock_edit_id':'<!--{$arrProducts[cnt].product_id}-->','stock_edit_value':this.value}, function(result){if(result!='ok'){alert('エラー:変更できませんでした');};});" ">238 <input type="text" name="stock_edit_<!--{$arrProducts[cnt].product_id}-->" size="8" value="<!--{$arrProducts[cnt].stock_min}-->" onchange="jQuery.post('./index.php', {'mode':'stock_edit','stock_edit_id':'<!--{$arrProducts[cnt].product_id}-->','stock_edit_value':this.value}, function(result){if(result!='ok'){alert('エラー:変更できませんでした');};});"> 239 239 <!--{/if}--> 240 240 <!--{/if}--> … … 243 243 <!--{assign var=key value=$arrProducts[cnt].status}--> 244 244 <td rowspan="2"> 245 <select name="status" >245 <select name="status" onchange="jQuery.post('./index.php', {'mode':'status_edit','status_edit_id':'<!--{$arrProducts[cnt].product_id}-->','status_edit_value':this.value}, function(result){if(result!='ok'){alert('エラー:変更できませんでした');};});"> 246 246 <option value="1"<!--{if $arrDISP[$key]=='公開'}--> selected<!--{/if}-->>公開</option> 247 247 <option value="2"<!--{if $arrDISP[$key]=='非公開'}--> selected<!--{/if}-->>非公開</option> -
branches/camp/camp-2_5-C/data/class/pages/admin/products/LC_Page_Admin_Products.php
r19337 r19353 133 133 $where = "product_id=" . $_POST['stock_edit_id']; 134 134 $objQuery->update("dtb_products_class", $data, $where); 135 if($objQuery->isError()) 136 { 137 $err_flag = true; 138 } 139 140 //トランザクション終了 141 if($err_flag) 142 { 143 $objQuery->rollback(); 144 echo("error"); 145 } 146 else 147 { 148 $objQuery->commit(); 149 echo("ok"); 150 } 151 //戻る 152 exit; 153 } 154 155 // 商品一覧での公開/非公開変更 156 if($_POST['mode'] === "status_edit") { 157 $objQuery = new SC_Query(); 158 159 //トランザクション開始 160 $objQuery->begin(); 161 //エラーフラグ初期化 162 $err_flag = false; 163 164 // データ更新 165 $data["status"] = $_POST['status_edit_value']; 166 $where = "product_id=" . $_POST['status_edit_id']; 167 $objQuery->update("dtb_products", $data, $where); 135 168 if($objQuery->isError()) 136 169 {
Note: See TracChangeset
for help on using the changeset viewer.