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

📄 newprofilelist.asp

📁 1 除掉了 时间 限制 2 除掉了 人数 限制 改为 500人 原为5人 3 发现一点小缺陷 增加人员的时候没有判断 登陆名是否重复! 自己写吧~~~:) 4 又 是一点缺陷
💻 ASP
字号:
<SCRIPT language='javascript'>window.resizeTo(450,200);window.focus()</SCRIPT>
<!--#include file="../config.ini" -->
<!--#include file="../commfunction.inc" -->
<%
Dim objcheck
Set objcheck=Server.CreateObject("SmartSales.CheckFunction")

if request("ProFileListid")<>"" then
	objcheck.CheckUserFunction "profile","edit"
else
	objcheck.CheckUserFunction "profile","add"
end if
set objcheck=nothing

if request("ProFileListid")<>"" then
	dim connq
	dim rsq
	set connq=server.CreateObject("adodb.connection")
	set rsq=server.CreateObject("adodb.recordset")
	connq.Open connstring
		rsq.Open "select * from ProFileList where ProFileListid="&request("ProFileListid"),connq,2,3,1
	strsubname=rsq("subname")
	rsq.Close
	set rsq=nothing
	connq.Close
	set connq=nothing
end if

if Request.Form("Mod")="Save" then 
	Dim Conn
	Dim Rs
	Set Conn=Server.CreateObject("ADODB.Connection")
	Set Rs=Server.CreateObject("ADODB.RecordSet")
	Conn.Open ConnString
	if request("ProFileListid")="" then
		Rs.Open "select * from ProFileList",Conn,2,3,1
		rs.AddNew 
		rs("creator")=session("loginid")
		rs("createdate")=now()
		rs("lastmoduser")=session("loginid")
		rs("lastmoddate")=now()
	else
		rs.Open "select * from ProFileList where ProFileListid="&request("ProFileListid"),conn,2,3,1
		rs("lastmoduser")=session("loginid")
		rs("lastmoddate")=now()
	end if
	if request("andid")<>"" then
		Rs("andId")=request("andid")	
	else
		Rs("andId")=0	
	end if	
	Rs("FileType")="用户"
	Rs("SubName")=replace((replace((replace(Request("SubName"),"<","&lt;")),">","&gt")),chr(10),"<br>")
	Rs.Update
	Rs.Close()
	Set Rs=nothing
	Conn.Close()
	Set Conn=nothing
%>
		<script>
		window.opener.location.reload(true);
		window.close();
		</script>
<%
end if 
%>
<html>
<head>
<title>文件</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../global.css" rel=STYLESHEET type=text/css>
</head>
<script language=javascript>
function save_onclick(){
	if (form1.SubName.value==''){
		alert('不能为空!');
		form1.SubName.focus();
		return;
	}
	form1.Mod.value='Save';
	form1.submit();
}
</script>
<body leftmargin="10" rightmargin="10" topmargin="10">
  <form name="form1" method="post" action="">
    <input type=hidden name=Mod>
      <table width="100%" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
	  <tr>
      <td>&nbsp;</td>
	  <td bgcolor="#FFFFFF" align="right">
	  	<a href="javascript:save_onclick();"><img src="../images/button_save.gif" border="0"></a>
	  	<a href="javascript:window.close();"><img src="../images/button_close.gif" border="0"></a> 
      </td></tr>
      <tr><td height="16" colspan="2" background="../images/title.gif">&nbsp;</td></tr>
      <tr><td height=4  colspan="2"></td></tr>
	  <tr><td height=4  colspan="2" class=title>
	  <%
	  if request("title")<>"" then
	  	response.write request("title")
	  else
	  	response.write "创建文件名"
	  end if
	  %>	  
		</td></tr></table>
    
  <table width="100%" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF">
    <tr bgcolor="#FFFFFF"> 
      <td><input name="SubName" type="text" value="<%=strsubname%>" size="50" maxlength="50"></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td><img src="../images/smallprompt.jpg">&nbsp;最大不能超过50个字符。</td>
    </tr>
  </table>
  </form>
</body>
</html>

⌨️ 快捷键说明

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