usercpshopgoodsmanage.aspx
上传用户:wenllgg125
上传日期:2020-04-09
资源大小:7277k
文件大小:18k
源码类别:

SCSI/ASPI

开发平台:

Others

  1. <%@ Page language="c#" AutoEventWireup="false" EnableViewState="false" Inherits="Discuz.Mall.Pages.usercpshopgoodsmanage" %>
  2. <%@ Import namespace="System.Data" %>
  3. <%@ Import namespace="Discuz.Common" %>
  4. <%@ Import namespace="Discuz.Forum" %>
  5. <%@ Import namespace="Discuz.Entity" %>
  6. <script runat="server">
  7. override protected void OnInit(EventArgs e)
  8. {
  9. /* 
  10. This page was created by Discuz!NT Template Engine at 2009-9-22 17:25:00.
  11. 本页面代码由Discuz!NT模板引擎生成于 2009-9-22 17:25:00. 
  12. */
  13. base.OnInit(e);
  14. templateBuilder.Capacity = 220000;
  15. templateBuilder.Append("<script type="text/javascript" src="javascript/template_usercpshopgoodsmanage.js"></");
  16. templateBuilder.Append("script>rn");
  17. templateBuilder.Append("<!--header end-->rn");
  18. templateBuilder.Append("<div id="foruminfo">rn");
  19. templateBuilder.Append(" <div id="nav">rn");
  20. templateBuilder.Append(" <a href="");
  21. templateBuilder.Append(config.Forumurl.ToString().Trim());
  22. templateBuilder.Append("" class="home">");
  23. templateBuilder.Append(config.Forumtitle.ToString().Trim());
  24. templateBuilder.Append("</a>  &raquo; <a href="usercp.aspx">用户中心</a>  &raquo; <strong>推荐商品列表</strong>rn");
  25. templateBuilder.Append(" </div>rn");
  26. templateBuilder.Append(" <div id="headsearch">rn");
  27. templateBuilder.Append(" <div id="search">rn");
  28. templateBuilder.Append(" </div>rn");
  29. templateBuilder.Append(" </div>rn");
  30. templateBuilder.Append("</div>rn");
  31. templateBuilder.Append("<!--主体-->rn");
  32. templateBuilder.Append("<div class="controlpannel">rn");
  33. templateBuilder.Append(" <div class="pannelcontent">rn");
  34. templateBuilder.Append(" <div class="pcontent">rn");
  35. templateBuilder.Append(" <!--panneldetail start-->rn");
  36. templateBuilder.Append(" <div class="panneldetail">rn");
  37. templateBuilder.Append(" <!--pannelbody start-->rn");
  38. templateBuilder.Append("                <div class="pannelbody">rn");
  39. templateBuilder.Append(" <div class="pannellist">rn");
  40. if (page_err==0)
  41. {
  42. if (ispost)
  43. {
  44. }
  45. else
  46. {
  47. templateBuilder.Append(" <form id="goodslist" name="goodslist" method="post" action="usercpshopgoodsmanage.aspx?item=");
  48. templateBuilder.Append(item.ToString());
  49. templateBuilder.Append("">rn");
  50. templateBuilder.Append(" <input type="hidden" id="operation" name="operation" value="movecategory"/>rn");
  51. templateBuilder.Append("     <input type="hidden" id="removeshopgoodscategoryid" name="removeshopgoodscategoryid" value="0"/>rn");
  52. templateBuilder.Append("     <input type="hidden" id="removegoodsid" name="removegoodsid" value="0"/>rn");
  53. templateBuilder.Append("     <input type="hidden" id="shopgoodscategoryid" name="shopgoodscategoryid" value="");
  54. templateBuilder.Append(shopgoodscategoryid.ToString());
  55. templateBuilder.Append(""/>rn");
  56. templateBuilder.Append("     <input type="submit" id="shopcategorysubmit" name="shopcategorysubmit" style="display: none" />rn");
  57. if (item=="recommend")
  58. {
  59. templateBuilder.Append("      <div class="shopsearch"><strong>推荐商品列表</strong></div>rn");
  60. if (recommendgoodslist.Count>0)
  61. {
  62. templateBuilder.Append("         <input type="submit" id="shoprecommendsubmit" name="shoprecommendsubmit" style="display: none" />rn");
  63. templateBuilder.Append("         <input type="hidden" id="cancelrecommendgoodsid" name="cancelrecommendgoodsid" value="updatedisplayorder"/>rn");
  64. templateBuilder.Append("      <ul id="photo">rn");
  65. int recommendgoodsinfo__loop__id=0;
  66. foreach(Goodsinfo recommendgoodsinfo in recommendgoodslist)
  67. {
  68. recommendgoodsinfo__loop__id++;
  69. templateBuilder.Append("          <li style="text-align:center; min-height:200px;">rn");
  70. templateBuilder.Append("         <div class="pictureimg">rn");
  71.  aspxrewriteurl = this.ShowGoodsAspxRewrite(recommendgoodsinfo.Goodsid);
  72. templateBuilder.Append("          <a href="");
  73. templateBuilder.Append(aspxrewriteurl.ToString());
  74. templateBuilder.Append("" target="_blank">rn");
  75. if (recommendgoodsinfo.Goodspic=="")
  76. {
  77. templateBuilder.Append("    <img width="80" height="80" src="templates/");
  78. templateBuilder.Append(templatepath.ToString());
  79. templateBuilder.Append("/images/NoPhoto.jpg" onerror="this.onerror=null;this.src='");
  80. templateBuilder.Append(recommendgoodsinfo.Goodspic.ToString().Trim());
  81. templateBuilder.Append("';"  title="");
  82. templateBuilder.Append(recommendgoodsinfo.Title.ToString().Trim());
  83. templateBuilder.Append("">rn");
  84. }
  85. else
  86. {
  87. templateBuilder.Append("    <img width="80" height="80" src="upload/");
  88. templateBuilder.Append(recommendgoodsinfo.Goodspic.ToString().Trim());
  89. templateBuilder.Append("" onerror="this.onerror=null;this.src='");
  90. templateBuilder.Append(recommendgoodsinfo.Goodspic.ToString().Trim());
  91. templateBuilder.Append("';"  title="");
  92. templateBuilder.Append(recommendgoodsinfo.Title.ToString().Trim());
  93. templateBuilder.Append("">rn");
  94. } //end if
  95. templateBuilder.Append("                                         </a>rn");
  96. templateBuilder.Append("         </div>rn");
  97. templateBuilder.Append("         <h4><a href="");
  98. templateBuilder.Append(aspxrewriteurl.ToString());
  99. templateBuilder.Append("" target="_blank">");
  100. templateBuilder.Append(recommendgoodsinfo.Title.ToString().Trim());
  101. templateBuilder.Append("</a> <a href="editgoods.aspx?goodsid=");
  102. templateBuilder.Append(recommendgoodsinfo.Goodsid.ToString().Trim());
  103. templateBuilder.Append("" target="_blank">[编辑]</a></h4>rn");
  104. templateBuilder.Append("         <p class="fontfamily">显示顺序:<input value="");
  105. templateBuilder.Append(recommendgoodsinfo.Displayorder.ToString().Trim());
  106. templateBuilder.Append("" name="displayorder_");
  107. templateBuilder.Append(recommendgoodsinfo.Goodsid.ToString().Trim());
  108. templateBuilder.Append("" size="1"/></p>rn");
  109. templateBuilder.Append("         <p><a href="#"  class="submitbutton" onclick="javascript:$('operation').value='cancelrecommend';$('cancelrecommendgoodsid').value=");
  110. templateBuilder.Append(recommendgoodsinfo.Goodsid.ToString().Trim());
  111. templateBuilder.Append(";$('shoprecommendsubmit').click();">取消推荐</a>rn");
  112. templateBuilder.Append("         </p>rn");
  113. templateBuilder.Append("         </li>rn");
  114. } //end loop
  115. templateBuilder.Append("     </ul>rn");
  116. templateBuilder.Append("     <a href="#"  class="submitbutton" onclick="javascript:$('operation').value='updatedisplayorder';$('shoprecommendsubmit').click();">更新商品摆放顺序</a> <br />rn");
  117. templateBuilder.Append("      </div>rn");
  118. }
  119. else
  120. {
  121. templateBuilder.Append("                               <div style="text-align:center; border: 1px solid rgb(221, 221, 221); padding: 10px; background: rgb(245, 245, 245) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-size: 14px; margin-top: 10px;">rn");
  122. templateBuilder.Append("                                   暂无推荐商品!rn");
  123. templateBuilder.Append("                               </div><BR />rn");
  124. } //end if
  125. } //end if
  126. templateBuilder.Append("                        <div class="shopsearch"><strong>商品分类:rn");
  127. templateBuilder.Append("                            <select id="jumpcategoryid" name="jumpcategoryid" onchange="javascript:window.location.href='usercpshopgoodsmanage.aspx?item=shopcategory&shopgoodscategoryid=' + this.value;">rn");
  128. templateBuilder.Append("               <option value="-1">全部商品</option>rn");
  129. if (shopcategorydt_count>0)
  130. {
  131. templateBuilder.Append("                      ");
  132. templateBuilder.Append(categoryoptions.ToString());
  133. templateBuilder.Append("rn");
  134. } //end if
  135. templateBuilder.Append("             </select></strong>rn");
  136. templateBuilder.Append("                        </div>rn");
  137. templateBuilder.Append("                        <script type="text/javascript">rn");
  138. templateBuilder.Append("                            var cats = ");
  139. templateBuilder.Append(shopcategorydata.ToString());
  140. templateBuilder.Append(";rn");
  141. templateBuilder.Append("                            selectcategory($('jumpcategoryid'), $('shopgoodscategoryid').value);rn");
  142. templateBuilder.Append("                        </");
  143. templateBuilder.Append("script>         rn");
  144. templateBuilder.Append("                        <table width="100%" cellspacing="0" cellpadding="0" border="0">rn");
  145. templateBuilder.Append("                            <thead>rn");
  146. templateBuilder.Append("                                <tr>rn");
  147. templateBuilder.Append("                                    <th></th>rn");
  148. templateBuilder.Append("                                    <th colspan="2" style="text-align: center;">商品名称</th>rn");
  149. templateBuilder.Append("                                    <th>查看交易</th>rn");
  150. if (item=="recommend")
  151. {
  152. templateBuilder.Append("<th>推荐</th>rn");
  153. } //end if
  154. if (item=="shopcategory")
  155. {
  156. templateBuilder.Append("<th>所属分类</th>rn");
  157. } //end if
  158. templateBuilder.Append("                                    <th>上架</th> rn");
  159. templateBuilder.Append("                                    <th>关闭</th> rn");
  160. templateBuilder.Append("                                    <th>最后交易</th>rn");
  161. templateBuilder.Append("                                </tr>rn");
  162. templateBuilder.Append("                            </thead>rn");
  163. templateBuilder.Append("                            <!--NtGoodsList start-->rn");
  164. int goodsinfo__loop__id=0;
  165. foreach(Goodsinfo goodsinfo in goodslist)
  166. {
  167. goodsinfo__loop__id++;
  168. templateBuilder.Append("                     <tbody>rn");
  169. templateBuilder.Append("                                <tr class="messagetable" onmouseover="this.className='messagetableon'" onmouseout="this.className='messagetable'">rn");
  170.  aspxrewriteurl = this.ShowGoodsAspxRewrite(goodsinfo.Goodsid);
  171. templateBuilder.Append("                                    <td style="width: 30px;"><input name="goodsid" type="checkbox" id="goodsid_");
  172. templateBuilder.Append(goodsinfo.Goodsid.ToString().Trim());
  173. templateBuilder.Append("" value="");
  174. templateBuilder.Append(goodsinfo.Goodsid.ToString().Trim());
  175. templateBuilder.Append("" style="margin-top:8px;" rn");
  176. if (item=="recommend" && goodsinfo.Recommend>0)
  177. {
  178. templateBuilder.Append("disabled="true"rn");
  179. } //end if
  180. templateBuilder.Append("/></td>rn");
  181. templateBuilder.Append("                                    <td style="width: 120px; padding:2px 0;"><a href="");
  182. templateBuilder.Append(aspxrewriteurl.ToString());
  183. templateBuilder.Append("" target="_blank">rn");
  184. templateBuilder.Append("                                        <a href="");
  185. templateBuilder.Append(aspxrewriteurl.ToString());
  186. templateBuilder.Append("" target="_blank">rn");
  187. if (goodsinfo.Goodspic=="")
  188. {
  189. templateBuilder.Append("                             <img width="50" height="50" src="templates/");
  190. templateBuilder.Append(templatepath.ToString());
  191. templateBuilder.Append("/images/NoPhoto.jpg" onerror="this.onerror=null;this.src='");
  192. templateBuilder.Append(goodsinfo.Goodspic.ToString().Trim());
  193. templateBuilder.Append("';"  title="");
  194. templateBuilder.Append(goodsinfo.Title.ToString().Trim());
  195. templateBuilder.Append("">rn");
  196. }
  197. else
  198. {
  199. templateBuilder.Append("                             <img width="50" height="50" src="upload/");
  200. templateBuilder.Append(goodsinfo.Goodspic.ToString().Trim());
  201. templateBuilder.Append("" onerror="this.onerror=null;this.src='");
  202. templateBuilder.Append(goodsinfo.Goodspic.ToString().Trim());
  203. templateBuilder.Append("';"  title="");
  204. templateBuilder.Append(goodsinfo.Title.ToString().Trim());
  205. templateBuilder.Append("">rn");
  206. } //end if
  207. templateBuilder.Append("                                        </a>rn");
  208. templateBuilder.Append("                                    </td>rn");
  209. templateBuilder.Append("                                    <td style="text-align: left;"><a href="");
  210. templateBuilder.Append(aspxrewriteurl.ToString());
  211. templateBuilder.Append("" target="_blank">");
  212. templateBuilder.Append(goodsinfo.Title.ToString().Trim());
  213. templateBuilder.Append("</a> <a href="editgoods.aspx?goodsid=");
  214. templateBuilder.Append(goodsinfo.Goodsid.ToString().Trim());
  215. templateBuilder.Append("" target="_blank">[编辑]</a></td>rn");
  216. templateBuilder.Append("                                    <td><a href="usercpmygoods.aspx?item=selltrade&goodsid=");
  217. templateBuilder.Append(goodsinfo.Goodsid.ToString().Trim());
  218. templateBuilder.Append("" target="_blank">进入</td>rn");
  219. if (item=="recommend")
  220. {
  221. templateBuilder.Append("                                    <td>rn");
  222. if (goodsinfo.Recommend>0)
  223. {
  224. templateBuilder.Append("<font color="red">已推荐</font>rn");
  225. }
  226. else
  227. {
  228. templateBuilder.Append("未推荐rn");
  229. } //end if
  230. templateBuilder.Append("</td>rn");
  231. } //end if
  232. if (item=="shopcategory")
  233. {
  234. templateBuilder.Append("                                    <td ><script type="text/javascript">bindshopgoodscategory('");
  235. templateBuilder.Append(goodsinfo.Shopcategorylist.ToString().Trim());
  236. templateBuilder.Append("',");
  237. templateBuilder.Append(goodsinfo.Goodsid.ToString().Trim());
  238. templateBuilder.Append(");</");
  239. templateBuilder.Append("script></td>rn");
  240. } //end if
  241. templateBuilder.Append("                                    <td>rn");
  242. if (goodsinfo.Displayorder>=0)
  243. {
  244. templateBuilder.Append("已上架rn");
  245. }
  246. else
  247. {
  248. templateBuilder.Append("未上架rn");
  249. } //end if
  250. templateBuilder.Append("</td>rn");
  251. templateBuilder.Append("                                    <td>rn");
  252. if (goodsinfo.Closed==1)
  253. {
  254. templateBuilder.Append("未关闭rn");
  255. }
  256. else
  257. {
  258. templateBuilder.Append("已关闭rn");
  259. } //end if
  260. templateBuilder.Append("</td>rn");
  261. templateBuilder.Append("                                    <td>rn");
  262. if (goodsinfo.Lastbuyer!="")
  263. {
  264. templateBuilder.Append("<a href="redirect.php?tid=45&goto=lastpost#lastpost">");
  265. templateBuilder.Append(goodsinfo.Lasttrade.ToString().Trim());
  266. templateBuilder.Append("</a><br/> by ");
  267. templateBuilder.Append(goodsinfo.Lastbuyer.ToString().Trim());
  268. templateBuilder.Append("rn");
  269. }
  270. else
  271. {
  272. templateBuilder.Append("暂无交易rn");
  273. } //end if
  274. templateBuilder.Append("</td>rn");
  275. templateBuilder.Append("                                </tr>rn");
  276. templateBuilder.Append("                            </tbody>rn");
  277. templateBuilder.Append("                            <!--NtGoodsList end-->                         rn");
  278. } //end loop
  279. templateBuilder.Append("                        </table>   rn");
  280. templateBuilder.Append("     <div class="pannelmessage">rn");
  281. templateBuilder.Append("     <div class="pannelleft" style="width: 100%;">rn");
  282. templateBuilder.Append("     <a href="javascript:;"  onclick="checkgoodsbox($('goodslist'),this)" checked="true" class="selectall">全选</a>&nbsp;&nbsp;&nbsp;rn");
  283. if (item=="shopcategory")
  284. {
  285. templateBuilder.Append("移动商品到分类: rn");
  286. if (shopcategorydt_count>0)
  287. {
  288. templateBuilder.Append("                           <select id="selectcategoryid" name="selectcategoryid">rn");
  289. templateBuilder.Append("                               ");
  290. templateBuilder.Append(categoryoptions.ToString());
  291. templateBuilder.Append("rn");
  292. templateBuilder.Append("                           </select>rn");
  293. } //end if
  294. templateBuilder.Append("                                  <a href="#"  class="selectall" onclick="javascript:$('operation').value='movecategory';$('shopcategorysubmit').click();">移动</a>rn");
  295. } //end if
  296. if (item=="recommend" && recommendgoodslist.Count<5)
  297. {
  298. templateBuilder.Append("                                  <a href="#"  class="selectall" onclick="javascript:$('operation').value='recommend';$('shopcategorysubmit').click();">推荐</a> 您最多可推荐的商品数: 5rn");
  299. } //end if
  300. templateBuilder.Append("     </div>rn");
  301. templateBuilder.Append("     </div>rn");
  302. templateBuilder.Append(" </form>rn");
  303. templateBuilder.Append(" <div class="pages_btns">rn");
  304. templateBuilder.Append(" <div class="pages">rn");
  305. templateBuilder.Append(" <em>");
  306. templateBuilder.Append(pageid.ToString());
  307. templateBuilder.Append("/");
  308. templateBuilder.Append(pagecount.ToString());
  309. templateBuilder.Append("页</em>");
  310. templateBuilder.Append(pagenumbers.ToString());
  311. templateBuilder.Append("rn");
  312. templateBuilder.Append(" <kbd>跳转<input name="gopage" type="text" id="gopage" onKeyDown="if(event.keyCode==13) { window.location.href='usercpshopgoodsmanage.aspx?item=");
  313. templateBuilder.Append(item.ToString());
  314. templateBuilder.Append("&shopcategoryid=");
  315. templateBuilder.Append(shopgoodscategoryid.ToString());
  316. templateBuilder.Append("&page=' + (parseInt(this.value) > 0 ? parseInt(this.value) : 1);}" size="4" maxlength="9"/>页</kbd>rn");
  317. templateBuilder.Append(" </div>rn");
  318. templateBuilder.Append(" </div>rn");
  319. } //end if
  320. }
  321. else
  322. {
  323. } //end if
  324. templateBuilder.Append("         </div>rn");
  325. templateBuilder.Append("     </div>   rn");
  326. templateBuilder.Append("     <!--pannelbody end-->rn");
  327. templateBuilder.Append("        </div>rn");
  328. templateBuilder.Append("        <!--panneldetail end-->rn");
  329. templateBuilder.Append("    </div>rn");
  330. templateBuilder.Append("   </div>rn");
  331. templateBuilder.Append("</div>rn");
  332. templateBuilder.Append("<!--主体-->rn");
  333. Response.Write(templateBuilder.ToString());
  334. }
  335. </script>