<?php defined('PHPNEW_STATIC_TPL') === false && exit(URL_HOST);?>

<!--{if !$default_parem[3]}-->
<style type="text/css">
    #mytable tr td{line-height: 3em; border: none; border-bottom: 1px solid silver;}
    #mytable .ser{border-right: 1px solid silver;}
</style>
<script type="text/javascript">
    var i = stop = 0;
    var str = '正在加载 ';
    var objs =0;
    function submitpost(obj){
        if(stop != 0){
            stop = 0;
            return false;
        }
        if(i == 0){
            objs = obj;
        }else{
            if(obj != 'b'){
                alert('正在加载中...');
                return false;
            }
        }
        
        i += 1;
        strs = str+'['+i+']';
        $(objs).val(strs);
        setTimeout('submitpost("b")',1000);
        return true;
    }
    function sync_url(obj){
        $('.ajax_showurl').html('正在检测.....');
        $.getJSON('./index.php?admincp=index&ajax_url='+encodeURIComponent($('.ajax_url').val())+'&count='+$('.ajax_int').val()+'&type='+encodeURIComponent($('.ajax_type').val())+'&rand='+Math.random(),function (data){
            stop = 1;
             $(objs).val('检测'+'['+i+']');
             i = 0;
            $('.ajaxshow').show();
            $('.ajax_showurl').html(data.url);
            $('.ajax_mess').html(data.left);
            $('.ajax_header').html(data.right);
        });
        return false;
    }
</script>
<table id="mytable">
    <tr class="admin_list">
        <th colspan="4">
            我的服务器: 
        </th>
    </tr>
  <tr>
    <td class="ser">PHPnew Blog信息</td>
    <td colspan="3">{PHPNEW} {VERSION} {if $firtime}(安装时间: {$firtime}){/if}</td>
  </tr>
  <tr>
    <td class="ser">服务器域名/IP地址</td>
    <td colspan="3"><?php echo @get_current_user();?>({PHP_OS}) - <?php echo $_SERVER['SERVER_NAME'];?>(<?php echo $_SERVER['SERVER_ADDR'];?>)&nbsp;&nbsp;你的IP地址是：<?php echo fun_get_ip();?></td>
  </tr>
  <tr>
    <td class="ser">服务器域名/IP地址</td>
    <td colspan="3">域名根目录: <a href="{URL_HOST}">{URL_HOST}</a> ; PHP,HTML,MYSQL 字符集均为: {$_config[default][charset]}</td>
  </tr>
  <tr>
    <td class="ser" style="line-height: 24px;">服务器语言 :<br />
    服务器端口 : <br />
    </td>
    <td class="ser" style="line-height: 24px;"> <?php echo getenv("HTTP_ACCEPT_LANGUAGE");?><br />
    <?php echo $_SERVER['SERVER_PORT'];?><br />
    </td>
    <td class="ser" style="line-height: 24px;">服务器版本信息: <br />
    服务器当前时间: <br />
    <td style="line-height: 24px;">
    <?php echo $_SERVER['SERVER_SOFTWARE'];?> mysql/{$mysqlver}
    <br />
    {$timezone_str}
    </td>
  </tr>
 <tr>
	  <td class="ser">服务器主机名</td>
	  <td class="ser"><?php if('/'==DIRECTORY_SEPARATOR ){echo $os[1];}else{echo $os[2];} ?></td>
	  <td class="ser">绝对路径</td>
	  <td><?php echo $_SERVER['DOCUMENT_ROOT'];?></td>
	</tr>
  <tr>
	  <td class="ser">管理员邮箱</td>
	  <td class="ser"><?php echo $_SERVER['SERVER_ADMIN'];?></td>
		<td class="ser">PHPinfo</td>
		<td><a href="./index.php?admincp=index&phpinfo.html">点击访问</a></td>
	</tr>
  <tr>
    <td class="ser">PHP运行方式:</td>
    <td class="ser"><?php echo strtoupper(php_sapi_name());?></td>
    <td class="ser">脚本占用最大内存:</td>
    <td><?php echo cfg_show("memory_limit");?></td>
  </tr>
   <tr>
    <td class="ser">上传文件最大限制:</td>
    <td class="ser"><?php echo cfg_show("upload_max_filesize");?></td>
    <td class="ser">POST方法提交最大限制:</td>
    <td><?php echo cfg_show("post_max_size");?> (推荐: 8MB)</td>
  </tr>
   <tr>
    <td class="ser">显示错误信息:</td>
    <td class="ser"><?php echo cfg_show("display_errors");?> (程序继承有定义)</td>
    <td class="ser">自定义全局变量:</td>
    <td><?php echo cfg_show("register_globals");?> (推荐: Not)</td>
  </tr>
    <td class="ser">打开远程文件:</td>
    <td class="ser"><?php echo cfg_show("allow_url_fopen");?> (推荐: Yes)</td>
     <td class="ser">CURL支持:</td>
    <td><?php echo cfg_show('CURL');?> (推荐: Yes)</td>
    <tr>
        <td colspan="4" style="line-height: 2em;">
        PHP已编译模块检测: <br />
        <?php
$able=get_loaded_extensions();
sort($able);
foreach ($able as $key=>$value) {
	echo "$value&nbsp; / &nbsp;";
}
?>
        </td>
    </tr>
    <tr>
    <td colspan="20" style=" border-top: 5px solid #FF8040; line-height:3em;"><strong style="color: #FF8040;">检测采集</strong>: <input class="ajax_url" style="width: 360px;" type="text" value="" /> <select class="ajax_int">
    <option value="1">001次</option>
    <option value="5">005次</option>
    <option value="10">010次</option>
    <option value="20">020次</option>
    <option value="30">030次</option>
    <option value="40">080次</option>
    <option value="100">100次</option>
    </select> <select class="ajax_type"> 
    <option value="curl">curl</option>
    <option value="file_get_contents">fsockopen</option>
    <option value="file_get_contents">file_get_contents</option>
    </select> <input onclick="submitpost(this); sync_url(this);" type="button" value=" 检 测 " /> (检测网络及同步情况)<br />
    <div class="ajaxshow" style="margin: 6px; display: none;">
        <table  style="line-height: 21px;">
            <tr>
                <td class="ajax_showurl" style="background-color: #F7FAEB; " colspan="2"></td>
            </tr>
            <tr>
                <td style="width: 50%; vertical-align: top; line-height: 2em;" class="ajax_mess"></td>
                <td style="width: 50%; vertical-align: top;line-height: 2em;" class="ajax_header"></td>
            </tr>
        </table>
    </div>
    </td>
    
    </tr>
</table>
<!--{elseif $default_parem[3] === 'phpinfo'}-->
<style type="text/css">
#phpinfo {font-family: sans-serif;}
#phpinfo pre {margin: 0px; font-family: monospace;}
#phpinfo a:link {color: #000099; text-decoration: none; background-color: #ffffff;}
#phpinfo a:hover {text-decoration: underline;}
.center {text-align: center;}
.center table { margin-left: auto; margin-right: auto; text-align: left;}
.center th { text-align: center !important; }
#phpinfo table td, #phpinfo table th { border-bottom:1px solid {$c3}; vertical-align: baseline;}

    #phpinfo table{ border-collapse: collapse; width: 100%;}
    #phpinfo table td{ padding: 3px; vertical-align: baseline;}
    #phpinfo table td img{float: right; border: 0px;}
h1 {font-size: 150%;}
h2 {font-size: 165%; line-height: 3em;}
.p {text-align: left;}
.e {background-color: #ccccff; font-weight: bold; width: 240px; color: #000000;}
.h {background-color: #9999cc; font-weight: bold; color: #000000;}
.v {background-color: #cccccc; color: #000000;}
.vr {background-color: #cccccc; text-align: right; color: #000000;}
hr {width: 600px; background-color: #cccccc; border: 0px; height: 1px; color: #000000;}
</style>
<script type="text/javascript">
    $(function (){
        $('#phpinfo a').click(function(){
            return false
        });
    });
</script>
<table>
    <tr>
    <td id="phpinfo">{$phpinfomess}<br /></td>
    </tr>
</table>
<div><a href="./index.php?admincp=index&phpinfo.html#phpinfo">返回顶端</a></div>
<!--{elseif $default_parem[3] === 'syscheck'}-->
<style type="text/css">
    #mytable{background-color: white; width: 100%; border-collapse: collapse;}
    #mytable td{ border: none; border-bottom: 1px dotted silver; width: auto; line-height: 26px; padding: 3px;}
    img{vertical-align: middle;}
</style>
<table id="mytable">
        <tr class="admin_list">
            <th>名称</th>
            <th style="width: 110px;">容量</th>
            <th style="width: 160px;">生成日期</th>
            <th style="width: 100px;">可读 / 可写</th>
        </tr>
        <tr><td colspan="4"> <div style="float: left;"><span style="font-weight: bolder; padding-left: 3px; border-left: 12px solid {$c3}; color: {$c3};"> {$getpath}</span>  <a href="{$backpathlink}" style="font-size: 11px;">上一层</a></div>
        <div style="float: right; color: #727272;">目录: {$dircount}; 文件: {$filecount}; 总容量: {$all_size}</div>
        </td></tr>
    <!--{if !$end_info}-->
<tr><td colspan="4" style="text-align: center; color: #FF8040;"> 目录为空... </td></tr>
    <!--{/if}-->
    <!--{loop $end_info[dir] $val}-->
        <tr>
            <td> <img src="./Static/Images/filetype/folder.gif" width="24" /> <a href="{$val[5]}">{$val[0]}</a></td>
            <td>{$val[4]}</td>
            <td>{$val[3]}</td>
             <td>{$val[2]} / {$val[1]}</td>
        </tr>
    <!--{/loop}-->
    <!--{loop $end_info[file] $val}-->
        <tr>
            <td style="color: {$c3};"> <img src="{$val[5]}" /> {$val[0]}</td>
            <td>{$val[4]}</td>
            <td>{$val[3]}</td>
             <td>{$val[2]} / {$val[1]}</td>
        </tr>
    <!--{/loop}-->
    <!--{if $omit}-->
        <tr><td colspan="4" style="text-align: center; color: #FF8040;"> ...仅可显示300个文件... </td></tr>
    <!--{/if}-->
        <tr><td colspan="4" style="text-align: right; color:#cccccc;">
            服务器环境管理1.0
        </td></tr>
    </table>
<!--{elseif $default_parem[3] === 'safecheck'}-->
<style type="text/css">
    #mytable{background-color: white; width: 100%; border-collapse: collapse;}
    #mytable td{border-bottom: 1px solid silver; line-height: 26px; padding: 3px;}
    img{vertical-align: middle; }
    .runshow{margin: 0 auto;}
</style>
<script type="text/javascript">
    function saferun(obj,i){
        $(obj).attr('src','./Static/Images/loading.gif');
        $('.runshow').css({'border': '2px solid silver', 'color': '#555555','width':'70%'});
        $.get('./index.php?admincp=index&safecheck='+i,function (data){
            data = eval('(' +data+ ')');
            $('.runshow').html(data.tag);
            
            if(data.err != '0'){
                $('.errmess').prepend('<p>'+data.errtag+'<p>');
            }
            
            if(data.i != '0'){
                 saferun(obj,data.i);
            }else{
                 $(obj).attr('src','./Static/Images/admincp/safeadmin.gif');
            }
        });
    }
</script>
<table id="mytable">
        <tr class="admin_list">
            <th>安全维护</th>
        </tr>
        <tr><td style="text-align: center; font-weight: bold;"><br /> <img src="./Static/Images/admincp/safeadmin2.gif" /><br />安全维护可以全面了解程序安全状况, 防患于未然.
        <!--{if $lastdate}-->
        <div class="runshow">上次体检时间为: {$lastdate}</div>
        <!--{else}-->
        <div class="runshow">系统未全面体检, 请立刻执行安全体检</div>
        <!--{/if}-->
        <img onclick="saferun(this,0);" src="./Static/Images/admincp/safeadmin.gif" /> </td></tr>
        <tr>
            <td>
                错误列表: <br />
                    <div class="errmess"></div>
            </td>
        </tr>
</table>
<!--{/if}-->
</div>