⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 icard.aspx.cs

📁 最好用的站点内容管理系统 全部源代码都有
💻 CS
📖 第 1 页 / 共 2 页
字号:
//======================================================
//==     (c)2008 aspxcms inc by NeTCMS v1.0              ==
//==          Forum:bbs.aspxcms.com                   ==
//==         Website:www.aspxcms.com                  ==
//======================================================
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
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 NetCMS.Content;

public partial class manage_user_icard : NetCMS.Web.UI.ManagePage
{
    public manage_user_icard()
    {
        Authority_Code = "U024";
    }
    UserMisc rd = new UserMisc();
    UserList UL = new UserList();
    protected void Page_Load(object sender, EventArgs e)
    {
        this.PageNavigator1.OnPageChange += new PageChangeHandler(PageNavigator1_PageChange);
        if (!IsPostBack)
        {

            copyright.InnerHtml = CopyRight;            //获取版权信息
            Response.CacheControl = "no-cache";                        //设置页面无缓存
            #region 获得频道列表
            if (SiteID == "0")
            {
                string getSiteID = Request.QueryString["SiteID"];
                if (getSiteID != null && getSiteID != "")
                {
                    channelList.InnerHtml = SiteList(getSiteID);
                }
                else
                {
                    channelList.InnerHtml = SiteList(SiteID);
                }
            }
            #endregion 获得频道列表结束
            if (Request.QueryString["Type"] == "Del")
            {
                dels(Request.QueryString["id"].ToString());
            }
            #region 获得状态参数
            string islock = Request.QueryString["islock"];
            string isuse = Request.QueryString["isuse"];
            string isbuy = Request.QueryString["isbuy"];
            string timeout = Request.QueryString["timeout"];
            string ReqSite = Request.QueryString["SiteID"];
            string _islock = "";
            string _isuse = "";
            string _isbuy = "";
            string _timeout = "";
            string _SiteID = "";
            if (islock != "" && islock != null) { _islock = islock.ToString(); }
            if (isuse != "" && isuse != null) { _isuse = isuse.ToString(); }
            if (isbuy != "" && isbuy != null) { _isbuy = isbuy.ToString(); }
            if (timeout != "" && timeout != null) { _timeout = timeout.ToString(); }
            if (ReqSite != "" && ReqSite != null) { _SiteID = SiteID.ToString(); }
            #endregion 获得状态参数
            StartLoad(1, _islock, _isuse, _isbuy, _timeout, _SiteID, "", "");
        }
    }

    string SiteList(string SessionSiteID)
    {
        string siteStr = "<select class=\"form\" name=\"SiteID\" id=\"SiteID\" onChange=\"getchanelInfo(this)\">\r";
        DataTable crs = rd.getSiteList();
        if (crs != null)
        {
            for (int i = 0; i < crs.Rows.Count; i++)
            {
                string getSiteID = SessionSiteID;
                string SiteID1 = crs.Rows[i]["ChannelID"].ToString();
                if (getSiteID != SiteID1)
                {
                    siteStr += "<option value=\"" + crs.Rows[i]["ChannelID"] + "\">==" + crs.Rows[i]["CName"] + "==</option>\r";
                }
                else
                {
                    siteStr += "<option value=\"" + crs.Rows[i]["ChannelID"] + "\"  selected=\"selected\">==" + crs.Rows[i]["CName"] + "==</option>\r";
                }
            }
        }
        //}
        siteStr += "</select>\r";
        return siteStr;
    }

    /// <summary>
    /// 删除所有点卡
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void delAll(object sender, EventArgs e)
    {
        this.Authority_Code = "U027";
        this.CheckAdminAuthority();
        rd.delALLCARD();
        PageRight("删除所有点卡成功!", "icard.aspx");
    }
    /// <summary>
    /// dels 的摘要说明
    /// 删除点卡
    /// </summary>
    protected void dels(string aId)
    {
        this.Authority_Code = "U027";
        this.CheckAdminAuthority();
        if (aId != null && aId != "")
        {
            rd.del_userNews(aId,1);
            PageRight("删除点卡成功。", "icard.aspx");
        }
        else
        {
            PageError("请选择至少一个点卡<br />", "icard.aspx");
        }
    }

    /// <summary>
    /// delmul 的摘要说明
    /// 删除多个点卡传递中间函数
    /// </summary>
    protected void delmul(object sender, EventArgs e)
    {
        this.Authority_Code = "U027";
        this.CheckAdminAuthority();
        string ids = Request.Form["cid"];
        dels(ids);
    }

    /// <summary>
    /// islock 的摘要说明
    /// 锁定多个点卡传递中间函数
    /// </summary>
    protected void islock(object sender, EventArgs e)
    {
        this.Authority_Code = "U027";
        this.CheckAdminAuthority();
        string ids = Request.Form["cid"];
        lockActions(ids, 1);
    }

    /// <summary>
    /// unlock 的摘要说明
    /// 取消锁定多个点卡传递中间函数
    /// </summary>
    protected void unlock(object sender, EventArgs e)
    {
        this.Authority_Code = "U027";
        this.CheckAdminAuthority();
        string ids = Request.Form["cid"];
        lockActions(ids, 0);
    }

    /// <summary>
    /// timeout 的摘要说明
    /// 设置为过期传递中间函数
    /// </summary>
    protected void timeout(object sender, EventArgs e)
    {
        this.Authority_Code = "U027";
        this.CheckAdminAuthority();
        string ids = Request.Form["cid"];
        lockActions(ids, 2);
    }


    /// <summary>
    /// isuse 的摘要说明
    /// 设置为已使用传递中间函数
    /// </summary>
    protected void isuse(object sender, EventArgs e)
    {

        string ids = Request.Form["cid"];
        lockActions(ids, 4);
    }

    protected void unisuse(object sender, EventArgs e)
    {
        this.Authority_Code = "U027";
        this.CheckAdminAuthority();
        string ids = Request.Form["cid"];
        lockActions(ids, 5);
    }

    /// <summary>
    /// isbuy 的摘要说明
    /// 设置为已购买传递中间函数
    /// </summary>
    protected void isbuy(object sender, EventArgs e)
    {
        this.Authority_Code = "U027";
        this.CheckAdminAuthority();
        string ids = Request.Form["cid"];
        lockActions(ids, 6);
    }

    protected void unisbuy(object sender, EventArgs e)
    {
        this.Authority_Code = "U027";
        this.CheckAdminAuthority();
        string ids = Request.Form["cid"];

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -