<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Index_ADFlash.aspx.cs" Inherits="MyITJob.Admin.Index_ADFlash" %>

<!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>
        <%=Application["Title"]%>
        ——管理讨论</title>
    <link href="../images/Admin_Style.css" rel="stylesheet" type="text/css" />

    <script language='javascript' type="text/javascript">
    function validator(){
        if(document.form1.Add_Title.value == "") {
            alert('标题不能为空！');
            form1.Add_Title.focus();
            return false;
        }
        if(isNaN(document.form1.TBWidth.value) && isNaN(document.form1.TBWidth.value) < 1) {
            alert('宽度不对！');
            form1.TBWidth.focus();
            return false;
        }
        if(isNaN(document.form1.TBHeight.value) && isNaN(document.form1.TBHeight.value) < 1) {
            alert('高度不对！');
            form1.TBWidth.focus();
            return false;
        }
}

function CheckAll(form){
  for (var i=0;i<form.elements.length;i++){
    var e = form.elements[i];
    if (e.name != 'chkAll' && e.disabled == false && e.type == 'checkbox') {
      e.checked = form.chkAll.checked;
      if (e.checked)
        hL(e);
      else
        dL(e);
    }
  }
}

function hL(E){
  while (E.tagName!='TR') {E=E.parentElement;}
  E.className='tdbg2';
}
function dL(E){
  while (E.tagName!='TR') {E=E.parentElement;}
  E.className='tdbg';
}
    </script>

</head>
<body>
    <form id="form1" runat="server" onsubmit='return validator();'>
        <div>
            <table width='100%' border='0' align='center' cellpadding='2' cellspacing='1' class='border'>
                <tr class='topbg2'>
                    <td width="100%" align='center'>
                        <strong class="Glow">Flash 广 告 管 理</strong></td>
                </tr>
            </table>
            <asp:Panel ID="Add" runat="server" Width="100%" Visible="False">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td>
                            <table width='100%' border='0' align='center' cellpadding='2' cellspacing='1' class='border'>
                                <tr class='tdbg'>
                                    <td width="15%" align="right" class="tdbg2">
                                        广告标题：</td>
                                  <td width="85%"><asp:TextBox ID="Add_Title" runat="server" Width="241px" MaxLength="50"></asp:TextBox>
                                      <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="Add_Title"
                                          ErrorMessage="<---不能为空！"></asp:RequiredFieldValidator></td>
                                </tr>
                                <tr class='tdbg'>
                                    <td width="15%" align="right" class="tdbg2">
                                        广告大小：</td>
                                  <td width="85%">
                                      宽度：<asp:TextBox ID="TBWidth" runat="server" MaxLength="3" Width="50px"></asp:TextBox>
                                      高度：<asp:TextBox ID="TBHeight" runat="server" MaxLength="3" Width="50px"></asp:TextBox>
                                      <br />
                                      <span class="style4">此处设置的大小将以第一次生成的广告大小为主。之后如果新添加Flash广告，修改的广告大小将直接影响之前所有的广告大小。（授权用户无限制）</span></td>
                                </tr>
                                <tr class='tdbg'>
                                  <td class="tdbg2" align="right">
                                        图片来源：                                    </td>
                                    <td>
                                        <input id="File1" runat="server" style="width: 361px" type="file" />
                                        <br />
                                        <span style="color: #ff0000">请上传 gif、jpg 图片文件</span></td>
                                </tr>
                                <tr class='tdbg'>
                                  <td class="tdbg2" align="right">
                                        广告超链接地址：                                    </td>
                                    <td>
                                        <asp:TextBox ID="Add_Url" runat="server" MaxLength="255" Width="290px"></asp:TextBox></td>
                                </tr>
                            </table>
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td style="height: 22px">
                                        <div align="center">
                                            <asp:Button ID="Button1" runat="server" Text="添加" OnClick="Button1_Click" />
                                            <input id="Reset1" type="reset" value="重置" />
                                        </div>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </asp:Panel>
            <asp:Panel ID="Panel_discuss" runat="server" Height="376px">
                <table width='100%' border='0' align='center' cellpadding='2' cellspacing='1' class='border'>
                    <tr class='topbg2'>
                        <td width="5%" align='center'>
                            序号</td>
                        <td width="60%" align='center'>
                            新闻标题</td>
                        <td width="10%" align='center'>
                            加入时间</td>
                        <td width="18%" align='center'>
                            常规操作</td>
                    </tr>
                    <asp:Repeater ID="Manage_discuss" runat="server">
                        <ItemTemplate>
                            <tr class='tdbg' onmouseout="this.className='tdbg'" onmouseover="this.className='tdbgmouseover'">
                                <td align='center'>
                                    <%#Eval("id")%></td>
                                <td align='center'>
                                    <%#Eval("adtitle")%></a></td>
                                <td align='center'>
                                    <%# Eval("adtime")%>                                </td>
                                <td align='center'><a href="?Action=Edit&id=<%# Eval("id")%>">修改</a> | <a href="?Action=Del&id=<%# Eval("id")%>" onclick="return confirm('确定要删除此项吗？此操作不可逆。')">
                                    删除</a></td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                </table>
                <br />
                <table width="100%" height="18" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td width="669" height="18">
                            共<b>
                                <asp:Label ID="LbRecord" runat="server" ForeColor="Red"></asp:Label>
                            </b>条记录 页数:
                            <asp:Label ID="CurrentPage" runat="server" ForeColor="Red"></asp:Label>
                            /
                            <asp:Label ID="TotalPage" runat="server" ForeColor="Red"></asp:Label>
                            页 <b>
                                <asp:Label ID="LbPageRecord" runat="server"></asp:Label>
                            </b>篇文章/页
                            <asp:HyperLink ID="Linkhead" runat="server">首页</asp:HyperLink>
                            <asp:HyperLink ID="LinkPrev" runat="server">上一页</asp:HyperLink>
                            <asp:HyperLink ID="LinkNext" runat="server">下一页</asp:HyperLink>
                            <asp:HyperLink ID="LinkFoot" runat="server">尾页</asp:HyperLink>
                            <br />
                        <span class="style4">注</span>：调用Flash广告的JS代码：&lt;script language='javascript' src='AD/ADFlash.js'&gt;&lt;/script&gt;。</td>
                    </tr>
                </table>
            </asp:Panel>
        </div>
    </form>
</body>
</html>
