首次推送
This commit is contained in:
66
Mtxfw.shop/_Admin/admin_User_log.aspx.cs
Normal file
66
Mtxfw.shop/_Admin/admin_User_log.aspx.cs
Normal file
@@ -0,0 +1,66 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace Mtxfw.shop._Admin
|
||||
{
|
||||
public partial class admin_User_log : Mtxfw.Utility.AdminPage
|
||||
{
|
||||
public Mtxfw.DAL.User_log daolog = new Mtxfw.DAL.User_log();
|
||||
public string stronlinecount = "0", stronlinecount2 = "0";
|
||||
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
base.OnLoad(e);
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Data_Bind();
|
||||
}
|
||||
|
||||
MyPager.PageChanged += delegate(object s, EventArgs ex)
|
||||
{
|
||||
Data_Bind();
|
||||
};
|
||||
}
|
||||
|
||||
protected void Data_Bind()
|
||||
{
|
||||
System.Text.StringBuilder sb = new System.Text.StringBuilder();
|
||||
String key = HttpUtility.UrlDecode(Request.QueryString["key"]);
|
||||
string Orderby = " Order By CONVERT(varchar(10),OperatingTime,120) desc,Orders desc";
|
||||
int order = 0;
|
||||
if (!String.IsNullOrEmpty(Request.QueryString["order"]))
|
||||
{
|
||||
order = Convert.ToInt32(Request.QueryString["order"]);
|
||||
}
|
||||
if (!String.IsNullOrEmpty(key))
|
||||
{
|
||||
key = key.Trim();
|
||||
if (key=="0")
|
||||
{
|
||||
key = key.Trim();
|
||||
sb.Append(" and MemberId=0");
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.Append(" and MemberId=(Select id from user_info b where b.UserName='" + key + "')");
|
||||
}
|
||||
|
||||
}
|
||||
Int32 Recount = daolog.GetCount("id>0" + sb.ToString());
|
||||
MyPager.PageSize = 100;
|
||||
Mtxfw.Utility.Tools.ToBind(Repeater1, daolog.GetPager(MyPager, "(select username from user_info b where id=a.MemberId) as CMemberId,", "id>0" + sb.ToString() + Orderby));
|
||||
MyPager.RecordCount = Recount;
|
||||
}
|
||||
protected void Run_Click(object s, System.EventArgs e)
|
||||
{
|
||||
daolog.Delete(0);
|
||||
Data_Bind();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user