Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        GetRequest GetRequest1 = new GetRequest();
        string uvid = "0";
        if (GetRequest1.GetRequestCookies("uvid", "0") == "0")
        {
            data_conn cn = new data_conn();
            DataSet ds = new DataSet();
            string sql = "INSERT INTO TB_UV_LIST (uvtime) values (getdate());select @@identity";
            ds = cn.mdb_ds(sql, "uvid");
            uvid = ds.Tables["uvid"].Rows[0][0].ToString();

            Response.Cookies["uvid"].Value = uvid;
            Response.Cookies["uvid"].Expires = DateTime.Now.AddDays(365);
        }
        else
        {
            uvid = GetRequest1.GetRequestCookies("uvid", "0");
        }

        string srvlink = "";
        srvlink += "<a title=\"欢迎使用在线客服\" id=\"service_link\" href=\"http://im.cn.alisoft.com/webim/webim/webclient!open.jspa?lang=zh_cn&img=0&memberid=";
        srvlink += "e" + uvid;
        srvlink += "&targetid=cnalichna910254766&siteId=4035516&initiative=1&domain=probe.alisoft.com&siteFlag=enet&colorStyle=orange&msg=&ct=\" target=\"_blank\">在线客服</a>";
        Literal3.Text = srvlink;
    }
Exemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        check check1 = new check();
        GetRequest GetRequest1 = new GetRequest();

        string u = "";
        u = check1.CheckNumber(GetRequest1.GetRequestCookies("user_id", "0"));

        if (u == "0")
        {
            PlaceHolder1.Visible = false;
            PlaceHolder2.Visible = true;
        }
        else
        {
            PlaceHolder1.Visible = true;
            PlaceHolder2.Visible = false;

                    string[] udetail;
        AllinUser AllinUser1 = new AllinUser();
        udetail = AllinUser1.GetUserDetail(u);

        string uhomeid = udetail[10];

        string name = udetail[3];

        Literal1.Text = "<A class=login_thumb href=\"/home/space.php?uid=" + udetail[10] + "\"><IMG height=20 alt=" + udetail[3] + " src=\"/uc/avatar.php?uid=" + udetail[10] + "&size=small&type=virtual\" width=20></A> <A class=loginName href=\"/home/space.php?uid=" + udetail[10] + "\">" + udetail[3] + "</A>";
        }
    }
Exemplo n.º 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        GetRequest GetRequest1 = new GetRequest();
        SymmetricMethod ss = new SymmetricMethod();
        check ck = new check();

        string uid = "0";
        uid = ck.CheckNumber(GetRequest1.GetRequestCookies("user_id", ""));

        Literal1.Text = "<area shape=\"rect\" coords=\"533,672,844,732\" href=\"join.aspx?uid=" + ss.Encrypto(uid) + "\" />";
    }
Exemplo n.º 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        GetRequest GetRequest1 = new GetRequest();
        admin_id = GetRequest1.GetRequestCookies("admin_id", "0");

        //LoadUser();
        if (Page.IsPostBack == false)
        {
            LoadRecord(lblCurrentPage.Text);
        }
    }
Exemplo n.º 5
0
    public void LoadEditOrder()
    {
        check ck = new check();
        data_conn cn = new data_conn();
        DataSet ds = new DataSet();
        GetRequest GetRequest1 = new GetRequest();

        string u = ck.CheckNumber(GetRequest1.GetRequestCookies("user_id", "0"));
        string orderid = ck.CheckInput(GetRequest1.GetRequestQueryString("orderid", "0"));
        string role = GetRequest1.GetRequestQueryString("role", "");

        AllinOrder AllinOrder1 = new AllinOrder();
        string[] odetail;
        odetail = AllinOrder1.GetOrderDetail(orderid);

        ltrHyf.Text = odetail[59];

        txtPubf.Text = odetail[4];
        txtCode.Value = odetail[0];
        txtShipper.Value = odetail[8];
        txtConsignee.Value = odetail[9];
        txtNotifyParty.Value = odetail[10];
        txtCompanyName.Value = odetail[11];
        txtEmail.Value = odetail[12];
        txtContactor.Value = odetail[13];
        txtMobile.Value = odetail[14];
        txtTel.Value = odetail[15];
        txtFax.Value = odetail[16];
        txtstartport.Value = odetail[17];
        txtmidport.Value = odetail[18];
        txtdestport.Value = odetail[19];
        txtMarksNumbers.Value = odetail[20];
        txtNumbersofPackages.Value = odetail[21];
        txtDescription.Value = odetail[22];
        txtGrossWeight.Value = odetail[23];
        txtMeasurement.Value = odetail[24];
        txtkaihangri.Value = odetail[27];
        txtzhuangxiangri.Value = odetail[28];
        txtjieguanri.Value = odetail[29];
        ltrEndDate.Text = odetail[105];
        txtcarrier_name.Value = odetail[26];

        ltrFreightTitle.Text = "<span style=\"font-weight:bold;font-size:14px\">" + odetail[75] + "</span>";

        txtgp.Value = odetail[34];

        if (odetail[44] != "")
        {
            ltrOrderFujiafei1.Text = "(附加费:" + odetail[44] + ")";
        }

        ltrFreightGP.Text = odetail[49];
        ltrFreightGPV.Text = odetail[50];
        ltrFreightAppend.Text = odetail[44];
        ltrFreightCarrier.Text = odetail[68];

        txtbeizhu.Value = odetail[36];
        SetStep(odetail[1], odetail[37], odetail[38]);

        ltrSMS.Text = "<a href=\"/member/pm_detail.aspx?cid=" + odetail[4] + "\" id=\"linkSMS\" target=\"_blank\"></a>";

        if (u != odetail[3])
        {
            Response.Redirect("/search/err.aspx");
        }//不是买方的用户无修改订单!

        if (odetail[1] != "2" & odetail[1] != "3" & odetail[1] != "7")
        {
            Response.Redirect("/search/err.aspx");
        }//排除不能修改的订单状态!

        ltrOrderStatus.Text = "<div style=\"padding:20px; margin-bottom:10px; font-size:14px; line-height:30px; text-align:center; background:#FFFCF3;border:1px solid #F7E4A5;\">修改订舱单</div>";

        AllinFreight AllinFreight1 = new AllinFreight();
        string[] fdetail;
        if (odetail[7] == "0")
        {
            fdetail = AllinFreight1.GetFreightDetail("9", ck.CheckNumber(odetail[6]), "0");
        }
        else
        {
            fdetail = AllinFreight1.GetFreightDetail("9", "0", ck.CheckNumber(odetail[7]));
        }

        ltrEndDate.Text = Convert.ToDateTime(fdetail[6]).ToString("yyyy-MM-dd");
        ltrFreightTitle.Text = "<span style=\"font-weight:bold;font-size:14px\">" + odetail[75] + "</span>";
        ltrFreightPostdate.Text = Convert.ToDateTime(odetail[65]).ToString("MM") + "/" + Convert.ToDateTime(odetail[65]).ToString("dd");
        ltrFreightEnddate.Text = Convert.ToDateTime(odetail[66]).ToString("MM") + "/" + Convert.ToDateTime(odetail[66]).ToString("dd");
        ltrFreightCompany.Text = fdetail[18];
        ltrFreightAllinStar.Text = fdetail[19];
        ltrFreightUserStar.Text = fdetail[20];
        ltrFreightLine.Text = odetail[69];
        ltrFreightStartport.Text = odetail[70];
        ltrFreightDestport.Text = odetail[71];
        ltrFreightAssuranceSpace.Text = odetail[100];
        ltrFreightAssurancePrice.Text = odetail[101];
        lblTousu.Text = fdetail[18];

        AllinUser AllinUser1 = new AllinUser();
        string[] udetail;
        udetail = AllinUser1.GetUserDetail(u);
        txtbank.Value = udetail[50];
        txtbankname.Value = udetail[51];
        txtbankaccount.Value = udetail[52];
        txtotheraccount.Value = udetail[53];
        txtaliaccount.Value = udetail[9];
    }
Exemplo n.º 6
0
    public void LoadSavedOrder()
    {
        check ck = new check();
        data_conn cn = new data_conn();
        DataSet ds = new DataSet();
        GetRequest GetRequest1 = new GetRequest();

        string u = ck.CheckNumber(GetRequest1.GetRequestCookies("user_id", "0"));
        string orderid = ck.CheckInput(GetRequest1.GetRequestQueryString("orderid", "0"));
        string role = GetRequest1.GetRequestQueryString("role", "");

        AllinOrder AllinOrder1 = new AllinOrder();
        string[] odetail;
        odetail = AllinOrder1.GetOrderDetail(orderid);
        ltrOrderViewCode.Text = odetail[0];
        ltrOrderViewShipper.Text = odetail[8];
        ltrOrderViewConsignee.Text = odetail[9];
        ltrOrderViewNotifyParty.Text = odetail[10];
        ltrOrderViewCompanyName.Text = odetail[11];
        ltrOrderViewEmail.Text = odetail[12];
        ltrOrderViewContactor.Text = odetail[13];
        ltrOrderViewMobile.Text = odetail[14];
        ltrOrderViewTel.Text = odetail[15];
        ltrOrderViewFax.Text = odetail[16];
        ltrOrderViewStartport.Text = odetail[17];
        ltrOrderViewMidport.Text = odetail[18];
        ltrOrderViewDestport.Text = odetail[19];
        ltrOrderViewMarksNumbers.Text = odetail[20];
        ltrOrderViewNumbersofPackages.Text = odetail[21];
        ltrOrderViewDescription.Text = odetail[22];
        ltrOrderViewGrossWeight.Text = odetail[23];
        ltrOrderViewMeasurement.Text = odetail[24];
        ltrOrderViewCarrier.Text = odetail[26];
        ltrOrderViewKaihangri.Text = odetail[27];
        ltrOrderViewZhuangxiangri.Text = odetail[28];
        ltrOrderViewJieguanri.Text = odetail[29];
        ltrOrderViewGP.Text = odetail[34];
        ltrFreightGP.Text = odetail[49];
        ltrFreightGPV.Text = odetail[50];
        ltrFreightAppend.Text = odetail[44];
        ltrFreightCarrier.Text = odetail[68];
        ltrOrderViewHyf.Text = odetail[59];
        ltrOrderViewBeizhu.Text = odetail[36];
        ltrOverageThis.Text = odetail[62];
        txt_edit_pricegp.Text = odetail[49];
        txt_edit_pricegpv.Text = odetail[50];
        txt_edit_price_shipcompany.Text = odetail[68];

        if (odetail[44] != "")
        {
            ltrOrderFujiafei.Text = "(附加费:" + odetail[44] + ")";
        }

        SetStep(odetail[1], odetail[37], odetail[38]);

        if (u != odetail[3] & u != odetail[4])
        {
            Response.Redirect("/search/err.aspx");
        }//不是买卖双方的用户无法查看该订单!

        string order_type_string = odetail[58];

        if (role == "shipper")
        {
            PlaceHolder3.Visible = true;
            ltrOrderStatus.Text = "<div style=\"padding:20px; margin-bottom:10px; font-size:14px; line-height:30px; text-align:left; background:#FFFCF3;border:1px solid #F7E4A5;\">" + odetail[89].Replace("{1}", orderid).Replace("{9}", order_type_string) + "</div>";

            if (u != odetail[3])
            {
                Response.Redirect("/search/err.aspx");
            }//不是买卖双方的用户无法查看该订单!

        }//订舱方显示的文本

        if (role == "forward")
        {
            PlaceHolder4.Visible = true;
            ltrOrderStatus.Text = "<div style=\"padding:20px; margin-bottom:10px; font-size:14px; line-height:30px; text-align:left; background:#FFFCF3;border:1px solid #F7E4A5;\">" + odetail[90].Replace("{1}", orderid).Replace("{9}", order_type_string) + "</div>";

            if (u != odetail[4])
            {
                Response.Redirect("/search/err.aspx");
            }//不是买卖双方的用户无法查看该订单!

            if (odetail[1] != "2")
            {
                phEditDisabled.Visible = true;
                phEditEnabled.Visible = false;
            }
            else
            {
                phEditDisabled.Visible = false;
                phEditEnabled.Visible = true;
            }
        }//承运方显示的文本

        if (odetail[1] != "2")
        {
            PlaceHolder2.Visible = false;
            PlaceHolder1.Visible = false;
        }

        ltrSMS.Text = "<a href=\"/member/pm_detail.aspx?cid=" + odetail[4] + "\" id=\"linkSMS\" target=\"_blank\"></a>";

        AllinFreight AllinFreight1 = new AllinFreight();
        string[] fdetail;
        if (odetail[7] == "0")
        {
            fdetail = AllinFreight1.GetFreightDetail("9", ck.CheckNumber(odetail[6]), "0");
        }
        else
        {
            fdetail = AllinFreight1.GetFreightDetail("9", "0", ck.CheckNumber(odetail[7]));
        }

        ltrEndDate.Text = Convert.ToDateTime(fdetail[6]).ToString("yyyy-MM-dd");
        ltrFreightTitle.Text = "<span style=\"font-weight:bold;font-size:14px\">" + odetail[75] + "</span>";
        ltrFreightPostdate.Text = Convert.ToDateTime(odetail[65]).ToString("MM") + "/" + Convert.ToDateTime(odetail[65]).ToString("dd");
        ltrFreightEnddate.Text = Convert.ToDateTime(odetail[66]).ToString("MM") + "/" + Convert.ToDateTime(odetail[66]).ToString("dd");
        ltrFreightCompany.Text = fdetail[18];
        ltrFreightAllinStar.Text = fdetail[19];
        ltrFreightUserStar.Text = fdetail[20];
        ltrFreightLine.Text = odetail[69];
        ltrFreightStartport.Text = odetail[70];
        ltrFreightDestport.Text = odetail[71];
        ltrFreightAssuranceSpace.Text = odetail[100];
        ltrFreightAssurancePrice.Text = odetail[101];
        lblTousu.Text = fdetail[18];

        AllinUser AllinUser1 = new AllinUser();
        string[] udetail;
        udetail = AllinUser1.GetUserDetail(u);
        txtbank.Value = udetail[50];
        txtbankname.Value = udetail[51];
        txtbankaccount.Value = udetail[52];
        txtotheraccount.Value = udetail[53];
        ltrOverageTotal.Text = udetail[55];
        ltrOverageAvailable.Text = (Convert.ToInt32(ltrOverageTotal.Text) - Convert.ToInt32(ltrOverageThis.Text)).ToString();
        ltrPayJump.Text = "<a href=\"/member/order/pay_sel_single.aspx?orderid=" + orderid + "\">立即充值</a>";

        //if (Convert.ToInt32(ltrOverageTotal.Text) - Convert.ToInt32(ltrOverageThis.Text) >= 0)
        //{
        //    PlaceHolder8.Visible = true;
        //    PlaceHolder9.Visible = false;
        //    PlaceHolder10.Visible = true;
        //    PlaceHolder11.Visible = false;
        //}
        //else
        //{
        //    PlaceHolder8.Visible = false;
        //    PlaceHolder9.Visible = true;
        //    PlaceHolder10.Visible = false;
        //    PlaceHolder11.Visible = true;
        //}

        PlaceHolder8.Visible = true;
        PlaceHolder9.Visible = false;
        PlaceHolder10.Visible = true;
        PlaceHolder11.Visible = false;
    }
