using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class member_memberselect : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string u_name = Session["membername"].ToString();
        //查询数据
        Fm.Bussiness.public_select ps = new Fm.Bussiness.public_select();
        //会员数据
        DataView dv = ps.Getps("Fm_user_view","u_name,u_nc,u_mail,r_name","u_name='"+u_name+"'");
        DataView login = ps.Getps("Fm_login","count(*) as num","lo_user='"+u_name+"'");
        foreach (DataRow row in dv.Table.Rows)
        {
            Lab_user.Text = row["u_name"].ToString();
            Lab_nc.Text = row["u_nc"].ToString();
            Lab_mail.Text = row["u_mail"].ToString();
            Lab_role.Text = row["r_name"].ToString();
        }
        Lab_login.Text = login[0]["num"].ToString();
        //会员发布的文档信息
        foreach (DataRow row in ps.Getps("Fm_model_main", "count(*) as num,sum(click) as ck,sum(topclick) as up,sum(tread) as td", "username='" + u_name + "'").Table.Rows)
        {
            Lab_doc.Text = row["num"].ToString();
            Lab_click.Text = row["ck"].ToString();
            Lab_top.Text = row["up"].ToString();
            Lab_tread.Text = row["td"].ToString();
        }
        Lab_audit.Text = ps.Getps("Fm_model_main", "count(*) as num", "username='" + u_name + "' and audit=1")[0]["num"].ToString();
        Lab_auditing.Text = ps.Getps("Fm_model_main", "count(*) as num", "username='" + u_name + "' and audit=0")[0]["num"].ToString();
    }
}
