<%@ Page Language="C#" AutoEventWireup="true" debug="true"  Inherits="WinLibClass.Form.Admin.ClearCache"  CodePage="65001" %>
<%
WinLibClass.Config.Global.SystemConfig.InitConfig();

bool bReturn = false;
string UriHost ="";
					Uri u = null;
					if ( System.Web.HttpContext.Current != null )
					{
						u = System.Web.HttpContext.Current.Request.Url;
						UriHost = u.Host.ToLower();
						Response.Write(UriHost+"<br />");
					}
					else
					{
						UriHost = "127.0.0.1";//应用程序调试专用
					//	bReturn = true;
					}

                        object cacheMsg = WinLibClass.Cache.CacheUtils.RetrieveObject("CacheName_RightFileName");
                        {
                            string strTmp = "";
                            if (cacheMsg == null)
                            {
                                string msg = WinLibClass.Common.Files.FileUtils.ReadFile(WinLibClass.Config.Global.WebSiteConfigAdmin.QssRightFilePath);
                                msg = WinLibClass.Data.BinaryString.Decode(msg).ToLower();
                                WinLibClass.Cache.CacheUtils.AddObject("CacheName_RightFileName", msg, 600);//每小时验证一次
                                strTmp = msg;
                            }
                            else strTmp = cacheMsg.ToString();
                            
Response.Write(strTmp+"<br />");                            
                            
                            string[] info = strTmp.Split('$');
                            if (info.Length > 0)
                            {
                                WinLibClass.Config.Global.WebSiteConfigAdmin.RightFileInfo = info[0];
                            }
                            else
                                WinLibClass.Config.Global.WebSiteConfigAdmin.RightFileInfo = "";


                            string[] urlList = WinLibClass.Config.Global.WebSiteConfigAdmin.RightFileInfo.Split('|');
                            if (urlList != null)
                            {
                                for (int i = 0; i < urlList.Length; i++)
                                {
                                	Response.Write(urlList[i]+ "/" + UriHost +"<br />"); 
                                    if (UriHost.IndexOf(urlList[i]) > -1)
                                    {
                                        bReturn = true;
                                        break;
                                    }
                                }
                            }

                        }

%>