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

📄 2.asp

📁 利用VB设计制作的一个小规模的教师工资管理系统
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>

<!--#include file="Connections/conn2.asp" -->


<%
Dim Recordset1
Dim Recordset1_numRows

Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_conn2_STRING
Recordset1.Source = "SELECT kc FROM kcb"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()

Recordset1_numRows = 0
%>
<%
Response.buffer=true
if request.form("method")=1 then
code=request.form("code")
if code<>session("code") then
    response.write("<script language=JavaScript>" & chr(13) & "alert('附加码输入错误!');" & "history.back()" & "</script>")
    response.end
end if
content=replace(request.form("text1"),"'","")
if len(content)>250 or trim(content)="" then
    response.write("<script language=JavaScript>" & chr(13) & "alert('您的留言的字数为零或是超过指定数目!');" & "history.back()" & "</script>")
    response.end
end if
xh=trim(request.form("xh"))
dim i,fine
fine=true
for i=1 to len(xh)
    if mid(cstr(xh),i,1)>"9" or mid(cstr(xh),i,1)<"0" then
        fine=false
        exit for
    end if
next
title=trim(replace(request.form("title"),"'",""))
if title="" then title=right(content,15)
    
if len(xh)>10 or xh="" or not fine then
    response.write("<script language=JavaScript>" & chr(13) & "alert('您的工号不符合条件,请确认!');" & "history.back()" & "</script>")
    response.end
end if
sql = "insert into liuyan(title,content,xh) values('"&title&"','"&content&"','"&xh&"')"
conn.execute(sql)
    response.write("<script language=JavaScript>" & chr(13) & "alert('您的留言已经提交成功!');" & "window.location.href = 'checklogin.asp'" & "</script>")
    response.end
end if
            dim num1
            dim rndnum
            Randomize
            Do While Len(rndnum)<4
            num1=CStr(Chr((57-48)*rnd+48))
            rndnum=rndnum&num1
            loop
            session("code")=rndnum
%>
<!-- #include file="inc/top.asp" -->
<!-- #include file="inc/stumenu.asp"-->
<script>
function showLen(obj)
            {
                document.all.bodyLen.innerText=obj.value.length;
            }
</script>
<table width="768" border="0" align="center" cellpadding="0" cellspacing="0" >
  <tr> 
    <td align="center"> <table width="768" height="20" border=0 align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td width="707" height="25" align=center bgcolor="#A0A4AC">积分申请</td>
        </tr>
      </table>
      <table width="768" height="20" border=0 align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td align="center"> <form action="" method="post" enctype="multipart/form-data" name="remarkForm">
              <table width="768" height="20" border=0 align="center" cellpadding="0" cellspacing="0">
                <br>
                <tr> 
                  <td width="15%" align="right">主题:</td>
                  <td colspan="2" valign=top><input name="title" value="服务申请" size="32" maxlength="30">
                    附加码: <input name=code size=1 maxlength=4> &nbsp;请输入: <span style="background-color: #DAEADA;line-height:200%"><font size=2><%=session("code")%></font></span></td>
                </tr>
                <tr> 
                  <td colspan="3" align="right" valign="top"> <table width="768" height="25" border="0" align="center" cellpadding="0" cellspacing="0" class="unnamed_rld2">
                      <%if request.querystring("kind")="new" then%>
                      <tr> 
                        <td width="60%" align="center"><br> <table width="50%"  border="1" cellspacing="0" cellpadding="0" bordercolor="#eeeeee">
                            <tr align="center"> 
                              <td height="31" colspan="2">添加单个员工的分数</td>
                            </tr>
                            <tr> 
                              <td width="27%" align="center">年代</td>
                              <td width="73%"><select name="bj11" id="xh">
                                  <!-- #include file="inc/selectbj.asp" -->
                                </select></td>
                            </tr>
                            <tr> 
                              <td align="center">工号 </td>
                              <td><input name="xh11" type="text" id="xh" value="<%=request.querystring("xh")%>"></td>
                            </tr>
                            <tr> 
                              <td align="center">姓名 </td>
                              <td><input name="user11" type="text" id="user"></td>
                            </tr>
                            <tr> 
                              <td align="center">项目</td>
                              <td><select name="kc11" id="xh">
                                  <!-- #include file="inc/xm.asp" -->
                                </select></td>
                            </tr>
                            <tr> 
                              <td align="center">分数</td>
                              <td><input name="cj11" type="text" id="cj"></td>
                            </tr>
                            <tr> 
                              <td align="center"> 月份</td>
                              <td><select name="xq11">
                                  <option>1</option>
                                  <option>2</option>
                                  <option>3</option>
                                  <option>4</option>
                                  <option>5</option>
                                  <option>6</option>
                                  <option>7</option>
                                  <option>8</option>
                                  <option>9</option>
                                  <option selected>10</option>
                                  <option>11</option>
                                  <option>12</option>
                                </select></td>
                            </tr>
                            <tr> 
                              <td align="center"> 类型 </td>
                              <td> <select name="lx11">
                                  <option selected>绩效工资</option>
                                  <option>一般工资</option>
                                </select> </tr>
                            <tr align="center"> 
                              <td colspan="2"><input type="hidden" name="max" value="1"> 
                                <input type="hidden" name="number" value="1"> 
                                <input type="submit" name="Submit" value="添加"> 
                                <input type="reset" name="Submit2" value="重置">
                                <input type=hidden name="method" value="1"></td>
                            </tr>
                            <tr> 
                              <td colspan="2">&nbsp;</td>
                            </tr>
                          </table></td>
                      </tr>
                      <%end if%>
                      <%if request.querystring("kind")="bj" then
session("return")=request.ServerVariables("SCRIPT_NAME")&"?kind=bj"%>
                      <%end if%>
                      <%if request.querystring("kind")="admin" then
session("return")="admin_add.asp?kind=admin"%>
                      <%end if%>
                      <%if request.querystring("kind")="user" then%>
                      <%end if%>
                    </table>
                    <p>&nbsp;</p>
                    <p>&nbsp;</p></td>
                </tr>
                <tr> 
                  <td align=right>&nbsp;</td>
                  <td colspan="2"> &nbsp;&nbsp; </td>
                </tr>
              </table>
            </form></td>
        </tr>
      </table></td>
  </tr>
</table>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>

⌨️ 快捷键说明

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