<?php
	session_start(); 
	require_once('../../ru/ls_admin/inc/conn.php');
	require_once('../../ru/ls_admin/inc/ls_syscode.php');
	require_once('../../ru/ls_admin/inc/constant.php');
	require_once('../../ru/ls_admin/inc/check.php');
	$opendb=new mydb();
	require_once('../../ru/ls_admin/inc/char_set.php');
	$allcontantsvars='$seoFrefix1,$seoFrefix2,$seoSufix1,$seoSufix2,$awstatsUrl,$PicSize,$BigPicW,$BigPicH,$SmallPicW,$SmallPicH,$newsNum';
	$allcontantsmemo='SEO长尾词前缀1,SEO长尾词前缀2,SEO长尾词后缀1,SEO长尾词后缀2,网站访问统计URL,图片最大字节数,大图宽,大图高,小图高,小图宽,每页新闻行数';
	$arraycontantsvars=explode(',',$allcontantsvars);  
	$arraycontantsmemos=explode(',',$allcontantsmemo); 

if($_POST["update"]== "确认")
{
	foreach ($_POST as $key=>$value)

	{
		if(in_array('$'.$key,$arraycontantsvars))
		{
			if($_POST["type_".$key]=="string")
			{$vartype="str";}
			else
				if($_POST["type_".$key]=="integer")
				{$vartype="int";}
				else
				{$vartype="str";}
				//echo $key."--".$value."--".$vartype."<br/>";
				writeconstant($key,$value,'str');
				$ls_msg="参数修改成功！";
		}
	}
			
}
?>
<!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>
<title><?php echo $engineName?>d</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<link href="../../ru/ls_admin/css/admin.css" rel="stylesheet" type="text/css">
<title>无标题文档</title>
</head>

<body>
<table width="96%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#6396D6">
  <tr> 
	<td height="18" background="../../ru/ls_admin/images/admin_bg.gif"><div align="center"><font color="#FFFFFF"><strong>维护参数更新</strong></font></div></td>
  </tr>

  <tr>
  	<td bgcolor="#E8F1FF" valign="top" align="center">
	<br>
		<form name="form1" method="post" action="../../ru/ls_mantain/?ls=eidt">
	  <p>&nbsp;</p>
	  
	  <table width="592" border="0">
		 
          <?
		  $i=0;
          foreach ($arraycontantsvars as $key=>$value)
		  {
			 $getvalue= str_replace('$','',$value);
		  ?> <tr>
		    <td width="84" align="right"><?=$value?></td>
		    <td width="320" align="center"><input name="<?=str_replace('$','',$value)?>" type="text" id="<?=str_replace('$','',$value)?>" size="46" maxlength="460" value="<?=${$getvalue}?>"    />
            <input name="type_<?=$getvalue?>" type="hidden" id="submit" value="<?=gettype(${$getvalue})?>" />
            </td>
		    <td width="174" align="left"><?=$arraycontantsmemos[$i]?></td>
            </tr>
          <?  
		  $i++;
		  } ?>
			
			<tr>
			  <td height="41" colspan="3" align="center"><input name="update" type="submit" id="submit" value="确认" />
		      <input type="reset" name="Submit2" value="重填" /></td>
		  </tr>
 <tr>
  <td colspan="3" align="left">
    
    
    
    </td>
 </tr>
		</table>
	  <font color="#FF0000"><?php echo $ls_msg; ?></font><br />
      </form>
		<br>

	</td>
 </tr>
	

</table>

</body>
</html>

