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

📄 adminjoin.asp

📁 一个用jsp 编写的个人主页网站哦。希望对大家有所帮助啊
💻 ASP
字号:
<!--#include file = "public.asp"-->
<%
if session("admintype")<>"common" and session("admintype")<>"admin" then response.Redirect "index.asp"%>
<SCRIPT LANGUAGE=vbscript>
Sub save_onclick 
  if form.SiteName.value="" then
    msgbox "请输入网站名称"
    form.SiteName.focus ()
    exit sub
  end if
      if instr(form.SiteName.value,"'") then
    msgbox " 网站名称中不可含有部分特殊字符,请去掉后重新提交! "
    form.SiteName.focus ()
    exit sub
  end if
  if form.url.value=""or form.url.value="http://" then
    msgbox " 请输入主页地址 "
    form.url.focus ()
    exit sub
  end if
        if instr(form.url.value,"'") then
    msgbox " 主页地址不可含有特殊字符 "
    form.url.focus ()
    exit sub
  end if
          if instr(form.logo.value,"'") then
    msgbox " 网站图标不可含有特殊字符 "
    form.logo.focus ()
    exit sub
  end if
  if form.linktype.value="请选择类别" or form.linktype.value="" then
    msgbox " 请选择网站类别 "
    exit sub
  end if
  if form.Description.value="" then
    msgbox " 请输入网站简介 "
    form.Description.focus ()
    exit sub
  end if	
  if len(form.Description.value)>125 then
    msgbox " 网站简介长度大于125字 "
    form.Description.focus ()
    exit sub  
  end if
          if instr(form.Description.value,"'") then
    msgbox " 网站简介中不可含有部分特殊字符,请去掉后重新提交! "
    form.Description.focus ()
    exit sub
  end if
  form.submit ()  
End Sub
</SCRIPT>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>加入链接</title>
<link rel="stylesheet" href="css.css" type="text/css">
</head>
<body>
<!--#include file = "admintop.asp"-->
<%
	if Request.Form<>"" then
		SiteName=Request.Form("SiteName")
		URL=Request.Form("URL")
		linktype=Request.Form("linktype")
		Description=Request.Form("Description")
		logo=request.Form("logo")
		if logo="http://" then logo=" "
		Set rso=conn.Execute("select * from foption")
		
		Set rsc=Server.CreateObject("ADODB.RecordSet")
		rsc.open "Select * From friend where name='" & request("name")& "'" ,Conn,1,1
		if not (rsc.eof or rsc.bof) then 
		response.Redirect "join_err.asp?type=usrname"
		end if
		rsc.close
		set rsc=nothing
		Set rsc=Server.CreateObject("ADODB.RecordSet")
		rsc.open "Select * From friend where url='" & request("url")& "'" ,Conn,1,1
		if not (rsc.eof or rsc.bof) then 
		response.Redirect "join_err.asp?type=url"
		end if
		rsc.close
		set rsc=nothing
		
		sql="insert into Friend(SiteName,url,Description,MyDate,linktype,mark,sitelogo,siteclick) values('"
		sql=sql & SiteName &"','"& url &"','" & Description &"','"&now&"','"& linktype &"','0','"&logo&"',0)"
		conn.execute sql
		if rso("auto") then 
			response.Redirect "succeed.asp?mode=add1" 
		else 
			response.Redirect "succeed.asp?mode=add"
		end if
		conn.close
		set conn=nothing	
	end if
	%>
<form action="" method="post" name="form" id="form">     
      <table width="57%" border="0" align="center" cellpadding="5" cellspacing="1" class="9point" >
        <tr class="table003">
          <td colspan="2"> 
            <p align="center">加入友情链接 
              <style type=text/css>
<!--
input,textarea {
font-size:9pt;
color:#222222;
font-family:'宋体';
background-color:#F9F9F9;
border-top:1px solid #222222;
border-bottom:1px solid #222222;
border-left:1px solid #222222;
border-right:1px solid #222222;
scrollbar-face-color:#ffffff;
scrollbar-track-color:#ffffff;
scrollbar-arrow-color:#222222;
scrollbar-3dlight-color:#ffffff;
scrollbar-highlight-color:#ffffff;
scrollbar-shadow-color:#222222;
scrollbar-darkshadow-color:#ffffff;}
-->
</style>
          </td>
      </tr>
      <tr>
          <td width="199" align="center"> 
            <div align="left">网站名称:</div>
          </td>
          <td height="28" align="center" width="347"> 
            <div align="left">
            <input name="SiteName" type="text" class="input1" value="" size="32">
        </div>
      </td>
      </tr>
      <tr class="table001">
          <td width="199" align="center"> 
            <div align="left">主页地址:</div>
          </td>
          <td height="28" align="center" width="347"> 
            <div align="left">
            <input name="URL" size="32" value="http://" class="input1">
        </div>
      </td>
      </tr>
      <tr>
          <td align="center" width="199"> 
            <div align="left">网站图标:</div>
          </td>
          <td height="28" align="center" valign="top" width="347"> 
            <div align="left"> 
              <input name="logo" class="input1" id="logo" value="images/nobanner.gif" size="32">
              没有LOGO请不要修改</div>
          </td>
      </tr>
      <tr class="table001">
          <td width="199" align="center"> 
            <div align="left">加入类别:</div>
          </td>
          <td height="28" align="center" valign="top" width="347"> 
            <div align="left">
            <select name="linktype" id="linktype">
              <option>请选择类别</option>
              <%Set rssort=conn.Execute("select * from sort")
			  rssort.movefirst
			   do while not rssort.eof   %>
              <option value="<%=rssort("sort")%>"><%=rssort("sort")%></option>
              <%  rssort.movenext    
    loop     
	%>
            </select>
        </div>
      </td>
      </tr>
      <tr class="table001">
          <td align="center" width="199"> 
            <div align="left">网站简介:<br>
          限制为125字以内</div>
          </td>
          <td height="28" align="center" valign="top" width="347"> 
            <div align="left">
          <TEXTAREA name=Description rows=5 cols=47 class="input1"></TEXTAREA>
        </div></td>
      </tr>
      <tr class="table001">
        <td height="28" colspan="2" align="center"><input name="join" type="button" class="input2" id="join" onclick=save_onclick value=" 加 入 " >
 
  <input name="B12" type="reset" class="input2" id="B12"  value=" 重 写 " >
 </td>
      </tr>
    </table>
	</form>
<!--#include file = "bottom.asp"-->
</body> 
</html> 

⌨️ 快捷键说明

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