<%@ page language="C#" autoeventwireup="true" inherits="admin_wimg, App_Web_5fvwns4r" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>上海和尘网站系统管理</title>
<link rel="stylesheet" href="style/css.css" type="text/css" /> 
<link rel="stylesheet" href="style/page.css" type="text/css" /> 

<script language="javascript" type="text/javascript" src="uploadify/jquery-1.4.2.min.js"></script>
<script language="javascript" type="text/javascript" src="uploadify/jquery.uploadify.v2.1.4.min.js"></script>
<link rel="stylesheet" href="uploadify/uploadify.css" type="text/css" /> 
<script language="javascript" type="text/javascript" src="uploadify/swfobject.js"></script>


</head>
<body>
    <form id="form1" runat="server">


<table width="100%" border="0" cellpadding="0" cellspacing="0" class="map">
  <tr>
    <td>图片管理</td>
    <td align="right"><a href="?" class="sixlink">图片信息</a> </td>
  </tr>
</table>
 
<table width="98%" border="0" cellpadding="0" cellspacing="0" class="title" align="center">
  <tr>
    <td>图片信息</td>
    <td width="50%"><span style="color:Red;"><%=title99%></span></td>
  </tr>
</table>


  <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="list">
    <thead>
    <tr class="header">
      <td align="center">中文名称</td>
      <td align="center" style="display:none;">英文名称</td>
      <td align="center">排序</td>
      <td align="center">图片</td>
      <td align="center">操作</td>
    </tr>
     </thead>

	 <asp:Repeater ID="RepeaterN" runat="server" OnItemDataBound="Repeater1_ItemDataBound" OnItemCommand="Repeater1_ItemCommand">
         <ItemTemplate>     
    <tr>
      
      <td align="center"><asp:TextBox ID="Title" Width="300px" runat="server" CssClass="input" Text='<%#Eval("title")%>' /></td>
      <td align="center" style="display:none;"><asp:TextBox ID="Title9" Width="200px" runat="server" CssClass="input" Text='<%#Eval("title9")%>' /></td>
      <td align="center"><asp:TextBox ID="Ordernumber" Width="30px" runat="server" CssClass="input" Text='<%#Eval("ordernumber")%>' /></td>
      <td align="center">
      <%#(Eval("img1")).ToString() == "" ? "" : "<img  border='0' src='../upload/" + Eval("img1") + "' height=50 align='absmiddle' />"%>
      <asp:FileUpload ID="fileUp" runat="server" Width="200px" Height="20px" Visible="false" />
      </td>
      <td align="center">
      
          <asp:ImageButton ID="ImgBtn" CommandName="Update" ImageUrl="images/icon_edit.gif" runat="server" />
          <asp:HiddenField ID="wimgid" Value='<%#Eval("wimgid")%>' runat="server" />
          <asp:HiddenField ID="wenzhangid" Value='<%#Eval("wenzhangid")%>' runat="server" />
      
      &nbsp;&nbsp;
      
     <a href="wimg.aspx?wimgid=<%#Eval("wimgid")%>&wenzhangid=<%#Eval("wenzhangid") %>&action=del&img=<%#Eval("img1")%>" onClick="javascript:return confirm('确定删除吗?');"><img src="images/icon_drop.gif" border="0" alt="删除" /></a>

      </td>
    </tr>
	     </ItemTemplate>
      </asp:Repeater> 
          
  </table>
   




<br>
<br>

<table width="98%" border="0" cellpadding="0" cellspacing="0" class="title" align="center">
  <tr>
    <td>添加图片</td>
  </tr>
</table>


  <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="add">
    <tr>
      <td width="30%" align="right">中文名称：</td>
      <td align="left"> <input runat="server" name="title" type="text" maxlength="50" class="input" id="title" style="width:300px;" />
      </td>
    </tr>
    
    <tr style="display:none;">
      <td width="30%" align="right">英文名称：</td>
      <td align="left"> <input runat="server" name="title9" type="text" maxlength="50" class="input" id="title9" style="width:300px;" />
      </td>
    </tr>    
    <tr>
      <td align="right">排序：</td>
      <td align="left"><input runat="server" name="ordernumber" type="text" maxlength="6" value="0" class="input" id="ordernumber" style="width:100px;" /></td>
    </tr>
   
    <tr> 
        <th>上传：</th>
        <td><input name="img1" maxlength="100" type="text" class="input" id="img1" style="width:300px; margin-bottom:5px;" />      
        <br /> 
        <input id="simage_upload" type="file" name="Filedata" /> 
        <span class="imgbox" style="display:none;"><img height="50" id="pic" style="margin-top:8px;" /></span> 
    </td>
    </tr>

    <tr>
      <td align="right">&nbsp;</td>
      <td align="left" valign="middle"><label>
        <asp:Button ID="Btn" runat="server" Text="确定" CssClass="btn" OnClick="Btn_Click" />
        <input name="button1" type="reset" class="btn" id="button1" value="清除" /> Ctrl多选

      </label></td>
    </tr>
  </table>



 
 
<!--#include file="footer.htm"-->

<script type="text/javascript">

    $(function() {
		$('#simage_upload').uploadify({
		  'uploader'  : 'uploadify/uploadify.swf',
		  'script'    : 'uploadify/upload.aspx',
		  'folder'	  : '../upload/',
		  'cancelImg' : 'uploadify/cancel.png',
		  'removeCompleted' : true,
		  'multi' : true,
		  'auto':true,
		  'buttonText': 'SELECT IMAGE',
		  'fileExt'     : '*.jpg; *.gif; *.png',
		  'fileDesc'    : 'Select Files *.jpg; *.gif; *.png',
		  'onCancel'    : function(event,ID,fileObj,data) {
      		  //$("#Btn").attr("disabled",false);
    	  },
		  'onSelect':function(event,ID,fileObj) {
			  //$("#Btn").attr("disabled",true);
		  },
		  'onComplete' :function(event,queueID,fileObj,response,data){
			   var img1=$("#img1").val();
			   $("#img1").val(img1+"|"+response);
			   $(".imgbox").css("display","");
			   $("#pic").attr("src",'../upload/'+response);
			   //$("#Btn").attr("disabled",false);
			   //if(img1!="")
			       //$.ajax({url:"uploadify/upload.aspx?action=delimg&img="+encodeURI(img1),async:false}).responseText;
			 }
		});	
		
	});
	
</script> 



    </form>
</body>
</html>
