<!--#include file="Conn.asp"-->
<!--#include file="sd_site.asp"-->
<%
'SQL防注入处理
Function CheckStr(istr)
dim Sql_Kill,Sql_Kill_2,Sql_Kill_3
Sql_Kill = "\'|and|exec|insert|select|delete|update|count|*|%|chr|mid|master|truncate|char|declare|set|;|from|="
Sql_Kill_2 = split(Sql_Kill,"|")
for Each Sql_Kill_3 In Sql_Kill_2
istr=Replace(istr,Sql_Kill_3,"")
Next
CheckStr=istr
End Function

if request.form("action")="save" then

dim server_v1,server_v2
server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))

if mid(server_v1,8,len(server_v2))<>server_v2 then
conn.close
set conn=nothing
response.write "<script>location.href='index.asp';</script>"
response.end
end if

if cstr(session("getcode"))<>cstr(trim(request("verifycode"))) then
response.Write "<script LANGUAGE='javascript'>alert('请输入正确的验证码！');history.go(-1);</script>"
response.end
end if

sd_name=request.form("sd_name")
set rs1=server.createobject("adodb.recordset")
sql1="select * from sd_show where sd_name='"&sd_name&"'" 
rs1.open sql1,conn,1,1
if not rs1.eof then
%>
<%if JT=1 then%>
<script language=javascript>alert("已经有该公司，请返回!");this.location.href="sd_<%=rs1("id")%>.htm";</script>
<%else%>
<script language=javascript>alert("已经有该公司，请返回!");this.location.href="sd_show.asp?id=<%=rs1("id")%>";</script>
<%end if%>
<%
rs1.close
set rs1=nothing

else
set rs=server.createobject("adodb.recordset")
sql="select sd_name,sd_namejx,sd_url,sd_address,sd_classid,sd_content,sd_qq,sd_xianlu,sd_email,sd_password,sd_dishi,sd_zipcode,sd_lianxiren,sd_tel,sd_fax,sd_yewufanwei,sd_jifang,sd_kehu,sd_rongyu,sd_icp,sd_isp from sd_show" 
rs.open sql,conn,1,3
rs.addnew
rs("sd_name")=CheckStr(trim(request.form("sd_name")))
rs("sd_namejx")=CheckStr(trim(request.form("sd_namejx")))
rs("sd_url")=CheckStr(trim(request.form("sd_url")))
rs("sd_address")=CheckStr(request.form("sd_address"))
rs("sd_classid")=CheckStr(trim(request.form("sd_classid")))
rs("sd_content")=CheckStr(replace(request("sd_content"),vbcrlf,"<br>"))
rs("sd_qq")=CheckStr(trim(request.form("sd_qq")))
rs("sd_xianlu")=CheckStr(trim(request.form("sd_xianlu")))
rs("sd_email")=CheckStr(trim(request.form("sd_email")))
rs("sd_password")=CheckStr(trim(request.form("sd_password")))
rs("sd_dishi")=CheckStr(trim(request.form("sd_dishi")))
rs("sd_zipcode")=CheckStr(trim(request.form("sd_zipcode")))
rs("sd_lianxiren")=CheckStr(trim(request.form("sd_lianxiren")))
rs("sd_tel")=CheckStr(trim(request.form("sd_tel")))
rs("sd_fax")=CheckStr(trim(request.form("sd_fax")))
rs("sd_yewufanwei")=CheckStr(trim(request.form("sd_yewufanwei")))
rs("sd_jifang")=CheckStr(trim(request.form("sd_jifang")))
rs("sd_kehu")=CheckStr(trim(request.form("sd_kehu")))
rs("sd_rongyu")=CheckStr(trim(request.form("sd_rongyu")))
rs("sd_icp")=CheckStr(trim(request.form("sd_icp")))
rs("sd_isp")=CheckStr(trim(request.form("sd_isp")))
rs.update
conn.close
set conn=nothing%>
<script language=javascript>alert("已经添加成功,请等待审核!");this.location.href="index.asp";</script>
<%end if
end if
%>
<%if request.form("action")="" then%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title><%=sd_hostname%> 虚拟主机评测 IDC导航 IDC评测 583344.com</title>
<meta name="keywords" content="<%=sd_keywords%>">
<meta name="description" content="<%=sd_description%>">
<LINK href="sd_style.css" type="text/css" rel="stylesheet">
</HEAD>
<BODY>
<div id="container" class="wrapper">
<!--#include file="sd_top.asp"-->
  <div id="main">
    <div class="sidebar1">
      <div class="title"><span style="width:939px;"><h3>账号注册信息表单</h3></span></div>
