<?php 
include("qs.php");
require( '../data/config.php');
$conn=mysql_connect($db_host,$db_user,$db_pass);
mysql_query("set names 'utf8'");
mysql_select_db($db_name);
if (PHP_VERSION >= '5.1' && !empty($timezone))
{
    date_default_timezone_set($timezone);
}
$qs=explode(",",$_SESSION["tm_qs"]);
if($qs[0]==0)
   {
   echo "<script>location.href='main.php';</script>";
   exit();
   }
?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php
$site_title=_post('site_title');
$site_ms=_post('site_ms');
$site_tj=_post('site_tj');
$site_foot=_post('site_foot');
$bah=_post('bah');
$site_footinfo="%E7%A8%8B%E5%BC%8F%E5%BC%80%E6%BA%90%2C%E4%BE%9B%E5%AD%A6%E4%B9%A0%E4%BD%BF%E7%94%A8%2C%E4%B8%8D%E5%BE%97%E7%94%A8%E4%BA%8E%E5%95%86%E4%B8%9A%E9%80%94%E5%BE%84%2C%3Ca+href%3D%27http%3A%2F%2Fwww.tmacn.cn%27+target%3D%27_blank%27%3E%E8%85%BE%E9%A9%AC%E7%BD%91%E7%BB%9C%3C%2Fa%3E";
$sql="update tm_php_info set title='$site_title',cont='$site_ms',foot='$site_foot',foot_info='$site_footinfo',bah='$bah',tj='$site_tj' where id=1";
  $rs=mysql_query($sql);
  if($rs)
  echo "<script>alert('更新成功');location.href='info.php';</script>";
  else
  echo "<script>alert('不能更新，请联系开发工程师！');location.href='info.php';</script>";
?>