54 lines
1.3 KiB
C#
54 lines
1.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
|
|
namespace abbott_2024_event.BackEnd
|
|
{
|
|
public partial class ip_management : System.Web.UI.Page
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
string myIP = globalClass.GetIPAddress();
|
|
|
|
if (myIP == "::1")
|
|
{
|
|
myIP = "127.0.0.1";
|
|
}
|
|
|
|
Boolean isAllow = false;
|
|
|
|
if (myIP == "127.0.0.1")
|
|
{
|
|
isAllow = true;
|
|
}
|
|
|
|
string myIP_2 = myIP.Substring(0, myIP.LastIndexOf('.'));
|
|
|
|
if (myIP_2 == "60.251.161")
|
|
{
|
|
isAllow = true;
|
|
}
|
|
|
|
//isAllow = false;
|
|
|
|
if (isAllow == true)
|
|
{
|
|
clearAll.Visible = true;
|
|
clearData.Visible = true;
|
|
clearRec.Visible = true;
|
|
clearLine.Visible = true;
|
|
line_uid.Visible = true;
|
|
}
|
|
else {
|
|
clearAll.Visible = false;
|
|
clearData.Visible = false;
|
|
clearRec.Visible = false;
|
|
clearLine.Visible = false;
|
|
line_uid.Visible = false;
|
|
}
|
|
}
|
|
}
|
|
} |