<!--#include file="../checkLogin.asp"-->
<!--#include file="../SQLconn.asp"-->

<link rel="stylesheet" type="text/css" href="../images/<%=request.cookies("imgdir")%>/css/style.css" media="all"/>



		<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><style type="text/css">
		<!--
		.STYLE3 {color: #FF0000}
.STYLE4 {font-size: 18}
body {
	background-image: url(../images/<%=request.cookies("imgdir")%>/NemuLine/bg.jpg);
}
		-->
		</style>
		<p>
		<script Language="JavaScript">
		function form_check(){
		if(document.form3.bianhao.value.length<1){window.alert("请输入编号");document.form3.bianhao.focus();return (false);}
		if(document.form3.mingcheng.value.length<1){window.alert("请输入名称");document.form3.mingcheng.focus();return (false);}
		
		}
		
		</script></p>
		
		<% 
		xueqi = TRIM(Request("xueqi"))
		if xueqi="" then
		xueqi=Right(request.cookies("nowxueqi"),4)   'request.cookies("nowxueqi") 
		end if
		strGrade = TRIM(Request("grade"))
		strsubject = TRIM(Request("subject"))
		 
		%>
		<form id="form3" name="form3" method="post" action="savevarzhang.asp?Grade=<%=strGrade%>&subject=<%=strsubject%>"  onSubmit="return form_check();">
		<table width="339" border="0" align="center" cellspacing="0" bordercolorlight="#11b1ff" bordercolordark="#f0f8ff">
		
		<tr align="middle">
		  <td height="27" class="STYLE1">&nbsp;</td>
		  <td align="center" valign="middle" class="STYLE1"><div align="left"><span class="STYLE3">【<%=strGrade%>】【<%=strsubject%>】章次设置</span></div></td>
		  <td>&nbsp;</td>
		  </tr>
		<tr align="middle">
		  <td height="27" class="STYLE1"><div align="right">学期</div></td>
		  <td align="center" valign="middle" class="STYLE1">
		    <div align="left">
		      <select name="xueqi" id="xueqi" style= "width:80px " onChange="form3.submit()" >
			     <option selected><%=xueqi%></option>
		          <option>第一学期</option>	
		          <option>第二学期</option>	
              </select>
            </div></td>
		  <td>&nbsp;</td>
		  </tr>
		<tr align="middle">
		<td width="70" height="27" class="STYLE1"><div align="right">编号</div></td>
		<td width="255" align="center" valign="middle" class="STYLE1"><div align="left">
		<input name="bianhao"  onKeyPress="if((event.keyCode<48 || event.keyCode>57) && event.keyCode!=46 || /\.\d\d$/.test(value))event.returnValue=false"  type="text" class="text" id="bianhao" size="5" />
		</div></td>
		<td width="8">&nbsp;</td>
		</tr>
		<tr align="middle">
		<td height="28" class="STYLE1"><div align="right">章名称 </div></td>
		<td align="center" valign="middle" class="STYLE1"><div align="left">
		<input name="mingcheng" type="text" class="text" id="mingcheng" />
		<input name="Submit" type="submit" class="topanniu" value="添加" />
		</div></td>
		<td>&nbsp;</td>
		</tr>
		</table>
		</form>
		
		<table width="90%" align="center" border="1" cellpadding="3"   cellspacing="0"  bordercolor="#6D8DD8"  class="mtable">   
		<tr style="background-color:#D6E4FF"  class="TableHeader">
		<td width="55" height="30" align="center" nowrap class="STYLE1">章次编号
		<div align="center"></div></td>
		<td  align="center" nowrap class="STYLE1">章次名称</td>
		<td width="60" align="center" nowrap class="STYLE1">设置人</td>
		<td width="60" align="center" nowrap class="STYLE1">操作</td>
		</tr>
		
		
		<%Set Rslist=Server.CreateObject("Adodb.Recordset")
		sqllist="select * from Subjectvar where  类别='章次' and  学期='"&xueqi& "' and 年级='"&strGrade& "'  and 科目='"&strsubject& "'  order by 编号" 
		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   height="30" align="center" nowrap class="STYLE1"><%=Rslist("编号")%></td>
		<td align="center" nowrap class="STYLE1"><a href="varJie.asp?Grade=<%=strGrade%>&subject=<%=strsubject%>&zhangci=<%=Rslist("编号")%>&zhangming=<%=Rslist("章次")%>" target="rightFrame"><%=Rslist("章次")%></a></td>
		<td align="center" nowrap class="STYLE1"><%=Rslist("设置人")%> </td>
		<td align="center" nowrap class="STYLE1">
		<%if Rslist("设置人")=request.cookies("tname")  or request.cookies("tname")="admin"  then %>
		<a   href= "# "   onclick= "javascript:if(confirm( '您真的要删除记录？ '))href= 'deletevarzhang.asp?id=<%=Rslist("id")%>&Grade=<%=strGrade%>&subject=<%=strsubject%>'; "> 删除 </a>	
		<%end if %>
		  </td>	
		</tr>
		<%  Rslist.movenext
		wend
		%>
		</table>
		<p>&nbsp;</p>
		<table width="80%" height="66" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td height="25"><span class="STYLE1">建议：先把整个学期的章节次按课本设置好<br />
            </span></td>
          </tr>
          <tr>
            <td height="25"><span class="STYLE1">章名称：如 <span class="STYLE3">第一章 信息与计算机<br />
            </span></span></td>
          </tr>
          <tr>
            <td><span class="STYLE1">节名称：如 <span class="STYLE3">第一节 信息与数据 </span></span></td>
          </tr>
        </table>
        <p>&nbsp;</p>
		