<%@ page language="C#" autoeventwireup="true" enableviewstate="false" inherits="WebAdmin_Admin_upfile, LebiMall" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!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 runat="server">
    <title>上传管理</title>
    <link href="css/css.css" rel="stylesheet" type="text/css" />
    <style>
    .image{margin:0 auto; text-align:Center; width:160px; min-height:50px; float:left;} 
    .image IMG{MARGIN-TOP: expression(( 50 - this.height ) / 2); width: expression(this.width >  160 ? 160 : true); height: expression(this.height > 50 ? 50 : true); max-width: 160px; max-height: 50px; VERTICAL-ALIGN: middle; TEXT-ALIGN: center}
    </style>
    <script type="text/javascript" src="js/MyCalendar.js"></script>
    <script type="text/javascript" src="js/checked.js"></script>
     <link href="css/tipswindown.css" type="text/css" rel="stylesheet" />
    <script src="js/jquery.js" type="text/javascript"></script>
    <script src="js/tipswindown.js" type="text/javascript"></script>
    <script src="js/topHead.js" type="text/javascript"></script>
    <script type="text/javascript">
        function dels(){
            var ids = GetCheckedBoxall();
            var strid = "";
            var flag = false;
            if(ids=="0"){
               alert("请选择图片！");
               return flag;
            }
            var form =document.forms[0];
            var strid="";
            if (confirm("确认要删除？")) {
                ids = ids.replace('0,','');
                document.getElementById("CheckedIDS").value = ids;
                flag = true;
                
                for(i=0;i<form.elements.length;i++)
                {
                    if(form.elements[i].type=="checkbox")
                    {
                        if(form.elements[i].checked==true){
                            strid+=document.getElementById(form.elements[i].value).value+",";
                        }
                    }
                }
                document.getElementById("values").value =  strid;
                document.getElementById("del").click();
            }
            return flag;
        }
    </script>
    
