145 lines
5.5 KiB
C#
145 lines
5.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using System.Data;
|
|
using System.Data.SqlClient;
|
|
using System.Data.OleDb;
|
|
namespace Mtxfw.VipSite
|
|
{
|
|
public partial class Admin_Member_groups : Mtxfw.Utility.MemberBase
|
|
{
|
|
Mtxfw.DAL.user_info daoUser = new Mtxfw.DAL.user_info();
|
|
Mtxfw.DAL.user_Results daoResults = new Mtxfw.DAL.user_Results();
|
|
Mtxfw.Utility.Config Config = new Mtxfw.Utility.Config("");
|
|
public string times = "", groups = "";
|
|
public int gtype = 0;
|
|
#region 判断页面是否刷新
|
|
private bool _refreshState;
|
|
private bool _isRefresh;
|
|
|
|
/// <summary>
|
|
/// 判断页面是否刷新
|
|
/// </summary>
|
|
public bool IsRefresh
|
|
{
|
|
get
|
|
{
|
|
return _isRefresh;
|
|
}
|
|
}
|
|
protected override void LoadViewState(object savedState)
|
|
{
|
|
object[] allStates = (object[])savedState;
|
|
base.LoadViewState(allStates[0]);
|
|
_refreshState = (bool)allStates[1];
|
|
_isRefresh = _refreshState == (bool)Session["__ISREFRESH"];
|
|
}
|
|
protected override object SaveViewState()
|
|
{
|
|
Session["__ISREFRESH"] = _refreshState;
|
|
object[] allStates = new object[2];
|
|
allStates[0] = base.SaveViewState();
|
|
allStates[1] = !_refreshState;
|
|
return allStates;
|
|
}
|
|
#endregion
|
|
protected override void OnLoad(EventArgs e)
|
|
{
|
|
base.OnLoad(e);
|
|
string hostname = Request.Url.Host;
|
|
if (!IsPostBack)
|
|
{
|
|
if (Session["IFPassword"] == null)
|
|
{
|
|
Response.Redirect("/Member_IFPassword.aspx?Url=/Admin_Member_groups.aspx");
|
|
}
|
|
if (IFStores != 1)
|
|
{
|
|
Mtxfw.Utility.Tools.Message("您没有权限!", "/gl.aspx");
|
|
}
|
|
if (MemberJS.IndexOf("入群管理") == -1)
|
|
{
|
|
Mtxfw.Utility.Tools.Message("您没有权限!", "/gl.aspx");
|
|
}
|
|
|
|
Data_Bind();
|
|
Page.Title = "入群管理 - " + GetWebName;
|
|
}
|
|
Btn_Save.Click += delegate(object s, EventArgs ex)
|
|
{
|
|
bool b = true;
|
|
|
|
Config.webMoney155 = txtgroups.Value;
|
|
|
|
Config.Save();
|
|
|
|
Model.User_CZ_log logmodel = new Model.User_CZ_log();
|
|
logmodel.MemberId = Card;
|
|
logmodel.AddTime = DateTime.Now;
|
|
logmodel.IP = Mtxfw.Utility.Common.GetIP;
|
|
logmodel.Body = "修改系统设置";
|
|
logmodel.UType = 0;
|
|
logmodel.gtype = gtype;
|
|
new DAL.User_CZ_log().Add(logmodel);
|
|
|
|
ClientScript.RegisterStartupScript(this.GetType(), "", "<script type='text/javascript'>alert('更新成功!');location.href='/Admin_Member_groups.aspx';</script>");
|
|
|
|
};
|
|
}
|
|
|
|
protected void Data_Bind()
|
|
{
|
|
|
|
if (Config.webMoney155 != "")
|
|
{
|
|
string[] astr = Config.webMoney155.Split('|');
|
|
int i = 0;
|
|
foreach (string str in astr)
|
|
{
|
|
if (str != "")
|
|
{
|
|
string[] astr1 = str.Split(',');
|
|
string stitle = "";
|
|
if (astr1.Length > 0)
|
|
{
|
|
stitle = astr1[0];
|
|
}
|
|
string sname = "";
|
|
if (astr1.Length > 1)
|
|
{
|
|
sname = astr1[1];
|
|
}
|
|
string shm = "";
|
|
if (astr1.Length > 2)
|
|
{
|
|
shm = astr1[2];
|
|
}
|
|
string spic = "";
|
|
if (astr1.Length > 3)
|
|
{
|
|
spic = astr1[3];
|
|
}
|
|
if (spic != "")
|
|
{
|
|
if (spic.IndexOf("http") == -1)
|
|
{
|
|
spic = Config.webUrl + Mtxfw.Utility.Common.GetCoverPic(spic, "220x220", "cut");
|
|
}
|
|
else
|
|
{
|
|
spic = (spic + "?imageView2/2/w/100/h/100/q/75");
|
|
}
|
|
}
|
|
groups += "<ul class=\"addimagebox_box\" id=\"addimagebox_box" + i + "\"><li><input id=\"texttitle\" type=\"text\" value=\"" + stitle + "\" /></li><li><input id=\"textname\" type=\"text\" value=\"" + sname + "\" /></li><li><input id=\"texthm\" type=\"text\" value=\"" + shm + "\" /></li><li class=\"uploadimage\" onclick=\"uploadimage("+i+")\" ><img src=\""+(spic!=""? spic : "images/num_add_visited.png") + "\" /><input type=\"hidden\" id=\"hiddenphoto\" value=\""+ spic + "\" /></li><li class=\"textcz\"><input id=\"delbtn\" onclick=\"ondelgroup(" + i + ")\" class=\"abtn\" type=\"button\" value=\"删除\" /></li></ul>";
|
|
|
|
i += 1;
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
} |