⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 score_apply.asp

📁 大学的综合测评
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="const.asp" -->
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="img/Style.css" rel="stylesheet" type="text/css" />
<title>无标题文档</title>
<style type="text/css">
<!--
.STYLE1 {
	color: #FFFFFF;
	font-weight: bold;
}
.STYLE3 {
	font-size: 14px;
	font-weight: bold;
	font-family: Arial, Helvetica, sans-serif;
	color: #000000;
}
.STYLE4 {color: #FFFFFF}
-->
</style>
</head>
<body>

<%
dim m_month
m_apmark="m"&student_allow_month&"_apmark"
m_reason="m"&student_allow_month&"_reason"
action=Request("action")
user_no=Request.Cookies("zcas")("user_no")
if user_no="" then 
Response.Write("<li>登录超时,请重新登录</li>")
Response.End()
end if

if action="update" then
      	mark=safeChar(Request.Form("mark"))
		if  not isnumeric(mark) 	then 
		 mark=0 
		elseif Cdbl(mark)<0 or Cdbl(mark)>score_apply_max then
		Response.Write("&nbsp;<li>输入的申请分不规则</li>")
		Response.end()
		end if
		reason = replace(safeChar(Request("reason")),chr(13),"")
		reason = replace(reason," ","")
		if len(reason)>reason_apply_maxlength then 
		response.Write("<li>输入的字符太多</li>")
		Response.End()
		end if
		y=split(reason,"#")
		if Ubound(y)>reason_apply_max-1 then 
		Response.Write("<li>输入的加分理由条数太多,请再整理一下</li>")
		Response.End()
		end if
			on error resume next
			set c = Server.CreateObject("ADODB.Command")
			c.ActiveConnection = dbconn
			c.CommandText = "update pc_user set "&m_apmark&"='"&mark&"',"&m_reason&"='"&reason&"' where user_no='"&user_no&"'"
			c.CommandType = 1
			c.CommandTimeout = 0
			c.Prepared = true
			c.Execute()
			if err.number="0" then
			
			Response.Write("<script language='javascript'>alert('添加成功');location=('score_apply.asp')</script>")			
		    else
			response.Write("<li>输入的字符太多</li>")
			Response.End()
			end if
		%>

<%else
Dim rs1
		Set rs1 = Server.CreateObject("ADODB.Recordset")
		rs1.ActiveConnection = dbconn
		rs1.Source = "SELECT "&m_apmark&","&m_reason&",user_no FROM pc_user where  user_no='"&user_no&"'"
		rs1.CursorType = 0
		rs1.CursorLocation = 2
		rs1.LockType = 1
		rs1.Open()
		if rs1.eof or rs1.bof then 
		response.Write("系统错误")
		response.End()
		end if

 %>
<p>&nbsp;</p>
<form name="form" action="" method="post" >
  <table width="80%" border="0" align="center" cellpadding="1" cellspacing="0" class="atable1">
  <tr>
    <td colspan="3" bgcolor="#333"><span class="STYLE1"><span class="STYLE1">&nbsp;&nbsp;</span></span><span class="STYLE4">个人得分申请表</span></td>
  </tr>
  <tr>
    <td height="15" colspan="3" class="tdmenu"><span class="jushe">&nbsp;&nbsp;&nbsp;&nbsp;[<span class="STYLE3"> <%=student_allow_month%> </span>] 月份个人得分申请表</span></td>
    </tr>
	
	<%if pow_student=1 then%>
  <tr>
    <td height="15" colspan="3" class="tdmenu">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="jushe">请输入要申请的分数:</span>
      <input name="mark" type="text" class="atable1" id="mark" value="<%=rs1(0)%>" size="3" maxlength="3" />      &nbsp;&nbsp;<span class="jushe">最大申请分数为: [</span><span class="STYLE3">&nbsp;<%=score_apply_max%>&nbsp;</span><span class="jushe">]</span></td>
  </tr>
  <tr>
    <td height="30" colspan="3" class="tdmenu"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="jushe">请输入申请加数的理由:多条理由间用“#”隔开,理由最大条数为: [</span>      <span class="STYLE3"><%=reason_apply_max%> </span><span class="jushe">],做多字符数 [</span> <span class="STYLE3"><%=reason_apply_maxlength%></span><span class="jushe"> ]字</span></td>
  </tr>
  <tr>
    <td width="76%" height="30" class="tdmenu"><div align="center">
      <p align="right"><textarea name="reason" cols="60" rows="10" class="atable1" id="reason"><%=rs1(1)%></textarea>
      </p>
      <p>&nbsp;  </p>
    </div></td>
    <td width="15%" valign="bottom" class="tdmenu"><div align="center">
      <p>
        <input name="提交" type="submit" class="tdmenu" id="提交" value="提交" />
        </p>
      <p>
        <input name="重填" type="reset" class="tdmenu" id="重填" value="重填" />
      </p>
      
        <input type="hidden" name="action" value="update" />
        <p>&nbsp;        </p>
    </div></td>
    <td width="5%" class="tdmenu">&nbsp;</td>
  </tr>
 <%end if%> 
  <tr>
    <td  colspan="3" class="tdmenu">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="jushe">你申请的分数<%if pow_student=0 then Response.Write(" <经班级负责人审核过>") end if%>:</span><span class="STYLE3"><%=rs1(0)%></span><span class="jushe">&nbsp;最大申请分数额度为: [</span><span class="STYLE3">&nbsp;<%=score_apply_max%></span><span class="jushe">&nbsp;]<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;申请理由如下:</span></td>
    </tr>
  <tr>
    <td  colspan="3" class="tdmenu"><span class="hei"><%=tolist(rs1(1))%></span></td>
  </tr>
  </table>
</form>
<%
rs1.close
set rs1=nothing
end if%>
</body>
</html>
<%dbconn.close%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -