Page 1 of 1

Code to add the server time to the Who Is Online Page.

Posted: Tue Feb 26, 2008 10:33 am
by Hostmaster
Add the server time to the Who Is Online Page.

Reply: Add the server time to the Who Is Online Page.

Posted: Wed Mar 19, 2008 1:56 am
by m_plugables
Edit the Admin/Reports/WhoIsOnline.aspx page and add following html

Code: Select all

<tr class="noPrint">
            <td>
		<asp:Label ID="ServerTimeLabel" runat="server" EnableViewState="false" Font-Bold="true">Server Time: </asp:Label>
				<asp:Label ID="ServerTime" runat="server" EnableViewState="false" />
    	   </td>
</tr>
just after the the following line of html

Code: Select all

<table align="center" class="form" cellpadding="0" cellspacing="0" border="0"> 
then edit the Admin/Reports/WhoIsOnline.aspx.cs file and edit
protected void Page_Load(object sender, EventArgs e)
function to look like

Code: Select all

protected void Page_Load(object sender, EventArgs e)
    {
        ServerTime.Text = DateTime.Now.ToShortTimeString();
        if (!Page.IsPostBack)
        {
            //initialize form
            ActivityThreshold.Text = "30";
        }
    }

Posted: Wed Mar 19, 2008 10:33 am
by Hostmaster
:D Thanks

Posted: Wed Mar 19, 2008 11:52 am
by jmestep
Somebody send Mazar some Pepsi- we need to keep him around.