<?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();
   }
?>
<!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>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<META http-equiv="Pragma" content="no-cache" />
<LINK href="css/general.css" rel="stylesheet" type="text/css" />
<LINK href="css/main.css" rel="stylesheet" type="text/css" />
</HEAD><BODY>
<div class="h2">系统管理 >> 网站信息</div>
<div class="list-div">

<table cellspacing='1' cellpadding='3'>
<tr>
  <th align='left'><table width="100" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><div align="left">&nbsp;&nbsp;网站信息</div></td>
        <td width="150">&nbsp;</td>
      </tr>
    </table></th>
</tr>
<tr><td align="left" valign="top" style="background:#F5F5F5;padding-bottom:8px;">
<?php
$sql="select * from tm_php_info where id=1";
$rsql=mysql_query($sql);
$rs=mysql_fetch_object($rsql);
$site_title=$rs->title;
$site_ms=$rs->cont;
$site_tj=$rs->tj;
$site_foot=$rs->foot;
$bah=$rs->bah;
			?>
<TABLE width="100%" border=0 cellPadding=0 cellSpacing=0 
            CALLPADDING="0">
<form id="form1" name="form1" method="post" action="inwrite.php">
              <TR BORDER="0" WIDTH="100%">
                <TD style="PADDING-LEFT: 8px; PADDING-TOP: 8px" vAlign=top 
                align=left width="100%" height=30>网 站 标 题：
               
                <input name="site_title" type="text" id="site_title" value="<?php echo $site_title;?>" size="70" /></TD>
              </TR>
              <TR BORDER="0" WIDTH="100%">
                <TD style="PADDING-LEFT: 8px; PADDING-TOP: 8px" vAlign=top 
                align=left height=80>网 站 描 述：
                <textarea name="site_ms" cols="70" rows="5" id="site_ms"><?php echo $site_ms;?></textarea></TD>
              </TR>
			  <TR BORDER="0" WIDTH="100%">
                <TD style="PADDING-LEFT: 8px; PADDING-TOP: 8px" vAlign=top 
                align=left height=80>统 计 代 码：
                <textarea name="site_tj" cols="70" rows="5" id="site_tj"><?php echo $site_tj;?></textarea></TD>
              </TR>
			  <TR BORDER="0" WIDTH="100%">
			    <TD style="PADDING-LEFT: 8px; PADDING-TOP: 8px" vAlign=top 
                align=left height=80>底 部 信 息：
		        <textarea name="site_foot" cols="70" rows="5" id="site_foot"><?php echo $site_foot;?></textarea></TD>
    </TR>
<TR BORDER="0" WIDTH="100%">
			    <TD style="PADDING-LEFT: 8px; PADDING-TOP: 8px" vAlign=top 
                align=left height=30>网 站 备 案：
      <input name="bah" type="text" id="bah" value="<?php echo $bah;?>" size="70" /></TD>
    </TR>
			  <TR BORDER="0" WIDTH="100%">
			    <TD style="PADDING-LEFT: 8px; PADDING-TOP: 8px" vAlign=top 
                align=left height=30><span class="help">
			      <input type="image" src="images/submit.gif" align="absmiddle" border="0" name="submit" onclick="return checkform(this.form)" />
			    </span></TD>
    </TR>
</form>
</TABLE></td>
</tr></table></div>

<?php include "boot.php";?>
</body></html>
<script language="JavaScript" >

function chkform(theForm,msg,action){
	if (confirm(msg)){

		document.forms[theForm].action.value = action;
		document.forms[theForm].submit();
		return true;
	}else{
		return false;
	}
}

// -------- 全選或取消 checkbox 方塊
<!--
function select_all(formName, elementName, selectAllName) {
	if(document.forms[formName].elements[selectAllName].checked) {
		
		if(document.forms[formName].elements[selectAllName].length = 1 &&
		    typeof(document.forms[formName].elements[elementName]) != "undefined" ) {
		
			document.forms[formName].elements[elementName].checked = true;

		    for(var i = 0; i < document.forms[formName].elements[elementName].length; i++)
			document.forms[formName].elements[elementName][i].checked = true;
		}
	}
	else {
		if(document.forms[formName].elements[selectAllName].length = 1 &&
		    typeof(document.forms[formName].elements[elementName]) != "undefined" ) {
			document.forms[formName].elements[elementName].checked = false;

		    for(var i = 0; i < document.forms[formName].elements[elementName].length; i++)
				document.forms[formName].elements[elementName][i].checked = false;
		}
	}
}
//-->
</script>