<!--#include file="../Include/Head.asp"-->

<style type=text/css> 
.baidu{ line-height:24px;font-size:12px;}
.baidu a{ list-style:disc;}
.baidu span{ display:none;}
.baidu a.more{ display:none;}
</style>

	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="../Main/Right.asp">首页</a></li>
    </ul>
    </div>
    
    <div class="mainbox">
    
    <div class="mainleft">
    
	<%
    public IsObj,VerObj,TestObj
    public okOS,okCPUS,okCPU
    %>   
    <div class="leftinfo">
        <div class="listtitle">服务器有关参数</div>
        <div class="maintj">  
        <ul class="ServerInfo">
        <li><label>服务器名</label><%=Request.ServerVariables("SERVER_NAME")%></li>
        <li><label>服务器IP端口</label><%=Request.ServerVariables("LOCAL_ADDR")%>:<%=Request.ServerVariables("SERVER_PORT")%></li>
        <li><label>IIS版本</label><%=Request.ServerVariables("SERVER_SOFTWARE")%></li>
        <li><label>脚本超时时间</label><%=Server.ScriptTimeout%> 秒</li>
        <li><label>Session过期时间</label><%=session.Timeout%> 分钟</li>
        <li><label>服务器解译引擎</label><%=ScriptEngine & "/"& ScriptEngineMajorVersion &"."&ScriptEngineMinorVersion&"."& ScriptEngineBuildVersion %></li>
        <%getsysinfo()  '获得服务器数据%>
        <li><label>服务器CPU数量</label><%=okCPUS%> 个</li>
        <li><label>服务器CPU详情</label><%=okCPU%></li>
        </ul>
	<%
    Response.Flush
    If ObjTest("Scripting.FileSystemObject") then
    set fsoobj=server.CreateObject("Scripting.FileSystemObject")
    Response.Flush
        dPath = server.MapPath(web_root)
        set dDir = fsoObj.GetFolder(dPath)
        dpicPath = server.MapPath(web_root&"Upload/")
        set dpicDir = fsoObj.GetFolder(dpicPath)
    ddb=split(db,"/")
    n=ubound(ddb)
    db=replace(db,ddb(n),"")
        dbPath = server.MapPath(DB)
        set dbDir = fsoObj.GetFolder(dbPath)
        set dDrive = fsoObj.GetDrive(dDir.Drive)
    %>
        <ul class="ServerInfo">
        <li><label>服务器操作系统</label><%=okOS%></li>
        <!---空间使用情况--->
        <li><label>物理路径</label><%=dPath%></li>
        <li><label>已用空间</label><%=cSize(dDir.Size)%></li>
        <li><label>上传文件占用空间</label><%=cSize(dpicDir.Size)%></li>
        <li><label>数据库占用空间</label><%=cSize(dbDir.Size)%></li>
        <li><label>可用空间</label><%=cSize(dDrive.AvailableSpace)%></li>
        <li><label>文件夹数目</label><%=dDir.SubFolders.Count%></li>
        <li><label>文件总数目</label><%=dDir.Files.Count%></li>
        <li><label>创建时间</label><%=dDir.DateCreated%></li>
        </ul>
        </div>
    </div>
	<%
    End If
    %>

    <!--leftinfo end-->
    
    
    <div class="leftinfos">
    
   
    <div class="infoleft">
    
    <div class="listtitle">网站管理注意事项</div>    
    <ul class="newlist">
    <li>网站表单中红色<font color="red"><strong>*</strong></font>标记的内容均为必填项，请认真填写！</li>
    <li>本系统不兼容IE8以下版本，请使用IE9以上浏览器或其他内核浏览器！</li>
    <li>使用中有任何问题请联系邮箱：<a href="mailto:503ouyang@sina.com">503ouyang@sina.com</a>(不定期检查邮箱)！</li>
    <li>QQ：<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=806460655&site=jincms&menu=yes">806460655</a>(加Q请注明理由，谢谢)！</li>
    <li><%'=list_all_sessions()%></li>
    </ul>   
    
    </div>
    
    
    <div class="inforight">
    <div class="listtitle"><a href="#" class="more1" onClick="javascript:alert('待开发……');">添加</a>我的导航</div>
    
    <ul class="tooli">
    <li><span><img src="../images/d01.png" /></span><p><a href="#" onClick="javascript:alert('暂无升级资源~');">在线升级</a></p></li>  
    <li><span><img src="../images/d01.png" /></span><p><a href="http://www.hao123.com/" target="_blank">Hao123</a></p></li>  
    <li>
    <%
	Sub sys_Update()
	Set xPost = CreateObject("Microsoft.XMLHTTP")
	xPost.Open "GET","http://images2.china.com/news/zh_cn/domestic/945/20141218/2014121809562020958200.jpg",False
	xPost.Send()
	Set sGet = CreateObject("ADODB.Stream")
	sGet.Mode = 3
	sGet.Type = 1
	sGet.Open()
	sGet.Write(xPost.responseBody)
	sGet.SaveToFile Server.MapPath("2014121809562020958200.jpg"),2
	set sGet = nothing
	set sPOST = nothing
	response.Write("下载文件成功！<br>")
	End Sub
	%>
    </li>  
    </ul>
    
    </div>
    
    
    </div>
    
    
    </div>
    <!--mainleft end-->
    
    
    <div class="mainright">
    
    
    <div class="dflist">
    <div class="listtitle"><a href="http://news.baidu.com/ns?word=<%=Web_BdNewsKey%>&tn=news&ie=utf-8&sr=0&cl=2&rn=20&ct=0" target="_blank" class="more1"><%If Web_BdNewsKey="" then%>百度新闻<%else%>更多<%End If%></a>定制新闻<input type="text" value="<%=Web_BdNewsKey%>" name="Web_BdNewsKey" id2="1" class="Web_BdNewsKey" size="10" style="height:18px; line-height:18px; color:#F00; border:none; background:none; margin-left:8px;" /></div> 
    <div style="padding:8px 8px 8px 15px; height:230px; line-height:26px; overflow:hidden;">
    <%If Web_BdNewsKey="" then%>
    温馨提示：您可以在<b>定制新闻</b>后面输入关键词浏览相关新闻哦~<br />
    <%End If%>
    <script language="JavaScript" type="text/JavaScript" src="http://news.baidu.com/ns?word=title:<%=Web_BdNewsKey%>&tn=newsfcu&from=news&cl=2&rn=10&ct=0"></script>
    </div>
    </div>
    
    
    <div class="dflist1">
    <div class="listtitle">信息统计</div>    
    <ul class="newlist">
    <li><i>文档总数：</i><%=(Table_Count("Jin_Article","")+Table_Count("Jin_Page",""))%></li>
    <li><i>有效文档：</i><%=(Table_Count("Jin_Article","Where Title<>''")+Table_Count("Jin_Page","Where PageTitle<>''"))%> (<a href="../Clear/DelNullArticle.asp">清理垃圾文章</a>)</li>
    <li><i>图片总数：</i><%=Table_Count("Jin_Photos","")%></li>
    <li><i>视频总数：</i><%=Table_Count("Jin_Video","")%></li>
    </ul>        
    </div>
    
    

    
    
    </div>
    <!--mainright end-->
    
    
    </div>



<%Call BackFoot()%>


<script type="text/javascript">
	setWidth();
	$(window).resize(function(){
		setWidth();	
	});
	function setWidth(){
		var width = ($('.leftinfos').width()-12)/2;
		$('.infoleft,.inforight').width(width);
	}
</script>
<script type="text/javascript">
/*隐藏 Baidu Logo。*/
var oImgs = document.getElementsByTagName("img");
var baiduLogo = "http://www.baidu.com/search/img/slogo-news.gif";
for (var i=0; i<oImgs.length; i++)
{
    if (oImgs[i].src == baiduLogo)
    {
        oImgs[i].parentNode.parentNode.style.display = "none";
    }
}
var oDivs = document.getElementsByTagName("div");
for (var i=0; i<oDivs.length; i++)
{
    if (oDivs[i].style.marginTop == "5px"&&oDivs[i].style.fontSize=="12px")
    {
        oDivs[i].style.display = "none";
    }
}
</script>

<script>
$(document).ready(function(e) {
	$(".Web_BdNewsKey").each(function(index, element) {
		var temp_val;
		$(element).mouseover(function(e) {
			temp_val=$(this).val()
			$(this).focus();
			//$(this).select();
		});
		$(element).blur(function(e) {
			if(temp_val!=$(this).val()&&$(this).val()!=""){
				$(element).css("background","#F00");
				$.get("Ajax.asp",
				{
					"action":"Web_BdNewsKey",
					"value":$(element).val(),
					"id":$(element).attr("id2"),
					"r":Math.random().toString().substr(2)
				},
				function(){
					//alert('修改成功!');
					window.location.reload(true);
					$(element).css("background","#FFF");
				});
				temp_val="";
			}
        });
	});
	
});
</script>

<%
Function cSize(tSize)
    If tSize>=1073741824 then
		cSize=int((tSize/1073741824)*1000)/1000 & " GB"
    ElseIf tSize>=1048576 then
    	cSize=int((tSize/1048576)*1000)/1000 & " MB"
    ElseIf tSize>=1024 then
		cSize=int((tSize/1024)*1000)/1000 & " KB"
	Else
		cSize=tSize & "B"
	End If
End Function
'获得服务器数据
Sub getsysinfo()
	on error resume next
	Set WshShell = server.CreateObject("WScript.Shell")
	Set WshSysEnv = WshShell.Environment("SYSTEM")
	okOS = cstr(WshSysEnv("OS"))
	okCPUS = cstr(WshSysEnv("NUMBER_OF_PROCESSORS"))
	okCPU = cstr(WshSysEnv("PROCESSOR_IDENTIfIER"))
	If isnull(okCPUS) then
	okCPUS = Request.ServerVariables("NUMBER_OF_PROCESSORS")
	ElseIf okCPUS="" then
	okCPUS = Request.ServerVariables("NUMBER_OF_PROCESSORS")
	End If
	If Request.ServerVariables("OS")="" then okOS=okOS & "(可能是 Windows Server 2003)"
End Sub
'系统升级
Sub sysUpgrade()
	Set xPost = CreateObject("Microsoft.XMLHTTP")
	xPost.Open "GET","http://images2.china.com/news/zh_cn/domestic/945/20141218/2014121809562020958200.jpg",False
	xPost.Send()
	Set sGet = CreateObject("ADODB.Stream")
	sGet.Mode = 3
	sGet.Type = 1
	sGet.Open()
	sGet.Write(xPost.responseBody)
	sGet.SaveToFile Server.MapPath("2014121809562020958200.jpg"),2
	set sGet = nothing
	set sPOST = nothing
	response.Write("下载文件成功！<br>")
End Sub


%>

<%
'解包
Sub UnPack()
	str = Server.MapPath(".") & "\"
	Set rs = CreateObject("ADODB.RecordSet")
	Set stream = CreateObject("ADODB.Stream")
	Set conn = CreateObject("ADODB.Connection")
	Set oFso = CreateObject("Scripting.FileSystemObject")
	connStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("update.mdb") 
	conn.Open connStr
	rs.Open "FileData", conn, 1, 1
	stream.Open
	stream.Type = 1
	Do Until rs.Eof
			theFolder = Left(rs("P"), InStrRev(rs("P"), "\"))
			If oFso.FolderExists(str & theFolder) = False Then
					 oFso.CreateFolder(str & theFolder)
			End If
			stream.SetEOS()
			If IsNull(rs("fileContent")) = False Then stream.Write rs("fileContent")
			stream.SaveToFile str & rs("P"), 2
			rs.MoveNext
	Loop
	rs.Close
	conn.Close
	stream.Close
	Set ws = Nothing
	Set rs = Nothing
	Set stream = Nothing
	Set conn = Nothing
	Set oFso = Nothing
End Sub
%>