コード例 #1
0
ファイル: Addchannel.aspx.cs プロジェクト: scutsky/iyuewan
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (!getUserCookies())
                {
                    Response.Redirect("~/Index.aspx");
                }
                else
                {
                    modeluser = blluser.GetModelByName(uid);

                }
                Spread.Model.WebSet model = new Spread.Model.WebSet();
                //bll.Get_Config(rwc);
                string pathurl = Server.MapPath(ConfigurationManager.AppSettings["WebSetpath"].ToString());
                model = bllSet.loadConfig(pathurl);
                DataTable dtChannel = cbll.GetList(" UserID='" + modeluser.ID + "' ").Tables[0];
                if (dtChannel.Rows.Count >= int.Parse(model.ChannelNum))
                {
                    string myScript = @"alertRedirectMsg('添加渠道不能大于" + model.ChannelNum + "!','error.gif','Channel.aspx');";
                    Page.ClientScript.RegisterStartupScript(this.GetType(), "MyScript", myScript, true);
                    return;
                }
                //TreeBind();
                DataTable dt = bll.GetList("").Tables[0];
                this.rptList.DataSource = dt;
                this.rptList.DataBind();
            }
        }
コード例 #2
0
ファイル: Site2.Master.cs プロジェクト: scutsky/iyuewan
 protected void Page_Load(object sender, EventArgs e)
 {
     Spread.Model.contant modelContant = new Spread.Model.contant();
     //bll.Get_Config(rwc);
     string pathurl = Server.MapPath(ConfigurationManager.AppSettings["WebSetpath"].ToString());
     webset = bll.loadConfig(pathurl);
 }
コード例 #3
0
ファイル: Index.aspx.cs プロジェクト: scutsky/iyuewan
 protected void Page_Load(object sender, EventArgs e)
 {
     string pathurl = Server.MapPath(ConfigurationManager.AppSettings["WebSetpath"].ToString());
     webset = bll.loadConfig(pathurl);
     if (!IsPostBack)
     {
         info();
         getUserCookies();
     }
 }
コード例 #4
0
ファイル: Admin_config.aspx.cs プロジェクト: scutsky/iyuewan
        protected void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                //赋值给MODEL
                Spread.Model.WebSet model = new Spread.Model.WebSet();
                model.WebName = txtWebName.Text;
                model.WebUrl = txtWebUrl.Text;
                model.WebPath = txtWebPath.Text;
                model.WeblogPath = txtWebLogPath.Text;
                model.WebTel = txtWebTel.Text;
                model.WebFax = txtWebFax.Text;
                model.WebQQ1 = txtWebQQ1.Text;
                model.WebQQ2 = txtWebQQ2.Text;
                model.SettlementCycle = txtSettlementCycle.Text;
                model.ChannelNum = txtChannelNum.Text;
                model.WebEmail = txtWebEmail.Text;
                model.WebCrod = txtWebCrod.Text;
                model.WebCopyright = txtWebCopyright.Text;

                model.WebKeywords = txtWebKeywords.Text.Trim();
                model.WebDescription = txtWebDescription.Text.Trim();
                model.WebLogStatus = int.Parse(rblWebLogStatus.SelectedValue);
                model.WebKillKeywords = txtWebKillKeywords.Text.Trim();

                model.WebProSize = int.Parse(txtWebProSize.Text.Trim());
                model.WebNewsSize = int.Parse(txtWebNewsSize.Text.Trim());
                model.WebFilePath = txtWebFilePath.Text;
                model.WebFileType = txtWebFileType.Text;
                model.WebFileSize = int.Parse(txtWebFileSize.Text.Trim());
                model.IsThumbnail = int.Parse(rblIsThumbnail.SelectedValue);
                model.ProWidth = int.Parse(txtProWidth.Text.Trim());
                model.ProHight = int.Parse(txtProHight.Text.Trim());
                model.IsWatermark = int.Parse(rblIsWatermark.SelectedValue.Trim());
                model.WatermarkStatus = int.Parse(rblWatermarkStatus.SelectedValue.Trim());
                model.ImgQuality = int.Parse(txtImgQuality.Text.Trim());
                model.ImgWaterPath = txtImgWaterPath.Text.Trim();
                model.ImgWaterTransparency = int.Parse(txtImgWaterTransparency.Text.Trim());
                model.WaterText = txtWaterText.Text.Trim();
                model.WaterFont = ddlWaterFont.SelectedValue;
                model.FontSize = int.Parse(txtFontSize.Text.Trim());
                model.ArtModelUrl = this.txtArtModelUrl.Text.Trim();
                model.ProModelUrl = this.txtProModelUrl.Text.Trim();
                model.DownModelUrl = this.txtDownModelUrl.Text.Trim();

                ////修改配置信息
                bll.saveConifg(model, Server.MapPath(Spread.Common.Param.WebSetpath));
                JscriptPrint("系统设置成功啦!", "admin_config.aspx", "Success");
            }
            catch(Exception ex)
            {

                JscriptMsg(350, 280, "错误提示", "<b>文件写入失败!</b>请检查是否有写入权限,如果没有,请联系管理员开启写入该文件的权限!" + ex.Message, "admin_config.aspx", "Error");
            }
        }
コード例 #5
0
ファイル: Default.aspx.cs プロジェクト: scutsky/iyuewan
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Request.Params["type"] != null)
         {
             type = Request.Params["type"].ToString();
         }
         else
         {
             type = "1";
         }
         string pathurl = Server.MapPath(ConfigurationManager.AppSettings["WebSetpath"].ToString());
         webset = bll.loadConfig(pathurl);
         info();
     }
 }
コード例 #6
0
ファイル: Admin_config.aspx.cs プロジェクト: scutsky/iyuewan
 public void LoadWevSet()
 {
     //取得配置信息
     Spread.Model.WebSet model = new Spread.Model.WebSet();
     //bll.Get_Config(rwc);
     string pathurl = Server.MapPath(ConfigurationManager.AppSettings["WebSetpath"].ToString());
     model = bll.loadConfig(pathurl);
     //赋值给对应的控件
     txtWebName.Text = model.WebName;
     txtWebUrl.Text = model.WebUrl;
     txtWebPath.Text = model.WebPath;
     txtWebLogPath.Text = model.WeblogPath;
     txtWebTel.Text = model.WebTel;
     txtWebFax.Text = model.WebFax;
     txtWebQQ1.Text = model.WebQQ1;
     txtWebQQ2.Text = model.WebQQ2;
     txtSettlementCycle.Text = model.SettlementCycle;
     txtChannelNum.Text = model.ChannelNum;
     txtWebEmail.Text = model.WebEmail;
     txtWebCrod.Text = model.WebCrod;
     txtWebCopyright.Text = model.WebCopyright;
     txtWebKeywords.Text = model.WebKeywords.ToString();
     txtWebDescription.Text = model.WebDescription.ToString();
     rblWebLogStatus.SelectedValue = model.WebLogStatus.ToString();
     txtWebKillKeywords.Text = model.WebKillKeywords.ToString();
     txtWebProSize.Text = model.WebProSize.ToString();
     txtWebNewsSize.Text = model.WebNewsSize.ToString();
     txtWebFilePath.Text = model.WebFilePath.ToString();
     txtWebFileType.Text = model.WebFileType.ToString();
     txtWebFileSize.Text = model.WebFileSize.ToString();
     rblIsThumbnail.SelectedValue = model.IsThumbnail.ToString();
     txtProWidth.Text = model.ProWidth.ToString();
     txtProHight.Text = model.ProHight.ToString();
     rblIsWatermark.SelectedValue = model.IsWatermark.ToString();
     rblWatermarkStatus.SelectedValue = model.WatermarkStatus.ToString();
     txtImgQuality.Text = model.ImgQuality.ToString();
     txtImgWaterPath.Text = model.ImgWaterPath.ToString();
     txtImgWaterTransparency.Text = model.ImgWaterTransparency.ToString();
     txtWaterText.Text = model.WaterText.ToString();
     ddlWaterFont.SelectedValue = model.WaterFont.ToString();
     txtFontSize.Text = model.FontSize.ToString();
     txtArtModelUrl.Text = model.ArtModelUrl.ToString();
     txtProModelUrl.Text = model.ProModelUrl.ToString();
     txtDownModelUrl.Text = model.DownModelUrl.ToString();
 }
コード例 #7
0
ファイル: Applay.aspx.cs プロジェクト: scutsky/iyuewan
 protected void Page_Load(object sender, EventArgs e)
 {
    
     if (!IsPostBack)
     {
         string pathurl = Server.MapPath(ConfigurationManager.AppSettings["WebSetpath"].ToString());
         webset = bll.loadConfig(pathurl);
         int num = int.Parse(webset.SettlementCycle);
         this.startDate.Text = DateTime.Now.AddDays(-num).ToString("yyyy-MM-dd");
         this.endDate.Text = DateTime.Now.ToString("yyyy-MM-dd");
         startDateStr = this.startDate.Text;
         endDateStr = this.endDate.Text;
         if (!getUserCookies())
         {
             Response.Redirect("~/Index.aspx");
         }
         else
         {
             modeluser = blluser.GetModelByName(uid);
             hduserid.Value = modeluser.ID.ToString();
             hdusername.Value = modeluser.Name.ToString();
             alipayPayeeName.Text = modeluser.TrueName;
             alipayPayeeAccount.Text = modeluser.PaypalAccount;
             getUserInfo(modeluser.ID);
         }
         DataTable dt = accBll.GetList(" and UserID='" + hduserid.Value + "' and CONVERT(varchar(100),ApplyTime,23)='"+DateTime.Now.ToString("yyyy-MM-dd")+"'  ").Tables[0];
         if (dt.Rows.Count >0)
         {
             if (dt.Rows[0]["Status"].ToString() == "待审核")
             {
                 this.btnSave.Enabled = false;
                 this.btnSave.Text = "已申请结算";
             }
             else
             {
                 this.btnSave.Enabled = false;
                 this.btnSave.Text = "已经结算";
             }
         }
         //ChannelData = rbll.GetList(" UserID='" + modeluser.ID + "'").Tables[0];
     }
 }
コード例 #8
0
        public bool SendMobileMsg(string msgContent, string strPhones)
        {
            try
            {
                Spread.BLL.WebSet bll = new Spread.BLL.WebSet();
                Spread.Model.WebSet webset = new Spread.Model.WebSet();
                //System.Web.HttpServerUtility httpmod = new HttpServerUtility();
                //string pathurl = httpmod.MapPath(System.Configuration.ConfigurationManager.AppSettings["WebSetpath"].ToString());
                //webset = bll.loadConfig(pathurl);
                string strUID = "500941270003";
                string strPWD = Function.MD5Encrypt("a123456");
                string strSMSURL = "http://dxhttp.c123.cn/tx/";

                bool result = false;
                //string strPhones = string.Join(";", destListPhones.ToArray());
                //strPhones += ";";
                Encoding encoding = System.Text.Encoding.GetEncoding("UTF-8");

                string postData = string.Format("uid={0}&pwd={1}&mobile={2}&content={3}", strUID, strPWD, strPhones, msgContent);

                byte[] data = encoding.GetBytes(postData);

                // 定义 WebRequest
                HttpWebRequest myRequest =
               (HttpWebRequest)WebRequest.Create(strSMSURL);

                myRequest.Method = "POST";
                myRequest.ContentType = "application/x-www-form-urlencoded";
                myRequest.ContentLength = data.Length;

                Stream newStream = myRequest.GetRequestStream();

                //发送数据
                newStream.Write(data, 0, data.Length);
                newStream.Close();

                // 得到 Response
                HttpWebResponse myResponse = (HttpWebResponse)myRequest.GetResponse();
                StreamReader reader = new StreamReader(myResponse.GetResponseStream(), Encoding.Default);
                string content = reader.ReadToEnd();

                if (content == "100")
                {
                    result = true;
                }
                else
                {
                    if (content == "101")
                    {
                        strMsg = "FALSE|验证失败!";
                        result = false;
                    }
                    else if (content == "102")
                    {
                        strMsg = "FALSE|短信不足!";
                        result = false;
                    }
                    else if (content == "103")
                    {
                        strMsg = "FALSE|操作失败!";
                        result = false;
                    }
                    else if (content == "104")
                    {
                        strMsg = "FALSE|非法字符!";
                        result = false;
                    }
                    else if (content == "105")
                    {
                        strMsg = "FALSE|内容过多!";
                        result = false;
                    }
                    else if (content == "106")
                    {
                        strMsg = "FALSE|号码过多!";
                        result = false;
                    }
                    else if (content == "107")
                    {
                        strMsg = "FALSE|频率过快!";
                        result = false;
                    }
                    else if (content == "108")
                    {
                        strMsg = "FALSE|号码内容空!";
                        result = false;
                    }
                    else if (content == "109")
                    {
                        strMsg = "FALSE|账号冻结!";
                        result = false;
                    }
                    else if (content == "110")
                    {
                        strMsg = "FALSE|禁止频繁单条发送!";
                        result = false;
                    }
                    else if (content == "111")
                    {
                        strMsg = "FALSE|系统暂定发送!";
                        result = false;
                    }
                    else if (content == "112")
                    {
                        strMsg = "FALSE|号码错误!";
                        result = false;
                    }
                    else if (content == "113")
                    {
                        strMsg = "FALSE|定时时间格式不对!";
                        result = false;
                    }
                    else if (content == "114")
                    {
                        strMsg = "FALSE|账号被锁,10分钟后登录!";
                        result = false;
                    }
                    else if (content == "115")
                    {
                        strMsg = "FALSE|连接失败!";
                        result = false;
                    }
                    else if (content == "116")
                    {
                        strMsg = "FALSE|禁止接口发送!";
                        result = false;
                    }
                    else if (content == "117")
                    {
                        strMsg = "FALSE|绑定IP不正确!";
                        result = false;
                    }
                    else if (content == "120")
                    {
                        strMsg = "FALSE|系统升级!";
                        result = false;
                    }
                    else
                    {
                        strMsg = "发送失败!";
                        result = false;
                    }
                }
                return result;
            }
            catch
            {
                return false;
            }

        }