Asp.net源码专业站
首页->门户综合->webzcn虚拟主机网站最初源码>>Admin/Default.aspx.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:webzcn虚拟主机网站最初源码
当前文件:文件类型 webzcn/Admin/Default.aspx.cs[3K,2009-6-12 11:58:27]打开代码结构图
普通视图
		            
1using System; 2using System.Data; 3using System.Configuration; 4using System.Collections; 5using System.Web; 6using System.Web.Security; 7using System.Web.UI; 8using System.Web.UI.WebControls; 9using System.Web.UI.WebControls.WebParts; 10using System.Web.UI.HtmlControls; 11using System.Data.SqlClient; 12 13public partial class Admin_Default : System.Web.UI.Page 14{ 15 protected void Page_Load(object sender, EventArgs e) 16 { 17 if (!Page.IsPostBack) 18 { 19 20 if (Session["Admin"] != null) 21 { 22 Bind(); 23 } 24 else 25 { 26 27 Response.Redirect("index.aspx"); 28 } 29 } 30 } 31 private void Bind() 32 { 33 DateTime nowtime = DateTime.Now; 34 SERVER_NAME.Text = Request.ServerVariables["SERVER_NAME"]; 35 MachineName.Text = Server.MachineName; 36 LOCAL_ADDR.Text = Request.ServerVariables["LOCAL_ADDR"]; 37 SERVER_PORT.Text = Request.ServerVariables["SERVER_PORT"]; 38 ServerDateTime.Text = DateTime.Now.ToString(); 39 SERVER_SOFTWARE.Text = Request.ServerVariables["SERVER_SOFTWARE"]; 40 ScriptTimeout.Text = Server.ScriptTimeout.ToString(); 41 APPL_PHYSICAL_PATH.Text = Request.ServerVariables["APPL_PHYSICAL_PATH"]; 42 43 char[] de = { ';' }; 44 string allhttp = Request.ServerVariables["HTTP_USER_AGENT"].ToString(); 45 string[] myFilename = allhttp.Split(de); 46 runtime.Text = myFilename[myFilename.Length - 1].Replace(")", " "); 47 OS.Text = myFilename[2]; 48 ServerView.Text = myFilename[1]; 49 PATH_TRANSLATED.Text = Request.ServerVariables["PATH_TRANSLATED"]; 50 51 if (checkobj("ADODB.RecordSet")) 52 { 53 access.Text = "已安装"; 54 } 55 else 56 { 57 access.Text = "未安装"; 58 } 59 60 if (checkobj("Scripting.FileSystemObject")) 61 { 62 fso.Text = "已安装"; 63 } 64 else 65 { 66 fso.Text = "未安装"; 67 } 68 69 if (checkobj("CDONTS.NewMail")) 70 { 71 sendmail.Text = "已安装"; 72 } 73 else 74 { 75 sendmail.Text = "未安装"; 76 } 77 78 if (checkobj("JMail.SMTPMail")) 79 { 80 jmail.Text = "已安装"; 81 } 82 else 83 { 84 jmail.Text = "未安装"; 85 } 86 87 if (checkobj("LyfUpload.UploadFile")) 88 { 89 lyupload.Text = "已安装"; 90 } 91 else 92 { 93 lyupload.Text = "未安装"; 94 } 95 96 if (checkobj("Persits.Upload")) 97 { 98 aspupload.Text = "已安装"; 99 } 100 else 101 { 102 aspupload.Text = "未安装"; 103 } 104 105 if (checkobj("Persits.MailSender")) 106 { 107 aspemail.Text = "已安装"; 108 } 109 else 110 { 111 aspemail.Text = "未安装"; 112 } 113 114 if (checkobj("aspcn.Upload")) 115 { 116 aspcn.Text = "已安装"; 117 } 118 else 119 { 120 aspcn.Text = "未安装"; 121 } 122 123 sessioncount.Text = Session.Contents.Count.ToString(); 124 appcount.Text = Application.Contents.Count.ToString(); 125 126 DateTime passtime = DateTime.Now; 127 fast.Text = ((passtime - nowtime).TotalMilliseconds).ToString(); 128 } 129 130 bool checkobj(string obj) 131 { 132 try 133 { 134 object meobj = Server.CreateObject(obj); 135 return (true); 136 } 137 catch (Exception) 138 { 139 return (false); 140 } 141 } 142 public void checkinput(Object sender, EventArgs e) 143 { 144 try 145 { 146 string obj = other.Text; 147 object meobj = Server.CreateObject(obj); 148 checkok.Text = "检测结果:" + obj + " 组件存在"; 149 } 150 catch (Exception) 151 { 152 checkok.Text = "检测结果:" + other.Text + " 组件不存在"; 153 } 154 } 155} 156
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:webzcn虚拟主机网站最初源码
51Aspx.com 版权所有 CopyRight © 2006-2010. 京ICP备06046876号 本站法律顾问:ITlaw-庄毅雄律师
返回顶部
客户服务:点击这里进行客户咨询 业务合作:点击这里洽谈业务合作 合作热线:010-68880146