Exemplo n.º 7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            AllinOrder AllinOrder1 = new AllinOrder();
            GetRequest GetRequest1 = new GetRequest();

            string u = GetRequest1.GetRequestCookies("user_id", "0");

            if (u == "0")
            {

            }
            else
            {
                if (AllinOrder1.GetOrderTry(u) == "success")
                {
                    Response.Redirect("tryalready.aspx");
                }
                else
                {
                    AllinOrder1.SetOrderTry(u);
                    Response.Redirect("trysuccess.aspx");
                }

            }
        }
    }
Exemplo n.º 8
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        check ck = new check();
        string username = ck.CheckInput(txtUsername.Value);
        string password = ck.CheckInput(txtPassword.Value);
        string autologin = "******";

        if (chkAutoLogin.Checked == true)
        {
            autologin = "******";
        }
        else
        {
            autologin = "******";
        }

        if (username == "" && password == "")
        {
            MessageBox("opfail", "未填写用户名和密码");
        }
        else
        {
            if (username == "")
            {
                MessageBox("opfail", "未填写用户名");
            }
            if (password == "")
            {
                MessageBox("opfail", "未填写密码");
            }
        }

        data_conn cn = new data_conn();
        DataSet ds = new DataSet();
        string sql = "";

        sql = sql + "SELECT ";
        sql = sql + "UserID,UserName,ifvip,ifmanage ";
        sql = sql + "FROM ";
        sql = sql + "TB_User ";
        sql = sql + "WHERE ";
        sql = sql + "UserName = '******' ";
        sql = sql + "AND UserPassword = '******' ";

        ds = cn.mdb_ds(sql, "user");

        if (ds.Tables["user"].Rows.Count > 0)
        {
            string userid = ds.Tables["user"].Rows[0][0].ToString();
            string usernm = ds.Tables["user"].Rows[0][1].ToString();
            string ifvip = ds.Tables["user"].Rows[0]["ifvip"].ToString();
            string ifmanage = ds.Tables["user"].Rows[0]["ifmanage"].ToString();

            Response.Cookies["user_id"].Value = userid;
            Response.Cookies["user_name"].Value = Server.UrlEncode(usernm);
            Response.Cookies["user_password"].Value = password;
            Response.Cookies["ifvip"].Value = ifvip;
            Response.Cookies["ifmanage"].Value = ifmanage;

            if (autologin == "1")
            {
                Response.Cookies["user_id"].Expires = DateTime.Now.AddDays(365);
                Response.Cookies["user_name"].Expires = DateTime.Now.AddDays(365);
                Response.Cookies["user_password"].Expires = DateTime.Now.AddDays(365);
                Response.Cookies["ifvip"].Expires = DateTime.Now.AddDays(365);
                Response.Cookies["ifmanage"].Expires = DateTime.Now.AddDays(365);
            }

            AllinOrder AllinOrder1 = new AllinOrder();
            GetRequest GetRequest1 = new GetRequest();

            string u = GetRequest1.GetRequestCookies("user_id", "0");

            if (AllinOrder1.GetOrderTry(u) == "success")
            {
                Response.Redirect("tryalready.aspx");
            }
            else
            {
                AllinOrder1.SetOrderTry(u);
                Response.Redirect("trysuccess.aspx");
            }

        }
        else
        {
            MessageBox("opfail", "用户名或密码填写错误");
        }
    }
Exemplo n.º 9
0
    public void LoadSavedOrder()
    {
        check ck = new check();
        data_conn cn = new data_conn();
        DataSet ds = new DataSet();
        GetRequest GetRequest1 = new GetRequest();

        string u = ck.CheckNumber(GetRequest1.GetRequestCookies("user_id", "0"));
        string orderid = ck.CheckInput(GetRequest1.GetRequestQueryString("orderid", "0"));
        string role = GetRequest1.GetRequestQueryString("role", "");

        AllinOrder AllinOrder1 = new AllinOrder();
        string[] odetail;
        odetail = AllinOrder1.GetOrderDetail(orderid);
        ltrOrderViewCode.Text = odetail[0];
        ltrOrderViewShipper.Text = odetail[8];
        ltrOrderViewConsignee.Text = odetail[9];
        ltrOrderViewNotifyParty.Text = odetail[10];
        ltrOrderViewCompanyName.Text = odetail[11];
        ltrOrderViewEmail.Text = odetail[12];
        ltrOrderViewContactor.Text = odetail[13];
        ltrOrderViewMobile.Text = odetail[14];
        ltrOrderViewTel.Text = odetail[15];
        ltrOrderViewFax.Text = odetail[16];
        ltrOrderViewStartport.Text = odetail[17];
        ltrOrderViewMidport.Text = odetail[18];
        ltrOrderViewDestport.Text = odetail[19];
        ltrOrderViewMarksNumbers.Text = odetail[20];
        ltrOrderViewNumbersofPackages.Text = odetail[21];
        ltrOrderViewDescription.Text = odetail[22];
        ltrOrderViewGrossWeight.Text = odetail[23];
        ltrOrderViewMeasurement.Text = odetail[24];
        ltrOrderViewCarrier.Text = odetail[26];
        ltrOrderViewKaihangri.Text = odetail[27];
        ltrOrderViewZhuangxiangri.Text = odetail[28];
        ltrOrderViewJieguanri.Text = odetail[29];
        ltrOrderViewGP.Text = odetail[34];
        ltrFreightGP.Text = odetail[49];
        ltrFreightGPV.Text = odetail[50];
        ltrFreightAppend.Text = odetail[44];
        ltrFreightCarrier.Text = odetail[26];
        ltrOrderViewHyf.Text = odetail[59];
        ltrOrderViewBeizhu.Text = odetail[36];

        if (odetail[44] != "")
        {
            ltrOrderFujiafei.Text = "(附加费:" + odetail[44] + ")";
        }

        string order_type_string = odetail[58];

        ltrSMS.Text = "<a href=\"/member/pm_detail.aspx?cid=" + odetail[4] + "\" id=\"linkSMS\" target=\"_blank\"></a>";

        AllinFreight AllinFreight1 = new AllinFreight();
        string[] fdetail;
        if (odetail[7] == "0")
        {
            fdetail = AllinFreight1.GetFreightDetail("9", ck.CheckNumber(odetail[6]), "0");
        }
        else
        {
            fdetail = AllinFreight1.GetFreightDetail("9", "0", ck.CheckNumber(odetail[7]));
        }

        ltrFreightTitle.Text = "<span style=\"font-weight:bold;font-size:14px\">" + odetail[75] + "</span>";
        ltrFreightPostdate.Text = Convert.ToDateTime(odetail[65]).ToString("MM") + "/" + Convert.ToDateTime(odetail[65]).ToString("dd");
        ltrFreightEnddate.Text = Convert.ToDateTime(odetail[66]).ToString("MM") + "/" + Convert.ToDateTime(odetail[66]).ToString("dd");
        ltrFreightCompany.Text = fdetail[18];
        ltrFreightAllinStar.Text = fdetail[19];
        ltrFreightUserStar.Text = fdetail[20];
        ltrFreightLine.Text = odetail[69];
        ltrFreightStartport.Text = odetail[70];
        ltrFreightDestport.Text = odetail[71];
        ltrFreightAssuranceSpace.Text = odetail[100];
        ltrFreightAssurancePrice.Text = odetail[101];

        ltrOrderFirstStep.Text = odetail[2] + ":订舱方 " + odetail[107] + " 创建订单";

        string sql = "";
        sql += "SELECT * FROM TB_ORDER_DETAIL WHERE order_code = '" + orderid + "'";

        ds = cn.mdb_ds(sql, "order");
        rptOrder.DataSource = ds.Tables["order"].DefaultView;
        rptOrder.DataBind();
    }
Exemplo n.º 10
0
    protected void submitbtn_ServerClick(object sender, EventArgs e)
    {
        check check1 = new check();
        GetRequest GetRequest1 = new GetRequest();

        string u = "";
        u = check1.CheckNumber(GetRequest1.GetRequestCookies("user_id", "0"));

        data_conn cn = new data_conn();
        DataSet ds = new DataSet();
        DataSet ds1 = new DataSet();
        DataSet ds2 = new DataSet();
        string sql = "";

        string surl = url2.Value.Trim();
        string vurl = "";

        if (surl.IndexOf("http://") == -1)
        {
            surl = "http://" + surl;
        }

        sql = "SELECT * FROM TB_REPASTE_VIDEO WHERE '" + check1.CheckRecord(surl) + "' LIKE '%' + vtag + '%'";

        ds = cn.mdb_ds(sql, "video");

        if (ds.Tables["video"].Rows.Count > 0)
        {

            string regexp1 = ds.Tables["video"].Rows[0]["surl"].ToString();
            string regexp2 = ds.Tables["video"].Rows[0]["durl"].ToString();

            Match TitleMatch = Regex.Match(surl, regexp1, RegexOptions.IgnoreCase | RegexOptions.Multiline);

            string urlkey = TitleMatch.Groups[1].Value.ToString();
            if (urlkey != "")
            {
                vurl = Regex.Replace(regexp2, "urlkey", urlkey);
            }

        }

        sql = "INSERT INTO TB_REPASTE_TOPIC (topic,txt,userid,url) VALUES ('" + check1.CheckInput(title.Value) + "','" + vurl + "<br/>" + check1.CheckRecord(HiddenField1.Value) + "'," + u + ",'" + check1.CheckInput(url2.Value) + "'); SELECT @@identity ";

        ds1 = cn.mdb_ds(sql, "topic");

        string redirect_tid = ds1.Tables["topic"].Rows[0][0].ToString();//获得转贴主记录的id号

        sql = "INSERT INTO TB_REPASTE_REPASTE (tid,userid) VALUES ('" + ds1.Tables["topic"].Rows[0][0].ToString() + "'," + u + "); SELECT @@identity ";

        ds2 = cn.mdb_ds(sql, "paste");

        string redirect_rid = ds2.Tables["paste"].Rows[0][0].ToString();//获得转贴的id号

        sql = "SELECT TOP 4 * FROM V_REPASTE_INDEX WHERE userid2 = " + u + " ORDER BY rid DESC";

        ds2 = cn.mdb_ds(sql, "index");

        string body_template = "";

        for (int i = 0; i < ds2.Tables["index"].Rows.Count; i++)
        {
            body_template = body_template + "<a href=\"/club/repaste/detail.aspx?rid=" + ds2.Tables["index"].Rows[i]["rid"].ToString() + "\">" + check1.CheckRecord(ds2.Tables["index"].Rows[i]["topic"].ToString()) + "</a><br/>";
            if (i == ds2.Tables["index"].Rows.Count - 1)
            {
                body_template += "<div style=\"width:98%;text-align:right;\"><a href=\"/club/repaste/other.aspx?uid=" + u + "\">查看TA的全部转贴>></a></div>";
            }
        }

        string[] udetail;
        AllinUser AllinUser1 = new AllinUser();
        udetail = AllinUser1.GetUserDetail(u);

        string uhomeid = udetail[10];

        mysqldata_conn mysqlcn = new mysqldata_conn();

        sql = "select uc_members.uid,uc_members.username,uchome_space.name from uc_members left join uchome_space on uc_members.uid = uchome_space.uid where uc_members.uid = " + uhomeid;

        ds2 = mysqlcn.mdb_ds(sql, "uc");

        string uhomename = "";

        if (ds2.Tables["uc"].Rows[0]["name"].ToString() == "")
        {
            uhomename = ds2.Tables["uc"].Rows[0]["username"].ToString();
        }
        else
        {
            uhomename = ds2.Tables["uc"].Rows[0]["name"].ToString();
        }

        sql = "DELETE FROM uchome_feed WHERE appid = 1 AND icon = 'repaste' AND uid = " + uhomeid + ";INSERT INTO uchome_feed (appid,icon,uid,username,dateline,friend,hash_data,title_template,body_template) VALUES (1,'repaste'," + uhomeid + ",'" + uhomename + "'," + UnixTimestamp() + ",0,'" + UnixTimestamp() + "','<b>{actor}</b> 转贴给大家','" + body_template + "')";

        //Response.Write(sql);
        mysqlcn.mdb_exe(sql);

        if (Radio2.Checked == true)
        {
            sql = "";
            if (answer1.Value != "")
            {
                DataSet ds_v = new DataSet();
                sql = "INSERT INTO TB_REPASTE_VOTE (txt,vcount,tid) VALUES ('" + check1.CheckInput(answer1.Value) + "',1," + redirect_tid + ");SELECT @@identity ";
                ds_v = cn.mdb_ds(sql,"vote");
                sql = "INSERT INTO TB_REPASTE_VIEW (userid,tid,voteid) VALUES (" + u + "," + redirect_tid + "," + ds_v.Tables["vote"].Rows[0][0].ToString() + ");";
            }

            if (answer2.Value != "")
            {
                sql += "INSERT INTO TB_REPASTE_VOTE (txt,vcount,tid) VALUES ('" + check1.CheckInput(answer2.Value) + "',0," + redirect_tid + ");";
            }

            if (answer3.Value != "")
            {
                sql += "INSERT INTO TB_REPASTE_VOTE (txt,vcount,tid) VALUES ('" + check1.CheckInput(answer3.Value) + "',0," + redirect_tid + ");";
            }

            if (answer4.Value != "")
            {
                sql += "INSERT INTO TB_REPASTE_VOTE (txt,vcount,tid) VALUES ('" + check1.CheckInput(answer4.Value) + "',0," + redirect_tid + ");";
            }

            if (answer5.Value != "")
            {
                sql += "INSERT INTO TB_REPASTE_VOTE (txt,vcount,tid) VALUES ('" + check1.CheckInput(answer5.Value) + "',0," + redirect_tid + ");";
            }

            if (answer6.Value != "")
            {
                sql += "INSERT INTO TB_REPASTE_VOTE (txt,vcount,tid) VALUES ('" + check1.CheckInput(answer6.Value) + "',0," + redirect_tid + ");";
            }

            if (answer7.Value != "")
            {
                sql += "INSERT INTO TB_REPASTE_VOTE (txt,vcount,tid) VALUES ('" + check1.CheckInput(answer7.Value) + "',0," + redirect_tid + ");";
            }

            if (answer8.Value != "")
            {
                sql += "INSERT INTO TB_REPASTE_VOTE (txt,vcount,tid) VALUES ('" + check1.CheckInput(answer8.Value) + "',0," + redirect_tid + ");";
            }
            cn.mdb_exe(sql);
        }

        Response.Redirect("detail.aspx?rid=" + redirect_rid);
    }
Exemplo n.º 11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.Cookies["user_id"] != null)
        {
            if (Request.Cookies["user_id"].Value.ToString() != "")
            {
                pm p = new pm();
                string newpm = p.getnewpm(Request.Cookies["user_id"].Value.ToString());

                if (newpm == "0")
                {
                    Literal1.Text = "0";
                }
                else
                {
                    Literal1.Text = newpm;
                }
                if (Request.Cookies["realname"] != null)
                {
                    Literal2.Text = "欢迎您!" + Server.UrlDecode(Request.Cookies["realname"].Value.ToString()) + " <a href=\"/accounts/logout.aspx\">退出登录</a>";
                }

                homelogin.Visible = true;
                homelogout.Visible = false;
            }
            else
            {
                PlaceHolder1.Visible = false;
                PlaceHolder2.Visible = true;
                Literal2.Text = "<a href=\"/accounts/login.aspx\"><img src=\"/images/fcl/jt.gif\" border=\"0\" width=\"3\" height=\"5\" />登录</a>";
                homelogin.Visible = false;
                homelogout.Visible = true;
            }
        }
        else
        {
            PlaceHolder1.Visible = false;
            PlaceHolder2.Visible = true;
            Literal2.Text = "<a href=\"/accounts/login.aspx\"><img src=\"/images/fcl/jt.gif\" border=\"0\" width=\"3\" height=\"5\" />登录</a>";
            homelogin.Visible = false;
            homelogout.Visible = true;
        }

        GetRequest GetRequest1 = new GetRequest();
        string uvid = "0";
        if (GetRequest1.GetRequestCookies("uvid", "0") == "0")
        {
            data_conn cn = new data_conn();
            DataSet ds = new DataSet();
            string sql = "INSERT INTO TB_UV_LIST (uvtime) values (getdate());select @@identity";
            ds = cn.mdb_ds(sql, "uvid");
            uvid = ds.Tables["uvid"].Rows[0][0].ToString();

            Response.Cookies["uvid"].Value = uvid;
            Response.Cookies["uvid"].Expires = DateTime.Now.AddDays(365);
        }
        else
        {
            uvid = GetRequest1.GetRequestCookies("uvid", "0");
        }

        string srvlink = "";
        srvlink += "<a title=\"欢迎使用在线客服\" id=\"service_link\" href=\"http://im.cn.alisoft.com/webim/webim/webclient!open.jspa?lang=zh_cn&img=0&memberid=";
        srvlink += "e" + uvid;
        srvlink += "&targetid=cnalichna910254766&siteId=4035516&initiative=1&domain=probe.alisoft.com&siteFlag=enet&colorStyle=orange&msg=&ct=\" target=\"_blank\">在线客服</a>";
        Literal3.Text = srvlink;
    }
Exemplo n.º 12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        login login1 = new login();
        login1.login();

        check check1 = new check();
        GetRequest GetRequest1 = new GetRequest();
        string p = "";
        p = check1.CheckNumber(GetRequest1.GetRequestQueryString("p", "1"));

        string u = "";
        u = check1.CheckNumber(GetRequest1.GetRequestCookies("user_id", "0"));

        data_conn cn = new data_conn();
        DataSet ds = new DataSet();
        string sql = "";

        sql = "SELECT UCenterHomeUid FROM TB_User WHERE userid = " + u;

        //Response.Write(sql);

        ds = cn.mdb_ds(sql, "tb_user");

        string uid = "0";

        uid = ds.Tables["tb_user"].Rows[0][0].ToString();

        mysqldata_conn mysqlcn = new mysqldata_conn();

        //以下为获得“我的好友”
        sql = "SELECT friendid FROM uc_friends WHERE uid = " + uid;

        ds = mysqlcn.mdb_ds(sql, "uc_friends");

        //ltrMyFriendCount.Text = ds.Tables["uc_friends"].Rows.Count.ToString();

        string uidlist = "";

        for (int i = 0; i < ds.Tables["uc_friends"].Rows.Count; i++)
        {
            if (uid != "")
            {
                uidlist += ds.Tables["uc_friends"].Rows[i][0].ToString() + ",";
            }

        }

        uidlist += "0";

        sql = "SELECT * FROM TB_User WHERE UCenterHomeUid in (" + uidlist + ") ORDER BY USERID";

        ds = cn.mdb_ds(sql, "myfriends");

        int item = 0;
        item = (Convert.ToInt32(p) - 1) * 10;

        sql = "SELECT TOP 10 * ";
        sql += "FROM (SELECT * FROM V_REPASTE_INDEX) AS T WHERE uhomeid2 in (" + uidlist + ") AND rid NOT IN ";
        sql += "(SELECT TOP " + item.ToString() + " rid FROM V_REPASTE_INDEX WHERE uhomeid2 in (" + uidlist + ") ORDER BY rid DESC) ORDER BY rid DESC";

        //Response.Write(sql);
        ds = cn.mdb_ds(sql, "repaste");
        Repeater1.DataSource = ds.Tables["repaste"].DefaultView;
        Repeater1.DataBind();

        sql = "SELECT rid as c FROM V_REPASTE_INDEX WHERE uhomeid2 in (" + uidlist + ")";
        ds = cn.mdb_ds(sql, "repaste");

        string base_url = "friend.aspx?p=";

        string end_url = "";

        int cp = Convert.ToInt32(p);
        int tp = 1;
        int count = 0;
        count = ds.Tables["repaste"].Rows.Count;

        if (count % 10 > 0 || count == 0)
        {
            tp = count / 10 + 1;
        }
        else
        {
            tp = count / 10;
        }

        string s = "";
        if (cp == 1)
        {
            //s = s + " <span class=\"selected2\">首页</span> ";
            //s = s + " <span class=\"selected2\">上一页</span> ";
            s = s + " <span class=\"selected2\">1</span> ";
            for (int i = 2; i <= (tp < 10 ? tp : 10); i++)
            {
                s = s + " <a href=\"" + base_url + "" + i + end_url + "\"><span>" + i + "</span></a> ";
            }
        }
        else
        {
            s = s + " <a href=\"" + base_url + "1" + end_url + "\"><span>首页</span></a> ";
            s = s + " <a href=\"" + base_url + (cp - 1) + end_url + "\"><span>上一页</span></a> ";
            for (int i = (cp <= 5 ? 1 : (tp - cp < 5 ? (tp - 9 < 1 ? 1 : tp - 9) : cp - 4)); i <= cp - 1; i++)
            {
                s = s + " <a href=\"" + base_url + i + end_url + "\"><span>" + i + "</span></a> ";
            }

            s = s + " <span class=\"selected2\">" + cp + "</span> ";

            for (int i = cp + 1; i <= (cp + 5 >= tp ? tp : (cp <= 5 ? (tp >= 10 ? 10 : tp) : cp + 5)); i++)
            {
                s = s + " <a href=\"" + base_url + i + end_url + "\"><span>" + i + "</span></a> ";
            }
        }

        if (cp == tp)
        {
            //s = s + " <span class=\"selected2\">下一页</span> ";
            //s = s + " <span class=\"selected2\">尾页</span> ";
        }
        else
        {
            s = s + " <a href=\"" + base_url + (cp + 1) + end_url + "\">下一页</a> ";
            s = s + " <a href=\"" + base_url + tp + end_url + "\">尾页</a> ";
        }
        pagecontrol_string = s;
    }
Exemplo n.º 13
0
    public void SetFreightViewrecord2(string type, string yid, string ydid,string yuserid)
    {
        try
        {
            GetRequest GetRequest1 = new GetRequest();
            check ck = new check();
            data_conn cn = new data_conn();
            string userid = GetRequest1.GetRequestCookies("user_id", "0");

            string address = HttpContext.Current.Request.UserHostAddress;
            string sql = "";

            if (userid != "0")
            {
                sql += "INSERT INTO TB_FREIGHT_VIEWRECORD (userid,userip,freight_type,freight_code,freight_code1,yuserid) VALUES (" + userid + ",'" + address + "'," + type + "," + yid + ", '" + ydid + "'," + yuserid + ")";
            }
            else
            {
                sql += "INSERT INTO TB_FREIGHT_VIEWRECORD (userid,userip,freight_type,freight_code,freight_code1,yuserid) VALUES (0,'" + address + "'," + type + "," + yid + ", '" + ydid + "'," + yuserid + ")";
            }

            string agent = "";
            agent = System.Web.HttpContext.Current.Request.ServerVariables["HTTP_USER_AGENT"].ToString();

            string[] k;
            k = new string[10];

            int ifbot = 0;

            k[0] = "spider";
            k[1] = "bot";
            k[2] = "slurp";
            k[3] = "pirst";
            k[4] = "wget";
            k[5] = "oray";
            k[6] = "nutch";

            for (int i = 0; i < k.Length - 1; i++)
            {
                if (k[i] != null)
                {
                    if (agent.ToLower().Contains(k[i]))
                    {
                        ifbot = 1;
                    }
                }
            }

            if (ifbot == 0)
            {
                cn.mdb_exe(sql);
            }

        }
        catch
        {

        }
    }
Exemplo n.º 14
0
    protected void Page_Load(object sender, EventArgs e)
    {
        GetRequest GetRequest1 = new GetRequest();
        string p = "";
        p = GetRequest1.GetRequestQueryString("p", "1");

        string u = "";
        u = GetRequest1.GetRequestCookies("user_id", "0");

        int item = 0;
        item = (Convert.ToInt32(p) - 1) * 10;

        data_conn cn = new data_conn();
        DataSet ds = new DataSet();
        string sql = "";
        sql += "SELECT TOP 10 * ";
        sql += "FROM (SELECT * FROM V_REPASTE_INDEX) AS T WHERE rid NOT IN ";
        sql += "(SELECT TOP " + item.ToString() + " rid FROM V_REPASTE_INDEX ORDER BY rid DESC) ORDER BY rid DESC";

        ds = cn.mdb_ds(sql, "repaste");
        Repeater1.DataSource = ds.Tables["repaste"].DefaultView;
        Repeater1.DataBind();

        sql = "SELECT rid as c FROM V_REPASTE_INDEX ";
        ds = cn.mdb_ds(sql, "repaste");

        string base_url = "random.aspx?p=";

        string end_url = "";

        int cp = Convert.ToInt32(p);
        int tp = 1;
        int count = 0;
        count = ds.Tables["repaste"].Rows.Count;

        if (count % 10 > 0 || count == 0)
        {
            tp = count / 10 + 1;
        }
        else
        {
            tp = count / 10;
        }

        string s = "";
        if (cp == 1)
        {
            //s = s + " <span class=\"selected2\">首页</span> ";
            //s = s + " <span class=\"selected2\">上一页</span> ";
            s = s + " <span class=\"selected2\">1</span> ";
            for (int i = 2; i <= (tp < 10 ? tp : 10); i++)
            {
                s = s + " <a href=\"" + base_url + "" + i + end_url + "\"><span>" + i + "</span></a> ";
            }
        }
        else
        {
            s = s + " <a href=\"" + base_url + "1" + end_url + "\"><span>首页</span></a> ";
            s = s + " <a href=\"" + base_url + (cp - 1) + end_url + "\"><span>上一页</span></a> ";
            for (int i = (cp <= 5 ? 1 : (tp - cp < 5 ? (tp - 9 < 1 ? 1 : tp - 9) : cp - 4)); i <= cp - 1; i++)
            {
                s = s + " <a href=\"" + base_url + i + end_url + "\"><span>" + i + "</span></a> ";
            }

            s = s + " <span class=\"selected2\">" + cp + "</span> ";

            for (int i = cp + 1; i <= (cp + 5 >= tp ? tp : (cp <= 5 ? (tp >= 10 ? 10 : tp) : cp + 5)); i++)
            {
                s = s + " <a href=\"" + base_url + i + end_url + "\"><span>" + i + "</span></a> ";
            }
        }

        if (cp == tp)
        {
            //s = s + " <span class=\"selected2\">下一页</span> ";
            //s = s + " <span class=\"selected2\">尾页</span> ";
        }
        else
        {
            s = s + " <a href=\"" + base_url + (cp + 1) + end_url + "\">下一页</a> ";
            s = s + " <a href=\"" + base_url + tp + end_url + "\">尾页</a> ";
        }
        pagecontrol_string = s;
    }
Exemplo n.º 15
0
    protected void Page_Load(object sender, EventArgs e)
    {
        login login1 = new login();
        login1.login();

        check check1 = new check();
        GetRequest GetRequest1 = new GetRequest();
        string p = "";
        p = check1.CheckNumber(GetRequest1.GetRequestQueryString("p", "1"));

        string u = "";
        u = check1.CheckNumber(GetRequest1.GetRequestCookies("user_id", "0"));

        string tip = "";
        tip = GetRequest1.GetRequestQueryString("tip", "0");

        if (tip == "delete")
        {
            Literal1.Text = "<div class=\"main2box_notice\" id=\"main2box_notice\"><img src=\"images/LedIcon_001.GIF\">&nbsp;&nbsp;转帖删除成功</div>";
            Literal1.Text = Literal1.Text + "<script>function hidetip(){document.getElementById(\"main2box_notice\").style.display = \"none\"};setTimeout(\"hidetip()\",\"2000\");</script>";
        }

        int item = 0;
        item = (Convert.ToInt32(p) - 1) * 10;

        data_conn cn = new data_conn();
        DataSet ds = new DataSet();
        string sql = "";
        sql += "SELECT TOP 10 * ";
        sql += "FROM (SELECT * FROM V_REPASTE_INDEX WHERE userid2 = " + u + ") AS T WHERE rid NOT IN ";
        sql += "(SELECT TOP " + item.ToString() + " rid FROM V_REPASTE_INDEX WHERE userid2 = " + u + " ORDER BY rid DESC) ORDER BY rid DESC";

        ds = cn.mdb_ds(sql, "repaste");
        Repeater1.DataSource = ds.Tables["repaste"].DefaultView;
        Repeater1.DataBind();

        sql = "SELECT rid as c FROM V_REPASTE_INDEX WHERE userid2 = " + u;
        ds = cn.mdb_ds(sql, "repaste");

        string base_url = "index.aspx?p=";

        string end_url = "";

        int cp = Convert.ToInt32(p);
        int tp = 1;
        int count = 0;
        count = ds.Tables["repaste"].Rows.Count;

        if (count % 10 > 0 || count == 0)
        {
            tp = count / 10 + 1;
        }
        else
        {
            tp = count / 10;
        }

        string s = "";
        if (cp == 1)
        {
            //s = s + " <span class=\"selected2\">首页</span> ";
            //s = s + " <span class=\"selected2\">上一页</span> ";
            s = s + " <span class=\"selected2\">1</span> ";
            for (int i = 2; i <= (tp < 10 ? tp : 10); i++)
            {
                s = s + " <a href=\"" + base_url + "" + i + end_url + "\"><span>" + i + "</span></a> ";
            }
        }
        else
        {
            s = s + " <a href=\"" + base_url + "1" + end_url + "\"><span>首页</span></a> ";
            s = s + " <a href=\"" + base_url + (cp - 1) + end_url + "\"><span>上一页</span></a> ";
            for (int i = (cp <= 5 ? 1 : (tp - cp < 5 ? (tp - 9 < 1 ? 1 : tp - 9) : cp - 4)); i <= cp - 1; i++)
            {
                s = s + " <a href=\"" + base_url + i + end_url + "\"><span>" + i + "</span></a> ";
            }

            s = s + " <span class=\"selected2\">" + cp + "</span> ";

            for (int i = cp + 1; i <= (cp + 5 >= tp ? tp : (cp <= 5 ? (tp >= 10 ? 10 : tp) : cp + 5)); i++)
            {
                s = s + " <a href=\"" + base_url + i + end_url + "\"><span>" + i + "</span></a> ";
            }
        }

        if (cp == tp)
        {
            //s = s + " <span class=\"selected2\">下一页</span> ";
            //s = s + " <span class=\"selected2\">尾页</span> ";
        }
        else
        {
            s = s + " <a href=\"" + base_url + (cp + 1) + end_url + "\">下一页</a> ";
            s = s + " <a href=\"" + base_url + tp + end_url + "\">尾页</a> ";
        }
        pagecontrol_string = s;
    }
Exemplo n.º 16
0
    protected void LoadRecord(string userid)
    {
        data_conn cn = new data_conn();
        DataSet ds = new DataSet();

        string sql = "";
        //sql = "SELECT realname,companyname,phone,movephone,star_allin,z_yingyezhizhao,z_shenfenzheng,z_nvocc,z_kongyuntongpai FROM TB_USER WHERE userid = " + userid + " AND Regtime > '2010-4-15 0:00:00' ";
        sql = "SELECT CompanyType,realname,companyname,phone,movephone,star_allin,z_yingyezhizhao,z_shenfenzheng,z_nvocc,z_kongyuntongpai FROM TB_USER WHERE userid = " + userid + "";

        ds = cn.mdb_ds(sql, "user");

        if (ds.Tables["user"].Rows.Count > 0)
        {
            GetRequest GetRequest1 = new GetRequest();
            if (GetRequest1.GetRequestCookies("admin_group", "3") == "3" || ds.Tables["user"].Rows[0]["CompanyType"].ToString() == "1")
            {
                Response.Redirect("userlist.aspx");
            }

            ltrRealname.Text = ds.Tables["user"].Rows[0]["realname"].ToString();
            ltrCompanyName.Text = ds.Tables["user"].Rows[0]["companyname"].ToString();
            ltrPhone.Text = ds.Tables["user"].Rows[0]["phone"].ToString();
            ltrMovephone.Text = ds.Tables["user"].Rows[0]["movephone"].ToString();
            rbl_star_allin.SelectedValue = ds.Tables["user"].Rows[0]["star_allin"].ToString();

            if (ds.Tables["user"].Rows[0]["z_yingyezhizhao"].ToString() == "1")
            {
                cb_z_yingyezhizhao.Checked = true;
            }
            if (ds.Tables["user"].Rows[0]["z_shenfenzheng"].ToString() == "1")
            {
                cb_z_shenfenzheng.Checked = true;
            }
            if (ds.Tables["user"].Rows[0]["z_nvocc"].ToString() == "1")
            {
                cb_z_nvocc.Checked = true;
            }
            if (ds.Tables["user"].Rows[0]["z_kongyuntongpai"].ToString() == "1")
            {
                cb_z_kongyuntongpai.Checked = true;
            }

        }
        else
        {
            ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "提示", "alert('没有此记录!');", true);
        }
    }