<?php 
include "../include/function.php";
include "admin_version.php";
include '../comm/conn.php';
include '../comm/config.php';
include '../comm/checkpostandget.php';
include 'check.php';
$link = mysql_connect($dbserver, $dbuser, $dbpass);
if (!$link) {
	die('数据库链接出错: ' . mysql_error());
}
else
{
	mysql_query("set names gbk");
	$sql="select count(id) as usernum from user";
	mysql_select_db($dbname);
	$rs = mysql_query($sql);
	while ($row = mysql_fetch_array($rs))
	{
		$usernum=$row[usernum];
	}
	
	$sql="select count(id) as jynum from tbjy";
	$rs = mysql_query($sql);
	while ($row = mysql_fetch_array($rs))
	{
		$jynum=$row[jynum];
	}
	
	$sql="select count(id) as jynum0 from tbjy where jystate=0";
	$rs = mysql_query($sql);
	while ($row = mysql_fetch_array($rs))
	{
		$jynum0=$row[jynum0];
	}
	
	$sql="select count(id) as jynum1 from tbjy where jystate=1";
	$rs = mysql_query($sql);
	while ($row = mysql_fetch_array($rs))
	{
		$jynum1=$row[jynum1];
	}
	
	$sql="select count(id) as jynum2 from tbjy where jystate=2";
	$rs = mysql_query($sql);
	while ($row = mysql_fetch_array($rs))
	{
		$jynum2=$row[jynum2];
	}
	
	$sql="select count(id) as txnum from tixian";
	$rs = mysql_query($sql);
	while ($row = mysql_fetch_array($rs))
	{
		$txnum=$row[txnum];
	}
	
	$sql="select count(id) as txnum0 from tixian where txstate=0";
	$rs = mysql_query($sql);
	while ($row = mysql_fetch_array($rs))
	{
		$txnum0=$row[txnum0];
	}
	
	$sql="select count(id) as txnum1 from tixian where txstate=1";
	$rs = mysql_query($sql);
	while ($row = mysql_fetch_array($rs))
	{
		$txnum1=$row[txnum1];
	}
	
	$sql="select count(id) as txnum2 from tixian where txstate=2";
	$rs = mysql_query($sql);
	while ($row = mysql_fetch_array($rs))
	{
		$txnum2=$row[txnum2];
	}
	$filename   =   '../comm/spurl.php'; 
	$lj="\"".dirname(__FILE__)."\"";  
	$somecontent   =   "<?php  echo ".$lj." ?>";
	
	if   (is_writable($filename))   {   
		if   (!$handle   =   fopen($filename,   'w'))   {   
						exit;   
		   }   
		 
		 if   (!fwrite($handle,   $somecontent))   {    
					  exit;   
			  }   
		
		  fclose($handle);   
		
	  }
}	
?><!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=gb2312" />
<title>管理中心</title>
<link href="../images/style1.css" rel="stylesheet" type="text/css">
<link href="../images/sty.css" rel="stylesheet" type="text/css">
<script src="js/jquery.js"></script>
<script language="javascript">
	function checkver(){
	$.get("js/ajaxfun.php?action=getver",function(R){
		$("#lastver").html(R);									  
	});	
	}
	function checkup(){
	$.get("js/ajaxfun.php?action=checkupdate",function(R){
		$("#updateinfo").html(R);											   
		});
	}
