<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="login_system.aspx.cs" Inherits="Web.kq.admin.login_system" %>

<!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>OA标题页</title>
    <link href="../../css/admincss/skin.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="../../css/popcalendar.js"></script>
  </head>
<body>
 <form id="form1" runat="server" >
<div>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
        <td   class ="top_bg_left "></td>
    <td  class ="top_bg_center " >
    <table style ="width :100%; height :31px"  border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
      
<!--这里写页标题 -->
        <td style ="height :31px"><div class="titlebt">基本设置</div></td>
      </tr>
    </table>
    </td> 
    <td class ="top_bg_right "></td>
  </tr>
  <tr>
    <td style ="background :url(../../css/admincss/images/mail_leftbg.gif); vertical-align :middle " >&nbsp;</td>
    <td style ="background-color :#F7F8F9; vertical-align :top " >
    <div style ="  margin :10px;">
            <table  border="0" cellpadding="0" cellspacing="0" >

<tr><td  class ="td_rightnoborder" style ="height :35px">网络考勤功能： </td>
<td class ="td_rightnoborder" >
    <asp:RadioButtonList ID="rblNetatt" runat="server" 
                RepeatDirection="Horizontal">
                <asp:ListItem>启用</asp:ListItem>
                <asp:ListItem>关闭</asp:ListItem>
            </asp:RadioButtonList>

    </td>
<td  class ="td_rightnoborder" >
    &nbsp;
    <asp:Button ID="btNetatt" runat="server" Text="提交" onclick="btNetatt_Click" />
    </td>
    </tr>
            </table>
         </div>

<asp:Panel ID="neirong" runat ="server" Visible ="false" >
<!--  一组内容模块开始   --> 
    <table class ="tablezong"   border="0"  cellpadding="0" cellspacing="0">
      <tr>
        <td style ="height :40px" >
        <table class="tablebiaoti"   border="0" cellpadding="0" cellspacing="0" >
          <tr>
            <td><div class ="biaotileft ">  
                休息日设置</div> </td>
          </tr>
        </table>
        </td>
      </tr>
    <tr>
        <td >
<table class ="table " style =" margin :10px;"  border="1" cellpadding="0" cellspacing="0" >

<tr><td class ="tabletd_right " style ="height :35px;width :80px"> 休息日设置</td>
<td  class ="tabletd_left " style ="width :500px">
    <asp:CheckBoxList ID="cblRest" runat="server" 
        RepeatDirection="Horizontal" Width="480px">
        <asp:ListItem Value="Monday">周一</asp:ListItem>
        <asp:ListItem Value="Tuesday">周二</asp:ListItem>
        <asp:ListItem Value="Wednesday">周三</asp:ListItem>
        <asp:ListItem Value="Thursday">周四</asp:ListItem>
        <asp:ListItem Value="Friday">周五</asp:ListItem>
        <asp:ListItem Value="Saturday">周六</asp:ListItem>
        <asp:ListItem Value="Sunday">周日</asp:ListItem>
    </asp:CheckBoxList>
    </td>
    </tr>
<tr><td class ="tabletd_center " style ="height :35px; " colspan="2"> 
    <asp:Button ID="btInfo" runat="server" onclick="btInfo_Click" Text="提交" />
    </td>
    </tr></table> 
        
        </td>
      </tr>

      </table>
<!-- 一组内容模块结束 -->
   
   <!--  一组内容模块开始   --> 
    <table class ="tablezong"   border="0"  cellpadding="0" cellspacing="0">
      <tr>
        <td style ="height :40px" >
        <table class="tablebiaoti"  border="0" cellpadding="0" cellspacing="0" >
          <tr>
            <td><div class ="biaotileft ">  
                IP设置</div> </td>
          </tr>
        </table>
        </td>
      </tr>
    <tr>
        <td   style =" padding :10px;">
        <asp:GridView ID="GridView1" runat="server" 
            onrowdeleting="GridView1_RowDeleting" 
            onrowdatabound="GridView1_RowDataBound" Width="500px" 
                BorderWidth="1px" CssClass="gv" 
                cellspacing="1" AutoGenerateColumns="False" 
                onrowcreated="GridView1_RowCreated">
            <RowStyle BorderWidth="1px" CssClass="gvrow" />
            <Columns>
            <asp:BoundField DataField="id" HeaderText="序号" ReadOnly="True" />
                            <asp:BoundField DataField="ipstar" HeaderText="起始IP" ReadOnly="True" />

                <asp:BoundField DataField="ipend" HeaderText="终止IP" ReadOnly="True" />

                <asp:CommandField HeaderText="删除" ShowDeleteButton="True"  DeleteText ="删除"/>
            </Columns>
            <HeaderStyle BorderWidth="1px" CssClass="gvhead" />
        </asp:GridView><div style = " margin-top :10px">
      添加IP：从                          <asp:TextBox ID="tbIPStar" runat="server"   ></asp:TextBox>
                          到        <asp:TextBox ID="tbIPEnd" runat="server"   ></asp:TextBox>
            <asp:Button ID="btIPAdd"
                              runat="server" Text="添加" onclick="btIPAdd_Click" 
                ValidationGroup="AddIP" />
             <asp:RegularExpressionValidator ID="RegularExpressionValidator8" runat="server" 
                        ControlToValidate="tbIPStar" Display="Dynamic" ErrorMessage="请输入正确的IP" 
                ValidationExpression="^(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9]{1,2})(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9]{1,2})){3}$" ValidationGroup="AddIP" 
                ForeColor="Red"></asp:RegularExpressionValidator>
      <asp:RegularExpressionValidator ID="RegularExpressionValidator9" runat="server" 
                        ControlToValidate="tbIPEnd" Display="Dynamic" ErrorMessage="请输入正确的IP" 
   ValidationExpression="^(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9]{1,2})(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9]{1,2})){3}$" ValidationGroup="AddIP" 
                ForeColor="Red"></asp:RegularExpressionValidator>
                   </div>
         </td>
      </tr>

      </table>
<!-- 一组内容模块结束 -->


   <!--  一组内容模块开始   --> 
    <table class ="tablezong"   border="0"  cellpadding="0" cellspacing="0">
      <tr>
        <td style ="height :40px" >
        <table class="tablebiaoti"  border="0" cellpadding="0" cellspacing="0" >
          <tr>
            <td><div class ="biaotileft ">  
                时间段设置</div> </td>
          </tr>
        </table>
        </td>
      </tr>
    <tr>
        <td  style =" padding :10px;" >
        <asp:GridView ID="GridView2" runat="server" 
            onrowdeleting="GridView2_RowDeleting" Width="800px" 
                BorderWidth="1px" CssClass="gv" 
                cellspacing="1" AutoGenerateColumns="False" 
                onrowcreated="GridView2_RowCreated">
            <RowStyle BorderWidth="1px" CssClass="gvrow" />
            <Columns>
            <asp:BoundField DataField="id" HeaderText="序号" ReadOnly="True" />
                            <asp:BoundField DataField="timename" HeaderText="时间段名称" 
                    ReadOnly="True" />
                <asp:BoundField DataField="timestar" HeaderText="上班时间" ReadOnly="True" />
                <asp:BoundField DataField="timeend" HeaderText="下班时间" />
                <asp:BoundField DataField="atttimestar" HeaderText="考勤开始时间" />
                <asp:BoundField DataField="atttimeend" HeaderText="考勤结束时间" />
                <asp:BoundField DataField="late" HeaderText="计迟到时间" />
                <asp:BoundField DataField="leaveearly" HeaderText="计早退时间" />
                <asp:BoundField DataField="absenteeism_day" HeaderText="折合天数" />
                 <asp:CommandField HeaderText="删除" ShowDeleteButton="True"  DeleteText ="删除" />
            </Columns>
            <HeaderStyle BorderWidth="1px" CssClass="gvhead" />
        </asp:GridView>
<table class ="table " style =" width :500px; margin-top :10px; "  border="1" cellpadding="0" cellspacing="0"><tr>
<td class = "tabletd_right " style ="height:35px" >时间段名称</td>
<td class ="tabletd_left ">
    <asp:TextBox ID="tbTimename" runat="server"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                                ControlToValidate="tbTimename" 
        Display="Dynamic" ErrorMessage="不能为空。" 
                                                ValidationGroup="AddReg" 
        ForeColor="Red"></asp:RequiredFieldValidator>
    </td>
</tr>
    <tr>
<td class = "tabletd_right " style ="height:35px">上班时间</td>
<td  class ="tabletd_left ">
    <asp:TextBox ID="tbTimestar" runat="server"></asp:TextBox>
         <asp:RegularExpressionValidator ID="RegularExpressionValidator10" runat="server" 
                        ControlToValidate="tbTimestar" Display="Dynamic" ErrorMessage="请输入正确时间格式，如：15:00" 
     ValidationExpression="^(([0-9]{1})|([0-1][0-9])|([1-2][0-3])):([0-5][0-9])$" ValidationGroup="AddReg" 
                ForeColor="Red"></asp:RegularExpressionValidator>
          </td>
</tr>
<tr><td class = "tabletd_right " style ="height:35px">下班时间 </td><td  class ="tabletd_left ">
    <asp:TextBox ID="tbTimeend" runat="server"></asp:TextBox>
          <asp:RegularExpressionValidator ID="RegularExpressionValidator11" runat="server" 
                        ControlToValidate="tbTimeend" Display="Dynamic" ErrorMessage="请输入正确时间格式，如：15:00" 
      ValidationExpression="^(([0-9]{1})|([0-1][0-9])|([1-2][0-3])):([0-5][0-9])$" ValidationGroup="AddReg" 
                ForeColor="Red"></asp:RegularExpressionValidator>
      </td></tr>
<tr><td  class = "tabletd_right " style ="height:35px">考勤开始时间</td><td  class ="tabletd_left ">
    <asp:TextBox ID="tbAtttimestar" runat="server"></asp:TextBox>
             <asp:RegularExpressionValidator ID="RegularExpressionValidator12" runat="server" 
                        ControlToValidate="tbAtttimestar" Display="Dynamic" ErrorMessage="请输入正确时间格式，如：15:00" 
         ValidationExpression="^(([0-9]{1})|([0-1][0-9])|([1-2][0-3])):([0-5][0-9])$" ValidationGroup="AddReg" 
                ForeColor="Red"></asp:RegularExpressionValidator>
     </td></tr>
<tr><td  class = "tabletd_right " style ="height:35px">考勤结束时间</td><td  class ="tabletd_left ">
    <asp:TextBox ID="tbAtttimeend" runat="server"></asp:TextBox>
         <asp:RegularExpressionValidator ID="RegularExpressionValidator13" runat="server" 
                        ControlToValidate="tbAtttimeend" Display="Dynamic" ErrorMessage="请输入正确时间格式，如：15:00" 
           ValidationExpression="^(([0-9]{1})|([0-1][0-9])|([1-2][0-3])):([0-5][0-9])$" ValidationGroup="AddReg" 
                ForeColor="Red"></asp:RegularExpressionValidator>
      </td></tr>
<tr><td  class = "tabletd_right " style ="height:35px">计迟到时间</td><td  class ="tabletd_left ">
    <asp:TextBox ID="tbLate" runat="server"></asp:TextBox>
                                            分钟
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                                                ControlToValidate="tbLate" 
        Display="Dynamic" ErrorMessage="请输入大于0的整数。" 
                                                ValidationExpression="^\+?[1-9][0-9]*$" 
                                                ValidationGroup="AddReg" 
        ForeColor="Red"></asp:RegularExpressionValidator>
    </td></tr>
<tr><td  class = "tabletd_right " style ="height:35px">计早退时间</td><td  class ="tabletd_left ">
    <asp:TextBox ID="tbLeaveearly" runat="server"></asp:TextBox>
                                            分钟
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator14" runat="server" 
                                                ControlToValidate="tbLeaveearly" 
        Display="Dynamic" ErrorMessage="请输入大于0的整数。" 
                                                ValidationExpression="^\+?[1-9][0-9]*$"
                                                ValidationGroup="AddReg" 
        ForeColor="Red"></asp:RegularExpressionValidator>
    </td></tr>
<tr><td class = "tabletd_right " style ="height:35px">折合天数</td><td  class ="tabletd_left ">
    <asp:TextBox ID="tbAbsenteeism_day" runat="server"></asp:TextBox>
    天</td></tr>
<tr><td colspan="2" class ="tabletd_center " style = "height :35px">
    <asp:Button ID="btAddattregulation" runat="server" 
        onclick="btAddattregulation_Click" Text="提交" ValidationGroup="AddReg" />
    </td></tr></table>
          <div style =" padding-top :10px">说明：<br />
          1.上班时间及考勤开始时间为空：上班不考勤；下班时间及考勤结束时间为空，下班不考勤。<br />
          2.考勤开始时间为上班考勤开始时间，早于此时间的记录无效；考勤结束时间为下班考勤结束时间，迟于此时间无效。<br />
          3.计迟到时间内为迟到，超出为旷工。如上班时间为8:00，计迟到时间为20分钟，则8:20后到岗为旷工。<br />
          4.计早退时间内离岗为早退，超出为旷工。如下班时间为11:00，计早退时间为20分钟，则10:40前离岗为旷工。
          </div>         
          </td>
      </tr>

      </table>
<!-- 一组内容模块结束 -->
        <!--  一组内容模块开始   --> 
    <table class ="tablezong"   border="0"  cellpadding="0" cellspacing="0">
      <tr>
        <td style ="height :40px" >
        <table class="tablebiaoti"   border="0" cellpadding="0" cellspacing="0" >
          <tr>
            <td><div class ="biaotileft ">  
                自定义更新考勤数据</div> </td>
          </tr>
        </table>
        </td>
      </tr>
    <tr>
        <td >更新
  <asp:textbox id="date1" runat="server" Width="72px"  onclick="popUpCalendar(this,this,'yyyy-mm-dd')"></asp:textbox>
            &nbsp;至 
            <asp:TextBox ID="date2" runat="server" onclick="popUpCalendar(this,this,'yyyy-mm-dd')" Width="72px"> </asp:TextBox>
            &nbsp;的考勤数据 <asp:Button ID="btTime" runat="server" Text="提交" OnClick="btTime_Click" ValidationGroup="time" />  <asp:RequiredFieldValidator ID="RequiredFieldValidator4" 
                  runat="server" ControlToValidate="date1" Display="Dynamic" 
                  ErrorMessage="起始日期必填！" ValidationGroup="time" ForeColor="Red"></asp:RequiredFieldValidator>
              <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                  ControlToValidate="date2" Display="Dynamic" ErrorMessage="终止日期必填！" 
                 ValidationGroup="time" ForeColor="Red"></asp:RequiredFieldValidator>
              <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" 
                  ControlToValidate="date1" Display="Dynamic" ErrorMessage="请填正确日期格式：如2001-01-01" 
                  ValidationExpression="\d{4}-\d{2}-\d{2}" ValidationGroup="time" 
                 ForeColor="Red"></asp:RegularExpressionValidator>
              <asp:RegularExpressionValidator ID="RegularExpressionValidator6" runat="server" 
                  ControlToValidate="date2" Display="Dynamic" ErrorMessage="请填正确日期格式：如2001-01-01" 
                  ValidationExpression="\d{4}-\d{2}-\d{2}" ValidationGroup="time" 
                 ForeColor="Red"></asp:RegularExpressionValidator>
      </td>
      </tr>

      </table>
<!-- 一组内容模块结束 -->
</asp:Panel>
    </td>
    <td  style =" background-image:url(../../css/admincss/images/mail_rightbg.gif )" >
    </td>
  </tr>
  <tr>
<td  class ="buttom_bg_left "></td>
  <td   class ="buttom_bg_center " ></td>
    <td  class ="buttom_bg_right " ></td>
  </tr>
</table>
    </div>
    </form>
</body>
</html>