</head>
<body>
    <form id="form1" runat="server">
        <div id="dhtmltooltip">
            <img src=""></div>
        <script type="text/javascript" language="javascript" src="js/js_link.js"></script>
    <script>header(6,9,"images/");</script>
    <!--面包屑-->
    <div class="blank clearfix">
        <script type="text/javascript">
            var $=jQuery;
            var f="<%=Session["returnValue"]  %>";
            var i =2;
            if(f=="true"){
                tipsWindown('操作结果','text:操作成功！','250','60','true','2000','true','text');
                <% Session["returnValue"]= null; %>
            }
            if(f=="false"){
                tipsWindown('操作结果','text:操作失败！','250','60','true','2000','true','text');
                <% Session["returnValue"]= null; %>
            }
        </script>
    </div>
    <!--功能区-->
   <div class="tabmenus mainwidth">
        <ul>
            <li><a href="Corp.aspx"><span>网站授权</span></a></li>
            <li><a href="AdminSQL.aspx"><span>命令执行</span></a></li>
            <li><a href="Ipblock.aspx"><span>IP锁定</span></a></li>
            <li class="current"><a href="Admin_upfile.aspx"><span>上传管理</span></a></li>
            <li><a href="clear_Log.aspx"><span>数据维护</span></a></li>
        </ul>
    </div>
    <div class="tab-mainbody">
        <div class="tab-mainbody2">
        <div class="functionHandleArea clearfix">
            <input type="hidden" id="CheckedIDS" runat="server" />
            <input type="hidden" id="values" runat="server" />
            <input type="hidden" id="hidState" runat="server" />
            <div style="float: left;">
                <input type="image" name="Submit" title=" 删除 " style="margin: 2px 2px 2px 2px;" onclick="dels();return false;"
                    src="images/bt_delete.gif" align="absmiddle" />
                <span id="msg_sub" class="title_r"></span>
            </div>
            <div style="float: right;">
                &nbsp;
            </div>
        </div>
        <div id="datalist">
                  <asp:GridView ID="list" runat="server" AutoGenerateColumns="False" CssClass="table" CellSpacing="0" CellPadding="0">
                      <Columns>
                          <asp:TemplateField HeaderText="选择">
                              <ItemTemplate>
                                  <input id='<%# Eval("FileName") %>' type="checkbox" value='<%# Eval("FileName") %>'/><br />
                                  <label style="color:red;"><%#Eval("FileExists")%></label>
                              </ItemTemplate>
                              <ItemStyle Width="10%" />
                              <HeaderTemplate>
                                  <asp:Label ID="Label3" runat="server" Text="选择" onclick="AllChecked();"></asp:Label>
                              </HeaderTemplate>
                          </asp:TemplateField>
                          <asp:TemplateField HeaderText="图片">
                              <EditItemTemplate>
                                  <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                              </EditItemTemplate>
                              <ItemTemplate>
                                  <div class="image"><img  style="margin:3px 2px 3px 2px; float:left;"  src='<%# Eval("FilePath") %>' onmouseover="javascript:ddrivetip('<div class=hideimg><img src=<%# Eval("FilePath") %>></div>', '#ffffff', '150')"   onmouseout="hideddrivetip()" /></div>
                              </ItemTemplate>
                              <ItemStyle Width="20%" />
                          </asp:TemplateField>
                          <asp:TemplateField HeaderText="名称">
                              <ItemTemplate>
                                  <asp:HyperLink ID="HyperLink1" target="_blank" runat="server" Text='<%# Eval("FileName") %>' NavigateUrl='<%# Eval("FilePath") %>'></asp:HyperLink>
                              </ItemTemplate>
                              <ItemStyle Width="20%" />
                          </asp:TemplateField>
                          <asp:TemplateField HeaderText="文件大小">
                              <ItemTemplate>
                                  <asp:Label ID="Label4" runat="server" Text='<%# Eval("FileLength") %>'></asp:Label>
                              </ItemTemplate>
                              <ItemStyle Width="15%" />
                          </asp:TemplateField>
                          <asp:TemplateField HeaderText="文件类型">
                              <ItemTemplate>
                                  <asp:Label ID="Label1" runat="server" Text='<%# Eval("Extension") %>' ></asp:Label> 
                              </ItemTemplate>
                              <ItemStyle Width="15%" />
                          </asp:TemplateField>
                           <asp:TemplateField  HeaderText="最后修改时间">
                              <ItemTemplate>
                                  <asp:Label ID="Label2" runat="server" Text='<%# Eval("FileLastWriteTime") %>'></asp:Label>
                              </ItemTemplate>
                               <ItemStyle Width="20%" />
                          </asp:TemplateField>
                      </Columns>
                      </asp:GridView>
                      <script type="text/javascript">tdshowm("list");</script>
                      <div class="list-foot1">
                       <div style="float:left;margin:3px 3px 3px 3px;"><select onchange="var jmpURL=this.options[this.selectedIndex].value ;if(jmpURL!='') {window.location=jmpURL; }else{ this.selectedIndex=0; }">
                                <option value="?type=commodity" <% if(model.Str1=="commodity"){ %>selcted<%} %>>├ 商品</option>
                                <option value="?type=brand" <% if(model.Str1=="brand"){ %>selected<%} %>>├ 品牌</option>
                                <option value="?type=face/avatar" <% if(model.Str1=="face/avatar"){ %>selected<%} %>>├ 头像</option>
                                <option value="?type=Company" <% if(model.Str1=="Company"){ %>selected<%} %>>├ 营业执照</option>
                                <option value="?type=Idcard" <% if(model.Str1=="Company"){ %>selected<%} %>>├ 身份证</option>
                                <option value="?type=shop" <% if(model.Str1=="shop"){ %>selected<%} %>>├ 店铺</option>
                                <option value="?type=WebAdminImages" <% if(model.Str1=="WebAdminImages"){ %>selected<%} %>>├ 网站信息</option>
                                <option value="?type=logoc" <% if(model.Str1=="logoc"){ %>selected<%} %>>├ logoc</option>
                                <option value="?type=FCKEditor" <% if(model.Str1=="FCKEditor"){ %>selected<%} %>>├ FCKEditor</option>
                                 <option value="?type=water" <% if(model.Str1=="water"){ %>selected<%} %>>├ 水印图片</option>
                                <option value="?type=adv" <% if(model.Str1=="adv"){ %>selected<%} %>>├ 首页广告|广告标签</option>
                                 <option value="?type=Article" <% if(model.Str1=="Article"){ %>selected<%} %>>├ 文章图片</option>
                                <option value="?type=imgtype" <% if(model.Str1=="imgtype"){ %>selected<%} %>>├ 店铺自定义图片</option>
                                
                            </select>
                            </div>
                            <div style="float: left; padding-top: 3px;">
                                </div>
                                <div id="divAsp" runat="server" style="float: right; padding-top: 3px;">
                                    <webdiyer:AspNetPager CssClass="pages" CurrentPageButtonClass="cpb" ID="AspNetPager1"
                                        runat="server"  FirstPageText="首页" LastPageText="尾页" NextPageText="下一页"
                                        PrevPageText="上一页" PageSize="20" UrlPaging="True" CustomInfoClass="pages1" CurrentPageButtonPosition="Center" ShowBoxThreshold="50"
                                        ShowFirstLast="true" NumericButtonCount="4" BackColor="Transparent" ShowDisabledButtons="False" EnableViewState="False">
                                    </webdiyer:AspNetPager>
                                </div>
                            <div style="clear: both;">
                            </div>
                            </div>
                            </div>
        </div>
        <input type="button" style="display: none;" id="del" runat="server" onserverclick="del_ServerClick" />
    </div>
    </form>
</body>
</html>
