Exemple #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        xc.CheckAdminLogin("|" + typeClss + "|");
        if (!IsPostBack)
        {
            XabaraClass xClass = new XabaraClass();
            xClass.NewsTypeData(typeClss, DropDownListClass);
            if (!string.IsNullOrEmpty(Session[typeClss] as string))
            {
                this.DropDownListClass.Items.FindByValue(Session[typeClss].ToString().Trim()).Selected = true;
            }
            else
            {
                this.DropDownListClass.Items.FindByText("== 新增根分类 ==").Selected = true;
            }
            xClass.getTreeList(typeClss, treeList, string.Empty, "top", false, true, false);

            FormCheck fCheck = new FormCheck();
            classListRegExpre.ValidationExpression = fCheck.RegExpressionValidator("number", 0, 0, false);
            classListRegExpre.ErrorMessage         = fCheck.RegExpressionValidator("number", 0, 0, true);
            classUrlRegExpre.ValidationExpression  = fCheck.RegExpressionValidator("urlHttp", 0, 0, false);
            classUrlRegExpre.ErrorMessage          = fCheck.RegExpressionValidator("urlHttp", 0, 0, true);

            titleClass.Text = Server.UrlDecode(xc.SafeSql(Request["title"]));
        }
    }
Exemple #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        XabaraCom xc = new XabaraCom();
        xc.CheckAdminLogin("|adminDel|");

        if (!xc.adminID.Equals(xc.SafeSql(Request["id"].Trim()).ToString()))
        {
            string returnValue = new dbDataFunction().DelDB("AdminUser", "UserId", xc.SafeSql(Request["id"].Trim()).ToString(), string.Empty, false, string.Empty);

            xc.insertMyLog(xc.adminID, "admin", "删除管理员");

            xc.divError("", returnValue, 350, 150, "userList.aspx", "goto");
        }
        else
        {
            xc.divError("", "不会吧,删除自己呀!", 350, 150, "userList.aspx", "goto");
        }
    }
Exemple #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        XabaraCom xc = new XabaraCom();

        xc.CheckAdminLogin("|adminDel|");

        if (!xc.adminID.Equals(xc.SafeSql(Request["id"].Trim()).ToString()))
        {
            string returnValue = new dbDataFunction().DelDB("AdminUser", "UserId", xc.SafeSql(Request["id"].Trim()).ToString(), string.Empty, false, string.Empty);

            xc.insertMyLog(xc.adminID, "admin", "删除管理员");

            xc.divError("", returnValue, 350, 150, "userList.aspx", "goto");
        }
        else
        {
            xc.divError("", "不会吧,删除自己呀!", 350, 150, "userList.aspx", "goto");
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        xc.CheckAdminLogin("|adminExe|");

        if (!IsPostBack)
        {
            string    strSqlread = "select UserID,UserName,UserAdmin from AdminUser where userID='" + xc.SafeSql(Request["id"].Trim()) + "'";
            DataTable dtRead     = db.getDataTable(strSqlread);
            if (dtRead.Rows.Count > 0 && xc.SafeSql(Request["id"].Trim()) != xc.adminID)
            {
                if (dtRead.Rows[0]["UserAdmin"].ToString().Trim().Equals("xabaraCOM"))
                {
                    xc.divError("", dtRead.Rows[0]["UserID"].ToString().Trim() + " 已是超级管理员,不需设置相应权限!", 380, 150, "userList.aspx", "goto");
                }
                string userAdminStr = dtRead.Rows[0]["UserAdmin"].ToString();

                uid.Text = dtRead.Rows[0]["UserName"].ToString() + "[" + dtRead.Rows[0]["UserID"].ToString() + "]";
                DataTable dt;

                dt = db.getDataTable("select * from classAdmin order by listID ASC ");
                if (dt.Rows.Count > 0)
                {
                    string ifType  = string.Empty;
                    string bgColor = string.Empty;
                    selectPopedomHtm.Text = "<table border='0' align='left' class='tableAdminLine'><tr>";
                    for (int p = 0; p < dt.Rows.Count; p++)
                    {
                        if (!ifType.Equals(dt.Rows[p]["listClass"].ToString().Trim()) && p > 0)  //控制回车
                        {
                            selectPopedomHtm.Text += "</tr><tr>";
                        }
                        ifType = dt.Rows[p]["listClass"].ToString().Trim();

                        string selectValue = dt.Rows[p]["classCode"].ToString().Trim();
                        string selectBool  = string.Empty;
                        if (userAdminStr.IndexOf(@"|" + selectValue + "|") >= 0)
                        {
                            selectBool = @" checked='checked'";
                        }

                        selectPopedomHtm.Text += "<td style='background-color:#f5fdfe;'><input name='adminPopedomSelect' type='checkbox' id='adminPopedomSelect' value='" + selectValue + "'" + selectBool + " />" + dt.Rows[p]["className"].ToString().Trim() + "</td>";
                    }
                    selectPopedomHtm.Text += "</tr></table>";
                }
                dt.Dispose();
            }
            else
            {
                xc.divError("", "您的操作有误!", 350, 150, "userList.aspx", "goto");
            }
            dtRead.Dispose();
        }
    }
Exemple #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        xc.CheckAdminLogin(string.Empty);

        if (!IsPostBack)
        {
            flag.Items.Add(new ListItem("图片:" + XmlReader.GetConfig(Server.MapPath("~/xabara.config"), "UploadImgType"), "Img"));
            flag.Items.Add(new ListItem("文件:" + XmlReader.GetConfig(Server.MapPath("~/xabara.config"), "UploadFileType"), "File"));
            flag.Items.Add(new ListItem("Flash:" + XmlReader.GetConfig(Server.MapPath("~/xabara.config"), "UploadFlashType"), "Flash"));
            this.indexPicSet.Items.Add(new ListItem("== 上传图片后可选择其中一张作为首页面的预览图 ==", string.Empty));
            string upImgTemp = string.Empty;

            int imgCount = 0;
            if (xc.SafeSql(Request["postType"]).Equals("edit")) //修改信息
            {
                string    strSql = "select fileName from upFileName where fileFlag='Img' and fileID='" + Session["upFileID"].ToString() + "' order by Fid ASC ";
                DataTable dt     = db.getDataTable(strSql);

                this.indexPicSet.Items.Clear();

                imgCount = dt.Rows.Count;

                if (imgCount > 0)
                {
                    this.indexPicSet.Items.Add(new ListItem("== 选择或取消页面预览图 ==", string.Empty));
                }

                if (imgCount == 0)
                {
                    this.indexPicSet.Items.Add(new ListItem("== 上传图片后可选择其中一张作为首页面的预览图 ==", string.Empty));
                }

                for (int i = 0; i < imgCount; i++)
                {
                    string fileNameStr = dt.Rows[i]["fileName"].ToString().Trim();
                    this.indexPicSet.Items.Add(new ListItem(fileNameStr, fileNameStr));
                }
                this.indexPicSet.DataBind();
            }

            if (!String.IsNullOrEmpty(Session["upPreFile"] as string) && imgCount > 0)
            {
                upImgTemp = Session["upPreFile"].ToString().Trim();

                this.indexPicSet.Items.FindByText(upImgTemp).Selected  = true;
                this.indexPicSet.Items.FindByValue(upImgTemp).Selected = true;

                preImage.Visible  = true;   //预览图
                preImage.ImageUrl = xc.UploadFolder.ToString() + upImgTemp.Substring(5, 8) + "/" + upImgTemp;
            }
        }
    }
Exemple #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        XabaraCom xc = new XabaraCom();
        xc.CheckAdminLogin("|adsDel|");

        dbDataFunction db = new dbDataFunction();
        string returnValue = string.Empty;

        long idTemp = xc.SafeNum(Request["id"].Trim());

        returnValue = db.DelDB("ads", "aID", xc.SafeSql(Request["id"].Trim()).ToString(), string.Empty, false, "adImg");

        xc.insertMyLog(xc.adminID, "admin", "删除广告");

        xc.divError("", returnValue, 350, 150, Server.UrlDecode(xc.errorUrlTwo), "goto");
    }
Exemple #7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        XabaraCom xc = new XabaraCom();

        xc.CheckAdminLogin("|adsDel|");

        dbDataFunction db          = new dbDataFunction();
        string         returnValue = string.Empty;

        long idTemp = xc.SafeNum(Request["id"].Trim());

        returnValue = db.DelDB("ads", "aID", xc.SafeSql(Request["id"].Trim()).ToString(), string.Empty, false, "adImg");

        xc.insertMyLog(xc.adminID, "admin", "删除广告");

        xc.divError("", returnValue, 350, 150, Server.UrlDecode(xc.errorUrlTwo), "goto");
    }
Exemple #8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        xc.CheckAdminLogin(string.Empty);

        long   cidTemp    = xc.SafeNum(Request["cid"]);
        string strSql     = string.Empty;
        string ifStr      = string.Empty;
        string keyWordStr = xc.SafeSql(Server.UrlDecode(Request["keyWords"]));

        if (!IsPostBack)
        {
            xClass.NewsTypeData("department", classList);

            if (cidTemp > 0) //分类读取
            {
                string idNums = xClass.getClassAllID("department", cidTemp);

                if (!idNums.Equals(cidTemp.ToString()))
                {
                    string[] ids = idNums.Split(new char[] { ',' });
                    for (int i = 0; i <= ids.GetUpperBound(0); i++)
                    {
                        ifStr += "classID=" + ids[i].ToString().Trim() + " or ";
                    }
                    ifStr = " and (" + ifStr.Substring(0, ifStr.Length - 3) + ")";
                }
                else
                {
                    ifStr += " and classID=" + cidTemp.ToString().Trim();
                }
                this.classList.Items.FindByValue(cidTemp.ToString()).Selected = true;
            }
            if (!string.IsNullOrEmpty(keyWordStr as string))
            {
                ifStr       += " and (UserName like '%" + keyWordStr + "%' or UserId like '%" + keyWordStr + "%') ";
                keyWord.Text = keyWordStr;
            }
            strSql = "select * from AdminUser where classID>0 " + ifStr + " Order By LoginDate desc";
            //Response.Write(strSql);

            lblCurrentPage.Text = new dbDataFunction().RepeaterDB(RepeaterList, strSql, "&keyWords=" + keyWordStr, 20, "page", "center", true);
        }
    }
Exemple #9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        xc.CheckAdminLogin(string.Empty);

        string uID     = xc.SafeSql(Request["id"]).Trim();
        string ifStr   = string.Empty;
        string pageStr = string.Empty;

        if (!uID.Equals("a"))
        {
            ifStr = " and userCardID='" + uID + "'";
        }
        else
        {
            //ifStr = " and userID<>'xabara'";
            pageStr = "&id=a";
        }

        string strSql = "select * from logLogin where userType='admin' " + ifStr + " order by id DESC";

        lblCurrentPage.Text = new dbDataFunction().RepeaterDB(RepeaterList, strSql, pageStr, 20, "page", "center", true);
    }
Exemple #10
0
    protected void addAdmin_Click(object sender, EventArgs e)
    {
        string adminIDTemp = xc.SafeSql(adminID.Text.Trim().ToLower());
        string strSql      = "select * from AdminUser where userID='" + adminIDTemp + "'";

        if (db.getDataTable(strSql).Rows.Count > 0)
        {
            xc.divError("", "已存在该管理员!", 350, 150, "", "");
        }
        else
        {
            string dimStr = "@UserId,@UserName,@UserPW,@SessionError,@loginFlag,@LoginNum,@RegDate,@LoginDate,@LoginIP,@classID";

            string[] strValue = new string[10];
            strValue[0] = adminIDTemp;
            strValue[1] = adminName.Text.Trim();
            strValue[2] = xc.GetMd5(adminPW.Text.Trim());
            strValue[3] = "xabara.com";
            strValue[4] = "1";
            strValue[5] = "0";
            strValue[6] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
            strValue[7] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
            strValue[8] = xc.GetIP().ToString();
            strValue[9] = adminClass.Text;

            if (db.InsertUpdateDB("AdminUser", dimStr, strValue, string.Empty).Equals("发布成功"))
            {
                xc.insertMyLog(xc.adminID, "admin", "添加管理员:" + adminIDTemp);
                xc.divError("", "添加管理员成功,需对 " + adminName.Text.Trim() + " 进行权限设置后才可以正常登陆!", 500, 200, "userPopedom.aspx?id=" + adminIDTemp, "goto");
            }
            else
            {
                xc.divError("", "添加管理员失败!", 350, 150, "", "");
            }
        }
    }
Exemple #11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        xc.CheckAdminLogin(string.Empty);

        XabaraClass xClass = new XabaraClass();

        if (!IsPostBack)
        {
            string uidTemp = xc.adminID;

            Uid.Text = uidTemp;

            xClass.NewsTypeData("department", adminClass);

            string    strSql = "select * from AdminUser where userID='" + uidTemp + "'";
            DataTable dt     = db.getDataTable(strSql);

            if (dt.Rows.Count > 0)
            {
                adminName.Text = dt.Rows[0]["UserName"].ToString().Trim();

                int    cID     = Convert.ToInt32(dt.Rows[0]["classID"].ToString().Trim());
                string cidName = xClass.getClass(cID, string.Empty, string.Empty);
                if (string.IsNullOrEmpty(cidName as string))
                {
                    if (cID > 0)
                    {
                        cidName = "原分类已被删除,请重新选择!";
                        this.adminClass.Items.Add(new ListItem("== 请选择 ==", ""));
                        this.adminClass.Items.FindByValue(string.Empty).Selected = true;
                    }
                    else
                    {
                        this.adminClass.Items.Add(new ListItem("超级管理员", "0"));
                        this.adminClass.Items.FindByValue(cID.ToString()).Selected = true;
                    }
                }
                else
                {
                    this.adminClass.Items.FindByValue(cID.ToString()).Selected = true;
                }

                classLab.Text = cidName;
                if (dt.Rows[0]["UserAdmin"].ToString().Trim().Equals("xabaraCOM") && !string.IsNullOrEmpty(xc.SafeSql(Request["uid"]) as string))
                {
                    adminClass.Visible          = true;
                    adminClassValidator.Visible = true;
                }

                oldPWHidden.Value = dt.Rows[0]["UserPW"].ToString().Trim();
                adminMail.Text    = dt.Rows[0]["userEmail"].ToString().Trim();
                adminTel.Text     = dt.Rows[0]["userTel"].ToString().Trim();
                adminMobile.Text  = dt.Rows[0]["userMobile"].ToString().Trim();
                adminQQ.Text      = dt.Rows[0]["userQQ"].ToString().Trim();
            }
            else
            {
                xc.divError("", "您的操作有误!", 350, 150, "userList.aspx", "goto");
            }
            dt.Dispose();

            FormCheck fCheck = new FormCheck();
            adminNameRegularExpressionValidator.ValidationExpression = fCheck.RegExpressionValidator("chinese", 0, 0, false);
            adminNameRegularExpressionValidator.ErrorMessage         = fCheck.RegExpressionValidator("chinese", 0, 0, true);
            adminPWRegularExpressionValidator.ValidationExpression   = fCheck.RegExpressionValidator("passWord", 0, 0, false);
            adminPWRegularExpressionValidator.ErrorMessage           = fCheck.RegExpressionValidator("passWord", 0, 0, true);
            mailRegularExpressionValidator.ValidationExpression      = fCheck.RegExpressionValidator("email", 0, 0, false);
            mailRegularExpressionValidator.ErrorMessage           = fCheck.RegExpressionValidator("email", 0, 0, true);
            telRegularExpressionValidator.ValidationExpression    = fCheck.RegExpressionValidator("phone", 0, 0, false);
            telRegularExpressionValidator.ErrorMessage            = fCheck.RegExpressionValidator("phone", 0, 0, true);
            mobileRegularExpressionValidator.ValidationExpression = fCheck.RegExpressionValidator("mobile", 0, 0, false);
            mobileRegularExpressionValidator.ErrorMessage         = fCheck.RegExpressionValidator("mobile", 0, 0, true);
            qqRegularExpressionValidator.ValidationExpression     = fCheck.RegExpressionValidator("qq", 0, 0, false);
            qqRegularExpressionValidator.ErrorMessage             = fCheck.RegExpressionValidator("qq", 0, 0, true);
        }
    }
Exemple #12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string classNav = "找店铺_ZDianPU.com";

        if (!IsPostBack)
        {
            DataTable dt;

            dt = db.getDataTable("select top 5 Tid,TreeName from NewsTree where taobaoKe<>'' order by newid() ");
            for (int i = 0; i < 5; i++)
            {
                ppRnd.Text += "<a href=\"/" + dt.Rows[i]["Tid"].ToString().Trim() + ".htm\" target=\"_blank\" title=\"查看 " + dt.Rows[i]["TreeName"].ToString().Trim() + "\" alt=\"查看 " + dt.Rows[i]["TreeName"].ToString().Trim() + "\">" + dt.Rows[i]["TreeName"].ToString().Trim() + "</a>";
                if (i < 4)
                {
                    ppRnd.Text += "&nbsp;<span class=\"headLine\">|</span>&nbsp;";
                }
            }
            dt.Dispose();
            ad468.Text = ad.getAdCode(0, 468, 60, 1, 0, true, string.Empty);

            long cidTemp = xc.SafeNum(Request.QueryString["id"]);
            if (cidTemp < 1)
            {
                string urlID = Page.RouteData.Values["cID"].ToString();
                urlID   = urlID.Replace(".htm", "");
                cidTemp = xc.SafeNum(urlID);
            }
            //Response.Write(cidTemp.ToString());
            listTop.Text = "<a href=\"" + cidTemp.ToString() + ".htm\" target=\"_top\">默认</a>";

            string ifStr     = string.Empty;
            string pageStr   = string.Empty;
            string searchStr = xc.SafeSql(Server.UrlDecode(Request["keyWord"]));
            string searchIf  = string.Empty;
            string orderBy   = " Order By isGood desc,volume DESC";
            long   sale      = xc.SafeNum(Request.QueryString["sale"]);
            if (sale > 0)
            {
                listTop.Text += "&nbsp;&nbsp;<a href=\"" + cidTemp.ToString() + ".htm?sale=1\" style=\"color:#cb0201; font-weight:bold;\" target=\"_top\">销售</a>";
                orderBy       = " Order By volume DESC";
                pageStr      += "&sale=1";
            }
            else
            {
                listTop.Text += "&nbsp;&nbsp;<a href=\"" + cidTemp.ToString() + ".htm?sale=1\" target=\"_top\">销售</a>";
            }
            long price = xc.SafeNum(Request.QueryString["price"]);
            if (price > 0)
            {
                listTop.Text += "&nbsp;&nbsp;<a href=\"" + cidTemp.ToString() + ".htm?price=1\" style=\"color:#cb0201; font-weight:bold;\" target=\"_top\">价格</a>";
                orderBy       = " Order By price ASC";
                pageStr      += "&price=1";
            }
            else
            {
                listTop.Text += "&nbsp;&nbsp;<a href=\"" + cidTemp.ToString() + ".htm?price=1\" target=\"_top\">价格</a>";
            }

            navClass.Text = xClass.getClass(cidTemp, "*.htm", "");

            if (!string.IsNullOrEmpty(searchStr as string))
            {
                if (xc.SafeNum(searchStr) > 0)
                {
                    searchIf = " and num_iid=" + searchStr;
                }
                else
                {
                    searchIf = " and title like '%" + searchStr + "%'";
                }

                searchWord.Text = HttpUtility.HtmlEncode(searchStr);
                pageStr         = "&keyWord=" + Server.UrlEncode(searchStr);

                classNav      = "搜索结果";
                navClass.Text = classNav;
            }

            dt = db.getDataTable("select Tid,TreeID,treeNameTxt,idLayerStr from newsTree where Tid=" + cidTemp.ToString());
            if (dt.Rows.Count > 0)
            {
                string tID    = dt.Rows[0]["Tid"].ToString().Trim();
                string treeID = dt.Rows[0]["TreeID"].ToString().Trim();
                classNav = dt.Rows[0]["treeNameTxt"].ToString().Trim();

                //读取二级分类
                string id = dt.Rows[0]["idLayerStr"].ToString().Trim();
                if (!string.IsNullOrEmpty(id as string))
                {
                    string[] bigID = id.Split(new char[] { '|' });
                    id = bigID[1];
                }
                else
                {
                    id = cidTemp.ToString();
                }
                dt = db.getDataTable("select Tid,TreeName from NewsTree where TreeID=" + id + " order by ListID ASC,Tid ASC");
                for (int l = 0; l < dt.Rows.Count; l++)
                {
                    string css     = string.Empty;
                    long   tidTree = xc.SafeNum(dt.Rows[l]["Tid"].ToString().Trim());
                    if (tidTree == cidTemp || classNav.IndexOf(dt.Rows[l]["TreeName"].ToString().Trim() + "&nbsp;") > -1)
                    {
                        css = " style=\"color:#cb0201; font-weight:bold;\"";
                    }
                    navList.Text += "<a href=\"" + tidTree.ToString() + ".htm\" target=\"_top\" " + css + ">" + dt.Rows[l]["TreeName"].ToString().Trim() + "</a>&nbsp;&nbsp;";
                }
                dt.Dispose();

                //读取品牌
                ppClass.Text = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:960px;\">";
                dt           = db.getDataTable("select Tid,TreeName from newsTree where taobaoKe<>'' and TreeID=" + treeID + " order by ListID ASC,Tid ASC");
                if (dt.Rows.Count > 0)
                {
                    for (int p = 0; p < dt.Rows.Count; p++)
                    {
                        if ((p + 1) % 6 == 1)
                        {
                            ppClass.Text += "<tr>";
                        }
                        string css     = string.Empty;
                        long   tidTree = xc.SafeNum(dt.Rows[p]["Tid"].ToString().Trim());
                        if (tidTree == cidTemp)
                        {
                            css = " style=\"color:#cb0201; font-weight:bold;\"";
                        }
                        ppClass.Text += "<td style=\"height:22px; line-height:22px; text-align:left; width:160px;\"><a href=\"" + tidTree.ToString() + ".htm\" target=\"_top\" " + css + ">" + dt.Rows[p]["TreeName"].ToString().Trim() + "</a></td>";
                        if ((p + 1) % 6 == 0)
                        {
                            ppClass.Text += "</tr>";
                        }
                    }
                }
                else
                {
                    dt = db.getDataTable("select Tid,TreeName from newsTree where taobaoKe<>'' and idLayerStr like '%|" + tID + "|%' order by ListID ASC,Tid ASC");
                    if (dt.Rows.Count > 0)
                    {
                        for (int p = 0; p < dt.Rows.Count; p++)
                        {
                            if ((p + 1) % 6 == 1)
                            {
                                ppClass.Text += "<tr>";
                            }
                            string css     = string.Empty;
                            long   tidTree = xc.SafeNum(dt.Rows[p]["Tid"].ToString().Trim());
                            if (tidTree == cidTemp)
                            {
                                css = " style=\"color:#cb0201; font-weight:bold;\"";
                            }
                            ppClass.Text += "<td style=\"height:22px; line-height:22px; text-align:left; width:160px;\"><a href=\"" + tidTree.ToString() + ".htm\" target=\"_top\" " + css + ">" + dt.Rows[p]["TreeName"].ToString().Trim() + "</a></td>";
                            if ((p + 1) % 6 == 0)
                            {
                                ppClass.Text += "</tr>";
                            }
                        }
                    }
                }
            }
            dt.Dispose();
            ppClass.Text += "</table>";

            //导航
            headMenu.Text = "<td valign=\"middle\" class=\"headBg1\"><a href=\"/\" target=\"_top\" class=\"head\">网站首页</a></td>";
            dt            = db.getDataTable("select Tid,TreeName from newsTree where TreeID=0 and TreeType='taobaoke' order by ListID ASC,Tid ASC");
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                string tid       = dt.Rows[i]["Tid"].ToString().Trim();
                string treeName  = dt.Rows[i]["TreeName"].ToString().Trim();
                string className = "headBg1";
                if (xc.SafeNum(tid) == cidTemp || classNav.IndexOf(treeName + "&nbsp;") > -1)
                {
                    className = "headBg2";
                }

                headMenu.Text += "<td valign=\"middle\" class=\"" + className + "\"><a href=\"/" + tid + ".htm\" target=\"_top\" class=\"head\">" + treeName + "</a></td>";
            }
            headMenu.Text += "<td valign=\"middle\" class=\"headBg1\"><a href=\"/huabao/default.htm\" target=\"_top\" class=\"head\">图搜画报</a></td><td valign=\"middle\" class=\"headBg1\"><a href=\"/huabao/\" target=\"_top\" class=\"head\">画报淘宝</a></td>";
            dt.Dispose();

            if (cidTemp > 0)
            {
                string cidStr = xClass.getClassAllID("taobaoke", cidTemp); //得到所有ID

                if (cidStr.IndexOf(",") > 0)
                {
                    string[] ids = cidStr.Split(new char[] { ',' });
                    for (int i = 0; i <= ids.GetUpperBound(0); i++)
                    {
                        ifStr += " select * from taobaoke where classID=" + ids[i].ToString().Trim() + searchIf + " union ";
                    }
                }
                else
                {
                    ifStr = " select * from taobaoke where classID=" + cidTemp.ToString().Trim() + searchIf + " union ";
                }
            }
            else
            {
                ifStr = " select * from taobaoke where isBad=1 " + searchIf + " union ";
            }

            ifStr = "(" + ifStr.Substring(0, ifStr.Length - 6) + ") as news";

            string strSql = "select top 3000 * from " + ifStr + orderBy;
            //Response.Write(strSql);
            //Response.End();
            lblCurrentPage.Text = db.RepeaterDB(RepeaterList, strSql, pageStr, 30, "page", "right", true);
            string[] inputStr = lblCurrentPage.Text.Replace("<!-- input -->", "@").Split(new char[] { '@' });
            pageTop.Text = inputStr[0] + "</tr></table>";
            if (this.RepeaterList.Items.Count < 1)
            {
                if (string.IsNullOrEmpty(searchStr as string))
                {
                    errInfo.Text   = "目前暂没有任何信息!";
                    errDiv.Visible = true;
                }
                else
                {
                    //即时搜索淘宝客显示商品
                    string     appkey             = XmlReader.GetConfig(Server.MapPath("~/xabara.config"), "taobaoKeAppKey");
                    string     appsecret          = XmlReader.GetConfig(Server.MapPath("~/xabara.config"), "taobaoKeAppSecret");
                    string     url                = XmlReader.GetConfig(Server.MapPath("~/xabara.config"), "taobaoKeUrl");
                    string     alimamaID          = XmlReader.GetConfig(Server.MapPath("~/xabara.config"), "taobaoKeAlimamaID"); //淘宝客推广ID
                    ITopClient client             = new DefaultTopClient(url, appkey, appsecret);
                    TaobaokeListurlGetRequest req = new TaobaokeListurlGetRequest();
                    req.Q    = searchStr;
                    req.Nick = alimamaID;
                    TaobaokeListurlGetResponse response = client.Execute(req);

                    Response.Redirect(response.TaobaokeItem.KeywordClickUrl, true);
                }
            }
            else
            {
                errDiv.Visible = false;
            }

            //热搜关键词
            string   hot     = XmlReader.GetConfig(Server.MapPath("~/xabara.config"), "hotSearch");
            string[] hotWord = hot.Split(new char[] { ',' });
            for (int h = 0; h <= hotWord.GetUpperBound(0); h++)
            {
                hotSearch.Text += "<a href=\"/search.htm?keyWord=" + Server.UrlEncode(hotWord[h]) + "\" target=\"_top\" title=\"搜索 " + hotWord[h] + "\">" + hotWord[h] + "</a>&nbsp;";
            }

            xc.webMeta(this.Page, XmlReader.GetConfig(Server.MapPath("~/xabara.config"), "KeyWord"), XmlReader.GetConfig(Server.MapPath("~/xabara.config"), "metaStr"));
        }

        this.Page.Title = classNav + " " + XmlReader.GetConfig(Server.MapPath("~/xabara.config"), "webName") + XmlReader.GetConfig(Server.MapPath("~/xabara.config"), "titleMeta");
    }