<!--{include file="<!--{$oetplpath}-->widget_header.tpl"}-->

<div class="oe_content_layout">
  <!--{include file="<!--{$oetplpath}-->widget_menu.tpl"}-->

  <div class="oe_cont_rt">
    
	<div class="oe_content_widget">
	
	  <div class="oe_tab_list">
        <ul>
          <li><a href="<!--{$oefile}-->&c=diy">店招设置</a></li>
		  <li><a href="<!--{$oefile}-->&c=diy&a=nav">导航设置</a></li>
          <li><a href="<!--{$oefile}-->&c=diy&a=page">店铺背景</a></li>
		  <li><a href="<!--{$oefile}-->&c=diy&a=diyhtml">自定义内容</a></li>
		  <li class="current"><a href="<!--{$oefile}-->&c=slide">广告幻灯片</a></li>
        </ul>
      </div>

	  <form id="myform" action="<!--{$oefile}-->&c=diy" method="post" />
	  <input type="hidden" name="a" id="a" value="saveslide" />
	  <table class="oe_table_info">
		<tr>
		  <th width="12%;">幻灯片高度：</th>
		  <td width="20%"><input type="text" name="slideheight" id="slideheight" class="input-s" value="<!--{$login.shop.slideheight}-->" />px(像素)</td>
		  <td><input type="button" id="btn_post" class="submit_btn1" value="保存设置" /> </td>
		</tr>
	  </table>
	  </form>
	  <script type="text/javascript">
	  $(function(){
		$("#btn_post").bind("click", function(){
			$("form").submit();
		});
	  });
	  </script>

	  <h3 class="oe_f_title _bottom_border _margin_bottom">
	    广告幻灯片<span>（管理店铺首页的幻灯片图片）</span>
		<strong><a href="<!--{$oefile}-->&c=<!--{$c}-->&a=add">添加幻灯片+</a></strong>
	  </h3>

	  <!--{if $a == "run"}-->
	  <table class="oe_table_list_3 table_cs">
		<tr>
	      <th>图片</th>
		  <th width="20%">URL链接</th>
		  <th width="10%">排序</th>
		  <th width="18%">添加时间</th>
		  <th width="10%">状态</th>
		  <th width="15%">操作</th>
	    </tr>
		<!--{if empty($slide)}-->
		<tr>
		  <td class="text_center" colspan="6">对不起，没有找到匹配的信息！</td>
		</tr>
		<!--{else}-->
		<!--{foreach $slide as $volist}-->
		<tr>
		  <td class="text_center">
		    <img f="view" src="<!--{$volist.imgurl}-->" width="120px" height="60px" />
		  </td>
		  <td><!--{$volist.httpurl}--></td>
		  <td class="text_center"><!--{$volist.orders}--></td>
		  <td class="text_center"><!--{$volist.addtime|date_format:"%Y-%m-%d %H:%M:%S"}--></td>
		  <td class="text_center">
		  <!--{if $volist.flag == '0'}-->
		  <font color="gray">待审</font>
		  <!--{else}-->
		  <font color="green">通过</span>
		  <!--{/if}-->
		  </td>
		  <td class="text_center">
		    <a href="<!--{$oefile}-->&c=<!--{$c}-->&a=edit&id=<!--{$volist.slideid}-->">编辑</a> | 
		    <a href="<!--{$oefile}-->&c=<!--{$c}-->&a=del&id=<!--{$volist.slideid}-->">删除</a>
		  </td>
		</tr>
		<!--{/foreach}-->
		<!--{/if}-->
	  </table>
	  <div class="oe_page_layout">
	    <!--{$showpage}-->
	  </div>
	  <!--{/if}-->


	  <!--{if $a == "add"}-->
	  <form id="myform" action="<!--{$oefile}-->&c=<!--{$c}-->" method="post" />
	  <input type="hidden" name="a" id="a" value="saveadd" />
	  <table class="oe_table_info">
		<tr>
		  <td colspan="2" height="10px"> </td>
		</tr>
	    <tr>
		  <th width="15%">幻灯片图片：<font color="red"></font></th>
		  <td width="85%">
			<table class="oe_table_wrap">
			  <tr>
				<td width="60px">
				  <img f="view" style="cursor:pointer;" src="tpl/static/images/waitimg_s.jpg" width="60px" height="60px" class="_img_border" id="img_preview" />
				</td>
			    <td width="90px">
				  <div class="oe_img_upload">
					<label class="_uploadbtn">点击上传<input type="file" name="img" id="img" value="" /></label>
					<label class="_uploading" id="img_loading">
					  <img src="<!--{$urlpath}-->tpl/static/images/loading.gif" />
					</label>
					<input type="hidden" id="img_thumb" name="img_thumb" value="" />
					<input type="hidden" id="img_url" name="imgurl" value="" />
				  </div>
				  <script type="text/javascript">
				  $(function(){
					  $("#img").live("change", function(){
						oemarryUploadImg("img", "<!--{$oefile}-->&c=index&a=uploadimg&module=shop&forbidcom=1&forbidwater=1");
					  });
				  });
				  </script>
				</td>
				<td></td>
			  </tr>
			</table>
		  </td>
		</tr>

		<tr>
		  <th>幻灯片排序：</th>
		  <td>
		    <input type="text" name="orders" id="orders" class="input-s" value="<!--{$orders}-->" />
		  </td>
		</tr>
		<tr>
		  <th>URL链接：</th>
		  <td>
		    <input type="text" name="httpurl" id="httpurl" class="input-b" />
			（不填写请留空）
		  </td>
		</tr>
		<tr>
		  <th></th>
		  <td>
			<input type="button" id="btn_post" class="submit_btn1" value="添加保存" /> 
		  </td>
		</tr>
	  </table>
	  </form>
	  <script type="text/javascript">
	  $(function(){
		$("#btn_post").bind("click", function(){
			if ($("input[name='imgurl']").val().length == 0) {
				ToastShow("请上传图片");
				return false;
			}
			$("form").submit();
		});
	  });
	  </script>
	  <!--{/if}-->

	  <!--{if $a == "edit"}-->
	  <form id="myform" action="<!--{$oefile}-->&c=<!--{$c}-->" method="post" />
	  <input type="hidden" name="a" id="a" value="saveedit" />
	  <input type="hidden" name="id" id="id" value="<!--{$id}-->" />
	  <table class="oe_table_info">
		<tr>
		  <td colspan="2" height="10px"> </td>
		</tr>
	    <tr>
		  <th width="15%">幻灯片图片：<font color="red"></font></th>
		  <td width="85%">
			<table class="oe_table_wrap">
			  <tr>
				<td width="60px">
				  <img f="view" style="cursor:pointer;" src="<!--{$slide.imgurl}-->" width="60px" height="60px" class="_img_border" id="img_preview" />
				</td>
			    <td width="90px">
				  <div class="oe_img_upload">
					<label class="_uploadbtn">点击上传<input type="file" name="img" id="img" value="" /></label>
					<label class="_uploading" id="img_loading">
					  <img src="<!--{$urlpath}-->tpl/static/images/loading.gif" />
					</label>
					<input type="hidden" id="img_thumb" name="img_thumb" value="" />
					<input type="hidden" id="img_url" name="imgurl" value="<!--{$slide.imgurl}-->" />
				  </div>
				  <script type="text/javascript">
				  $(function(){
					  $("#img").live("change", function(){
						oemarryUploadImg("img", "<!--{$oefile}-->&c=index&a=uploadimg&module=shop&forbidcom=1&forbidwater=1");
					  });
				  });
				  </script>
				</td>
				<td></td>
			  </tr>
			</table>
		  </td>
		</tr>

		<tr>
		  <th>幻灯片排序：</th>
		  <td>
		    <input type="text" name="orders" id="orders" class="input-s" value="<!--{$slide.orders}-->" />
		  </td>
		</tr>
		<tr>
		  <th>URL链接：</th>
		  <td>
		    <input type="text" name="httpurl" id="httpurl" class="input-b" value="<!--{$slide.httpurl}-->" />
			（不填写请留空）
		  </td>
		</tr>
		<tr>
		  <th></th>
		  <td>
			<input type="button" id="btn_post" class="submit_btn1" value="编辑保存" /> 
		  </td>
		</tr>
	  </table>
	  </form>
	  <script type="text/javascript">
	  $(function(){
		$("#btn_post").bind("click", function(){
			if ($("input[name='imgurl']").val().length == 0) {
				ToastShow("请上传图片");
				return false;
			}
			$("form").submit();
		});
	  });
	  </script>
	  <!--{/if}-->

	</div>
	<!--//oe_content_widget End-->

  </div>
  <div class="clear"></div>
  <!--//oe_cont_rt Enc-->
</div>
<!--{include file="<!--{$oetplpath}-->widget_footer.tpl"}-->
</body>
</html>