<!--#include file="../inc/config.asp"-->
<!--#include file="../inc/conn.asp"-->
<!-- #include file="inc/Session.asp" -->
<!-- #include file="inc/checkrole.asp" -->
<HTML>
<HEAD>
<TITLE>添加友情链接</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<style>
body,td,input,textarea {font-size:9pt}
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
</style>

</HEAD>
<BODY>
<%
'''''''''''''''''''''''''''''''''''''''''''''''
call checkPrevilege(Session("Name"),"p08")
'''''''''''''''''''''''''''''''''''''''''''''''
%>
<table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><iframe src="right_top.htm" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" height="30" width="100%"></iframe></td>
  </tr>
</table>
<%
dim act,flag,title,siteurllink,sitepic
act=request.QueryString("act")

if(act="add") then
	flag=cint(request.Form("flag"))
	title=trim(request.Form("title"))
	siteurllink=trim(request.Form("siteurl"))
	sitepic=request.Form("sitepic")	
	call Addflink()
	response.Write("添加友情链接~!")
	response.Write("<br><a href=flink_manage.asp>返回</a>")
else
%>
<FORM method="POST" name="form1" action="flink_add.asp?act=add" style="margin:0 0 0 0;">
  <TABLE width="100%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#666666">
<TR bgcolor="#F5F5F5">
  <TD colspan="2"><div align="center">添加友情链接</div></TD>
  </TR>
<TR bgcolor="#F5F5F5">
  <TD><div align="center">链接类型：</div></TD>
  <TD><select name="flag" id="flag">
    <option value="0">文字链接</option>
    <option value="1">图片链接</option>
  </select></TD>
</TR>
<TR bgcolor="#F5F5F5">
  <TD width="14%"><div align="center">网站标题：</div></TD>
  <TD width="86%"><input name="title" type="text" id="title" size="30"></TD>
</TR>
<TR bgcolor="#F5F5F5">
  <TD><div align="center">网站地址：</div></TD>
  <TD><div align="left">
    <input name="siteurl" type="text" id="siteurl" size="50">
  </div></TD>
</TR>
<TR bgcolor="#F5F5F5">
  <TD><div align="center">网站图片：</div></TD>
  <TD><div align="left">
    <input name="sitepic" type="text" id="sitepic" size="50">
  </div></TD>
</TR>
<TR bgcolor="#F5F5F5">
	<TD align=right>&nbsp;	  </TD>
    <TD align=right><div align="left"> 
        <input type=submit name=b1 value="提 交">&nbsp;&nbsp;
        <input type=reset name=b2 value="重 填">       
    </div></TD>
</TR>
</TABLE>
</FORM>
<%
end if
sub Addflink
	set rs=server.createobject("adodb.recordset")
	sql="select top 1 * from friendlink order by id desc "
	rs.open sql,conn,3,3
	rs.addnew
	rs("Flag")=flag
	rs("Title")=title
	rs("LinkUrl")=siteurllink
	rs("Pic")=sitepic	
	rs.update
	rs.close
	set rs=nothing
end sub
%>
</BODY>
</HTML>
<%
call connclose()
%>