<%@ page language="C#" autoeventwireup="true" inherits="admin_Ad_Table, App_Web_ad_table.aspx.fdf7a39c" smartnavigation="true" %>

<%@ Register Src="yanz.ascx" TagName="yanz" TagPrefix="uc1" %>

<!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 id="Head1" runat="server">
    <title>广告管理</title>
    <link href="images/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<script language="javascript" type="text/javascript"> 
function selcheck(id) {
   var e =document.getElementById(id);
   var objs = e.getElementsByTagName("input");
   if (e.checked){
      e.checked = false;
      for(var i=0; i<objs.length; i++) {
         if(objs[i].type.toLowerCase() == "checkbox" )
         objs[i].checked = false;
      }
   }   else   {
      e.checked = true;
      for(var i=0; i<objs.length; i++) {
         if(objs[i].type.toLowerCase() == "checkbox" )
         objs[i].checked = true;
      }
   }
}
</script>

     <div id="frame_Toolbar" class="toolbarBg"> 
		<div style="float:left">
            <uc1:yanz ID="Yanz1" runat="server" />
            <a href="javascript:self.history.back();" class="icoBtn_ct"><span class="btnIco btnBack"></span><span class="btnTxt">返回</span></a><a href="javascript:self.location.reload();" class="icoBtn_ct"><span class="btnIco btnReload"></span><span class="btnTxt">刷新</span></a>&nbsp;
         <span class="split ftSplit" ></span></div>
	    <div id="guide"> 您现在的位置：扩展功能 >> 广告管理</div>
		
	    <div class="pageInfo right light_gray"> <a href='Ad_Table_add.aspx'>添加广告</a>&nbsp;<asp:TextBox ID="TextBox1" runat="server" Width="100px"></asp:TextBox>&nbsp;<asp:Button ID="Button1" runat="server" CssClass="btn" OnClick="Button1_Click" Text="查找" /></div>
		
    </div>
	<div id="content">
     <table class="cTable table tCenter">
	    <tr class="cTitle toolbarBg" id="Title">
		    <td width="6%"><span class="checkbox"><input type="checkbox" name="chkall" onclick="selcheck('content')" /></span></td>
		    <td width="5%"><span class="split ctSplit"></span><div>编号</div></td>
		    <td width="15%"><span class="split ctSplit"></span><div>广告名</div></td>
		    <td><span class="split ctSplit"></span><div>广告介绍</div></td>
		    <td width="10%"><span class="split ctSplit"></span><div>类型</div></td>
			<td width="15%"><span class="split ctSplit"></span><div>添加时间</div></td>
			<td width="15%"><span class="split ctSplit"></span><div>操作</div></td>
	    </tr>
	 </table>
	<table class="cTable table tCenter" cellspacing="0" border="0" style="border-collapse:collapse;">
	     <asp:Repeater ID="Repeater1" runat="server">
                 <ItemTemplate>
		<tr>
			<td align="center" style="width:6%;white-space:nowrap;">
                <input type="checkbox" name="chk" value="<%#DataBinder.Eval(Container.DataItem, "id")%>" />
			</td>
			<td align="center" style="width:5%;white-space:nowrap;">
             <%#DataBinder.Eval(Container.DataItem, "id")%>
			</td>
			<td style="width:15%;"><a href="Ad_Table_add.aspx?id=<%#DataBinder.Eval(Container.DataItem, "id")%>&type=edit&u4=<%#DataBinder.Eval(Container.DataItem, "u4")%>"><%#DataBinder.Eval(Container.DataItem, "u1").ToString()%></a></td>
			<td style=" text-align:left"><%#DataBinder.Eval(Container.DataItem, "u2").ToString()%></td>
			<td style="width:10%;"><%#DataBinder.Eval(Container.DataItem, "u4").ToString()%></td>
			<td style="width:15%;"><%#DataBinder.Eval(Container.DataItem, "dtime", "{0:yyyy-MM-dd}")%></td>
			<td style="width:15%;"><a  href="#" onclick="cpIt('{fzw:ad:<%#DataBinder.Eval(Container.DataItem, "u1").ToString()%> /}');">复制代码</a> | <a  href="Ad_Table_add.aspx?type=edit&id=<%#DataBinder.Eval(Container.DataItem, "id")%>&u4=<%#DataBinder.Eval(Container.DataItem, "u4")%>">修改</a> | <a onclick="return confirm('你确认将该广告删除到回收站?\r\n注意：删除后该广告所有数据不可以恢复。');" id="repChannel_ctl01_btnDelete" href="Ad_Table_add.aspx?type=del&id=<%#DataBinder.Eval(Container.DataItem, "id")%>&u4=<%#DataBinder.Eval(Container.DataItem, "u4")%>">删除</a></td>
		</tr>
		</ItemTemplate>
                 </asp:Repeater>

	</table> 
    <div id="cEndToolbar" class="toolbarBg">
        <div class="pageList">
		<asp:Literal ID="Literal1" runat="server"></asp:Literal>
		
	    </div>
	    <div class="pageSelect"><span class="iptSl"><input type="checkbox" name="chkall" onclick="selcheck('content')" /></span><a href="javascript:selcheck('content');"><span class="btnTxt">选择</span><span class="btnIco btnDown"></span></a></div>
	    <span class="split cpSplit" ></span>
	    <div class="pageBtnDo">
	        <div class="icoBtn_do"><input type="image" name="Delete_Button" id="Delete_Button" class="btnIco btnDel" src="images/Empty.gif" onclick="chk1()" style="border-width:0px;" /></div>
	    </div>
	</div>	
    </div>
	<script type="text/javascript">
	function cpIt(s){   
    if (window.clipboardData) {   
       window.clipboardData.setData("Text",s);   
    }   
    else   
    {     
      var flashcopier = 'flashcopier';   
        if(!document.getElementById(flashcopier)) {   
          var divholder = document.createElement('div');   
          divholder.id = flashcopier;   
          document.body.appendChild(divholder);   
        }   
        document.getElementById(flashcopier).innerHTML = '';   
        var divinfo = '<embed src="clipboard.swf" FlashVars="clipboard='+encodeURIComponent(s)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';   
        document.getElementById(flashcopier).innerHTML = divinfo;   
    }   
    alert("\r\n信息："+s+"\r\n\r\n恭喜您，您需要的信息已经被成功复制到剪贴板了！\r\n\r\n贴心小提示：(1) 按 Ctrl+v 可以将上面信息粘贴到您指定的位置。\r\n\r\n                        (2) 按空格键可迅速关闭本提示框");   
}   


function chk1()
{
    var boxes = document.getElementsByName("chk"); 
    var t2=0;
    var t1="";
    for (var i = 0; i < boxes.length; i++)   
    {
     if (boxes[i].checked)   
     {
        t2=t2+1;
        if(t2==1)
        {
        t1=t1+boxes[i].value;
        }
        else
        {
        t1=t1+","+boxes[i].value;
        }
     }
    }
   // window.location="Ad_Table_add.aspx?type=del&id="+t1;
var tiao_url = "Ad_Table_add.aspx?type=del&id="+t1;
             window.location.href = tiao_url;
        window.event.returnValue = false;
}
        </script> 
</form>

</body>
</html>


