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

📄 install.asp

📁 新闻管理系统,管理员登陆后能够实现对新闻的添加,删除以及更新等功能,操作比较简单,但是很方便
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="char.asp"-->
<!--#include file="md5.asp"-->
<!--#include file="header.inc"-->
<%


If IsEmpty(Request.QueryString("action")) Then
%>
<body topmargin=0 leftmargin=0>

<BR>
<form name="form" method="post" action="install.asp?action=1">
  <table width="95%" cellspacing=1 cellpadding=0 align=center class=tableBorder1>
    <tr>
      <th height=25 align=center>PSN 用户协定</th>
    </tr>
    <tr>
      <td>    1、PSN 为免费程序,您可以免费获得本程序,并安装在个人或商业性质的主机上,而不必支付费用;但个人或非个人商业用户需要得到我们的免费许可协议。<BR><BR>

    2、无论如何,您使用 PSN 的整体或部分,无论用途如何、是否经过美化,页脚处PSN名称和Patron Saint Studio (http://3gu.tea8.com) 的链接都必须保留而不能清除或修改。 <BR><BR>
 
    3、您可以查看 PSN 的源代码,但在没有获得我们 (Patron Saint Studio .http://3gu.tea8.com)正式许
可的情况下, 不能以除了美化界面、修改 BUG 以外的其他任何理由修改 PSN 的源程序,更不能修改
相关说明档和程序显示的版权信息。 <BR><BR>

    4、PSN 是开放源代码软件,如果您对 PSN 有好的想法和意见,并希望自己修改 PSN 完善其功能
时,必须与我们 取得联系,在获得我们正式的许可后,在完整保留 PSN 版权信息和说明档的前提下, 
对 PSN 进行修改。 <BR><BR>

    5、本程序欢迎转载,您可以在原样完整保留全部版权信息和说明档的前提下,传播和发布本程序,
但将 PSN 用于商业目的或违背上述条款的传播都是被禁止的;若您要利用 PSN 进行商业目的,请联系
Patron Saint Studio。 <BR><BR>

     6、安装 PSN 建立在完全同意本授权文档的基础之上,因此而产生的纠纷,违反授权协议的一方
将承担全部责任,本程序受中国最新的著作权相关法律保护。<BR><BR><BR> 

网站:<A HREF="http://3gu.tea8.com">http://3gu.tea8.com</A><BR>
E-Mail:<A HREF="mailto:y3gu@public.zz.ha.cn">y3gu@public.zz.ha.cn</A><BR><BR>
</td>
    </tr>
    <tr>
      <td height=25 Class="TableTitle2" align=center><div align="center">
          <input type="submit" name="Submit" value="同意">
        </div></td>
    </tr>
  </table>

</form>



<%
End If

select case request("action")
case "1"
%>

<br><br><br><br>
<form name="form" method="post" action="install.asp?action=2">
  <table width="200" border="0" cellspacing="0" cellpadding="2" align="center">
  <tr><th height=25 colspan="2" align="center">设定管理员</td></tr>
    <tr><td align="left" class="TableBody1" height=25 >user</td>
    	<td class="TableBody1" height=25 ><input name="user" type="TEXT"size="10"></td></tr>
    <tr><td align="left" class="TableBody1" height=25 >pass</td>
	    <td class="TableBody1" height=25 ><input name="pass" TYPE="PASSWORD" size="10"></td></tr>
    <tr><td align="left" class="TableBody1" height=25 >Repetition</td>
	    <td class="TableBody1" height=25 ><input name="pass1" TYPE="PASSWORD" size="10"></td></tr>
	<tr><td colspan="2" align="center" class="TableTitle2" height=25 ><input type="submit" name="submit" value="OK"></td></tr>
  </table>
</form>
<br><br><br><br>

<%

case "2"
Dim user,pass,pass1
user=replace(trim(request("user")),"'","")
pass=replace(trim(Request("pass")),"'","")
pass1=replace(trim(Request("pass1")),"'","")
if user="" or pass="" or pass1="" then
errorstr="用户名或者密码为空时安装程序无法继续"
errorbox(errorstr)
end if
if pass<>pass1 then
errorstr="密码不一致"
errorbox(errorstr)
end if
pass=md5(pass)
conn.execute("insert into admin(Adminuser,Adminpass) values ('"&user&"','"&pass&"')")
Response.Write "<BR><BR>管理员设定成功<BR>user:"&user&"<BR>pass:"&pass1&"<BR>"

%>
<BR><BR>
  <CENTER><form name="form" method="post" action="install.asp?action=3">
  <table width="470" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr> 
      <th colspan="2" align="left" height=25>系统设定</th>
    </tr>
    <tr> 
      <td>主页名称</td>
      <td><input name="HomeNameX1" type="text" size="50" maxlength="125"></td>
    </tr>
    <tr> 
      <td width="102">主页URL</td>
      <td width="468"><input name="HomePageX1" type="text" size="50" maxlength="125"></td>
    </tr>
    <tr> 
      <td>系统安装目录</td>
      <td>
	  <input name="SysPathX1" type="text" size="50" maxlength="125">不加"/"</td>
    </tr>
	<tr> 
      <td>每页显示数据</td>
      <td><input name="SysX1" type="text" size="2" maxlength="2"></td>
    </tr>
    <tr> 
      <td>调用数据条树</td>
      <td><input name="SysX2" type="text" size="2" maxlength="2"></td>
    </tr>
    <tr> 
      <td>每条显示多少字符</td>
      <td><input name="SysX3" type="text" size="2" maxlength="2"></td>
    </tr>
    <tr> 
      <td colspan="2" Class="TableTitle2" height=25><div align="center">
          <input type="submit" name="Submit" value="提交">
          <input type="reset" name="Submit2" value="重置">
        </div></td>
    </tr>
  </table>
</form>
<%
case "3"

Dim HomeNameX1,HomePageX1,SysPathX1,SysX1,SysX2,SysX3,SysX4

	HomeNameX1=replace(trim(request("HomeNameX1")),"'","")
	HomePageX1=replace(trim(Request("HomePageX1")),"'","")
	SysPathX1=replace(trim(request("SysPathX1")),"'","")
	SysX1=replace(trim(Request("SysX1")),"'","")
	SysX2=replace(trim(request("SysX2")),"'","")
	SysX3=replace(trim(request("SysX3")),"'","")
     HomeNameX1=checkStr(HomeNameX1)

	 if HomeNameX1="" OR HomePageX1="" OR SysPathX1="" OR SysX1="" OR SysX2="" OR SysX3="" Then
     errorstr="系统设置中各项必须详细填写"
     errorbox(errorstr)
     End If

     if strLength(HomeNameX1) > 120 Then
	 errorstr="主页名称字节超出系统限定范围"
     errorbox(errorstr)
	 End If
     
	 If Not IsNumeric(SysX1) OR Not IsNumeric(SysX2) OR Not IsNumeric(SysX3) Then
	 errorstr="数据类型不符合系统限定"
	 errorbox(errorstr)
	 End If

SysX4=clng(SysX1) & "|" & clng(SysX2) & "|" & clng(SysX3)
conn.execute("insert into config(HomeNameX,HomePageX,SysPathX,SysX) values ('"&HomeNameX1&"','"&HomePageX1&"','"&SysPathX1&"','"&SysX4&"')")

Response.Write "<BR><BR><BR><BR><CENTER>恭喜您.Patron Saint News已经成功的安装在您的服务器上<br>请删除本文件<BR><A HREF=""login.asp"">登陆管理</A></CENTER>"
end select

%>

⌨️ 快捷键说明

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