예제 #1
0
        public static bool UpdateNewWebSite(NewWebSite nwst)
        {
            WebSite website = new WebSite();

            website.IconStyle   = nwst.banners.State + "|" + nwst.banners.Online + "|" + nwst.banners.Offline;
            website.InviteStyle = nwst.invites.State + "|" + nwst.invites.Bgimg + "|" + nwst.invites.Okimg + "|" + nwst.invites.Noimg;
            website.ChatStyle   = nwst.chatpage.State + "|" + nwst.chatpage.ChatPageBGImg + "|" + nwst.chatpage.ChatPageRightImg + "|" + nwst.chatpage.LeavePageTopImg;
            website.DomainName  = nwst.domainName;
            website.CompanyName = nwst.companyName;
            website.RegisterId  = nwst.accountId;
            website.IcoLocation = nwst.icoLocation;
            return(Update(website));
        }
예제 #2
0
        //取一行数据
        public static NewWebSite GetNewWebSiteByDomainName(string domainName)
        {
            WebSite website = Provider.GetModel(domainName);

            if (website == null)
            {
                return(null);
            }
            NewWebSite nwbt = new NewWebSite();

            string[] bannerStyle = website.IconStyle.Split('|');
            Banner   ban         = new Banner();

            if (newWebSiteState(bannerStyle[0]) && bannerStyle.Length == IconStyleLength)
            {
                ban.State   = bannerStyle[0];
                ban.Online  = bannerStyle[1];
                ban.Offline = bannerStyle[2];
            }
            nwbt.banners = ban;
            Invite ivt = new Invite();

            string[] invateStyle = website.InviteStyle.Split('|');
            if (newWebSiteState(invateStyle[0]) && invateStyle.Length == InviteStyleLength)
            {
                ivt.State = invateStyle[0];
                ivt.Bgimg = invateStyle[1];
                ivt.Okimg = invateStyle[2];
                ivt.Noimg = invateStyle[3];
            }
            nwbt.invites = ivt;
            ChatPage cpe = new ChatPage();

            string[] chatPageStyle = website.ChatStyle.Split('|');
            if (newWebSiteState(chatPageStyle[0]) && chatPageStyle.Length == ChatStyleLength)
            {
                cpe.State            = chatPageStyle[0];
                cpe.ChatPageBGImg    = chatPageStyle[1];
                cpe.ChatPageRightImg = chatPageStyle[2];
                cpe.LeavePageTopImg  = chatPageStyle[3];
            }
            nwbt.chatpage    = cpe;
            nwbt.companyName = website.CompanyName;
            nwbt.accountId   = website.RegisterId;
            nwbt.icoLocation = website.IcoLocation;
            nwbt.domainName  = website.DomainName;
            return(nwbt);
        }
예제 #3
0
    public void GetChatPageStyle()
    {
        LiveSupport.BLL.NewWebSite nwst = WebSiteManager.GetNewWebSiteByDomainName(CurrentVisitor.CurrentSession.DomainRequested);//用堿名取一行数
        if (nwst == null || nwst.chatpage == null)
        {
            return;
        }
        string chatImageUrl = null;

        if (nwst.chatpage.State == LiveSupport.BLL.WebSiteManager.WebSite_UserDefined)
        {
            chatImageUrl = "Images/" + AccountService.GetAccountById(CurrentVisitor.AccountId).AccountNumber + "/" + nwst.domainName + "/";
        }
        else
        {
            chatImageUrl = "Images/Default/";
        }
        this.ChatPageOfflineTopImage.ImageUrl = chatImageUrl + nwst.chatpage.LeavePageTopImg;
        this.chatPageRightImg.ImageUrl        = chatImageUrl + nwst.chatpage.ChatPageRightImg;
    }
예제 #4
0
 //添加域名
 protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
 {
     if (Session["User"] != null)
     {
         oepr = (Operator)Session["User"];
         if (WebSiteManager.GetWebSiteByDomainName(this.txtDomainName.Text) != null)
         {
             ClientScript.RegisterStartupScript(this.GetType(), "Error", "<script>alert('域名存在');</script>");
             return;
         }
         LiveSupport.BLL.NewWebSite  nwst= new LiveSupport.BLL.NewWebSite();
         LiveSupport.BLL.Banner bnr = new LiveSupport.BLL.Banner();
         bnr.State = LiveSupport.BLL.WebSiteManager.WebSite_Default;
         bnr.Offline = "offline0.JPG";
         bnr.Online = "online0.JPG";
         LiveSupport.BLL.Invite ivt = new LiveSupport.BLL.Invite();
         ivt.State = LiveSupport.BLL.WebSiteManager.WebSite_Default;
         ivt.Bgimg = "invite_bg0.gif";
         ivt.Noimg = "btn_no0.jpg";
         ivt.Okimg = "btn_ok0.jpg";
         LiveSupport.BLL.ChatPage cpg = new LiveSupport.BLL.ChatPage();
         cpg.State = LiveSupport.BLL.WebSiteManager.WebSite_Default;
         cpg.ChatPageBGImg = "chat_bg0.gif";
         cpg.ChatPageRightImg = "right_column_0.jpg";
         cpg.LeavePageTopImg = "topmove1.gif";
         nwst.banners = bnr;
         nwst.invites = ivt;
         nwst.chatpage = cpg;
         nwst.accountId = oepr.Account.AccountId;
         nwst.icoLocation = "0";
         nwst.domainName = this.txtDomainName.Text;
         if (WebSiteManager.AddNewWebSite(nwst))
         {
             Response.Redirect("GetCode.aspx?domain=" + this.txtDomainName.Text);
         }
     }
     else
     {
         Response.Redirect("../Default.aspx");
     }
 }
