using System;
using System.Data;
using System.Configuration;
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;
using Common;
using System.Text.RegularExpressions;
namespace hqgl.user
{
    /// <summary>
    /// priv 的摘要说明
    /// </summary>
    public class priv
    {
        public priv()
        {
            //
            // TODO: 在此处添加构造函数逻辑
            //
        }
        public bool priv_yanzheng(string uname, string pid)
        {
            string sql = "select func_id_str from user_priv where user_priv in (select user_priv from reguser where u_id=#uname#)";
            sql = sql.Replace("#uname#", uname);
            DbHelper db = new DbHelper();
            object uid = db.ExecuteScalar(sql);
            string lst="";
            if(uid!=null)
                lst=uid.ToString();
            Regex rex=new Regex("(?<=\\D)"+pid+"(?=,)", RegexOptions.IgnoreCase);
            if (rex.IsMatch(lst))
                return true;
            else
                return false;

        }
        public string priv_build()
        {
            return null;
        }
    }
}
///5/&1*a*s*p*x**首发**