<!--#include file="conn/conn.asp"-->
<!--#include file="inc/Commoncode.asp"-->
<%Call SQLin()
linkname=Replace_Text(request.form("linkname"))
linkurl=CheckStr(request.form("linkurl"))
linksm=Replace_Text(request.form("linksm"))
key=request.form("key")
if request("action")="save1" then
if linkname="" or linkurl="" or linksm="" or key="" then
CloseConn
response.write"<script>alert('友情连接资料不能为空！！！');history.go(-1)</script>"
response.end
end if
set rs=Server.CreateObject("Adodb.Recordset")
sql="select * from JOB_links"
rs.open sql,conn,1,3
rs.addnew
rs("link_name")=linkname
rs("link_url")=linkurl
rs("link_sm")=linksm
rs("link_key")=0
rs("link_key1")=0
rs.update
rs.close
set rs=nothing
CloseConn
response.write"<script>alert('操作成功，请等待管理员审核开通！');window.close()</script>"
response.end
end if
if request("action")="save2" then
if linkname="" or linkurl="" or linksm="" or key="" then
response.write"<script>alert('友情连接资料不能为空！！！');history.go(-1)</script>"
response.end
end if

set rs=Server.CreateObject("Adodb.Recordset")
sql="select * from JOB_links"
rs.open sql,conn,1,3
rs.addnew
rs("link_name")=linkname
rs("link_url")=linkurl
rs("link_sm")=linksm
rs("link_key")=1
rs("link_key1")=0
rs.update
rs.close
set rs=nothing
CloseConn
response.write"<script>alert('操作成功，请等待管理员审核开通！');window.close()</script>"
response.end
end if
Call CloseConn
%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</hand>
<style type="text/css">
<!--
body{
	font-size:12px;
}
.STYLE1 {font-size: 14px}
-->
</style>
<body style="margin:5">
<script language="javascript">
function show1()
{
 	text.style.display="";
	picture.style.display="none";
}
function show2()
{
	picture.style.display="";
	text.style.display="none";
}

</script><table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolorlight="#cccccc" bordercolordark="#FFFFFF">
    <tr>
      <td height="25" align="center" bgcolor=#efefef>&nbsp; <strong class="STYLE1">交换链接类型</strong></td>
    </tr>
    <tr>
      <td height="25" align="center"><p class="STYLE1">
        <input name="type" type="radio" id=1 value="text" checked onClick="show1()">
        文字链接
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   
        <input type="radio" name="type" id=2 value="picture" onClick="show2()">
        图片连接
&nbsp;&nbsp;</p>
      </td>
    </tr>
</table>

<table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolorlight="#cccccc" bordercolordark="#FFFFFF" id="text" style="display:">
<form name="addform" action="links.asp?action=save1" method="post">
<input name="key" type="hidden" value="0">
<tr><td height="25" colspan=2 align="left" bgcolor=#efefef>&nbsp; <strong class="STYLE1">文字链接</strong></td>
</tr>
<tr><td width="12%" height="25" align="right"><span class="STYLE1">网站名称</span>&nbsp;</td>
<td width="88%">&nbsp;<input name="linkname" type="text" size="20" value="http://"></td></tr>
<tr> <td height="25" align="right"><span class="STYLE1">连接地址</span>&nbsp;</td>
<td>&nbsp;<input name="linkurl" type="text" size="40" value="http://"></td></tr>
<tr><td height="25" align="right"><span class="STYLE1">网站说明</span>&nbsp;</td>
<td>&nbsp;<input name="linksm" type="text" size="40"></td></tr>
<tr><td height="25" align="center" colspan="2"><input type="submit" name="Submit" value=" 现在申请 "></td></tr>
</form>
</table>

<table width="100%" border="1" align="right" cellpadding="0" cellspacing="0" bordercolorlight="#cccccc" bordercolordark="#FFFFFF" id="picture" style="display:none">
<form name="form" action="links.asp?action=save2" method="post">
<input name="key" type="hidden" value="1">
<tr><td height="25" align="left" colspan=2 bgcolor=#efefef>&nbsp; <strong class="STYLE1">图片连接</strong></td>
</tr>
<tr><td width="12%" height="25" align="right"><span class="STYLE1">图片地址</span>&nbsp;</td>
<td>&nbsp;<input name="linkname" type="text" size="30" value="http://"> <span class="STYLE1">尺寸</span>：<span class="STYLE1">88*31
</span></td>
</tr>
<tr> <td height="25" align="right"><span class="STYLE1">连接地址</span>&nbsp;</td>
<td>&nbsp;<input name="linkurl" type="text" size="40" value="http://"></td></tr>
<tr><td height="25" align="right"><span class="STYLE1">网站说明</span>&nbsp;</td>
<td>&nbsp;<input name="linksm" type="text" size="40"></td></tr>
<tr><td height="25" align="center" colspan="2"><input type="submit" name="Submit" value=" 现在申请 "></td></tr>
</form>
</table>
</body>
</html>