?? admin_right.aspx.cs
字號:
?using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Net;
public partial class Admin_Admin_Right : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["UserID"] == "" || Session["UserID"] == null)
{
Response.Write("<script language=javascript>window.alert('為了系統安全,請您重新登陸');window.location.href=('Admin_Login.aspx')</script>");
}
//獲取服務器IP
string name = Dns.GetHostName();
IPHostEntry myip = Dns.GetHostByName(name);
foreach (IPAddress ip in myip.AddressList)
{
this.LabIp.Text = ip.ToString();
}
//獲取名稱
string pcname = Dns.GetHostName();
this.LabName.Text = pcname.ToString();
//iis
this.LabIis.Text = Request.ServerVariables["SERVER_SOFTWARE"];
//時間
this.LabTime.Text = DateTime.Now.ToString();
//路徑
this.LabPatch.Text = Server.MapPath(Request.ServerVariables["SCRIPT_NAME"]);
//端口
this.Labdk.Text = Request.ServerVariables["SERVER_PORT"];
//系統
this.LabWin.Text = Environment.OSVersion.Platform.ToString() + " " + Environment.OSVersion.Version.ToString();
//超時
this.LabSe.Text = Server.ScriptTimeout.ToString() ;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -