<%dbs="../"%>
<!--#include file="../inc/config.asp"-->
<!--#include file="../inc/sub.asp"-->
<!--#include file="uccook.asp"-->
<!--#include file="uc.asp"-->
<%
id=request.QueryString("id")
if id="" or IsNumeric(id)<>true then
	response.write"请输入正确的ID号！"
	response.end
end if
set rs=Server.CreateObject("Adodb.Recordset")
	sql="select * from H_pageads where ID="&id&""
	rs.open sql,conn,1,1
	if rs.eof then
	response.Write "系统错误非法操作"
	response.End()
	else
	H_page_sort_old=rs("H_sort")
	H_name=rs("H_name")
	H_TXT=rs("H_TXT")
	H_url=rs("H_url")
	H_px=rs("H_px")
	end if
	rs.close
act=request("act")
if act="edit" then
H_sort1=Replace(Replace(Left(request.Form("H_sort"),9),"<","["),">","]")
H_name=Replace(Replace(Left(request.Form("H_name"),200),"<","["),">","]")
H_TXT=Replace(Replace(Left(request.Form("H_TXT"),300),"<","["),">","]")
H_url=Replace(Replace(Left(request.Form("H_url"),100),"<","["),">","]")
H_px=Replace(Replace(Left(request.Form("H_px"),9),"<","["),">","]")
if H_url="" then
		response.Write "<script >alert('提示：\n\n请填写网站地址,立即返回...');history.back(-1);</script>"
		response.End()	
end if
if H_name="" then
		response.Write "<script >alert('提示：\n\n请填写企业名称,立即返回...');history.back(-1);</script>"
		response.End()	
end if
if H_TXT="" then
		response.Write "<script >alert('提示：\n\n请填写广告短语...');history.back(-1);</script>"
		response.End()	
end if
if H_px="" or IsNumeric(H_px)<>true then
		response.Write "<script >alert('提示：\n\n请填写排序,并必须是数字，立即返回...');history.back(-1);</script>"
		response.End()	
end if
if H_sort1="" or IsNumeric(H_sort1)<>true then
		response.Write "<script >alert('提示：\n\n请选择分类...');history.back(-1);</script>"
		response.End()	
end if
set rs=Server.CreateObject("Adodb.Recordset")
	sql="select * from H_pageads where id="&request.QueryString("id")&""
	rs.open sql,conn,1,3
	rs("H_sort")=H_sort1
	rs("H_name")=H_name
	rs("H_TXT")=H_TXT
	rs("H_url")=H_url
	rs("H_px")=H_px
	rs.update
	rs.close
	set rs=nothing	
	response.Write "<script >alert('提示：\n\n修改成功,立即返回...');location.href='pageads_master.asp';</script>"
	response.End()	
end if

	
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<title><%=W_title%>,总管理中心</title>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="style.css" type=text/css rel=stylesheet>
<SCRIPT language=javascript src="images/jquery.js" 
type=text/javascript></SCRIPT>

<SCRIPT language=javascript src="images/function.js" 
type=text/javascript></SCRIPT>



<SCRIPT language=javascript type=text/javascript>
<!--


/*
function AddnewType()
*/
-->
</SCRIPT>

<META content="MSHTML 6.00.3790.4426" name=GENERATOR>
</HEAD>
<BODY><!--用户中心头部-->
<!--#include file="top.asp"-->
<table width="960" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td width="150" valign="top"><!--#include file="left.asp"--></td>
      <td width="810" align="right" valign="top"><table width="800" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td width="20" align="center"><img src="images/ico_4.gif" width="12" height="12"></td>
                <td height="30" align="left"><a href="index.asp" target="_self">用户中心</a> <span class="uc_huise">&gt; 友情连接管理</span></td>
            </tr>
            <tr>
                <td height="1" colspan="2" bgcolor="#EEEEEE"></td>
        </tr>
        </table>
            <table width="600" height="5" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td></td>
                </tr>
            </table>
			<form name="form" action="pageads_edit.asp?act=edit&id=<%=id%>" method="post"  target="_self">
            <table width="800" border="0" cellpadding="0" cellspacing="1" bgcolor="#EEEEEE">
                <tr>
                    <td height="30" colspan="2" align="left" bgcolor="#FFFFFF" class="uc_huise">增加广告                        </td>
                </tr>
                <tr>
                    <td width="128" height="28" align="right" bgcolor="#FFFFFF" class="fc_green" >分类：</td>
                    <td height="13" align="left" bgcolor="#FFFFFF" class="uc_huise" ><%call H_page_sort(H_page_sort_old)%></td>
                </tr>
                <tr>
                  <td width="128" height="28" align="right" bgcolor="#FFFFFF" class="fc_green" >企业名称：</td>
                  <td height="14" align="left" bgcolor="#FFFFFF" class="uc_huise" ><input name="H_name" type="text" id="H_name" value="<%=H_name%>" size="50"></td>
                </tr>
                <tr>
                  <td height="28" align="right" bgcolor="#FFFFFF" class="fc_green" >简单说明：</td>
                  <td height="28" align="left" bgcolor="#FFFFFF" class="uc_huise" ><textarea name="H_TXT" cols="50" rows="3" id="H_TXT"><%=H_TXT%></textarea></td>
                </tr>
                <tr>
                  <td height="28" align="right" bgcolor="#FFFFFF" class="fc_green" >连接地址：</td>
                  <td height="13" align="left" bgcolor="#FFFFFF" class="uc_huise" ><input name="H_url" type="text" id="H_url" value="<%=H_url%>" size="50"></td>
                </tr>
                <tr>
                  <td height="28" align="right" bgcolor="#FFFFFF" class="fc_green" >排序：</td>
                  <td height="14" align="left" bgcolor="#FFFFFF" class="uc_huise" ><input name="H_px" type="text" id="H_px" value="<%=H_px%>" size="50"></td>
                </tr>
                <tr>
                  <td height="28" colspan="2" align="center" bgcolor="#FFFFFF" class="fc_green" ><input name="Submit" type="submit" class="UCform" value="提交"></td>
                </tr>
            </table>
	        
			</form>
			
		    <table width="200" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td>&nbsp;</td>
              </tr>
            </table>
			
			
			
			
			
      </td>
    </tr>
</table>
<!--#include file="end.asp"-->

</BODY></HTML>
