📄 system.asp
字号:
Loop
If flag = 0 Then
rs.AddNew
rs("recordsType") = recordsType
rs.Update
End If
rs.Close
Set rs = Nothing
If flag = 1 Then
Response.Write("<script>" & VBCrlf)
Response.Write("alert(""编号或者名称已经存在。"")" & VBCrlf)
Response.Write("history.back();" & VBCrlf)
Response.Write("</script>")
Else
Response.Redirect("?action=RecordsType")
End If
End Sub
Sub editLevel()
Dim lNameOld
lNameOld = Trim(Request.QueryString("lNameOld"))
If lNameOld = "" Then Response.Redirect(Request.ServerVariables("HTTP_REFERER"))
Dim rs
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Select * From baidu_level Where lName = '" & lNameOld & "'",conn,3,1
If rs.RecordCount = 1 Then
strForm = strForm & " <table width=""100%"" border=""0"" cellpadding=""3"" cellspacing=""0"" bgcolor=""#FFFFFF"">" & VBCrlf
strForm = strForm & " <form name=""levelForm"" action=""?action=Level&subAction=edit"" method=""post"">" & VBCrlf
strForm = strForm & " <tr>" & VBCrlf
strForm = strForm & " <td width=""60""> </td>" & VBCrlf
strForm = strForm & " <td>添加用户级别:</td>" & VBCrlf
strForm = strForm & " </tr>" & VBCrlf
strForm = strForm & " <tr> " & VBCrlf
strForm = strForm & " <td width=""60""> </td>" & VBCrlf
strForm = strForm & " <td>用户级别名称:" & VBCrlf
strForm = strForm & " <input name=""lName"" type=""text"" id=""lName"" size=""16"" maxlength=""16"" value=""" & rs("lName") & """>" & VBCrlf
strForm = strForm & " 级别编号:" & VBCrlf
strForm = strForm & " <input name=""lId"" type=""text"" id=""lId"" size=""2"" maxlength=""2"" value=""" & rs("lId") & """>" & VBCrlf
strForm = strForm & " (1-9,数字越大级别越高,管理员为 9 级。)</td>" & VBCrlf
strForm = strForm & " </tr>" & VBCrlf
strForm = strForm & " <tr>" & VBCrlf
strForm = strForm & " <td width=""60"" align=""center""> </td>" & VBCrlf
strForm = strForm & " <td align=""center""> <input type=""submit"" name=""Submit"" value="" 提 交 "">" & VBCrlf
strForm = strForm & " <input name=""Reset"" type=""reset"" id=""Reset"" value="" 重 置 "">" & VBCrlf
strForm = strForm & " </td>" & VBCrlf
strForm = strForm & " </tr>" & VBCrlf
strForm = strForm & " </form>" & VBCrlf
strForm = strForm & " </table>" & VBCrlf
End If
rs.Close
Set rs = Nothing
strList = strList & list("level")
End Sub
Sub editGroup()
Dim gNameOld
gNameOld = Trim(Request.QueryString("gNameOld"))
If gNameOld = "" Then Response.Redirect(Request.ServerVariables("HTTP_REFERER"))
Dim rs
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Select * From baidu_group Where gName = '" & gNameOld & "'",conn,3,1
If rs.RecordCount = 1 Then
strForm = strForm & " <table width=""100%"" border=""0"" cellpadding=""3"" cellspacing=""0"" bgcolor=""#FFFFFF"">" & VBCrlf
strForm = strForm & " <form name=""groupForm"" action=""?action=Group&subAction=edit"" method=""post"">" & VBCrlf
strForm = strForm & " <tr>" & VBCrlf
strForm = strForm & " <td width=""60""> </td>" & VBCrlf
strForm = strForm & " <td>添加用户组:</td>" & VBCrlf
strForm = strForm & " </tr>" & VBCrlf
strForm = strForm & " <tr> " & VBCrlf
strForm = strForm & " <td width=""60""> </td>" & VBCrlf
strForm = strForm & " <td>用户组名称:" & VBCrlf
strForm = strForm & " <input name=""gName"" type=""text"" id=""gName"" size=""16"" maxlength=""16"" value=""" & rs("gName") & """>" & VBCrlf
strForm = strForm & " 组编号:" & VBCrlf
strForm = strForm & " <input name=""gId"" type=""text"" id=""gId"" size=""2"" maxlength=""2"" value=""" & rs("gId") & """>" & VBCrlf
strForm = strForm & " </td>" & VBCrlf
strForm = strForm & " </tr>" & VBCrlf
strForm = strForm & " <tr>" & VBCrlf
strForm = strForm & " <td width=""60"" align=""center""> </td>" & VBCrlf
strForm = strForm & " <td align=""center""> <input type=""submit"" name=""Submit"" value="" 提 交 "">" & VBCrlf
strForm = strForm & " <input name=""Reset"" type=""reset"" id=""Reset"" value="" 重 置 "">" & VBCrlf
strForm = strForm & " </td>" & VBCrlf
strForm = strForm & " </tr>" & VBCrlf
strForm = strForm & " </form>" & VBCrlf
strForm = strForm & " </table>" & VBCrlf
End If
rs.Close
Set rs = Nothing
strList = strList & list("group")
End Sub
Sub editClientsType()
Dim clientsTypeOld
clientsTypeOld = Trim(Request.QueryString("clientsTypeOld"))
If clientsTypeOld = "" Then Response.Redirect(Request.ServerVariables("HTTP_REFERER"))
Dim rs
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Select * From baidu_clientsType Where clientsType = '" & clientsTypeOld & "'",conn,3,1
If rs.RecordCount = 1 Then
strForm = strForm & " <table width=""100%"" border=""0"" cellpadding=""3"" cellspacing=""0"" bgcolor=""#FFFFFF"">" & VBCrlf
strForm = strForm & " <form name=""clientsTypeForm"" action=""?action=ClientsType&subAction=edit"" method=""post"">" & VBCrlf
strForm = strForm & " <tr>" & VBCrlf
strForm = strForm & " <td width=""60""> </td>" & VBCrlf
strForm = strForm & " <td>添加客户类型:</td>" & VBCrlf
strForm = strForm & " </tr>" & VBCrlf
strForm = strForm & " <tr> " & VBCrlf
strForm = strForm & " <td width=""60""> </td>" & VBCrlf
strForm = strForm & " <td>客户类型:" & VBCrlf
strForm = strForm & " <input name=""clientsType"" type=""text"" id=""clientsType"" size=""16"" maxlength=""16"" value=""" & rs("clientsType") & """>" & VBCrlf
strForm = strForm & " </td>" & VBCrlf
strForm = strForm & " </tr>" & VBCrlf
strForm = strForm & " <tr>" & VBCrlf
strForm = strForm & " <td width=""60"" align=""center""> </td>" & VBCrlf
strForm = strForm & " <td align=""center""> <input type=""submit"" name=""Submit"" value="" 提 交 "">" & VBCrlf
strForm = strForm & " <input name=""Reset"" type=""reset"" id=""Reset"" value="" 重 置 "">" & VBCrlf
strForm = strForm & " </td>" & VBCrlf
strForm = strForm & " </tr>" & VBCrlf
strForm = strForm & " </form>" & VBCrlf
strForm = strForm & " </table>" & VBCrlf
End If
rs.Close
Set rs = Nothing
strList = strList & list("clientsType")
End Sub
Sub editRecordsType()
Dim recordsTypeOld
recordsTypeOld = Trim(Request.QueryString("recordsTypeOld"))
If recordsTypeOld = "" Then Response.Redirect(Request.ServerVariables("HTTP_REFERER"))
Dim rs
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Select * From baidu_recordsType Where recordsType = '" & clientsTypeOld & "'",conn,3,1
If rs.RecordCount = 1 Then
strForm = strForm & " <table width=""100%"" border=""0"" cellpadding=""3"" cellspacing=""0"" bgcolor=""#FFFFFF"">" & VBCrlf
strForm = strForm & " <form name=""recordsTypeForm"" action=""?action=RecordsType&subAction=edit"" method=""post"">" & VBCrlf
strForm = strForm & " <tr>" & VBCrlf
strForm = strForm & " <td width=""60""> </td>" & VBCrlf
strForm = strForm & " <td>添加客户类型:</td>" & VBCrlf
strForm = strForm & " </tr>" & VBCrlf
strForm = strForm & " <tr> " & VBCrlf
strForm = strForm & " <td width=""60""> </td>" & VBCrlf
strForm = strForm & " <td>客户类型:" & VBCrlf
strForm = strForm & " <input name=""recordsType"" type=""text"" id=""recordsType"" size=""16"" maxlength=""16"" value=""" & rs("recordsType") & """>" & VBCrlf
strForm = strForm & " </td>" & VBCrlf
strForm = strForm & " </tr>" & VBCrlf
strForm = strForm & " <tr>" & VBCrlf
strForm = strForm & " <td width=""60"" align=""center""> </td>" & VBCrlf
strForm = strForm & " <td align=""center""> <input type=""submit"" name=""Submit"" value="" 提 交 "">" & VBCrlf
strForm = strForm & " <input name=""Reset"" type=""reset"" id=""Reset"" value="" 重 置 "">" & VBCrlf
strForm = strForm & " </td>" & VBCrlf
strForm = strForm & " </tr>" & VBCrlf
strForm = strForm & " </form>" & VBCrlf
strForm = strForm & " </table>" & VBCrlf
End If
rs.Close
Set rs = Nothing
strList = strList & list("recordsType")
End Sub
Sub restoreLevel()
End Sub
Sub restoreGroup()
End Sub
Sub restoreClientsType()
End Sub
Sub restoreRecordsType()
End Sub
Sub deleteLevel()
End Sub
Sub deleteGroup()
End Sub
Sub deleteClientsType()
End Sub
Sub deleteRecordsType()
End Sub
Sub listLevel()
strForm = myForm("level")
strList = list("level")
End Sub
Sub listGroup()
strForm = myForm("group")
strList = list("group")
End Sub
Sub listClientsType()
strForm = myForm("clientsType")
strList = list("clientsType")
End Sub
Sub listRecordsType()
strForm = myForm("recordsType")
strList = list("recordsType")
End Sub
Dim rs,intTotalRecords,intTotalPages,intCurrentPage,intPageSize
intCurrentPage = CInt(ABS(Request("pageNum")))
If Not IsNumeric(intCurrentPage) Or intCurrentPage <= 0 Then intCurrentPage = 1
intPageSize = 10
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Select * From baidu_user Order By uId",conn,3,1
intTotalRecords = rs.RecordCount
rs.PageSize = intPageSize
intTotalPages = rs.PageCount
If intCurrentPage > intTotalPages Then intCurrentPage = intTotalPages
If intTotalRecords > 0 Then rs.AbsolutePage = intCurrentPage
strCounter = strCounter & "共 " & intTotalRecords & " 条记录 "
strCounter = strCounter & "共 " & intTotalPages & " 页 "
strCounter = strCounter & "当前第 " & intCurrentPage & " 页 "
If intCurrentPage <> 1 And intTotalRecords <> 0 Then
strCounter = strCounter & "<a href=""?pageNum=1""><<首页</a> "
Else
strCounter = strCounter & "<<首页 "
End If
If intCurrentPage > 1 Then
strCounter = strCounter & "<a href=""?pageNum=" & intCurrentPage - 1 & """><上一页</a> "
Else
strCounter = strCounter & "<上一页 "
End If
If intCurrentPage < intTotalPages Then
strCounter = strCounter & "<a href=""?pageNum=" & intCurrentPage + 1 & """>下一页></a> "
Else
strCounter = strCounter & "下一页> "
End If
If intCurrentPage <> intTotalPages Then
strCounter = strCounter & "<a href=""?pageNum=" & intTotalPages & """>尾页>></a>"
Else
strCounter = strCounter & "尾页>>"
End If
Dim i
i = 0
Do While Not rs.BOF And Not rs.EOF
i = i + 1
strToPrint = strToPrint & " <tr>" & VBCrlf
strToPrint = strToPrint & " <td align=""center"">" & rs("uId") & "</td>" & VBCrlf
If rs("uBlock") = False Then
strToPrint = strToPrint & " <td>" & rs("uAccount") & "</td>" & VBCrlf
Else
strToPrint = strToPrint & " <td><font color=""#FF0000"">" & rs("uAccount") & "</font></td>" & VBCrlf
End If
strToPrint = strToPrint & " <td>" & rs("uPassword") & "</td>" & VBCrlf
strToPrint = strToPrint & " <td>" & rs("uName") & "</td>" & VBCrlf
strToPrint = strToPrint & " <td>" & getGroupName(rs("uGroup")) & "</td>" & VBCrlf
strToPrint = strToPrint & " <td>" & getLevelName(rs("uLevel")) & "</td>" & VBCrlf
If rs("uBlock") = False Then
strToPrint = strToPrint & " <td align=""center"">[<a href=""?action=edit&uId=" & rs("uId") & """>修改</a>] [<a href=""?action=block&uId=" & rs("uId") & """>冻结</a>] [<a href=""?action=delete&uId=" & rs("uId") & """>删除</a>]</td>" & VBCrlf
Else
strToPrint = strToPrint & " <td align=""center"">[<a href=""?action=edit&uId=" & rs("uId") & """>修改</a>] [<a href=""?action=block&uId=" & rs("uId") & """>解冻</a>] [<a href=""?action=delete&uId=" & rs("uId") & """>删除</a>]</td>" & VBCrlf
End If
strToPrint = strToPrint & " </tr>" & VBCrlf
If i >= intPageSize Then Exit Do
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="Author" content="http://127.0.0.1">
<meta name="Date" content="2007-08">
<title>客户资源管理系统</title>
<link href="myStyle.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="images/test.css" type="text/css">
<script language="JavaScript">
<!--
function showHideHead(strSrc)
{
var strFile = strSrc.substring(strSrc.lastIndexOf("/"),strSrc.length);
if (strFile == "/arrow_up.gif"){
oHead.style.display = "none";
oHeadCtrl.src = "images/arrow_down.gif";
oHeadCtrl.alt = "显示头部";
oHeadBar.title = "显示头部";
}
else {
oHead.style.display = "block";
oHeadCtrl.src = "images/arrow_up.gif";
oHeadCtrl.alt = "隐藏头部";
oHeadBar.title = "隐藏头部";
}
}
function checkInput(o)
{
var oo = eval("document.all." + o);
var num = oo.length;
for(var i=0;i<num;i++){
if(oo[i].value == ""){
alert(oo[i].selfValue + "不能为空。");
oo[i].focus();
return false
break;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -