Ejemplo n.º 1
0
    /// <summary>
    /// 清除宝贝描述
    /// </summary>
    /// <param name="id">模板ID</param>
    /// <param name="aid">活动ID</param>
    public void ClearitemsDesc(string id, string aid)
    {
        if (id != "" && !utils.IsInt32(id))
        {
            Response.Write("非法参数1");
            Response.End();
            return;
        }

        Common.Cookie cookie     = new Common.Cookie();
        string        taobaoNick = cookie.getCookie("nick");
        string        session    = cookie.getCookie("top_sessiongroupbuy");

        //COOKIE过期判断
        if (taobaoNick == "")
        {
            //SESSION超期 跳转到登录页
            Response.Write("<script>parent.location.href='http://container.open.taobao.com/container?appkey=12287381'</script>");
            Response.End();
        }

        Rijndael_ encode = new Rijndael_("tetesoft");

        taobaoNick = encode.Decrypt(taobaoNick);

        string sql   = "SELECT COUNT(*) FROM Tete_ActivityMission WHERE shoptempletID = " + id + " AND typ='delete' AND isok = 0 AND nick<>''";
        string count = utils.ExecuteString(sql);

        if (count != "0")
        {
            Response.Write("<script>alert('创建任务失败,有同类型的任务正在执行中,请等待其完成后再创建新的任务!');window.location.href='activitymissionlist.aspx';</script>");
            Response.End();
            return;
        }


        if (taobaoNick.Trim() == "")
        {
            //SESSION超期 跳转到登录页
            Response.Write("<script>parent.location.href='http://container.open.taobao.com/container?appkey=12287381'</script>");
            Response.End();
        }
        sql = "INSERT INTO Tete_ActivityMission (typ, nick, ActivityID,IsOK,shoptempletID,Success,Fail,Startdate) VALUES ('delete','" + taobaoNick + "','" + aid + "',0,'" + id + "',0,0,'" + DateTime.Now.ToString() + "')";
        utils.ExecuteNonQuery(sql);


        sql = "SELECT TOP 1 ID FROM Tete_ActivityMission ORDER BY ID DESC";
        string missionid = utils.ExecuteString(sql);



        //更新任务总数
        sql   = "SELECT COUNT(*) FROM Tete_ActivityWriteContent WHERE shoptempletID = '" + id + "' and ActivityID=" + aid + " AND isok = 1";
        count = utils.ExecuteString(sql);
        sql   = "UPDATE tete_ActivityMission SET total = '" + count + "' WHERE id = " + missionid;
        utils.ExecuteNonQuery(sql);
        // 清除宝贝描述
        DeleteTaobaoitmes(taobaoNick);
        Response.Redirect("activitymissionlist.aspx");
    }
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Common.Cookie cookie     = new Common.Cookie();
        string        taobaoNick = cookie.getCookie("nick");

        session = cookie.getCookie("top_sessionsale");
        Rijndael_ encode = new Rijndael_("tetesoft");

        nick = encode.Decrypt(taobaoNick);

        if (!IsPostBack)
        {
            string    sql = "SELECT * FROM TCS_ShopConfig WHERE nick = '" + nick + "'";
            DataTable dt  = utils.ExecuteDataTable(sql);
            if (dt.Rows.Count != 0)
            {
                wordcount = dt.Rows[0]["wordcount"].ToString();
                keyword   = dt.Rows[0]["keyword"].ToString().Replace("|", "\r\n");
            }
            else
            {
                Response.Write("请先到基本设置里面进行信息设置,<a href='setting.aspx'>点此进入</a>");
                Response.End();
            }
        }
    }
Ejemplo n.º 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string id = utils.NewRequest("id", utils.RequestType.QueryString);

        Common.Cookie cookie     = new Common.Cookie();
        string        taobaoNick = cookie.getCookie("nick");

        session = cookie.getCookie("top_sessiongroupbuy");
        Rijndael_ encode = new Rijndael_("tetesoft");

        nick = encode.Decrypt(taobaoNick);

        //判断VIP版本,只有VIP才能使用此功能
        string    sql = "SELECT * FROM TopTaobaoShop WHERE nick = '" + nick + "'";
        DataTable dt  = utils.ExecuteDataTable(sql);

        if (dt.Rows.Count != 0)
        {
            string flag = dt.Rows[0]["versionNoBlog"].ToString();
            if (flag == "0")
            {
                Response.Redirect("xufei.aspx");
                Response.End();
                return;
            }
        }

        BindData();
    }
Ejemplo n.º 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Common.Cookie cookie1    = new Common.Cookie();
        string        taobaoNick = cookie1.getCookie("nick");
        string        session    = cookie1.getCookie("top_session");
        string        isAct      = cookie1.getCookie("act");
        Rijndael_     encode     = new Rijndael_("tetesoft");

        nick = encode.Decrypt(taobaoNick);

        //过期判断
        if (string.IsNullOrEmpty(session))
        {
            string msg = "尊敬的淘宝卖家,非常抱歉的告诉您,您还没有购买此服务或者登录信息已失效,如需继续使用请<a href='http://fuwu.taobao.com/serv/detail.htm?service_id=764' target='_blank'>进入该服务</a>,谢谢!";
            Response.Redirect("buy.aspx?msg=" + HttpUtility.UrlEncode(msg));
            Response.End();
            return;
        }

        //过期判断
        if (isAct != "1")
        {
            string msg = "尊敬的" + nick + ",非常抱歉的告诉您,您尚未订购该功能,如需继续使用请<a href='http://fuwu.taobao.com/item/subsc.htm?items=service-0-22762-10:1;' target='_blank'>购买该服务</a>,谢谢!";
            Response.Redirect("buy.aspx?msg=" + HttpUtility.UrlEncode(msg));
            Response.End();
            return;
        }

        FormatData();
    }
Ejemplo n.º 5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Common.Cookie cookie     = new Common.Cookie();
        string        taobaoNick = cookie.getCookie("nick");

        session = cookie.getCookie("top_session");
        st      = cookie.getCookie("short");
        Rijndael_ encode = new Rijndael_("tetesoft");

        nick = encode.Decrypt(taobaoNick);

        string sql = "SELECT * FROM TeteShopCategory WHERE nick = '" + st + "' AND parentid=0 ORDER BY orderid";

        if (!IsPostBack)
        {
            DataTable dt = utils.ExecuteDataTable(sql);
            ddl1.DataSource     = dt;
            ddl1.DataTextField  = "catename";
            ddl1.DataValueField = "cateid";
            ddl1.DataBind();


            sql = "SELECT * FROM TeteShopItem WHERE nick = '" + st + "' AND isnew = 1 ORDER BY orderid";

            dt = utils.ExecuteDataTable(sql);
            rpt1.DataSource = dt;
            rpt1.DataBind();
        }
    }
Ejemplo n.º 6
0
    private void BindData()
    {
        Common.Cookie cookie     = new Common.Cookie();
        string        taobaoNick = cookie.getCookie("nick");
        string        session    = cookie.getCookie("top_sessionblog");

        //COOKIE过期判断
        if (taobaoNick == "")
        {
            //SESSION超期 跳转到登录页
            Response.Write("<script>parent.location.href='http://container.open.taobao.com/container?appkey=12159997'</script>");
            Response.End();
        }

        Rijndael_ encode = new Rijndael_("tetesoft");

        taobaoNick = encode.Decrypt(taobaoNick);

        //获取用户店铺商品列表
        TopXmlRestClient      client  = new TopXmlRestClient("http://gw.api.taobao.com/router/rest", "12159997", "614e40bfdb96e9063031d1a9e56fbed5");
        ItemsOnsaleGetRequest request = new ItemsOnsaleGetRequest();

        request.Fields   = "num_iid,title,price,pic_url";
        request.Q        = tbKey.Text;
        request.PageSize = 5;
        request.OrderBy  = "volume:desc";

        PageList <Item> product = new PageList <Item>();

        try
        {
            product = client.ItemsOnsaleGet(request, session);
        }
        catch (Exception e)
        {
            if (e.Message == "27:Invalid session:Session not exist")
            {
                //SESSION超期 跳转到登录页
                Response.Write("<script>parent.location.href='http://container.open.taobao.com/container?appkey=12159997'</script>");
                Response.End();
            }
            return;
        }
        rptProduct.DataSource = product.Content;
        rptProduct.DataBind();

        //数据绑定
        string    sqlNew = "SELECT TOP 10 * FROM TopIdea WHERE nick = '" + taobaoNick + "' ORDER BY id DESC";
        DataTable dtNew  = utils.ExecuteDataTable(sqlNew);

        rptAds.DataSource = dtNew;
        rptAds.DataBind();

        //数据绑定
        sqlNew = "SELECT * FROM TopBlogLink WHERE nick = '" + taobaoNick + "' ORDER BY id DESC";
        dtNew  = utils.ExecuteDataTable(sqlNew);

        rptLink.DataSource = dtNew;
        rptLink.DataBind();
    }
Ejemplo n.º 7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string id = utils.NewRequest("id", utils.RequestType.QueryString);

        Common.Cookie cookie     = new Common.Cookie();
        string        taobaoNick = cookie.getCookie("nick");

        session = cookie.getCookie("top_sessionsale");
        Rijndael_ encode = new Rijndael_("tetesoft");

        nick = encode.Decrypt(taobaoNick);

        string act = utils.NewRequest("act", utils.RequestType.QueryString);
        string t   = utils.NewRequest("t", utils.RequestType.Form);
        string ids = utils.NewRequest("id", utils.RequestType.Form);

        if (act == "send")
        {
            Delete();
            return;
        }

        //批量操作评论
        if (t != "")
        {
            MultiConfirm(t, ids);
        }

        if (!IsPostBack)
        {
            BindData();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        string id = utils.NewRequest("id", utils.RequestType.QueryString);

        Common.Cookie cookie     = new Common.Cookie();
        string        taobaoNick = cookie.getCookie("nick");

        session = cookie.getCookie("top_sessiongroupbuy");
        string    iscrm  = cookie.getCookie("iscrm");
        Rijndael_ encode = new Rijndael_("tetesoft");

        nick = encode.Decrypt(taobaoNick);

        //过期判断
        if (string.IsNullOrEmpty(taobaoNick))
        {
            string msg = "尊敬的淘宝卖家,非常抱歉的告诉您,您还没有购买此服务或者登录信息已失效,如需继续使用请<a href='http://fuwu.taobao.com/serv/detail.htm?service_id=4545' target='_blank'>进入该服务</a>,谢谢!";
            Response.Redirect("buy.aspx?msg=" + HttpUtility.UrlEncode(msg));
            Response.End();
            return;
        }

        //过期判断
        if (!IsBuy(nick))
        {
            string msg = "尊敬的" + nick + ",非常抱歉的告诉您,只有VIP版本才能使用【客户关系营销】功能,如需继续使用请<a href='http://fuwu.taobao.com/ser/detail.htm?service_code=service-0-22904&frm=haoping' target='_blank'>购买高级会员服务</a>,谢谢!";
            Response.Redirect("buy.aspx?msg=" + HttpUtility.UrlEncode(msg));
            Response.End();
            return;
        }
    }
Ejemplo n.º 9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        id = utils.NewRequest("id", utils.RequestType.QueryString);
        Common.Cookie cookie     = new Common.Cookie();
        string        taobaoNick = cookie.getCookie("nick");

        session = cookie.getCookie("top_sessiongroupbuy");
        Rijndael_ encode = new Rijndael_("tetesoft");

        nick = encode.Decrypt(taobaoNick);


        //过期判断
        if (string.IsNullOrEmpty(taobaoNick))
        {
            string msg = "尊敬的淘宝卖家,非常抱歉的告诉您,您还没有购买此服务或者登录信息已失效,如需继续使用请<a href='http://fuwu.taobao.com/serv/detail.htm?service_id=4545' target='_blank'>进入该服务</a>,谢谢!";
            Response.Redirect("buy.aspx?msg=" + HttpUtility.UrlEncode(msg));
            Response.End();
            return;
        }

        //过期判断
        if (!IsBuy(nick))
        {
            string msg = "尊敬的" + nick + ",非常抱歉的告诉您,您尚未订购该功能,如需继续使用请购买该服务:<br><br>29元/月 【赠送短信100条】 <a href='http://fuwu.taobao.com/item/subsc.htm?items=service-0-22904-11:1;' target='_blank'>立即购买</a><br><br>78元/季 【赠送短信300条】 <a href='http://fuwu.taobao.com/item/subsc.htm?items=service-0-22904-11:3;' target='_blank'>立即购买</a><br><br>148元/半年 【赠送短信600条】<a href='http://fuwu.taobao.com/item/subsc.htm?items=service-0-22904-11:6;' target='_blank'>立即购买</a><br><br>288元/年 【赠送短信1200条】<a href='http://fuwu.taobao.com/item/subsc.htm?items=service-0-22904-11:12;' target='_blank'>立即购买</a><br>";
            Response.Redirect("buy.aspx?msg=" + HttpUtility.UrlEncode(msg));
            Response.End();
            return;
        }

        BindData();
    }
Ejemplo n.º 10
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string id  = utils.NewRequest("id", utils.RequestType.QueryString);
        string act = utils.NewRequest("act", utils.RequestType.QueryString);

        Common.Cookie cookie     = new Common.Cookie();
        string        taobaoNick = cookie.getCookie("nick");

        session = cookie.getCookie("top_sessiongroupbuy");
        Rijndael_ encode = new Rijndael_("tetesoft");

        nick = encode.Decrypt(taobaoNick);

        //过期判断
        if (string.IsNullOrEmpty(taobaoNick))
        {
            string msg = "尊敬的淘宝卖家,非常抱歉的告诉您,您还没有购买此服务或者登录信息已失效,如需继续使用请<a href='http://fuwu.taobao.com/serv/detail.htm?service_id=4545' target='_blank'>进入该服务</a>,谢谢!";
            Response.Redirect("buy.aspx?msg=" + HttpUtility.UrlEncode(msg));
            Response.End();
            return;
        }

        //判断VIP版本,只有VIP才能使用此功能
        string    sql = "SELECT * FROM TCS_ShopSession WHERE nick = '" + nick + "'";
        DataTable dt  = utils.ExecuteDataTable(sql);

        if (dt.Rows.Count != 0)
        {
            string flag = dt.Rows[0]["version"].ToString();
            if (flag == "0")
            {
                Response.Redirect("xufei.aspx");
                Response.End();
                return;
            }
        }

        string action = utils.NewRequest("action", utils.RequestType.Form);

        if (action == "save")
        {
            SaveIndexInfo();
            return;
        }

        if (act == "add")
        {
            InitTradeRateData(id);
            return;
        }

        if (act == "del")
        {
            DelTradeRateData(id);
            return;
        }

        BindData();
    }
Ejemplo n.º 11
0
    /// <summary>
    /// 创建删除活动关联的宝贝描述
    /// </summary>
    private void Delete()
    {
        Common.Cookie cookie = new Common.Cookie();
        //判断如果活动未开始或进行中则可以关闭活动
        string taobaoNick = cookie.getCookie("nick");
        string session    = cookie.getCookie("top_sessiongroupbuy");

        //COOKIE过期判断
        if (taobaoNick == "")
        {
            return;
        }

        string    id     = utils.NewRequest("id", utils.RequestType.QueryString);
        Rijndael_ encode = new Rijndael_("tetesoft");

        taobaoNick = encode.Decrypt(taobaoNick);

        string sql   = "SELECT COUNT(*) FROM TopMission WHERE groupbuyid = " + id + " AND typ='delete' AND isok = 0 AND nick<>''";
        string count = utils.ExecuteString(sql);

        if (count != "0")
        {
            return;
        }

        if (taobaoNick.Trim() == "")
        {
            //SESSION超期 跳转到登录页
            Response.Write("<script>parent.location.href='http://container.open.taobao.com/container?appkey=12287381'</script>");
            Response.End();
        }
        sql = "INSERT INTO TopMission (typ, nick, groupbuyid) VALUES ('delete', '" + taobaoNick + "', '" + id + "')";
        utils.ExecuteNonQuery(sql);


        sql = "SELECT TOP 1 ID FROM TopMission ORDER BY ID DESC";
        string missionid = utils.ExecuteString(sql);

        //获取团购信息并更新
        sql = "SELECT name,productimg,productid FROM TopGroupBuy WHERE id = '" + id + "'";
        DataTable dt = utils.ExecuteDataTable(sql);

        if (dt.Rows.Count != 0)
        {
            sql = "UPDATE TopMission SET groupbuyname = '" + dt.Rows[0]["name"].ToString() + "',groupbuypic = '" + dt.Rows[0]["productimg"].ToString() + "',itemid = '" + dt.Rows[0]["productid"].ToString() + "' WHERE id = " + missionid;
            utils.ExecuteNonQuery(sql);
        }

        //更新任务总数
        sql   = "SELECT COUNT(*) FROM TopWriteContent WHERE groupbuyid = '" + id + "' AND isok = 1";
        count = utils.ExecuteString(sql);
        sql   = "UPDATE TopMission SET total = '" + count + "' WHERE id = " + missionid;
        utils.ExecuteNonQuery(sql);
        //清除宝贝描述
        DeleteTaobao(taobaoNick);
    }
Ejemplo n.º 12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string sql = string.Empty;

        appKey    = "d3225497956249cbb13a7cb7375d62bd";
        appSecret = "6cf7a3274cb676328e77dff3e203061d";

        Common.Cookie cookie = new Common.Cookie();
        tokenKey    = cookie.getCookie("tokenKey");
        tokenSecret = cookie.getCookie("tokenSecret");
        uid         = cookie.getCookie("uid");

        string act      = utils.NewRequest("act", utils.RequestType.QueryString);
        string listento = utils.NewRequest("listento", utils.RequestType.QueryString);

        if (act == "listen")
        {
            //每小时最多一键收听一次
            sql = "SELECT COUNT(*) FROM TopMicroBlogNumLog WHERE typ = 'add' AND uid = '" + uid + "' AND  DATEDIFF(s, adddate, GETDATE() ) < 3600";
            string count = utils.ExecuteString(sql);
            if (int.Parse(count) < 10)
            {
                listen(listento);

                //记录操作日志
                sql = "INSERT INTO TopMicroBlogNumLog (uid, typ, num, bak) VALUES ('" + uid + "', 'add', 1, '" + listento + "')";
                utils.ExecuteNonQuery(sql);

                //减少积分
                sql = "UPDATE TopMicroBlogAccount SET score = score + 1 WHERE uid = '" + uid + "'";
                utils.ExecuteNonQuery(sql);

                //如果这个人积分为0则给他发送私信提醒他回来赚积分
                sql = "SELECT score FROM TopMicroBlogAccount WHERE uid = '" + uid + "'";

                Response.Redirect("hand.aspx");
                return;
            }
            else
            {
                Response.Write("<script>alert('每小时最多收听10个别人的微博,请您过一会再来:)');history.go(-1);</script>");
                Response.End();
                return;
            }
        }

        //每小时最多一键收听一次
        sql = "SELECT TOP 16 uid FROM TopMicroBlogAccount WHERE typ = 'qq' AND score > 0 AND uid <> '' AND uid NOT IN (SELECT listen FROM TopMicroBlogListen WHERE uid = '" + uid + "') ORDER BY NEWID()";

        DataTable dt = utils.ExecuteDataTable(sql);

        rptArticle.DataSource = dt;
        rptArticle.DataBind();


        lbPage.Text = InitPageStr(200, "hand.aspx");
    }
Ejemplo n.º 13
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string id = utils.NewRequest("id", utils.RequestType.QueryString);

        Common.Cookie cookie     = new Common.Cookie();
        string        taobaoNick = cookie.getCookie("nick");

        session = cookie.getCookie("top_sessiongroupbuy");
        Rijndael_ encode = new Rijndael_("tetesoft");

        nick = encode.Decrypt(taobaoNick);

        //判断VIP版本,只有VIP才能使用此功能
        string    sql = "SELECT * FROM TopTaobaoShop WITH (NOLOCK) WHERE nick = '" + nick + "'";
        DataTable dt  = utils.ExecuteDataTable(sql);

        if (dt.Rows.Count != 0)
        {
            string flag = dt.Rows[0]["versionNoBlog"].ToString();

            if (flag == "0")
            {
                Response.Redirect("xufei.aspx");
                Response.End();
                return;
            }

            if (flag != "3")
            {
                string msg = "尊敬的" + nick + ",非常抱歉的告诉您,只有VIP版本才能使用【评价手动审核】功能,如需继续使用请<a href='http://fuwu.taobao.com/ser/detail.htm?service_code=service-0-22904&frm=haoping' target='_blank'>购买高级会员服务</a>,谢谢!";
                Response.Redirect("buy.aspx?msg=" + HttpUtility.UrlEncode(msg));
                Response.End();
                return;
            }
        }

        string act = utils.NewRequest("act", utils.RequestType.QueryString);
        string t   = utils.NewRequest("t", utils.RequestType.Form);
        string ids = utils.NewRequest("id", utils.RequestType.Form);

        if (act == "send")
        {
            Delete();
            return;
        }

        //批量操作评论
        if (t != "")
        {
            MultiConfirm(t, ids);
        }

        if (!IsPostBack)
        {
            BindData();
        }
    }
Ejemplo n.º 14
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Common.Cookie cookie     = new Common.Cookie();
        string        taobaoNick = cookie.getCookie("nick");

        session = cookie.getCookie("top_sessionsale");
        Rijndael_ encode = new Rijndael_("tetesoft");

        nick = encode.Decrypt(taobaoNick);
    }
Ejemplo n.º 15
0
    protected void Page_Load(object sender, EventArgs e)
    {
        appKey    = "d3225497956249cbb13a7cb7375d62bd";
        appSecret = "6cf7a3274cb676328e77dff3e203061d";

        Common.Cookie cookie = new Common.Cookie();
        tokenKey    = cookie.getCookie("tokenKey");
        tokenSecret = cookie.getCookie("tokenSecret");
        uid         = cookie.getCookie("uid");

        //Response.Write(tokenKey + "-");
        //Response.Write(tokenSecret);

        string sql  = string.Empty;
        string uids = string.Empty;

        uids = "以下为您具体收听的微博清单:<br>";

        //每小时最多一键收听一次
        sql = "SELECT COUNT(*) FROM TopMicroBlogNumLog WHERE typ = 'onekey' AND uid = '" + uid + "' AND  DATEDIFF(s, adddate, GETDATE() ) < 3600";
        string count = utils.ExecuteString(sql);

        if (count == "0")
        {
            //一键收听,取得自己没有收听过的20个随机账户
            sql = "SELECT TOP 20 uid FROM TopMicroBlogAccount WHERE typ = 'qq' AND score > 0 AND uid <> '' AND uid NOT IN (SELECT listen FROM TopMicroBlogListen WHERE uid = '" + uid + "') ORDER BY score DESC";
            DataTable dt = utils.ExecuteDataTable(sql);
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                listen(dt.Rows[i]["uid"].ToString());

                uids += "<a href='http://t.qq.com/" + dt.Rows[i]["uid"].ToString() + "' target='_blank'>" + dt.Rows[i]["uid"].ToString() + "</a>&nbsp;&nbsp;&nbsp;&nbsp;";
                if (i % 3 == 0)
                {
                    uids += "<br>";
                }
            }

            //记录操作日志
            sql = "INSERT INTO TopMicroBlogNumLog (uid, typ, num) VALUES ('" + uid + "', 'onekey', 20)";
            utils.ExecuteNonQuery(sql);

            //增加积分
            sql = "UPDATE TopMicroBlogAccount SET score = score + 20 WHERE uid = '" + uid + "'";
            utils.ExecuteNonQuery(sql);

            //输出提示
            str = uids + "<br>收听成功,+20积分!";
        }
        else
        {
            //输出提示
            str = "不好意思,一个小时内最多一键收听一次,请您稍后再试~";
        }
    }
Ejemplo n.º 16
0
    private string BindDataProduct()
    {
        string str = string.Empty;

        Common.Cookie cookie     = new Common.Cookie();
        string        taobaoNick = cookie.getCookie("nick");
        string        session    = cookie.getCookie("top_sessionblog");

        //COOKIE过期判断
        if (taobaoNick == "")
        {
            //SESSION超期 跳转到登录页
            Response.Write("<script>parent.location.href='http://container.open.taobao.com/container?appkey=12159997'</script>");
            Response.End();
        }

        Rijndael_ encode = new Rijndael_("tetesoft");

        taobaoNick = encode.Decrypt(taobaoNick);

        //获取用户店铺商品列表
        TopXmlRestClient      client  = new TopXmlRestClient("http://gw.api.taobao.com/router/rest", "12159997", "614e40bfdb96e9063031d1a9e56fbed5");
        ItemsOnsaleGetRequest request = new ItemsOnsaleGetRequest();

        request.Fields   = "num_iid,title,price,pic_url";
        request.Q        = key;
        request.PageSize = 5;
        request.OrderBy  = "volume:desc";

        PageList <Item> product = new PageList <Item>();

        try
        {
            product = client.ItemsOnsaleGet(request, session);
        }
        catch (Exception e)
        {
            if (e.Message == "27:Invalid session:Session not exist")
            {
                //SESSION超期 跳转到登录页
                Response.Write("<script>parent.location.href='http://container.open.taobao.com/container?appkey=12159997'</script>");
                Response.End();
            }
            return("");
        }

        for (int i = 0; i < product.Content.Count; i++)
        {
            str += "<a href=\"http://item.taobao.com/item.htm?id=" + product.Content[i].NumIid.ToString() + "\" title=\"" + product.Content[i].Title + "\" target=\"_blank\"><img src=\"" + product.Content[i].PicUrl + "\" border=\"0\" /></a><br />";
            str += "<a href=\"http://item.taobao.com/item.htm?id=" + product.Content[i].NumIid.ToString() + "\" title=\"" + product.Content[i].Title + "\" target=\"_blank\">" + product.Content[i].Title + "</a> 售价:" + product.Content[i].Price + "元<br><br>";
        }

        return(str);
    }
Ejemplo n.º 17
0
    protected void Page_Load(object sender, EventArgs e)
    {
        appKey    = "d3225497956249cbb13a7cb7375d62bd";
        appSecret = "6cf7a3274cb676328e77dff3e203061d";

        Common.Cookie cookie = new Common.Cookie();
        tokenKey    = cookie.getCookie("tokenKey");
        tokenSecret = cookie.getCookie("tokenSecret");
        uid         = cookie.getCookie("uid");

        BindData();
    }
Ejemplo n.º 18
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Common.Rijndael_ encode = new Rijndael_("tetetete");
        Common.Cookie    cookie = new Common.Cookie();

        if (cookie.getCookie("nick") == "")
        {
            Response.Redirect("default.aspx");
            return;
        }

        nick = encode.Decrypt(cookie.getCookie("nick"));
    }
Ejemplo n.º 19
0
    protected void Page_Load(object sender, EventArgs e)
    {
        id = utils.NewRequest("id", utils.RequestType.QueryString);
        Common.Cookie cookie     = new Common.Cookie();
        string        taobaoNick = cookie.getCookie("nick");

        session = cookie.getCookie("top_sessionsale");
        Rijndael_ encode = new Rijndael_("tetesoft");

        nick = encode.Decrypt(taobaoNick);

        BindData();
    }
Ejemplo n.º 20
0
    protected void Page_Load(object sender, EventArgs e)
    {
        appKey    = "d3225497956249cbb13a7cb7375d62bd";
        appSecret = "6cf7a3274cb676328e77dff3e203061d";

        Common.Cookie cookie = new Common.Cookie();
        tokenKey    = cookie.getCookie("tokenKey");
        tokenSecret = cookie.getCookie("tokenSecret");
        uid         = cookie.getCookie("uid");

        string score = utils.ExecuteString("SELECT score FROM TopMicroBlogAccount WHERE uid = '" + uid + "'");

        Response.Write("document.write('您目前的剩余积分是【" + score + "】..');");
    }
Ejemplo n.º 21
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Common.Cookie cookie     = new Common.Cookie();
        string        taobaoNick = cookie.getCookie("nick");

        session = cookie.getCookie("top_session");
        st      = cookie.getCookie("short");
        Rijndael_ encode = new Rijndael_("tetesoft");

        nick = encode.Decrypt(taobaoNick);

        Act(st, nick);
        Response.Write("数据更新完毕!");
    }
Ejemplo n.º 22
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string id = utils.NewRequest("id", utils.RequestType.QueryString);

        Common.Cookie cookie     = new Common.Cookie();
        string        taobaoNick = cookie.getCookie("nick");

        session = cookie.getCookie("top_sessiongroupbuy");
        Rijndael_ encode = new Rijndael_("tetesoft");

        nick = encode.Decrypt(taobaoNick);

        //过期判断
        if (string.IsNullOrEmpty(taobaoNick))
        {
            string msg = "尊敬的淘宝卖家,非常抱歉的告诉您,您还没有购买此服务或者登录信息已失效,如需继续使用请<a href='http://fuwu.taobao.com/serv/detail.htm?service_id=4545' target='_blank'>进入该服务</a>,谢谢!";
            Response.Redirect("buy.aspx?msg=" + HttpUtility.UrlEncode(msg));
            Response.End();
            return;
        }

        //判断VIP版本,只有VIP才能使用此功能
        string    sql = "SELECT * FROM TCS_ShopSession WHERE nick = '" + nick + "'";
        DataTable dt  = utils.ExecuteDataTable(sql);

        if (dt.Rows.Count != 0)
        {
            string flag = dt.Rows[0]["version"].ToString();

            if (flag == "0")
            {
                Response.Redirect("xufei.aspx");
                Response.End();
                return;
            }

            if (flag == "1")
            {
                string msg = "尊敬的" + nick + ",非常抱歉的告诉您,只有专业版或者以上版本才能使用【短信自动提醒】功能,如需继续使用请<a href='http://fuwu.taobao.com/item/subsc.htm?items=service-0-22904-2:1;' target='_blank'>购买高级会员服务</a>,谢谢!<br><br> PS:发送的短信需要单独购买,1毛钱1条~";
                Response.Redirect("buy.aspx?msg=" + HttpUtility.UrlEncode(msg));
                Response.End();
                return;
            }
        }

        if (!IsPostBack)
        {
            BindData();
        }
    }
Ejemplo n.º 23
0
    /// <summary>
    /// 删除活动
    /// </summary>
    public void delactivity()
    {
        //删除活动
        string appkey = "12287381";
        string secret = "d3486dac8198ef01000e7bd4504601a4";
        IDictionary <string, string> param = new Dictionary <string, string>();

        Common.Cookie cookie  = new Common.Cookie();
        string        session = cookie.getCookie("top_sessiongroupbuy");

        string    taobaoNick = cookie.getCookie("nick");
        Rijndael_ encode     = new Rijndael_("tetesoft");

        taobaoNick = encode.Decrypt(taobaoNick);

        //通过数据库查询获取活动ID actionId iid
        string sql          = "SELECT promotionID FROM tete_activitylist WHERE Status<>4 and ActivityID = " + actionId + " and  ProductID='" + iid + "'";
        string promotion_id = utils.ExecuteString(sql);

        //删除活动
        param = new Dictionary <string, string>();
        param.Add("promotion_id", promotion_id);
        string result = Post("http://gw.api.taobao.com/router/rest", appkey, secret, "taobao.marketing.promotion.delete", session, param);

        WriteLog(result, "0", taobaoNick, iid);
        if (result.IndexOf("error_response") != -1)
        {
            string err = new Regex(@"<sub_msg>([^<]*)</sub_msg>", RegexOptions.IgnoreCase).Match(result).Groups[1].ToString();
            if (err == "")
            {
                Response.Write("<b>活动删除失败,错误原因:</b><br><font color='red'>您的session已经失效,需要重新授权</font><br><a href='http://container.api.taobao.com/container?appkey=12287381&scope=promotion' target='_parent'>重新授权</a>");
                Response.End();
            }

            sql = "update  [tete_activitylist] set  Status=4  WHERE Status<>4 and Status<>3 and ActivityID = " + actionId + " and  ProductID=" + iid;

            utils.ExecuteNonQuery(sql);

            Response.Write("<b>活动删除失败,错误原因:</b><br><font color='red'>" + err + "</font>");
            Response.End();
            return;
        }
        //删除活动
        sql = "update  tete_activitylist set Status=4 ,isok=1  WHERE ActivityID = " + actionId + " and  ProductID=" + iid;
        utils.ExecuteNonQuery(sql);

        Response.Write("true");
        Response.End();
    }
Ejemplo n.º 24
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string id = utils.NewRequest("id", utils.RequestType.QueryString);

        Common.Cookie cookie     = new Common.Cookie();
        string        taobaoNick = cookie.getCookie("nick");

        session = cookie.getCookie("top_sessiongroupbuy");
        string    iscrm  = cookie.getCookie("iscrm");
        Rijndael_ encode = new Rijndael_("tetesoft");

        nick = encode.Decrypt(taobaoNick);



        //过期判断
        if (string.IsNullOrEmpty(taobaoNick))
        {
            string msg = "尊敬的淘宝卖家,非常抱歉的告诉您,您还没有购买此服务或者登录信息已失效,如需继续使用请<a href='http://fuwu.taobao.com/serv/detail.htm?service_id=4545' target='_blank'>进入该服务</a>,谢谢!";
            Response.Redirect("buy.aspx?msg=" + HttpUtility.UrlEncode(msg));
            Response.End();
            return;
        }

        ////过期判断
        //if (iscrm != "1")
        //{
        //    string msg = "尊敬的" + nick + ",非常抱歉的告诉您,您尚未订购该功能,如需继续使用请购买该服务:<br><br>19元/月 【赠送短信50条】 <a href='http://fuwu.taobao.com/item/subsc.htm?items=service-0-22762-4:1;' target='_blank'>立即购买</a><br><br>54元/季 【赠送短信150条】 <a href='http://fuwu.taobao.com/item/subsc.htm?items=service-0-22762-4:3;' target='_blank'>立即购买</a><br><br>99元/半年 【赠送短信300条】<a href='http://fuwu.taobao.com/item/subsc.htm?items=service-0-22762-4:6;' target='_blank'>立即购买</a><br><br>188元/年 【赠送短信600条】<a href='http://fuwu.taobao.com/item/subsc.htm?items=service-0-22762-4:12;' target='_blank'>立即购买</a><br>";
        //    Response.Redirect("buy.aspx?msg=" + HttpUtility.UrlEncode(msg));
        //    Response.End();
        //    return;
        //}

        string act = utils.NewRequest("act", utils.RequestType.QueryString);

        if (act == "del")
        {
            DeleteGroup();
            return;
        }

        if (act == "create")
        {
            CreateCode(id);
            return;
        }

        BindData();
    }
Ejemplo n.º 25
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Common.Cookie cookie = new Common.Cookie();
            this.TextBox1.Text = cookie.getCookie("blogname");
            this.TextBox2.Text = cookie.getCookie("blogpass");
        }

        string path = Server.MapPath("/auto/ipnow.txt");

        if (File.Exists(path))
        {
            proxy = File.ReadAllText(path);
        }

        key = this.tbKey.Text;
        ads = utils.NewRequest("ads", Common.utils.RequestType.Form);

        //判断是否录入新客户
        Common.Cookie cookie1    = new Common.Cookie();
        string        taobaoNick = cookie1.getCookie("nick");

        //过期判断
        if (string.IsNullOrEmpty(taobaoNick))
        {
            Response.Write("<script>parent.location.href='http://container.open.taobao.com/container?appkey=12159997'</script>");
            Response.End();
            return;
        }

        Rijndael_ encode = new Rijndael_("tetesoft");

        taobaoNick = encode.Decrypt(taobaoNick);

        string    sql = "SELECT * FROM TopBlogAccountNew WHERE nick = '" + taobaoNick + "'";
        DataTable dt  = utils.ExecuteDataTable(sql);

        //if (dt.Rows.Count != 0)
        //{
        panel1.Visible = false;
        panel2.Visible = true;

        //数据绑定
        rptAccount.DataSource = dt;
        rptAccount.DataBind();
        //}
    }
    private void Delete()
    {
        //判断如果活动未开始或进行中则可以关闭活动
        string id = utils.NewRequest("id", utils.RequestType.QueryString);

        if (!utils.IsInt32(id))
        {
            return;
        }

        //删除活动
        string appkey = "12132145";
        string secret = "1fdd2aadd5e2ac2909db2967cbb71e7f";
        IDictionary <string, string> param = new Dictionary <string, string>();

        Common.Cookie cookie  = new Common.Cookie();
        string        session = cookie.getCookie("top_session");

        //通过数据库查询获取活动ID
        string sql          = "SELECT promotionid FROM TopGroupBuy WHERE id = " + id;
        string promotion_id = utils.ExecuteString(sql);

        //创建活动
        param = new Dictionary <string, string>();
        param.Add("promotion_id", promotion_id);
        string result = Post("http://gw.api.taobao.com/router/rest", appkey, secret, "taobao.marketing.promotion.delete", session, param);

        //更新数据库
        sql = "UPDATE TopGroupBuy SET isdelete = 1 WHERE id = " + id;
        utils.ExecuteNonQuery(sql);

        Response.Redirect("deletegrouplist.aspx");
    }
Ejemplo n.º 27
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Common.Cookie cookie     = new Common.Cookie();
        string        taobaoNick = cookie.getCookie("nick");

        //过期判断
        if (string.IsNullOrEmpty(taobaoNick))
        {
            string msg = "尊敬的淘宝卖家,非常抱歉的告诉您,您还没有购买此服务或者登录信息已失效,如需继续使用请<a href='http://fuwu.taobao.com/serv/detail.htm?service_id=11807' target='_blank'>进入该服务</a>,谢谢!";
            Response.Redirect("buy.aspx?msg=" + HttpUtility.UrlEncode(msg));
            Response.End();
            return;
        }

        id  = utils.NewRequest("id", Common.utils.RequestType.QueryString);
        url = "addtotaobaoactivity-2.aspx";

        style = utils.NewRequest("style", Common.utils.RequestType.Form);
        size  = utils.NewRequest("size", Common.utils.RequestType.Form);
        name  = utils.NewRequest("ideaName", Common.utils.RequestType.Form);

        //判断是否为编辑状态
        id = utils.NewRequest("id", Common.utils.RequestType.QueryString);

        if (id != "" && !utils.IsInt32(id))
        {
            Response.Write("非法参数1");
            Response.End();
            return;
        }

        BindData();
    }
Ejemplo n.º 28
0
    /// <summary>
    /// 删除优惠券信息
    /// </summary>
    private void DeleteGroup()
    {
        //判断如果活动未开始或进行中则可以关闭活动
        string id = utils.NewRequest("id", utils.RequestType.QueryString);

        if (!utils.IsInt32(id))
        {
            return;
        }

        //删除活动
        string appkey = "12159997";
        string secret = "614e40bfdb96e9063031d1a9e56fbed5";
        IDictionary <string, string> param = new Dictionary <string, string>();

        Common.Cookie cookie  = new Common.Cookie();
        string        session = cookie.getCookie("top_sessiongroupbuy");

        //通过数据库查询获取活动ID
        string sql = "UPDATE TopCoupon SET isdel = 1 WHERE id = " + id;

        utils.ExecuteNonQuery(sql);

        Response.Write("<script>alert('取消成功!');window.location.href='couponlist.aspx';</script>");
    }
Ejemplo n.º 29
0
    private void BindData()
    {
        Common.Cookie cookie     = new Common.Cookie();
        string        taobaoNick = cookie.getCookie("nick");

        Rijndael_ encode = new Rijndael_("tetesoft");

        taobaoNick = encode.Decrypt(taobaoNick);


        string id = utils.NewRequest("id", utils.RequestType.QueryString);

        string    sql   = "SELECT * FROM TopGroupBuyDetail WHERE groupbuyid =" + id;
        DataTable dtNew = utils.ExecuteDataTable(sql);

        dtNew = ConvertTable(dtNew);

        rptArticle.DataSource = dtNew;
        rptArticle.DataBind();


        sql   = "SELECT * FROM TopGroupBuy WHERE nick = '" + taobaoNick + "' AND id = " + id;
        dtNew = utils.ExecuteDataTable(sql);
        Repeater1.DataSource = dtNew;
        Repeater1.DataBind();
    }
Ejemplo n.º 30
0
    /// <summary>
    /// 删除优惠券信息
    /// </summary>
    private void DeleteGroup()
    {
        //判断如果活动未开始或进行中则可以关闭活动
        string id = utils.NewRequest("id", utils.RequestType.QueryString);
        //if (!utils.IsInt32(id))
        //{
        //    return;
        //}

        //删除活动
        string appkey = "12159997";
        string secret = "614e40bfdb96e9063031d1a9e56fbed5";
        IDictionary <string, string> param = new Dictionary <string, string>();

        Common.Cookie cookie  = new Common.Cookie();
        string        session = cookie.getCookie("top_sessiongroupbuy");

        string sql      = "SELECT couponid FROM TCS_ShopConfig WHERE nick = '" + nick + "'";
        string couponid = utils.ExecuteString(sql);

        if (couponid == id)
        {
            Response.Write("<script>alert('默认赠送的优惠券无法删除,请您到“基本设置”里面更改默认优惠券后再删除!');history.go(-1);</script>");
            return;
        }

        //通过数据库查询获取活动ID
        sql = "UPDATE TCS_Coupon SET isdel = 1 WHERE guid = '" + id + "'";
        utils.ExecuteNonQuery(sql);

        Response.Write("<script>alert('取消成功!');window.location.href='couponlist.aspx';</script>");
    }