📄 admin_res_inc.asp
字号:
<%
Sub nowmenu()
res "<h4><b>相关操作:</b>",1
res "<a href=""?action=default"">成绩管理首页</a> | ",1
res "<a href=""?action=add&"&urlinfos&""">添加新成绩</a> | ",1
res "<a href=""?action=list&"&urlinfos&""">成绩信息查看</a> ",1
res "</h4>",1
res "<div style=""height:3px;width:100%;background: #fff;""></div>",1
End Sub
Sub nowmenu2()
res "<h4><b>相关操作:</b>",1
res "<a href=""?action=default"">成绩管理首页</a> | ",1
res "<a href=""?action=search"">成绩搜索查询</a> | ",1
res "<a href=""?action=into"">成绩在线导入</a> | ",1
res "<a href=""?action=Statistics"">成绩统计更新</a> ",1
res "</h4>",1
res "<div style=""height:3px;width:100%;background: #fff;""></div>",1
End Sub
Sub jstable()
res_in = che(request.form("res_in"))
res_con = che(request.form("res_con"))
classNO = che(request.form("classNO"))
End Sub
Sub sqltable(types)
rs("res_in") = res_in
rs("res_con") = res_con
End Sub
Sub getto()
%><SCRIPT LANGUAGE="JavaScript">
<!--
function check_list() {
var check_lj=$sel("lj_id").value;
var check_Col=$sel("Col_id").value;
var check_pro=$sel("pro_id").value;
var check_sem=$sel("sem_id").value;
if (check_lj!=0 && check_Col!=0 && check_pro!=0 && check_sem!=0 )
{
}
var gotourl="?action=list&page=<%=page%>&lj_id="+check_lj+"&Col_id="+check_Col+"&pro_id="+check_pro+"&sem_id="+check_sem
window.location.href=gotourl;
}
//-->
</SCRIPT>
<H6>成绩库: </H6>
<h5>
<ul>
<li>年 届 <SELECT NAME="<%=nowlm(0)%>"><%=my_sqlsel(lj_id,"lj")%></SELECT>
<li>学 期 <SELECT NAME="<%=nowlm(3)%>"><%=sem_select(sem_id)%></SELECT> <SPAN></SPAN>
<li>系 所 <SELECT id="<%=nowlm(1)%>" NAME="<%=nowlm(1)%>"><%=my_sqlsel(Col_id,"Col")%></SELECT>
<li>专 业 <SELECT NAME="<%=nowlm(2)%>"><option>请选择...</option></SELECT> <SPAN id="<%=nowlm(2)%>_txt"></SPAN>
<li> <INPUT TYPE="button" value=" 进 入 " onclick="check_list();">
</ul>
</h5>
<SCRIPT LANGUAGE = JavaScript>
var s=["<%=nowlm(1)%>","<%=nowlm(2)%>"];
var opt0 = ["请选择...","请选择..."];
function setup()
{
for(i=0;i<s.length-1;i++)
if (window.attachEvent){
$val(s[i]).attachEvent("onchange",new Function("change("+(i+1)+")"));
}
else{
$val(s[i]).addEventListener("change", change(i+1), false);
}
}
//function checkdef(formobj){
// if (formobj=="<%=nowlm(2)%>"){
// setSel2(<%=pro_id%>,$val(formobj));
// }
//}
setup();
<%if Col_id<>0 then res "change(1);",1%>
//-->
</SCRIPT>
<%
End Sub
Sub Switch()
%><SCRIPT LANGUAGE="JavaScript">
<!--
function check_listinfo(){
var check_cla=$sel("cla_id").value;
var check_cou=$sel("cou_id").value;
var check_type=$sel("type_id").value;
var gotourl="?action=<%=action%>&page=<%=page%>&lj_id=<%=lj_id%>&Col_id=<%=Col_id%>&pro_id=<%=pro_id%>&sem_id=<%=sem_id%>";
gotourl+="&cla_id="+check_cla+"&cou_id="+check_cou+"&type_id="+check_type;
window.location.href=gotourl;
}
//-->
</SCRIPT><H6>成绩列表: </H6>
<h5>
<ul>
<li>班 级 <SELECT NAME="<%=nowlm(4)%>"></SELECT> <SPAN id="<%=nowlm(4)%>_txt"></SPAN>
</ul>
<ul><li>考试类别 <SELECT NAME="<%=nowlm(6)%>"></SELECT> <SPAN id="<%=nowlm(6)%>_txt"></SPAN>
<li>课 程 <SELECT NAME="<%=nowlm(5)%>"></SELECT> <SPAN id="<%=nowlm(5)%>_txt"></SPAN>
<li> <INPUT TYPE="button" value=" 切 换 " onclick="check_listinfo();">
</ul>
</h5>
<SCRIPT LANGUAGE = JavaScript>
postinfos("lj_id=<%=lj_id%>&Col_id=<%=Col_id%>&pro_id=<%=pro_id%>","admin_res_check.asp","","cla_id");
postinfos("actions=res_type&lj_id=<%=lj_id%>","admin_res_check.asp","","type_id");
postinfos("actions=res_cou&lj_id=<%=lj_id%>&sem_id=<%=sem_id%>&Col_id=<%=Col_id%>&pro_id=<%=pro_id%>","admin_res_check.asp","","cou_id");
function checkdef(strtypes){
if (strtypes=="<%=nowlm(4)%>"){
setSel2("<%=cla_id%>",$val("<%=nowlm(4)%>"));
}
if (strtypes=="<%=nowlm(5)%>"){
setSel2("<%=cou_id%>",$val("<%=nowlm(5)%>"));
}
if (strtypes=="<%=nowlm(6)%>"){
setSel2("<%=type_id%>",$val("<%=nowlm(6)%>"));
}
}
//-->
</SCRIPT>
<%
End Sub
Sub addinfos()
%>
<table width="100%" cellspacing="1" cellpadding="0" class="info_tab2" id="idTB">
<form method=post name="adds"
action="?action=save&<%=urlinfos%>">
<tr>
<th width="15%"><%=nows(7)%></th>
<th width="15%"><%=nows(10)%></th>
<th width="15%"><%=nows(11)%></th>
<th></th>
</tr>
<TR>
<TD> <input type="text" name="<%=nowlm(7)%>" style="width:90%;" maxlength="20"></td>
<TD> <INPUT TYPE="text" NAME="<%=nowlm(10)%>" style="width:90%;" maxlength="10"></td>
<TD> <INPUT TYPE="text" NAME="<%=nowlm(11)%>" style="width:90%;" maxlength="20"></td>
<TD> </TD>
</tr>
</form>
</TABLE>
<table width="100%" cellspacing="1" cellpadding="0" class="info_tab2">
<TR><TD width="20%">行数:<input id="idFirst" name="idFirst" style="height:16px;width:25px;text-align:center;ime-mode:disabled;" value=1 maxlength="3" onkeypress="var k=event.keyCode; if ((k<=57 &&k>=48)) return true;else return false" onpaste="return false" onFocus="this.select();">
<input type="button" onclick="setRow()" value="设定">
<input type="button" onclick="addRow()" value=" + "></TD><TD> <input type="button" onclick="CheckForm_adds()" value="确认提交">
</TD></TR>
</TABLE>
</FORM>
<div id="bottom"></div>
<script language="JavaScript">
<!--
function addRow(){//添加表格的一行
oTR=$val("idTB").insertRow(idTB.rows.length);
tmpNum=oTR.rowIndex;
oTD0=oTR.insertCell(0);
oTD0.innerHTML+=" <input type=\"text\" name=\"<%=nowlm(7)%>\" maxlength=\"10\" style=\"width:90%;\">";
oTD3=oTR.insertCell(1);
oTD3.innerHTML+=" <INPUT TYPE=\"text\" NAME=\"<%=nowlm(10)%>\" maxlength=\"20\" style=\"width:90%;\">";
oTD4=oTR.insertCell(2);
oTD4.innerHTML+=" <INPUT TYPE=\"text\" NAME=\"<%=nowlm(11)%>\" maxlength=\"20\" style=\"width:90%;\">";
oTD5=oTR.insertCell(3);
oTD5.innerHTML+="<a href=\"#\" onclick=\"delRow(this.parentElement.parentElement.rowIndex);\">删除</a>";
$val("idFirst").innerText=$val("idTB").rows.length-1;
window.location.href="#bottom";
return true;
}
//-->
</script>
<%
End Sub
Sub listinfos()
%>
<table width="100%" cellspacing="1" cellpadding="0" class="info_tab2">
<tr>
<th width="5%" style="text-align:center;text-indent: 4px;">选</th>
<th width="15%">学号</th>
<th width="15%">姓名</th>
<th width="10%">成绩</th>
<th width="15%">备注</th>
<th width="10%">名次</th>
<th width="10%">操作</th>
<th width=""></th>
</tr>
<%
Sql_Conditions="b.cla_id="&cla_id&" and b.sem_id="&sem_id&" and b.type_id="&type_id&" and b.cou_id="&cou_id&" and a.id=b.stu_id"
sql=Sqlinfo("a.id,a.stuid,a.[name],b.res_in,b.res_con,b.id,b.mc","admin_stu as a,res_info as b",Sql_Conditions,"","","")
strFileName="?action="&action&"&"&urlinfos
colnum="8"
formaction="?action=del&"&urlinfos
sqllist sql,colnum,strFileName,formaction
If outcom=True Then
showContent
showdelpages
End If
%>
</TABLE>
<%
End Sub
sub showContent
dim i
i=0
Dim my_temp_res
do while not rs.eof
my_temp_res=rs(3)
If my_temp_res=-1 Then my_temp_res=" "
%>
<tr>
<td class="art_info2" align="center">
<input name='id' type='checkbox' class="chek" onclick="unselectall()" id="ArticleID" value='<%=Rs(0)%>' style=" border: 0px">
</td>
<td> <%=rs(1)%></td>
<td> <%=rs(2)%></td>
<td> <%=my_temp_res%></td>
<td> <%=rs(4)%></td>
<td> <%=rs(6)%></td>
<td> <A HREF="?action=edit&<%=urlinfos%>&id=<%=Rs(5)%>">修改</A>|<A HREF="?action=del&<%=urlinfos%>&id=<%=Rs(5)%>">删除</A></td>
<td> </td>
</tr>
<%
i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
end Sub
Sub editinfos()
If id="" Then errormsg "参数错误!"
Sql_Conditions="b.cla_id="&cla_id&" and b.sem_id="&sem_id&" and b.type_id="&type_id&" and b.cou_id="&cou_id&" and a.id=b.stu_id and b.id="&id
sql=Sqlinfo("a.id,a.stuid,a.[name],b.res_in,b.res_con,a.IdentityNO","admin_stu as a,res_info as b",Sql_Conditions,"","","")
rs_edit = connopen(sql)
If isArray(rs_edit)=False Then errormsg "参数错误"
%>
<table width="100%" cellspacing="1" cellpadding="0" class="info_tab">
<FORM METHOD=POST ACTION="?action=mod&<%=urlinfos%>" name="edit" onsubmit="return CheckForm2();">
<TR><TD class="zq" width="20%"><%=nows(8)%></TD>
<TD> <%=rs_edit(2,0)%>
</td>
</tr>
<TR><TD class="zq" width="20%"><%=nows(7)%></TD>
<TD> <%=rs_edit(1,0)%>
</td>
</tr>
<TR><TD class="zq" width="20%"><%=nows(9)%></TD>
<TD> <%=rs_edit(5,0)%>
</td>
</tr>
<TR><TD class="zq" width="20%"><%=nows(10)%></TD>
<TD> <input name="<%=nowlm(10)%>" type="text" onkeypress="var k=event.keyCode; if ((k<=57 &&k>=48)) return true;else return false" onpaste="return false" maxlength="4" onFocus="this.select();" value="<%=rs_edit(3,0)%>" style="ime-mode:disabled" class="put"> <span id="<%=nowlm(10)%>_txt"> </span>
</td>
</tr>
<TR><TD class="zq" width="20%"><%=nows(11)%></TD>
<TD> <input name="<%=nowlm(11)%>" type="text" maxlength="20" onFocus="this.select();" value="<%=rs_edit(4,0)%>" class="put"> <span id="<%=nowlm(11)%>_txt"> </span>
</td>
</tr>
<TR><TD> </TD><TD> <input type="submit" name="send" value=" 确 认 ">
<INPUT TYPE="hidden" NAME="id" value="<%=id%>">
</TD></TR>
</FORM>
</TABLE>
<%
end sub
Sub Statisticsinfos
%>
<SCRIPT LANGUAGE="JavaScript">
<!--
function check_list() {
var check_lj=$sel("lj_id").value;
var check_sem=$sel("sem_id").value;
if (check_lj!=0 && check_sem!=0 )
{
}
var gotourl="?action=Statistics&check=yes&page=<%=page%>&lj_id="+check_lj+"&sem_id="+check_sem
window.location.href=gotourl;
}
//-->
</SCRIPT>
<H6>成绩库: </H6>
<h5>
<ul>
<li>年 届 <SELECT NAME="<%=nowlm(0)%>"><%=my_sqlsel(lj_id,"lj")%></SELECT>
<li>学 期 <SELECT NAME="<%=nowlm(3)%>"><%=sem_select(sem_id)%></SELECT> <SPAN></SPAN>
<li> <INPUT TYPE="button" value=" 一键统计 " onclick="check_list();">
</ul>
</h5>
<%
If check="yes" Then
Dim rs_type,rs_cla,rs_cou,rs_info
Dim rs_i,rs_ii,rs_iii,rs_iiii
sql=Sqlinfo("id","res_type","lj_id="&lj_id,"","","")
rs_type = connopen(sql)
If IsArray(rs_type) Then
sql=Sqlinfo("id","res_cla","lj_id="&lj_id,"","","")
rs_cla = connopen(sql)
If IsArray(rs_cla) Then
For rs_i =0 To UBound(rs_cla,2)
sql=Sqlinfo("id","res_cou","lj_id="&lj_id&" and sem_ids like '%"&sem_id&"%'","","","")
rs_cou = connopen(sql)
If IsArray(rs_cou) Then
For rs_ii =0 To UBound(rs_cou,2)
For rs_iii =0 To UBound(rs_type,2)
Sql_Conditions="cou_id="&rs_cou(0,rs_ii)&" and cla_id="&rs_cla(0,rs_i)&" and sem_id="&sem_id&" and type_id="&rs_type(0,rs_iii)&" and res_in<>'-1'"
sql=Sqlinfo("res_in,id","res_info",Sql_Conditions,"res_in",1,"")
rs_info = connopen(sql)
If IsArray(rs_info) Then
For rs_iiii =0 To UBound(rs_info,2)
conn.execute("update res_info set mc="&rs_iiii+1&" where id="&rs_info(1,rs_iiii))
Next
End If
Next
Next
End If
Next
End If
End If
response.write "成功!"
End If
End Sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -