功能介绍: 1、全站生成html(可选) 可减轻服务器负载

源代码在线查看: mb.aspx

软件大小: 8519 K
上传用户: MOMO89752118
关键词: html 服务器 负载
下载地址: 免注册下载 普通下载 VIP

相关代码

				
				
				
								 #AdvDetailedId# 详细广告 ID
				 #width# 图片的长
				 #height# 图片的高
				 #picurl# 图片地址
				 #AdvImagePath# //图片路径
				 #CountFilePath# //统计路径
				-->
				
				 string key;
				 string WebUserName;
				 int WebsiteId;
				 int AdvDetailedId=#AdvDetailedId#;
				 string fromurl;
				 string CountFilePath;
				 
				 protected void Page_Load(Object Src, EventArgs E)
				 {
				  
				  WebUserName=Codeschar(Request.Params["WebUserName"]); //取得用户名
				  fromurl=Server.UrlEncode(Request.Params["host"]);
				  WebsiteId=Convert.ToInt32(Codeschar(Request.Params["WebsiteId"]));
				  
				  Random ro = new Random();
				  key=ro.Next(10000,999999).ToString()+WebUserName+WebsiteId+AdvDetailedId;
				  key=FormsAuthentication.HashPasswordForStoringInConfigFile(key ,"SHA1");
				  Session[WebUserName+"_key"]=key;
				  //Response.Write(fromurl);
				  
				  CountFilePath="#CountFilePath#/count/count.aspx?AdvDetailedId="+AdvDetailedId+"&WebsiteId="+WebsiteId+"&WebUserName="+WebUserName+"&key="+key+"&fromurl="+fromurl;
				  //Response.Write(CountFilePath);
				 }
				 
				 //字符过滤
				public string Codeschar(string ch)
				{ 
				 if(ch==null || ch=="")
				  {
				   return "";
				   }
				  else
				  {
				 ch=ch.Replace("\"","");
				 
				 ch=ch.Replace(")","");
				 ch=ch.Replace("(","");
				 ch=ch.Replace(" ","");
				 ch=ch.Replace("[","");
				 ch=ch.Replace("]","");
				 ch=ch.Replace("20%","");
				 ch=ch.Replace(",","");
				 return ch;
				 }
				 }
				
				
				
								#Layer1 {
					position:absolute;
					width:#width#;
					height:#height#;
					z-index:1;
				}
				-->
				
				
				
				
				
				
				
							

相关资源