<div class="content">
<SCRIPT type="text/javascript" src="js/sd_user.js"></script>
<div style="float:left;width:705px;margin-right:10px;">
<FORM name="shangdao" action="sd_add.asp" method="post" onSubmit="javascript:return check()">
<div align="center" style="font-size:14px;color:#FF0000;font-weight:bold;height:20px;line-height:20px;margin-top:20px;">尽量填写完表单所有内容，否则可能不会审核通过！</div>
<table width="98%" border="0" cellpadding="0" cellspacing="0" class="idcintro" id="userinfo">
<tr>
	      <th width="15%" rowspan="2" class="s1">注意：</th>
	      <td class="red_12" colspan="3">1.请在贵站首页添加本站友情链接，以便管理员审核时确认信息并非其他人恶意提交。</td>
	    </tr>
	    <tr>
	      <td class="red_12" colspan="3">2.链接文字：<a href="<%=sd_hostsite%>" target="_blank"><%=sd_hostname%></a>，连接地址：<a href="<%=sd_hostsite%>" target="_blank"><%=sd_hostsite%></a></td>
	    </tr>
        	<tr>
            	<th>修改码:</th>
                <td colspan="3"><input type="password" name="sd_password" id="sd_password"><span class="red">*</span>(长度在3-18个字符之间，修改信息时会用到)</td>
            </tr>
        	<tr>
            	<th>确认修改码:</th>
                <td colspan="3"><input type="password" name="sd_password1" id="sd_password1"><span class="red">*</span></td>
            </tr>
          <tr>
            <th>公司名称:</th>
            <td colspan="3"><input name="sd_name" type="text" id="sd_name" size="40" /><span class="red">*(请按营业执照上公司名称填写)</span></td>
          </tr>
	  <tr>
	    <th>IDC简称:</th>
            <td colspan="3"><input type="text" name="sd_namejx" id="sd_namejx"><span class="red">*</span>(如"xx互联")</td>
          </tr>
          <tr>
            <th>公司网站:</th>
            <td colspan="3"><input type="text" name="sd_url" id="sd_url" value="http://" size="50" /><br><font color="#FF0000">必须填写"http://"开头，真实填写否则不会通过审核！</font></td>
        </tr>
          <tr>
            <th>公司简介:</th>
            <td colspan="3"><textarea name="sd_content" cols="50" rows="3" id="sd_content"></textarea></td>
          </tr>
          <tr>
            <th>公司所在地:</th>
            <td colspan="3"><select name="sd_classid">
            <option value="">请选择</option>
<%
set rs=server.createobject("adodb.recordset")
rs.open "select id,sd_title from sd_yys order by sd_topid desc",conn,1,3
while not rs.eof
response.write "<option value='"&rs("id")&"'>"&rs("sd_title")&"</option>"&vbCrLf
call listunder(1)
rs.movenext
wend
%>
          </select> <input type="text" name="sd_dishi" id="sd_dishi" size="8">市<span class="red">*</span></td>
          </tr>
          <tr>
            <th>详细地址:</th>
            <td colspan="3"><input name="sd_address" type="text" id="sd_address" size="50" /><span class="red">*</span></td>
          </tr>
          <tr>
            <th>邮政编码:</th>
            <td><input type="text" name="sd_zipcode" id="sd_zipcode" size="8" /><span class="red">*</span></td>
            <th>联 系 人:</th>
            <td><input type="text" name="sd_lianxiren" id="sd_lianxiren" size="10" /><span class="red">*</span></td>
          </tr>
          <tr>
            <th>电 话:</th>
            <td><input type="text" name="sd_tel" id="sd_tel" size="15" /><span class="red">*</span></td>
            <th>传 真:</th>
            <td><input type="text" name="sd_fax" id="sd_fax" size="15" /><span class="red">*</span></td>
          </tr>
        <tr>
            <th>邮 件:</th>
            <td colspan="3"><input type="text" name="sd_email" id="sd_email" size="18" /><span class="red">*</span></td>
          </tr>
          <tr>
            <th>业务范围:</th>
            <td colspan="3"><input type="text" name="sd_yewufanwei" id="sd_yewufanwei" size="50" /></td>
          </tr>
          <tr>
            <th>主机线路:</th>
            <td colspan="3"><input type='checkbox' name='sd_xianlu' value='1'>中国电信</option>
<input type='checkbox' name='sd_xianlu' value='2'>中国联通(网通)</option>
<input type='checkbox' name='sd_xianlu' value='3'>中国移动(铁通)</option>
<input type='checkbox' name='sd_xianlu' value='4'>双线机房</option>
<input type='checkbox' name='sd_xianlu' value='5'>多线机房</option>
<input type='checkbox' name='sd_xianlu' value='6'>港澳台</option>
<input type='checkbox' name='sd_xianlu' value='7'>海外线路</option><span class="red">*</span></td>
          </tr>
          <tr>
            <th>客服QQ:</th>
            <td colspan="3"><input type="text" name="sd_qq" id="sd_qq" size="30" />(多个请逗号,分开)</td>
          </tr>
          <tr>
            <th>托管机房:</th>
            <td colspan="3"><input type="text" name="sd_jifang" id="sd_jifang" size="30"></td>
          </tr>
          <tr>
            <th>代表客户:</th>
            <td colspan="3"><input type="text" name="sd_kehu" id="sd_kehu" size="30"></td>
          </tr>
          <tr>
            <th>所获荣誉:</th>
            <td colspan="3"><input type="text" name="sd_rongyu" id="sd_rongyu" size="30"></td>
          </tr>
          <tr>
            <th>ICP证:</th>
            <td colspan="3"><input type="text" name="sd_icp" id="sd_icp"></td>
          </tr>
          <tr>
            <th>ISP证:</th>
            <td colspan="3"><input type="text" name="sd_isp" id="sd_isp"></td>
          </tr>
</table>
<table width="98%" border="0" cellpadding="0" cellspacing="0" class="idcintro2" id="idcintro2">
<tr>
<th width="12%">验证码：</th>
<td><input name="verifycode" type="text" value="<%If GetCode=9999 Then Response.Write "9999"%>" maxLength="4" size="10">&nbsp; <img src="js/code.asp"></td>
</tr>
<tr>
<th></th>
<td><input name="action" type="hidden" value="save"><input type="Submit" name="submit1" value="提交注册"> <input type="reset" name="reset" value="重新填写"></td>
</tr>
</table>
</form>
</div>

<div style="float:left;width:236px;">
<div style="margin-top:50px;">
<div style="background-color:#FFF9EE;padding:5px;line-height:22px;color:#333;">
<div style="margin-bottom:5px;"><img src="images/ts.gif" align="absmiddle" />&nbsp; <strong style="color:#CC0000;font-size:13px;">审核条件：</strong></div>
<div style="margin-bottom:5px;"><b style="font-size:14px;">1.</b> 在您的首页放置<%=sd_hostname%>的链接。</div>
<div style="margin-bottom:5px;"><b style="font-size:14px;">2.</b> 按照营业执照填写公司名称。</div>
<div style="margin-bottom:5px;"><b style="font-size:14px;">3.</b> 正确填写公司ICP/ISP证。</div>
<div style="margin-bottom:5px;"><b style="font-size:14px;">4.</b> 尽量填写完表单所有内容。</div>
</div>
</div>
</div>

</div>
      <div class="bottom"><span style="width:952px;"></span></div>
    </div>
    <div class="clear"></div>
  </div>
<!--#include file="sd_bottom.asp"-->
</div>
<%end if
conn=close
set conn=nothing%>
</BODY>
</HTML>
