68 lines
2.6 KiB
C#
68 lines
2.6 KiB
C#
using System;
|
|
using System.Data;
|
|
using System.Configuration;
|
|
using System.Web;
|
|
using System.Net;
|
|
using System.IO;
|
|
using System.Security.Cryptography;
|
|
using System.Xml;
|
|
using System.Collections.Specialized;
|
|
using System.Text.RegularExpressions;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.Globalization;
|
|
using System.Web.Security;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using System.Web.UI.WebControls.WebParts;
|
|
using System.Web.UI.HtmlControls;
|
|
using Newtonsoft.Json;
|
|
namespace Mtxfw.shop
|
|
{
|
|
public partial class choujiang_sel : System.Web.UI.Page
|
|
{
|
|
/// <summary>
|
|
/// 填写你申请的登录资料
|
|
/// </summary>
|
|
public Mtxfw.Utility.Config config = new Mtxfw.Utility.Config();
|
|
public Mtxfw.DAL.user_info daoUser = new Mtxfw.DAL.user_info();
|
|
public Mtxfw.DAL.P_Product daoProduct = new Mtxfw.DAL.P_Product();
|
|
public string MemberName = "";
|
|
public int MemberId = 0;
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
|
|
if (!IsPostBack)
|
|
{
|
|
Page.Title = "在线抽奖 - " + config.webName;
|
|
Page.MetaDescription = "在线抽奖 - " + config.webName;
|
|
Page.MetaKeywords = "在线抽奖," + config.webName;
|
|
|
|
if (Session["MemberId"] != null && Session["MemberName"] != null)
|
|
{
|
|
MemberId = int.Parse(Session["MemberId"].ToString());
|
|
MemberName = Session["MemberName"].ToString();
|
|
Mtxfw.Model.user_info umodel = daoUser.GetModel(MemberId);
|
|
if (umodel != null)
|
|
{
|
|
if (umodel.Phone.Trim() == "")
|
|
{
|
|
ClientScript.RegisterStartupScript(this.GetType(), "", "<script type='text/javascript'>alert('请先修改您的手机号码等资料再来抽奖!');location.replace('/Member_Info.aspx?returnurl=/choujiang_sel.aspx');</script>");
|
|
}
|
|
else
|
|
{
|
|
if (!System.Text.RegularExpressions.Regex.IsMatch(umodel.Phone.Trim(), @"^[1]+[3,4,5,8]+\d{9}"))
|
|
{
|
|
ClientScript.RegisterStartupScript(this.GetType(), "", "<script type='text/javascript'>alert('您的手机号码格式填写不正确,请重新填写!');location.replace('/Member_Info.aspx?returnurl=/choujiang_sel.aspx');</script>");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
} |