using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using xabaraCOM;

public partial class webXabara_adminUser_exe : System.Web.UI.Page
{
    admin a = new admin();
    sqlServer sql = new sqlServer();

    protected void Page_Load(object sender, EventArgs e)
    {
        a.check(string.Empty);

        string uID = Request.QueryString["id"];
        string ifStr = string.Empty;
        string pageStr = string.Empty;

        if (!uID.Equals("a"))
        {
            ifStr = " and logLogin.userID='" + uID + "'";
        }
        else
        {
            //ifStr = " and userID<>'xabara'";
            pageStr = "&id=a";
        }

        string strSql = "select logLogin.userID,logLogin.loginDate,logLogin.exeTitle,logLogin.exeUrl,logLogin.loginIP,AdminUser.UserName from logLogin left join AdminUser on logLogin.UserId=AdminUser.UserId where logLogin.userType='admin' " + ifStr + " order by id DESC";
        //Response.Write(strSql);
        lblCurrentPage.Text = sql.RepeaterDB(RepeaterList, strSql, pageStr, 20, "page", "center", true);
    }

    public string ipStr(string str)
    {
        ipAddress i = new ipAddress();
        return i.addressCN(str);
    }
}