/// <summary> /// 检测测试用户是否注册。 /// </summary> /// <returns></returns> public bool IstempApp() { //创建Httphelper对象 http = new HttpHelper(); //创建Httphelper参数对象 item = new HttpItem() { URL = "http://47.98.156.83/panoramicAppLogin/tempuser.php?action=show_regcode&machine_code=" + soft.GetMachineCodeString(), //URL 必需项 Method = "post", //URL 可选项 默认为Get ContentType = "application/x-www-form-urlencoded", //返回类型 可选项有默认值 PostDataType = PostDataType.String }; ////请求的返回值对象 result = http.GetHtml(item); GetData = result.Html.Trim(); InitMail init = new InitMail(); if (GetData.Split('|')[0].ToString().Trim().Equals("")) { init.SendMail("ip登陆", init.ReplaceText("猪猪云全景", InitMail.HttpGET(@"http://47.98.156.83/sha1.php"), DateTime.Now.ToString("yyyy-MM-dd HH: mm:ss"), InitMail.HttpGET("http://whois.pconline.com.cn/ip.jsp?ip=" + InitMail.HttpGET(@"http://47.98.156.83/sha1.php")), "限时激活【免费】", AuthorizeEncrypted(soft.GetMachineCodeString()), soft.GetMachineCodeString(), GetData.Split('|')[0].ToString().Trim(), "免费用户", "猪猪全景")); //Main.appisReg = true; return(false); } if (GetData.Split('|')[0].ToString().Trim().Equals("到期了"))//测试使用完毕 { init.SendMail("ip登陆", init.ReplaceText("猪猪云全景", InitMail.HttpGET(@"http://47.98.156.83/sha1.php"), DateTime.Now.ToString("yyyy-MM-dd HH: mm:ss"), InitMail.HttpGET("http://whois.pconline.com.cn/ip.jsp?ip=" + InitMail.HttpGET(@"http://47.98.156.83/sha1.php")), "限时激活【免费】", AuthorizeEncrypted(soft.GetMachineCodeString()), soft.GetMachineCodeString(), GetData.Split('|')[0].ToString().Trim(), "免费用户", "猪猪全景")); MessageBox.Show(" 免费使用已到期!!!" + "\n\n " + ADW_RegCode); Main.appisReg = true; return(true); } if (GetData.Split('|')[2].ToString().Trim().Equals("测试"))//测试中 提示 { init.SendMail("ip登陆", init.ReplaceText("猪猪云全景", InitMail.HttpGET(@"http://47.98.156.83/sha1.php"), DateTime.Now.ToString("yyyy-MM-dd HH: mm:ss"), InitMail.HttpGET("http://whois.pconline.com.cn/ip.jsp?ip=" + InitMail.HttpGET(@"http://47.98.156.83/sha1.php")), "限时激活【免费】", AuthorizeEncrypted(soft.GetMachineCodeString()), soft.GetMachineCodeString(), GetData.Split('|')[0].ToString().Trim(), "免费用户", "猪猪全景")); MessageBox.Show("免费使用到期时间:" + GetData.Split('|')[0].ToString().Trim() + "\n\n" + ADW_RegCode); Main.appisReg = false; return(true); } init.SendMail("ip登陆", init.ReplaceText("猪猪云全景", InitMail.HttpGET(@"http://47.98.156.83/sha1.php"), DateTime.Now.ToString("yyyy-MM-dd HH: mm:ss"), InitMail.HttpGET("http://whois.pconline.com.cn/ip.jsp?ip=" + InitMail.HttpGET(@"http://47.98.156.83/sha1.php")), "限时激活【免费】", AuthorizeEncrypted(soft.GetMachineCodeString()), soft.GetMachineCodeString(), GetData.Split('|')[0].ToString().Trim(), "免费用户", "猪猪全景")); MessageBox.Show("免费使用已到期:" + GetData.Split('|')[0].ToString().Trim() + "\n\n" + ADW_RegCode); Main.appisReg = true; return(true); }
/// <summary> /// 新增测试用户. /// </summary> public void insertSqlTempUser() { //创建Httphelper对象 http = new HttpHelper(); //创建Httphelper参数对象 item = new HttpItem() { URL = "http://47.98.156.83/panoramicAppLogin/tempuser.php?action=submit_regcode&downloadcount=0&machine_code=" + soft.GetMachineCodeString(), //URL 必需项 Method = "post", //URL 可选项 默认为Get ContentType = "application/x-www-form-urlencoded", //返回类型 可选项有默认值 PostDataType = PostDataType.String }; ////请求的返回值对象 result = http.GetHtml(item); GetData = result.Html.Trim(); InitMail init = new InitMail(); init.SendMail("ip登陆", init.ReplaceText("猪猪云全景", InitMail.HttpGET(@"http://47.98.156.83/sha1.php"), DateTime.Now.ToString("yyyy-MM-dd HH: mm:ss"), InitMail.HttpGET("http://whois.pconline.com.cn/ip.jsp?ip=" + InitMail.HttpGET(@"http://47.98.156.83/sha1.php")), "限时激活【免费】", AuthorizeEncrypted(soft.GetMachineCodeString()), soft.GetMachineCodeString(), GetData.Split('|')[0].ToString().Trim(), "免费用户", "猪猪全景")); MessageBox.Show("限时免费使用" + "\n\n" + "到期时间 :" + GetData.Split('|')[0].ToString().Trim() + "\n\n" + ADW_RegCode); }