<?php
require_once '../include/adminfunction.php';
checkadmin();

$array_guanggao = application("array_guanggao","../data/guanggao.php");
if(!is_array($array_guanggao)){
	$array_guanggao = array();
}

$action=var_request("action","");


$errmsg = "";
$pagetext="";
if($action=="update"){
	$ctop = htmlspecialchars(var_request("top",""),ENT_QUOTES);
	$cleft = htmlspecialchars(var_request("left",""),ENT_QUOTES);
	$cleftcontent = htmlspecialchars(var_request("leftcontent",""),ENT_QUOTES);

	$array_guanggao["top"] = $ctop;
	$array_guanggao["left"] = $cleft;
	$array_guanggao["leftcontent"] = $cleftcontent;
	
	setapplication("array_guanggao",$array_guanggao,"../data/guanggao.php");
	
	redirect_to("managegug.php?add=ok");
	exit;
	
}





?>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>315爱购网</title>
	<link rel='stylesheet' href='images/order.css'>
    <style type="text/css">
<!--
.STYLE2 {color: #FF0000}
-->
    </style>
</head>

<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">
<center>
<table width="96%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="30" align=center>
<br> 
<p>&nbsp;    </p>

      </td>
  </tr>
</table>
<?php if(var_request("add","")=="ok"){?>
<table width="96%" border="0" cellpadding="3" cellspacing="1" bgcolor="#cccccc">
  <tr>
    <td height="30" colspan="2" align="center" bgcolor="#FFFFCC"><a href="manageconfig.php"><span class="STYLE2">修改成功！</span></a> </td>
  </tr>
</table>
<?php }?>

  <form name="form1" method="post" action="managegug.php?action=update" style=" margin:2px;">
    <table width="90%" border="0" cellpadding="10" cellspacing="1" bgcolor="#cccccc"><tr bgcolor="#c8ddf4">
        <td height="30" align="right" bgcolor="#FFFFFF" class="paragraph" title="20039669"><b>网站注册验证代码切勿修改</b></td>
        <td align="left" bgcolor="#ffffff"><textarea name="top" cols="90" rows="8" id="txtrootroad"><?php echo stripslashes(html_entity_decode($array_guanggao["top"],ENT_QUOTES)) ?></textarea></td>
        </tr>
      <tr bgcolor="#c8ddf4">
        <td height="30" align="right" bgcolor="#FFFFFF" class="paragraph" title="20039669">列表页左栏分类下广告位：</td>
        <td align="left" bgcolor="#ffffff"><textarea name="left" cols="90" rows="8" id="txturl"><?php echo stripslashes(html_entity_decode($array_guanggao["left"],ENT_QUOTES)) ?></textarea></td>
      </tr>
      <tr bgcolor="#c8ddf4">
        <td height="30" align="right" bgcolor="#FFFFFF" class="paragraph" title="20039669">商品页左栏分类下广告位：</td>
        <td align="left" bgcolor="#ffffff"><textarea name="leftcontent" cols="90" rows="8" id="txturl2"><?php echo stripslashes(html_entity_decode($array_guanggao["leftcontent"],ENT_QUOTES)) ?></textarea></td>
      </tr>
      <tr bgcolor="#c8ddf4">
        <td height="30" align="right" bgcolor="#FFFFFF" class="paragraph" title="20039669">&nbsp;</td>
        <td bgcolor="#ffffff"><input type="submit" name="button" id="button" value="修改"></td>
      </tr>
    </table>
  </form>



<table width="96%" height="91" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td height="1" bgcolor="#b2b2b2"></td>
  </tr>
  <tr>
    <td height="90" align=center>
<br> 
<p><span style="color:#FF0000">提示：支持常用的HTML代码，可自定义广告位图片链接。</span></p>

      </td>
  </tr>
</table>
</center>
</body>
</html>