</script>
<style type="text/css">
<!--
.STYLE5 {color: #008EBD}
.STYLE7 {color: #008EBD; font-weight: bold; }
-->
</style>
</head>
<?php
include("../comm/head.php");
?>
<body topmargin="5" leftmargin="0">

<table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="6"></td>
  </tr>
</table>
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="282" valign="top"><table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="950">
          <table cellspacing="0" width="953" height="340" style="border:1px  solid #DCEAF7;">
            <tr>
              <td height="30" colspan="2" bgcolor="E9F2FB" class="bigtext"><strong>&nbsp;<img src="../images/arrow.gif" width="16" height="22" align="absmiddle" /> 网站基本信息</strong>&nbsp;&nbsp;<a href="../hotel/admin"target=_blank><strong><font color=red>进入酒店分销联盟</font></strong></a></td>
            </tr>
            <tr>
              <td colspan="2" valign="top"><table width="950" height="253" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td height="253" valign="top"><table width="950" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td height="30" colspan="2">&nbsp;</td>
                      <td height="30" colspan="2">&nbsp;</td>
                      </tr>
                    <tr>
                      <td height="30" colspan="2" align="right" class="bigtext">用户数：</td>
                      <td height="30" colspan="2" class="bigtext">&nbsp;<font color="#FF3300"><b><?php echo $usernum;?></b></font></td>
                      </tr>
                    <tr>
                      <td height="30" colspan="2" align="right" class="bigtext">交易数：</td>
                      <td height="30" colspan="2" class="bigtext">&nbsp;交易总数 <font color="#FF3300"><b><?php echo $jynum;?></b></font>&nbsp;&nbsp;|&nbsp;&nbsp;未结算交易 <font color="#FF3300"><b><?php echo $jynum0;?></b></font>&nbsp;&nbsp;|&nbsp;&nbsp;已结算交易 <font color="#FF3300"><b><?php echo $jynum1;?></b></font>&nbsp;&nbsp;|&nbsp;&nbsp;信息有误交易 <font color="#FF3300"><b><?php echo $jynum2;?></b></font></td>
                      </tr>
                    <tr>
                      <td height="30" colspan="2" align="right" class="bigtext">提现数：</td>
                      <td height="30" colspan="2" class="bigtext">&nbsp;提现总数 <font color="#FF3300"><b><?php echo $txnum;?></b></font>&nbsp;&nbsp;|&nbsp;&nbsp;正提现中数 <font color="#FF3300"><b><?php echo $txnum0;?></b></font>&nbsp;&nbsp;|&nbsp;&nbsp;提现成功数 <font color="#FF3300"><b><?php echo $txnum1;?></b></font>&nbsp;&nbsp;|&nbsp;&nbsp;提现失败总数 <font color="#FF3300"><b><?php echo $txnum2;?></b></font></td>
                      </tr>
                    <tr>
                      <td height="30" align="right" colspan="2" ><span class="v_info STYLE5"><strong>程序版本信息</strong></span></td>
                      <td height="30" colspan="2" >&nbsp;<span class="v_show">&nbsp;版本检测：&nbsp;&nbsp;<strong>当前版本：<font color='#ff0000'><?php echo $S_Version?></font>，最新版本为</strong><strong><span id="lastver" style="color:red;"><a onclick="checkver()" style="cursor:pointer;">[点击检测]</a></span></strong></span><span class="v_show">&nbsp; 升级检测：&nbsp;&nbsp;<span id="updateinfo" style="color:red;"><strong><a onclick="checkup()" style="cursor:pointer;">[点击检测]</a></strong></span></span></td>
                    </tr>
                    <tr>
                      <td height="30" align="right" colspan="2" ><span class="STYLE7">更换模板</span></td>
                      <td height="30" colspan="2" >1.【<a href="admin_update_mode1.php" target="_blank"><strong>粉色佳人</strong></a>】<a href="http://soft.yesfeng.com/mode/mode1.jpg" target="_blank"></a> 2. 【<a href="admin_update_mode2.php" target="_blank"><strong>黑色炫酷</strong></a>】 3.新增待续。。。 </td>
                    </tr>
                    <tr>
                      <td height="21" colspan="2" ><div align="right"><span class="S_info STYLE5"><strong>服务器信息</strong></span></div></td>
                      <td height="30" colspan="2" >&nbsp;</td>
                    </tr>
                    <tr>
                      <td width="37" height="30" >&nbsp;</td>
                      <td height="30" colspan="2" ><span class="S_list">服务器IP：<?php echo $_SERVER["REMOTE_ADDR"];?></span></td>
                      <td width="572" ><span class="S_list">服务器名：<span class="forumRow"><?php echo $_SERVER['SERVER_NAME']?></span></span></td>
                    </tr>
                    <tr>
                      <td height="30" >&nbsp;</td>
                      <td height="30" colspan="2" ><span class="S_list">MySQL 支持：<?php echo function_exists('mysql_close')?"<font color=green>[√]</font>".' /版本:'.mysql_get_client_info() :"<font color=red>×</font>"?></span></td>
                      <td height="30" ><span class="S_list" style="overflow:hidden;">站点物理路径：<?php echo $_SERVER['DOCUMENT_ROOT']?></span></td>
                    </tr>
                    <tr>
                      <td height="1" >&nbsp;</td>
                      <td width="53" height="1" >&nbsp;</td>
                      <td width="288" height="1" >&nbsp;</td>
                      <td height="1" >&nbsp;</td>
                    </tr>
                  </table>                    </td>
                </tr>
              </table></td>
            </tr><tr><td width="88" height="26"><div align="right"><span class="S_info STYLE5"><strong>官方最新消息</strong></span></div></td>
            <td width="860"></td>
            </tr>
            <tr>
              <td height="27" colspan="2"><script src="http://soft.yesfeng.com/news.js"></script></td>
              </tr>
          </table></td>
        </tr>
      
    </table></td>
  </tr>
</table>
  <?php
include("footer.php");
?>
</body>
</html>
<?php mysql_close($link);?>
