📄 sysconfig.asp
字号:
<!--#include file="check.asp"-->
<!--#include file="checkpower.asp"-->
<!--#INCLUDE FILE="connect.asp" -->
<html>
<head>
<title>系统参数设定</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="apply.css" type="text/css">
</head>
<script language=javascript src="apply.js">
</script>
<script language="javascript">
function checkaddconfig() {
var checkOK = "0123456789";
var checkStr = document.form.sys1.value
var allValid = true;
var decPoints = 0;
var allNum = "";
if (checkStr==""){
alert("您还没有填写上班时间!")
document.form.sys1.focus()
return false;
}
if (checkStr.length>4){
alert("您输入的位数不能超过4位!")
document.form.sys1.value=""
document.form.sys1.focus()
return false;
}
for (i = 0; i < checkStr.length; i++)
{
ch = checkStr.charAt(i);
for (j = 0; j < checkOK.length; j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
if (ch != ",")
allNum += ch;
}
if (!allValid)
{
alert("上班时间只能输入数字");
document.form.sys1.value=""
document.form.sys1.focus()
return (false);
}
var checkStr = document.form.sys2.value
var allValid = true;
var decPoints = 0;
var allNum = "";
if (checkStr==""){
alert("您还没有填写下班时间!")
document.form.sys2.focus()
return false;
}
if (checkStr.length>4){
alert("您输入的位数不能超过4位!")
document.form.sys2.value=""
document.form.sys2.focus()
return false;
}
for (i = 0; i < checkStr.length; i++)
{
ch = checkStr.charAt(i);
for (j = 0; j < checkOK.length; j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
if (ch != ",")
allNum += ch;
}
if (!allValid)
{
alert("下班时间只能输入数字");
document.form.sys2.value=""
document.form.sys2.focus()
return (false);
}
if (document.form.sys5.value=="") {
alert("您还没有输入数据库服务器名称")
document.form.sys5.focus()
return false
}
if (document.form.sys6.value=="") {
alert("您还没有输入数据库名")
document.form.sys6.focus()
return false
}
if (document.form.sys7.value=="") {
alert("您还没有输入数据库用户名")
document.form.sys7.focus()
return false
}
if (document.form.sys8.value=="") {
alert("您还没有输入数据库密码")
document.form.sys8.focus()
return false
}
if (document.form.sys9.value=="") {
alert("您还没有输入数据备份路径")
document.form.sys9.focus()
return false
}
if(!confirm("您确定要修改系统参数吗?"))
{return false;}
else
{
document.form.choose.value="2"
document.form.submit()
}
}
function checkdelconfig() {
if(!confirm("您确定要恢复到默认设置吗?"))
{return false}
else
{
document.form.choose.value="0"
document.form.submit()
}
}
</script>
<%set rs=server.createobject("adodb.recordset")
if request.servervariables("Request_Method")="POST" then
sql="select id from sysconfig where type=1"
rs.open sql,conn,1,1
if not rs.eof then
defaultid=rs("id")
end if
rs.close
if request("choose")="0" then
sql="delete from sysconfig where type>1"
conn.execute(sql)
end if
if request("choose")="2" then
if defaultid=CLng(request("id")) then
sql="select * from sysconfig"
rs.open sql,conn,1,3
if rs.eof then
response.redirect "error.htm"
response.end
end if
rs.addnew
rs("startwork")=request("sys1")
rs("endwork")=request("sys2")
rs("maxsize")=request("sys3")
rs("soundpath")=request("sys4")
rs("sqlname")=request("sys5")
rs("basename")=request("sys6")
rs("username")=request("sys7")
rs("password")=request("sys8")
rs("savepath")=request("sys9")
'rs("mobilephone")=request("sys10")
'rs("smspassword")=request("sys11")
rs("type")="2"
rs.update
rs.close
else
sql="select * from sysconfig where id="&CLng(request("id"))
rs.open sql,conn,1,3
rs("startwork")=request("sys1")
rs("endwork")=request("sys2")
rs("maxsize")=request("sys3")
rs("soundpath")=request("sys4")
rs("sqlname")=request("sys5")
rs("basename")=request("sys6")
rs("username")=request("sys7")
rs("password")=request("sys8")
rs("savepath")=request("sys9")
'rs("mobilephone")=" "&request("sys10")
'rs("smspassword")=request("sys11")
rs("type")="2"
rs.update
rs.close
end if
end if
end if
%>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<%
sql="select * from sysconfig where type=2 or type=1 order by type desc"
rs.open sql,conn,1,1
if rs.eof then
response.redirect "error.htm"
response.end
end if
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="50">
<tr>
<td align="center" class="title"> <img src="images/systemconfig.gif"></td>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0" align="center">
<tr>
<td valign="top" width="80" align="left"> </td>
<td valign="top" align="left">
<form method="POST" action="" name="form">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="175"> </td>
<td valign="top" height="30">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height="30" width="120"> 上班时间:</td>
<td height="30" width="200">
<input type="text" name="sys1" value="<%=rs("startwork")%>" class="noinput" size="25" maxlength="4">
</td>
<td height="30">如果上班时间为8:30则输入"0830"</td>
</tr>
<tr>
<td height="30" width="120"> 下班时间:</td>
<td height="30" width="200">
<input type="text" name="sys2" value="<%=rs("endwork")%>" class="noinput" size="25" maxlength="4">
</td>
<td height="30">如果下班时间为18:00则输入"1800" </td>
</tr>
<tr>
<td height="30" width="120"> 上传文件限制:</td>
<td height="30" width="200">
<select name="sys3" style="width:80px">
<%for i=1 to 10
k=i*1000000
if k=rs("maxsize") then
response.write "<option value="&k&" selected>"&i&"M</option>"
else
response.write "<option value="&k&">"&i&"M</option>"
end if
next
%>
</select>
</td>
<td height="30">通过此参数可以限制上传文件的的大小</td>
</tr>
<tr>
<td height="30" width="120"> 提醒声音路径:</td>
<td height="30" width="200">
<input type="text" name="sys4" size="25" class="noinput" value="<%=rs("soundpath")%>">
</td>
<td height="30">提醒音乐存放路径。</td>
</tr>
<tr>
<td height="30" width="120"> 数据库服务器:</td>
<td height="30" width="200">
<input type="text" name="sys5" size="25" class="noinput" value="<%=rs("sqlname")%>" maxlength="25">
</td>
<td height="30">SQL数据库服务器名称或IP地址如:Server、192.168.0.1</td>
</tr>
<tr>
<td height="30" width="120"> 数据库名:</td>
<td height="30" width="200">
<input type="text" name="sys6" size="25" class="noinput" value="<%=rs("basename")%>" maxlength="25">
</td>
<td height="30">SQL数据库名</td>
</tr>
<tr>
<td height="30" width="120"> 数据库用户名:</td>
<td height="30" width="200">
<input type="text" name="sys7" size="25" class="noinput" value="<%=rs("username")%>" maxlength="25">
</td>
<td height="30">有备份SQL数据库权限的用户名</td>
</tr>
<tr>
<td height="30" width="120"> 数据库密码:</td>
<td height="30" width="200">
<input type="text" name="sys8" size="25" class="noinput" value="<%=rs("password")%>" maxlength="25">
</td>
<td height="30">SQL数据库密码</td>
</tr>
<tr>
<td height="30" width="120">数据备份路径:</td>
<td height="30" width="200">
<input type="text" name="sys9" size="25" class="noinput" value="<%=rs("savepath")%>">
</td>
<td height="30">如:c:\或c:\backup\</td>
</tr>
<tr>
<td height="30" width="120">手机号码:</td>
<td height="30" width="200">
<input type="text" name="sys10" size="25" class="noinput" value="<%=rs("mobilephone")%>" maxlength="15">
</td>
<td height="30">在新浪网站注册,发送手机短信的手机号码</td>
</tr>
<tr>
<td height="30" width="120"> 手机密码:</td>
<td height="30" width="200">
<input type="text" name="sys11" size="25" class="noinput" value="<%=rs("smspassword")%>" maxlength="25">
</td>
<td height="30">发送手机短信的手机密码</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="40">
<tr>
<td width="21%">
<input type="hidden" name="choose">
<input type="hidden" name="id" value="<%=rs("id")%>">
</td>
<td width="79%">
<input type="button" name="Submit3" value="保 存" style="width:70px;height:25px" onClick="return checkaddconfig()">
<input type="button" name="Submit32" value="默认值" style="width:70px;height:25px" onClick="return checkdelconfig()">
<input type="button" name="Submit22" value="返 回" style="width:70px;height:25px" onClick="gosystem()">
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<!--#include file="close.asp"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -