Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string nick        = utils.NewRequest("nick", utils.RequestType.QueryString);
        string top_session = utils.NewRequest("session", utils.RequestType.QueryString);
        string iscrm       = utils.NewRequest("iscrm", utils.RequestType.QueryString);

        Common.Cookie cookie = new Common.Cookie();
        cookie.setCookie("top_session", top_session, 999999);
        cookie.setCookie("nick", nick, 999999);
        if (iscrm == "1")
        {
            cookie.setCookie("iscrm", "1", 999999);
        }
        Rijndael_ encode = new Rijndael_("tetesoft");

        nick = encode.Decrypt(nick);

        //写入数据库
        if (iscrm == "1")
        {
            string sql   = "SELECT COUNT(*) FROM TCS_CrmConfig WHERE nick = '" + nick + "'";
            string count = utils.ExecuteString(sql);
            if (count == "0")
            {
                sql = "INSERT INTO TCS_CrmConfig (nick, session, updatedate) VALUES ('" + nick + "','" + top_session + "','" + DateTime.Now.AddMonths(-3).ToString() + "')";
                Response.Write(sql);
                utils.ExecuteNonQuery(sql);
            }
        }
    }
Exemplo n.º 2
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();
    }
Exemplo 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();
    }
    /// <summary>
    /// 数据绑定
    /// </summary>
    private void BindData()
    {
        Cookie cookie     = new 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>");//12287381
            Response.End();
        }

        Rijndael_ encode = new Rijndael_("tetesoft");

        taobaoNick = encode.Decrypt(taobaoNick);

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

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

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

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

        request.Fields   = "num_iid,title,price,pic_url";
        request.PageSize = 10;

        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=12287381'</script>");
                Response.End();
            }
            return;
        }
        rptItems.DataSource = product.Content;
        rptItems.DataBind();

        //团购数据绑定
        string    sqlNew = "SELECT * FROM TopGroupBuy WHERE nick = '" + taobaoNick + "' AND isdelete = 0 ORDER BY id DESC";
        DataTable dtNew  = utils.ExecuteDataTable(sqlNew);

        rptAds.DataSource = dtNew;
        rptAds.DataBind();
    }
Exemplo n.º 5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Cookie cookie     = new Cookie();
        string taobaoNick = cookie.getCookie("nick");
        string session    = cookie.getCookie("top_session");

        Rijndael_ encode = new Rijndael_("tetesoft");

        taobaoNick = encode.Decrypt(taobaoNick);

        string    sql = "SELECT * FROM TopTuijian WHERE nickfrom = '" + taobaoNick + "' ORDER BY id ASC";
        DataTable dt  = utils.ExecuteDataTable(sql);

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

        sql     = "SELECT COUNT(*) FROM TopTuijian WHERE nickfrom = '" + taobaoNick + "' AND isok = 1";
        tuijian = utils.ExecuteString(sql);

        if (int.Parse(tuijian) % 10 != 0)
        {
            need = (10 - int.Parse(tuijian) % 10).ToString();
        }
        else
        {
            need = "10";
        }

        sql = "SELECT sid FROM TopTaobaoShop WHERE nick = '" + taobaoNick + "'";
        id  = utils.ExecuteString(sql);
    }
Exemplo n.º 6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Common.Cookie cookie     = new Common.Cookie();
        string        taobaoNick = cookie.getCookie("nick");

        Rijndael_ encode = new Rijndael_("tetesoft");

        taobaoNick = encode.Decrypt(taobaoNick);

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

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

        if (act == "del")
        {
            string sqlnew = "DELETE FROM TopBlogSearchKey WHERE nick = '" + taobaoNick + "' AND id = " + id;
            utils.ExecuteNonQuery(sqlnew);

            Response.Redirect("linklistnew.aspx");
            return;
        }

        string    sqlNew = "SELECT * FROM TopBlogSearchKey WHERE nick = '" + taobaoNick + "' ORDER BY id DESC";
        DataTable dtNew  = utils.ExecuteDataTable(sqlNew);

        rptArticle.DataSource = dtNew;
        rptArticle.DataBind();
    }
    /// <summary>
    /// 记录该任务并返回任务ID
    /// </summary>
    /// <returns></returns>
    private string RecordMission()
    {
        Cookie cookie     = new Cookie();
        string missionid  = string.Empty;
        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 = "INSERT INTO Tete_ActivityMission (typ, nick, ActivityID,IsOK,shoptempletID,Success,Fail,Startdate) VALUES ('write','" + taobaoNick + "','" + id + "',0,'" + myadstemp + "',0,0,'" + DateTime.Now.ToString() + "')";

        utils.ExecuteNonQuery(sql);

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


        return(missionid);
    }
Exemplo n.º 8
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();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        name      = Request.Form["title"].ToString();
        templetid = Request.Form["templateID"].ToString();
        bt        = Request.Form["button1"].ToString();
        mall      = Request.Form["showmall"].ToString();
        liang     = Request.Form["showliang"].ToString();
        if (Request.Form["flag"] != null && Request.Form["flag"] != "")
        {
            baoy = Request.Form["flag"].ToString();
        }


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

        if (!IsPostBack)
        {
            Rijndael_ encode = new Rijndael_("tetesoft");
            taobaoNick = encode.Decrypt(taobaoNick);

            sql = "SELECT * FROM tete_activity WHERE Status=1 and Nick = '" + taobaoNick + "'";

            DataTable dt = utils.ExecuteDataTable(sql);

            if (dt != null)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    strhtml += "<option value=\"" + dt.Rows[i]["id"].ToString() + "\">" + dt.Rows[i]["name"].ToString() + "</option>";
                }
            }
        }
    }
Exemplo n.º 10
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Cookie cookie     = new 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=12159997'</script>");
            Response.End();
        }

        Rijndael_ encode = new Rijndael_("tetesoft");

        taobaoNick = encode.Decrypt(taobaoNick);

        string sql = "SELECT * FROM TopTaobaoShopCat WHERE nick = '" + taobaoNick + "'";

        DataTable dt = utils.ExecuteDataTable(sql);

        Repeater1.DataSource = dt;
        Repeater1.DataBind();
    }
Exemplo n.º 11
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();
        }
    }
Exemplo n.º 12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Common.Cookie cookie     = new Common.Cookie();
            string        taobaoNick = cookie.getCookie("nick");
            string        nickid     = string.Empty;

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

            Rijndael_ encode = new Rijndael_("tetesoft");
            taobaoNick = encode.Decrypt(taobaoNick);

            string    sqlNew = "SELECT sid FROM TopTaobaoShop WHERE nick = '" + taobaoNick + "'";
            DataTable dtNew  = utils.ExecuteDataTable(sqlNew);
            if (dtNew.Rows.Count != 0)
            {
                nickid = "http://shop" + dtNew.Rows[0]["sid"].ToString() + ".taobao.com/";
            }
            else
            {
                nickid = "http://www.taobao.com/";
            }

            this.TextBox2.Text = nickid;
        }
    }
Exemplo n.º 13
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();
    }
Exemplo n.º 14
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");
    }
Exemplo n.º 15
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();
    }
    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;
        }
    }
Exemplo n.º 17
0
    private void BindData()
    {
        //获取用户信息
        Cookie cookie     = new Cookie();
        string taobaoNick = cookie.getCookie("nick");

        Rijndael_ encode = new Rijndael_("tetesoft");

        taobaoNick = encode.Decrypt(taobaoNick);

        //判断是否删除
        string id = utils.NewRequest("id", utils.RequestType.QueryString);

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

        DataTable dt = utils.ExecuteDataTable("SELECT COUNT(url) AS viewcount,url FROM TopIdeaLog WHERE ideaid = '" + id + "' GROUP BY url");

        DataView dv = dt.DefaultView;

        dv.Sort = "viewcount DESC";

        rptLogList.DataSource = dv;
        rptLogList.DataBind();
    }
Exemplo n.º 18
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Cookie cookie     = new Cookie();
        string taobaoNick = cookie.getCookie("nick");

        Rijndael_ encode = new Rijndael_("tetesoft");

        taobaoNick = encode.Decrypt(taobaoNick);

        string    sql = "SELECT phone,qq FROM TCS_ShopConfig WHERE nick = '" + taobaoNick + "'";
        DataTable dt  = utils.ExecuteDataTable(sql);

        if (dt.Rows.Count != 0)
        {
            string phone = dt.Rows[0][0].ToString();
            string qq    = dt.Rows[0][1].ToString();
            sql = "SELECT version FROM TCS_ShopSession WHERE nick = '" + taobaoNick + "'";
            string version = utils.ExecuteString(sql);

            if (phone.Length == 0 || qq.Length == 0)
            {
                Response.Write("setTimeout('showAreaPhone()', 6000);");
                Response.Write("var version = " + version + ";");
            }
        }
    }
Exemplo n.º 19
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();
            }
        }
    }
Exemplo n.º 20
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();
    }
Exemplo n.º 21
0
    /// <summary>
    /// 替换关键字
    /// </summary>
    /// <param name="content"></param>
    /// <returns></returns>
    private string changeKey(string content)
    {
        Common.Cookie cookie1     = new Common.Cookie();
        string        taobaoNick1 = cookie1.getCookie("nick");
        string        nickid      = string.Empty;

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

        taobaoNick1 = encode.Decrypt(taobaoNick1);


        //替换掉博客文章里面的关键字
        string    sql = "SELECT * FROM TopBlogLink WHERE nick = '" + taobaoNick1 + "'";
        DataTable dt  = utils.ExecuteDataTable(sql);

        if (dt != null && dt.Rows.Count > 0)
        {
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                content = content.Replace(dt.Rows[i]["keyword"].ToString(), "<a href='" + dt.Rows[i]["link"].ToString() + "' target='_blank'>" + dt.Rows[i]["keyword"].ToString() + "</a>");
            }
        }


        return(content);
    }
Exemplo n.º 22
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Cookie cookie     = new Cookie();
        string taobaoNick = cookie.getCookie("nick");
        string session    = cookie.getCookie("top_sessiongroupbuy");

        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.PageSize = 10;

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

        //try
        //{
        //    product = client.ItemsOnsaleGet(request, session);
        //}
        //catch (Exception ex)
        //{
        //    if (ex.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;
        //}
        //rptItems.DataSource = product.Content;
        //rptItems.DataBind();
    }
Exemplo n.º 23
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Cookie cookie     = new Cookie();
        string taobaoNick = cookie.getCookie("nick");

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

        Rijndael_ encode = new Rijndael_("tetesoft");

        taobaoNick = encode.Decrypt(taobaoNick);

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

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

            if (phone.Length == 0)
            {
                Response.Write("setTimeout('showArea()', 3000);");
            }
        }
    }
Exemplo n.º 24
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();
    }
    public static string decode(string uid)
    {
        Rijndael_ encode = new Rijndael_("tetesoft");

        uid = encode.Decrypt(uid);

        return(uid);
    }
Exemplo n.º 26
0
    /// <summary>
    /// 解密函数
    /// </summary>
    /// <param name="str"></param>
    /// <returns></returns>
    private string strDecode(string str)
    {
        string    newstr = string.Empty;
        Rijndael_ encode = new Rijndael_("tetesoftstr");

        newstr = encode.Decrypt(str);
        return(newstr);
    }
Exemplo n.º 27
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);
    }
Exemplo n.º 28
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();
        }
    }
Exemplo n.º 29
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);
    }
Exemplo n.º 30
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request.Cookies["nick"] == null)
            {
                return;
            }

            //解密NICK
            Rijndael_ encode = new Rijndael_("tetesoft");
            string    nick   = encode.Decrypt(Request.Cookies["nick"].Value);

            if (Request.Cookies["mobile"] == null)
            {
                Response.Redirect("http://iphone.7fshop.com/CreateAPK.aspx?nick=" + HttpUtility.UrlEncode(nick) + "&nicksession=" + Request.Cookies["top_session"].Value);
            }
            else
            {
                Response.Redirect("http://iphone.7fshop.com/CreateAPK.aspx?nick=" + HttpUtility.UrlEncode(nick) + "&nicksession=" + Request.Cookies["top_session"].Value + "&mobile=1");
            }

            if (!Directory.Exists(@"D:\APKTool\" + nick))
            {
                Process p = new Process();
                p.StartInfo.FileName               = "cmd.exe";
                p.StartInfo.UseShellExecute        = false;
                p.StartInfo.RedirectStandardInput  = true;
                p.StartInfo.RedirectStandardOutput = true;
                p.StartInfo.RedirectStandardError  = true;
                p.StartInfo.CreateNoWindow         = true;
                p.Start();
                string strOutput = null;
                //进入目录
                p.StandardInput.WriteLine("d:");
                p.StandardInput.WriteLine(@"cd D:\APKTool");

                //复制APK
                //p.StandardInput.WriteLine(@"copy sourceAPK\TeceraNew.apk TeceraNew.apk /y");

                //解压APK
                //p.StandardInput.WriteLine("apktool d TeceraNew.apk");
                //创建目录
                p.StandardInput.WriteLine("md " + nick);
                //复制文件到该目录
                p.StandardInput.WriteLine(@"xcopy TeceraNew\*.* " + nick + " /E /y");

                p.StandardInput.WriteLine("exit");
                strOutput = p.StandardOutput.ReadToEnd();
                //Console.WriteLine(strOutput);
                p.WaitForExit();
                p.Close();
            }
        }
    }