예제 #5
0
 //添加域名
 protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
 {
     if (Session["User"] != null)
     {
         oepr = (Operator)Session["User"];
         if (WebSiteManager.GetWebSiteByDomainName(this.txtDomainName.Text) != null)
         {
             ClientScript.RegisterStartupScript(this.GetType(), "Error", "<script>alert('域名存在');</script>");
             return;
         }
         LiveSupport.BLL.NewWebSite nwst = new LiveSupport.BLL.NewWebSite();
         LiveSupport.BLL.Banner     bnr  = new LiveSupport.BLL.Banner();
         bnr.State   = LiveSupport.BLL.WebSiteManager.WebSite_Default;
         bnr.Offline = "offline0.JPG";
         bnr.Online  = "online0.JPG";
         LiveSupport.BLL.Invite ivt = new LiveSupport.BLL.Invite();
         ivt.State = LiveSupport.BLL.WebSiteManager.WebSite_Default;
         ivt.Bgimg = "invite_bg0.gif";
         ivt.Noimg = "btn_no0.jpg";
         ivt.Okimg = "btn_ok0.jpg";
         LiveSupport.BLL.ChatPage cpg = new LiveSupport.BLL.ChatPage();
         cpg.State            = LiveSupport.BLL.WebSiteManager.WebSite_Default;
         cpg.ChatPageBGImg    = "chat_bg0.gif";
         cpg.ChatPageRightImg = "right_column_0.jpg";
         cpg.LeavePageTopImg  = "topmove1.gif";
         nwst.banners         = bnr;
         nwst.invites         = ivt;
         nwst.chatpage        = cpg;
         nwst.accountId       = oepr.Account.AccountId;
         nwst.icoLocation     = "0";
         nwst.domainName      = this.txtDomainName.Text;
         if (WebSiteManager.AddNewWebSite(nwst))
         {
             Response.Redirect("GetCode.aspx?domain=" + this.txtDomainName.Text);
         }
     }
     else
     {
         Response.Redirect("../Default.aspx");
     }
 }
예제 #6
0
 public static bool UpdateNewWebSite(NewWebSite nwst)
 {
     WebSite website = new WebSite();
     website.IconStyle = nwst.banners.State + "|" + nwst.banners.Online + "|" + nwst.banners.Offline;
     website.InviteStyle = nwst.invites.State + "|" + nwst.invites.Bgimg + "|" + nwst.invites.Okimg + "|" + nwst.invites.Noimg;
     website.ChatStyle = nwst.chatpage.State + "|" + nwst.chatpage.ChatPageBGImg + "|" + nwst.chatpage.ChatPageRightImg + "|" + nwst.chatpage.LeavePageTopImg;
     website.DomainName = nwst.domainName;
     website.CompanyName=nwst.companyName;
     website.RegisterId = nwst.accountId;
     website.IcoLocation = nwst.icoLocation;
     return Update(website);
 }
예제 #7
0
 //取一行数据
 public static NewWebSite GetNewWebSiteByDomainName(string domainName)
 {
     WebSite website=Provider.GetModel(domainName);
     if (website == null)
     {
         return null;
     }
     NewWebSite nwbt = new NewWebSite();
     string[] bannerStyle = website.IconStyle.Split('|');
     Banner ban = new Banner();
     if (newWebSiteState(bannerStyle[0])&&bannerStyle.Length==IconStyleLength)
     {
         ban.State = bannerStyle[0];
         ban.Online = bannerStyle[1];
         ban.Offline = bannerStyle[2];
     }
     nwbt.banners = ban;
     Invite ivt = new Invite();
     string[] invateStyle = website.InviteStyle.Split('|');
     if (newWebSiteState(invateStyle[0])&&invateStyle.Length==InviteStyleLength)
     {
         ivt.State = invateStyle[0];
         ivt.Bgimg = invateStyle[1];
         ivt.Okimg = invateStyle[2];
         ivt.Noimg = invateStyle[3];
     }
     nwbt.invites = ivt;
     ChatPage cpe = new ChatPage();
     string[] chatPageStyle = website.ChatStyle.Split('|');
     if (newWebSiteState(chatPageStyle[0])&&chatPageStyle.Length==ChatStyleLength)
     {
         cpe.State = chatPageStyle[0];
         cpe.ChatPageBGImg = chatPageStyle[1];
         cpe.ChatPageRightImg = chatPageStyle[2];
         cpe.LeavePageTopImg = chatPageStyle[3];
     }
     nwbt.chatpage = cpe;
     nwbt.companyName=website.CompanyName;
     nwbt.accountId = website.RegisterId;
     nwbt.icoLocation = website.IcoLocation;
     nwbt.domainName = website.DomainName;
     return nwbt;
 }