<!--#include file="../../checkLogin.asp"-->
<!--#include file="../../SQLconn.asp"-->
<link rel="stylesheet" type="text/css" href="../../images/<%=request.cookies("imgdir")%>/css/style.css" media="all"/>



<p>
  <script Language="JavaScript">
 function form_check(){
  if(document.form3.vid.value.length<1){window.alert("请输入序号");document.form3.vid.focus();return (false);}
   
                  }

  </script>
</p>

<%
   tname=request("tname")
   
   
   %>
      <form id="form3" name="form3" method="post" action="save.asp?tname=<%=tname%>"  onSubmit="return form_check();">
	  
	  <table width="688" border="1" align="center" cellpadding="3"   cellspacing="0"  bordercolor="#6D8DD8"  class="mtablehui"> 
<tr style="background-color:#D6E4FF"  class="TableHeader">      <td width="630" height="30" colspan="3"  align="center" valign="middle" nowrap class="NemuNot">
	  
      <table width="570" border="0" align="center" cellspacing="0" bordercolorlight="#11b1ff" bordercolordark="#f0f8ff">
      <tr align="middle">  <td class="STYLE1">&nbsp;</td>
      <td height="30" class="STYLE1"><div align="right">序号</div></td>
      <td align="center" valign="middle" class="STYLE1">&nbsp;</td>
      <td align="center" valign="middle" class="STYLE1"><div align="left">
      <label><input name="vid" type="text" class="text" id="vid" size="5" /></label>
      </div></td><td>&nbsp;</td> </tr>
      <tr align="middle">
        <td class="STYLE1">&nbsp;</td>
        <td height="30" class="STYLE1"><div align="right">选修课科目名称</div></td>
        <td align="center" valign="middle" class="STYLE1">&nbsp;</td>
        <td align="center" valign="middle" class="STYLE1"><div align="left">
          <input name="vname1" type="text" class="text" id="vname1" />
        </div></td>
        <td>&nbsp;</td>
      </tr>
      <tr align="middle">
        <td class="STYLE1">&nbsp;</td>
        <td height="30" class="STYLE1"><div align="right">总人数</div></td>
        <td align="center" valign="middle" class="STYLE1">&nbsp;</td>
        <td align="center" valign="middle" class="STYLE1"><div align="left">
          <input name="vname2" type="text" class="text" id="vname2" size="15"   onKeyUp="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')"  >
        </div></td>
        <td>&nbsp;</td>
      </tr>
      <tr height="30" align="middle">
        <td class="STYLE1">&nbsp;</td>
        <td  class="STYLE1"><div align="right">性别限制</div></td>
        <td align="center" valign="middle" class="STYLE1">&nbsp;</td>
        <td align="center" valign="middle" class="STYLE1"><div align="left">
          <select name="vname6" id="vname6" style= "width:118px ">
             <option selected="selected" value="不限">不限</option>           
             <option value="不限">不限</option>
			 <option value="男">男</option>
			 <option value="女">女</option>
           
          </select>
        </div></td>
        <td>&nbsp;</td>
      </tr>
      <tr height="30" align="middle"> <td width="3" class="STYLE1">&nbsp;</td>
      <td width="109"  class="STYLE1"><div align="right">每班限制人数</div></td>
      <td width="13" align="center" valign="middle" class="STYLE1">&nbsp;</td>
      <td width="254" align="center" valign="middle" class="STYLE1"><div align="left">
	  <input name="vname3" type="text" class="text" id="vname3" size="15"  onKeyUp="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')" >
      </div> 
        </label></td><td width="181"><input name="Submit" type="submit" class="topanniu" value="添加" /></td> </tr>
      <tr height="30" align="middle">
        <td class="STYLE1">&nbsp;</td>
        <td height="21" class="STYLE1"><div align="right">所属年级</div></td>
        <td align="center" valign="middle" class="STYLE1">&nbsp;</td>
        <td align="center" valign="middle" class="STYLE1"><div align="left">
          <select name="vname4" id="vname4" style= "width:118px "> 
			<option selected value=<%=strGrade%>><%=strGrade%></option>
			<% Set RSsel = Conn.Execute("select vname from  varset where name='grade'")
			While NOT RSsel.EOF %>
			<option value=<%=RSsel( "Vname" )%>><%=RSsel( "vname" )%></option>
			<% RSsel.MoveNext
			Wend
			RSsel.Close%>
			</select>
        </div></td>
        <td>&nbsp;</td>
      </tr>
      <tr height="30" align="middle">
        <td class="STYLE1">&nbsp;</td>
        <td height="21" class="STYLE1"><div align="right">结束日期</div></td>
        <td align="center" valign="middle" class="STYLE1">&nbsp;</td>
        <td align="center" valign="middle" class="STYLE1"><div align="left">
          <input name="vname5" type="text" class="text" id="vname5" value="<%=date+2%>" size="15" />
        </div></td>
        <td>&nbsp;</td>
      </tr>
      </table>
	   </td>    </tr>    </table> 
      <div align="center" class="STYLE1"></div>
      </form>

    <table width="780" align="center" border="1" cellpadding="3"   cellspacing="0"  bordercolor="#6D8DD8"  class="mtable">   
    <tr style="background-color:#D6E4FF"  class="TableHeader">
    <td align="center" nowrap class="STYLE1">序号</td>
    <td height="27" align="center" nowrap class="STYLE1"><div align="center">选修课科目名称</div></td>
    <td align="center" nowrap class="STYLE1"><div align="center">总人数</div></td>
    <td width="84" align="center" nowrap class="STYLE1">性别限制</td>
    <td width="84" align="center" nowrap class="STYLE1">每班限制人数</td>
    <td width="91" align="center" nowrap class="STYLE1">所属年级</td>
    <td width="75" align="center" nowrap class="STYLE1">结束日期</td>
    <td width="115" align="center" nowrap class="STYLE1">操作</td>
    </tr>

   
   <%Set Rslist=Server.CreateObject("Adodb.Recordset")
   sqllist="select * from varlong where  name='"&tname& "'  order by vid" 
   Rslist.open sqllist,conn,1,1
   while not Rslist.eof and not Rslist.bof%>
    <tr onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#EFF8FF'">
    <td width="48" height="27" align="center" nowrap class="STYLE1"><div align="center"><%=Rslist("vid")%></div></td>
    <td width="178" align="center" nowrap class="STYLE1"><%=Rslist("vname1")%></td>
    <td width="39" align="center" nowrap class="STYLE1"><%=Rslist("vname2")%></td>
    <td align="center" nowrap class="STYLE1"><%=Rslist("vname6")%></td>
    <td align="center" nowrap class="STYLE1"><%=Rslist("vname3")%></td>
    <td align="center" nowrap class="STYLE1"><%=Rslist("vname4")%></td>
    <td align="center" nowrap class="STYLE1"><%=Rslist("vname5")%></td>
    <td align="center" nowrap class="STYLE1"><a href="Modify.asp?tname=<%=tname%>&id=<%=Rslist("id")%>">修改</a>&nbsp;&nbsp;&nbsp;<a href="del.asp?tname=<%=tname%>&id=<%=Rslist("id")%>">删除</a>	</td>	
    </tr>
<%  Rslist.movenext
    wend
%>
</table>
