//发送数据 public static void SendPostData() { try { Thread.Sleep(50000); //得到系统相关信息 int member = Convert.ToInt32(Statistics.GetStatisticsRowItem("totalusers")); int topcis = Convert.ToInt32(Statistics.GetStatisticsRowItem("totaltopic")); int posts = Convert.ToInt32(Statistics.GetStatisticsRowItem("totalpost")); string build = string.Empty; string strPath = Utils.GetMapPath(BaseConfigs.GetForumPath.ToLower() + "config/localupgradeini.config"); if (System.IO.File.Exists(strPath)) { XmlDocument lastupdate = new XmlDocument(); lastupdate.Load(strPath); build = lastupdate.SelectSingleNode("/localupgrade/requiredupgrade").InnerText; XmlNodeList list = lastupdate.SelectNodes("/localupgrade/optionalupgrade/dnt" + Utils.GetAssemblyVersion() + "/item"); if (list != null) { foreach (XmlNode node in list) { if (StrToDateTime(node.InnerText) > StrToDateTime(build)) build = node.InnerText; } } } string osversion = Environment.OSVersion.ToString(); int dotnetmajor = Environment.Version.Major; int dotnetminor = Environment.Version.Minor; int dotnetbuild = Environment.Version.Build; CatchSoftInfo csi = new CatchSoftInfo(); //产生webservice的认证信息 AuthHeaderCS myHeader = new AuthHeaderCS(); myHeader.Username = "******"; myHeader.Password = "******"; csi.AuthHeaderCSValue = myHeader; int dbtype = 0; switch(Discuz.Config.BaseConfigs.GetDbType.ToLower()) { case "sqlserver": { dbtype = 0; break; } case "access": { dbtype = 101; break; } case "mysql": { dbtype = 201; break; } } csi.SetupSoftInfo(forumname, member, topcis, posts, serversoftware, Utils.AssemblyFileVersion.FileMajorPart, Utils.AssemblyFileVersion.FileMinorPart, Utils.AssemblyFileVersion.FileBuildPart, dotnetmajor, dotnetminor, dotnetbuild, dbtype, build, osversion, serverip, servername); } catch(Exception e) { string result = e.Message; } finally { Thread.CurrentThread.Abort(); } }
//发送数据 public static void SendPostData() { try { Thread.Sleep(50000); //得到系统相关信息 int member = Convert.ToInt32(Statistics.GetStatisticsRowItem("totalusers")); int topcis = Convert.ToInt32(Statistics.GetStatisticsRowItem("totaltopic")); int posts = Convert.ToInt32(Statistics.GetStatisticsRowItem("totalpost")); string build = string.Empty; string strPath = Utils.GetMapPath(BaseConfigs.GetForumPath.ToLower() + "config/localupgradeini.config"); if (System.IO.File.Exists(strPath)) { XmlDocument lastupdate = new XmlDocument(); lastupdate.Load(strPath); build = lastupdate.SelectSingleNode("/localupgrade/requiredupgrade").InnerText; XmlNodeList list = lastupdate.SelectNodes("/localupgrade/optionalupgrade/dnt" + Utils.GetAssemblyVersion() + "/item"); if (list != null) { foreach (XmlNode node in list) { if (StrToDateTime(node.InnerText) > StrToDateTime(build)) { build = node.InnerText; } } } } string osversion = Environment.OSVersion.ToString(); int dotnetmajor = Environment.Version.Major; int dotnetminor = Environment.Version.Minor; int dotnetbuild = Environment.Version.Build; CatchSoftInfo csi = new CatchSoftInfo(); //产生webservice的认证信息 AuthHeaderCS myHeader = new AuthHeaderCS(); myHeader.Username = "******"; myHeader.Password = "******"; csi.AuthHeaderCSValue = myHeader; int dbtype = 0; switch (Discuz.Config.BaseConfigs.GetDbType.ToLower()) { case "sqlserver": { dbtype = 0; break; } case "access": { dbtype = 101; break; } case "mysql": { dbtype = 201; break; } } csi.SetupSoftInfo(forumname, member, topcis, posts, serversoftware, Utils.AssemblyFileVersion.FileMajorPart, Utils.AssemblyFileVersion.FileMinorPart, Utils.AssemblyFileVersion.FileBuildPart, dotnetmajor, dotnetminor, dotnetbuild, dbtype, build, osversion, serverip, servername); } catch (Exception e) { string result = e.Message; } finally { Thread.CurrentThread.Abort(); } }
//发送数据 public static void SendPostData() { try { Thread.Sleep(50000); //Thread.Sleep(1000); //得到系统相关信息 int member = Convert.ToInt32(Statistics.GetStatisticsRowItem("totalusers")); int topcis = Convert.ToInt32(Statistics.GetStatisticsRowItem("totaltopic")); int posts = Convert.ToInt32(Statistics.GetStatisticsRowItem("totalpost")); int build = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileBuildPart; //Environment.Version.Build; string osversion = Environment.OSVersion.ToString(); int major = Environment.Version.Major; int minor = Environment.Version.Minor; int revision = Environment.Version.Revision; CatchSoftInfo csi = new CatchSoftInfo(); //产生webservice的认证信息 AuthHeaderCS myHeader = new AuthHeaderCS(); myHeader.Username = "******"; myHeader.Password = "******"; csi.AuthHeaderCSValue = myHeader; //csi.InsertSoftInfo(bbname, member, topcis, posts, serversoftware, major, minor, revision, build, osversion, serverip, servername); int dbtype = 0; switch (Discuz.Config.BaseConfigs.GetDbType.ToLower()) { case "sqlserver": { dbtype = 0; break; } case "access": { dbtype = 101; break; } case "mysql": { dbtype = 201; break; } } int productmarjorpart = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).ProductMajorPart; csi.SetupSoftInfo(bbname, member, topcis, posts, serversoftware, productmarjorpart, dbtype, major, minor, revision, build, osversion, serverip, servername); } catch { ; } finally { Thread.CurrentThread.Abort(); } }
//发送数据 public static void SendPostData() { try { Thread.Sleep(50000); //Thread.Sleep(1000); //得到系统相关信息 int member = Convert.ToInt32(Statistics.GetStatisticsRowItem("totalusers")); int topcis = Convert.ToInt32(Statistics.GetStatisticsRowItem("totaltopic")); int posts = Convert.ToInt32(Statistics.GetStatisticsRowItem("totalpost")); int build = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileBuildPart; //Environment.Version.Build; string osversion = Environment.OSVersion.ToString(); int major = Environment.Version.Major; int minor = Environment.Version.Minor; int revision = Environment.Version.Revision; CatchSoftInfo csi = new CatchSoftInfo(); //产生webservice的认证信息 AuthHeaderCS myHeader = new AuthHeaderCS(); myHeader.Username = "******"; myHeader.Password = "******"; csi.AuthHeaderCSValue = myHeader; //csi.InsertSoftInfo(bbname, member, topcis, posts, serversoftware, major, minor, revision, build, osversion, serverip, servername); int dbtype = 0; switch(Discuz.Config.BaseConfigs.GetDbType.ToLower()) { case "sqlserver": { dbtype = 0; break; } case "access": { dbtype = 101; break; } case "mysql": { dbtype = 201; break; } } int productmarjorpart = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).ProductMajorPart; csi.SetupSoftInfo(bbname, member, topcis, posts, serversoftware, productmarjorpart, dbtype, major, minor, revision, build, osversion, serverip, servername); } catch { ; } finally { Thread.CurrentThread.Abort(); } }