📄 companymanager.asp
字号:
<!--#include file="asp/opendb.asp"-->
<!--#include file="asp/sqlstr.asp"-->
<!--#include file="asp/bgsub.asp"-->
<%
function strlength(inputstr)
dim length,i
length=0
for i=1 to len(inputstr)
if asc(mid(inputstr,i,1))<0 then
length=length+2
else
length=length+1
end if
next
strlength=length
end function
oabusyname=request.cookies("oabusyname")
oabusyusername=request.cookies("oabusyusername")
oabusyuserdept=request.cookies("oabusyuserdept")
oabusyuserlevel=request.cookies("oabusyuserlevel")
if oabusyusername="" then
response.write("<script language=""javascript"">")
response.write("window.top.location.href='default.asp';")
response.write("</script>")
response.end
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css/css.css">
<title>红孩儿Office办公系统</title>
</head>
<body bgcolor="#ffffff" topmargin="5" leftmargin="5">
<% call bghead() %>
<center><b>单位名称维护</b></center>
<%
call bgmid()
%>
<%
set conn=opendb("oabusy","conn","accessdsn")
set rs=server.createobject("adodb.recordset")
sql="select * from userinf where username='" & oabusyusername&"'"
rs.open sql,conn,1
cook_allow_control_all_user=rs("allow_control_all_user")
conn.close
set conn=nothing
set rs=nothing
if cook_allow_control_all_user="no" then
response.write("<font color=red size=""+1"">对不起,您没有这个权限!</font>")
response.end
end if
%>
<center>
<br>
<%
companyname=trim(request.form("companyname"))
if companyname<>"" then
if strlength(companyname)>20 then
response.write("<font color=""#ee0000"" size=""+1""><b>部门名称最多只能输入10个汉字!</b></font>")
else
set fs=createobject("scripting.filesystemobject")
set fp=fs.createtextfile(server.mappath("db/companyname.asp"),true)
fp.writeline(companyname)
fp.close
set fp=nothing
set fs=nothing
end if
end if
set fs=createobject("scripting.filesystemobject")
set fp=fs.opentextfile(server.mappath("db/companyname.asp"),,true)
if not fp.AtEndOfStream then
companyname=fp.readline
end if
%>
<form method="post" name="theForm" action="companymanager.asp">
单位名称:<input type="text" name="companyname" maxlength="11" value="<%=companyname%>">
<br><br>
<input type="submit" name="submit" value="确定">
</form>
</center>
<%
fp.close
set fp=nothing
set fs=nothing
%>
</td>
<td background="<%=imgpath%>images/j5.gif" width=19 height=280></td>
</tr>
</table>
</tr>
<tr>
<td height=19>
<table border="0" cellpadding="0" cellspacing="0" width="610" height="19">
<tr>
<td width=18 height=20><img border="0" src="<%=imgpath%>images/j6.gif" width="18" height="19"></td>
<td background="<%=imgpath%>images/j7.gif" width=100% height=20></td>
<td width="19" height="20"><img border="0" src="<%=imgpath%>images/j8.gif"></td>
</tr>
<tr>
<td width="100%" height=20 colspan="3"><center>-----<a href="http://office.11k.net/" target=_blank><font color="red">Red office v1.5</font></a>-----</center></td>
</tr>
</table>
</td>
</tr>
</table>
<%
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -