Пример #1
0
        /// <summary>
        /// 保存配置类实例
        /// </summary>
        /// <returns></returns>
        public static bool SaveConfig(SpaceActiveConfigInfo spaceconfiginfo)
        {
            SpaceActiveConfigFileManager sfm = new SpaceActiveConfigFileManager();

            SpaceActiveConfigFileManager.ConfigInfo = spaceconfiginfo;
            return(sfm.SaveConfig());
        }
Пример #2
0
 /// <summary>
 /// 保存配置类实例
 /// </summary>
 /// <returns></returns>
 public static bool SaveConfig(SpaceActiveConfigInfo spaceconfiginfo)
 {
     SpaceActiveConfigFileManager sfm = new SpaceActiveConfigFileManager();
     SpaceActiveConfigFileManager.ConfigInfo = spaceconfiginfo;
     return sfm.SaveConfig();
 }
 /// <summary>
 /// 初始化文件修改时间和对象实例
 /// </summary>
 static SpaceActiveConfigFileManager()
 {
     m_fileoldchange = System.IO.File.GetLastWriteTime(ConfigFilePath);
     m_configinfo    = (SpaceActiveConfigInfo)DefaultConfigFileManager.DeserializeInfo(ConfigFilePath, typeof(SpaceActiveConfigInfo));
 }
Пример #4
0
		public SpacePage()
		{
            //去掉http地址中的文件名称
            if (forumurl.ToLower().IndexOf("http://") == 0)
                forumurlnopage = forumurl.Substring(0, forumurl.LastIndexOf('/')) + "/";
            else
                forumurl = "../" + forumurl;

            if (GeneralConfigs.GetConfig().Enablespace != 1)
            {
                HttpContext.Current.Response.Clear();
                HttpContext.Current.Response.Write("<script>alert('" + spacename + "功能已被关闭!');document.location = '" + forumurl + "';</script>");
                HttpContext.Current.Response.End();
                return;
            }
			userid = Utils.StrToInt(ForumUtils.GetCookie("userid"), -1);
            config = SpaceActiveConfigs.GetConfig();
            OnlineUserInfo oluserinfo = OnlineUsers.UpdateInfo(GeneralConfigs.GetConfig().Passwordkey, GeneralConfigs.GetConfig().Onlinetimeout);
			olid = oluserinfo.Olid;
			userid = oluserinfo.Userid;
			username = oluserinfo.Username;
			password = oluserinfo.Password;
			if (password.Length > 16)
				userkey = password.Substring(4, 8).Trim();
			else
				userkey = "";

			if (!IsPostBack)
			{
				OutputSpacePage();
			}
		}
 /// <summary>
 /// 初始化文件修改时间和对象实例
 /// </summary>
 static SpaceActiveConfigFileManager()
 {
     m_fileoldchange = System.IO.File.GetLastWriteTime(ConfigFilePath);
     m_configinfo = (SpaceActiveConfigInfo)DefaultConfigFileManager.DeserializeInfo(ConfigFilePath, typeof(SpaceActiveConfigInfo));
 }