 <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp"-->
<!--#include file="Ex_Cls/Ex_SkinCls.asp"-->
<!--#include file="Ex_Cls/Ex_SplitPageCls.asp"-->
<%
Dim ExComm
Set ExComm=new Ex_CommonCls
ExComm.GetConfigCache("runmode,ShowName,CmtPageSize,IsCheckCode,cmtmsgcheckre,iscmtmsgcheck,LogNum,blogname,BlogDescription,BlogKeyWord,IndexAddWord,blogurl,logourl,DefaultSkin")
ExComm.CheckInstall
ExComm.IsIpAllow
Dim Title,Show_logids,show_blogKeyword
Dim c_year,c_month,C_day
 '******************************************************
 '显示友情连接注册表单
 '参数：无
 '******************************************************
function show_link()
	dim str
	str=str& "<form name=""form1"" method=""post"" action=""?action=add"">"
	str=str& "<table width=""80%"" border=""0"" align=""center"">"
	str=str& "  <tr>"
	str=str& "    <th colspan=""2"">友情连接申请</th>"
	str=str& "    </tr>"
	str=str& "  <tr>"
	str=str& "    <td colspan=""2"" style=""text-align:left;"">本站名称："&Application(sn&"blogname")&"</td>"
	str=str& "    </tr>"
	str=str& "  <tr>"
	str=str& "    <td colspan=""2"" style=""text-align:left;"">本站地址: "&Application(sn&"blogurl")&"</td>"
	str=str& "    </tr>"
	str=str& "  <tr>"
	str=str& "    <td colspan=""2"" style=""text-align:left;"">logo地址:"&Application(sn&"logourl")&"</td>"
	str=str& "    </tr>"
	str=str& "  <tr>"
	str=str& "    <td width=""21%"" style=""text-align:left;"">网站名称：<font color=""red"">*</font></td>"
	str=str& "    <td width=""79%"" style=""text-align:left;""><input name=""linkname"" type=""text"" id=""linkname""></td>"
	str=str& "  </tr>"
	str=str& "  <tr>"
	str=str& "    <td style=""text-align:left;"">网站地址：<font color=""red"">*</font></td>"
	str=str& "    <td style=""text-align:left;""><input name=""linkurl"" type=""text"" id=""linkurl"" size=""30""><br>请在网址中加上<font color=red>http://</font></td>"
	str=str& "  </tr>"
	str=str& "  <tr>"
	str=str& "    <td style=""text-align:left;"">logo地址：[可选]</td>"
	str=str& "    <td style=""text-align:left;""><input name=""linklogo"" type=""text"" id=""linklogo"" size=""30""><br>请在网址中加上<font color=red>http://</font></td>"
	str=str& "  </tr>"
	str=str& "  <tr>"
	str=str& "    <td colspan=""2""><input type=""submit"" name=""Submit"" value=""提交""></td>"
	str=str& "  </tr>"
	str=str& "</table><br><font color=red>请站长做好本站连接后再提交贵站信息。本人审核后立即加入友情连接。否则，发现未作本站连接的，提交信息作删除处理！</font>"
	str=str& "</form>"
	show_link=str
end Function
sub add()
  dim linklogo,linkname,linkurl,Sql,rs
  linklogo=ExComm.F(request.Form("linklogo"))
  linkname=ExComm.F(request.Form("linkname"))
  linkurl=ExComm.F(request.Form("linkurl"))
  If Trim(linkname)="" Or Trim(linkurl)="" Then 
	ExComm.ShowMsg "网站名称和网站地址必须填写",""
  End If 
  If InStr(LinkUrl,"http://")=0 Then 
	ExComm.ShowMsg "网站地址必须以http://开头",""
  End If 
  if linklogo<>"" then
  LinkLogo="无"
  end If
  Sql="insert into Ex_Links (linkname,linkurl,linkLogo) values('"&linkname&"','"&linkurl&"','"&linklogo&"')"
  Conn.Execute Sql
  ExComm.ShowMsg "连接添加成功","Linkreg.asp"
end Sub

'主模板标记替换开始
Dim ExSkin,Head,Body,Bottom   
Set ExSkin=new Ex_SkinCls
Body=Replace(ExSkin.GetTxtSkin("default.html"),"$show_log$",show_Link)
Body=Replace(Body,"$show_info$",ExSkin.Info)
Body=Replace(Body,"$show_login$",ExSkin.Login)
Body=Replace(Body,"$show_calendar$",ExSkin.calendar(C_year,C_Month,C_Day))
Set ExSkin=Nothing 
Bottom=ExComm.BottomInfo
Title="友情连接申请"
'输出内容
Head=Head&"<html xmlns=""http://www.w3.org/1999/xhtml"">"&vbcrlf
Head=Head&"<head>"&vbcrlf
Head=Head&"<meta http-equiv=""content-type"" content=""text/html; charset=gb2312"">"&vbcrlf
Head=Head&"<meta name=""Description"" content="""&Application(sn&"BlogDscription")&""">"&vbcrlf
Head=Head&"<meta name=""Keywords"" content="""&Application(sn&"BlogKeyWord")&""">"&vbcrlf
Head=Head&"<title>"&Title&Application(sn&"IndexAddWord")&"</title>"&vbcrlf
Head=Head&"<script src=""inc/Main.js""></script>"
Head=Head&"<script src=""inc/UserInfo.js""></script>"
Head=Head&"<script src=""inc/jquery.js""></script>"
Head=Head&"<link href=""inc/OblogSkin.Css"" rel=""stylesheet"" type=""text/css"" />"&vbcrlf
Head=Head&"</head>"&vbcrlf
Head=Head&"<body>"&vbcrlf
If ExComm.IsOblogSkin Then 
	Response.Write Head
	Response.Write Body
	Response.Write "</body></html>"
Else
	Body=Replace(Body,"$show_blogtitle$",Title&Application(sn&"IndexAddWord"))
	Body=Replace(Body,"$show_blogkeyword$",Application(sn&"blogkeyword"))
	Body=Replace(Body,"$show_blogdescription$",Application(sn&"blogdescription"))
	Response.Write Body
End If 
If request.querystring("action")="add" Then
Call add()
End If
If Application(Sn&"Runmode")<>"静态" Then 
	ExComm.visitorCount
End If
Set ExComm=Nothing 
%>