Location: PHPKode > projects > phpMyPrepaid > phpmyprepaid/www/include/tabs/c_html.php
<?php

echo "\n";
if ($logged_now==1)
{
echo "<script Language=\"JavaScript\">\n";
echo "<!--
	var start;
	var our_time;
	
	function startcounter() 
	{
		var start_date = new Date();
		start = start_date.getTime();
		our_time = $lastlog_session_time_jvs;
		showcounter();
	}

	function showcounter ()
	{
		var now_date = new Date();
		var diff = now_date.getTime() - start + our_time;
			
		var hours = parseInt(diff / 3600000);
		if(isNaN(hours)) hours = 0;
			
		var minutes = parseInt((diff % 3600000) / 60000);
		if(isNaN(minutes)) minutes = 0;
			
		var seconds = parseInt(((diff % 3600000) % 60000) / 1000);
		if(isNaN(seconds)) seconds = 0;
			
		var timeValue = \" \" ;
		timeValue += ((hours < 10) ? \"0\" : \"\") + hours;
		timeValue += ((minutes < 10) ? \":0\" : \":\") + minutes;
		timeValue += ((seconds < 10) ? \":0\" : \":\") + seconds;
		
		document.online.status.value = timeValue;
		setTimeout(\"showcounter()\", 1000);
	}
	//-->
	</script> ";
}

echo "<tr> ";

echo "<table class=\"tabTable\" border=3 width=100% cellpadding=5 cellspacing=0>";
echo "<tr  > ";
echo "<td class=\"bl\"  width=250>";
echo "	<font color=\"black\">Connection Status for $pullUser </font>&nbsp;";
echo "</td></tr>";
echo "</table> ";

echo "<table bordercolordark=\"#ffffe0\"   bordercolorlight=\"#000000\" valign=\"top\" bgcolor=\"#666699\" border=\"1\" cellpadding=\"2\" cellspacing=\"0\" width=\"100%\">";
									 
     
if ($logged_now){

	echo "<script Language=\"JavaScript\"> startcounter();</script>";
  	echo "      
    	<form name=\"online\" onLoad=\"startcounter()\">
   	<tr  ><td class=\"bl\" align=center>
	User is <b>online</b> since
	</td><td class=\"bl\" >
	$lastlog_time
	</td></tr>
	<tr ><td class=\"bl\" align=center >
	Connection Duration
	</td><td class=\"bl\">	
	<input type=\"text\" name=\"status\" size=10 value=\"$lastlog_session_time\">
	</form>
	</td></tr>";
echo "	
 <tr><td align=center class=\"bl\" >
        Server
        </td><td>
        <b>$lastlog_server_name</b> ($lastlog_server_ip)
        </td></tr>
        <tr><td align=center class=\"bl\" >
        Server Port
        </td><td>
        $lastlog_server_port
        </td></tr>
        <tr><td align=center class=\"bl\" >
        Workstation
        </td><td>
        $lastlog_callerid
        </td></tr>
        <tr><td align=center class=\"bl\" >
        Upload
        </td><td>
        $lastlog_input
        </td></tr>
        <tr><td align=center class=\"bl\" >
        Download
        </td><td >
        $lastlog_output
        </td></tr>";
	
    }else if ($not_known) {
		echo "<tr><td align=center class=\"bl\">
		        This user has <b>never</b> connected
			</td><td class=\"bl\" >
		        </td></tr>";
				
	  }else 
	  echo "<tr><td align=center class=\"bl\">
	          User is <b>not online</b> now<br>
		  </td><td>
		  </td></tr>";
	
	
echo "				
	<tr><td align=center class=\"bl\">
	Last Connection Time
	</td><td>
	$lastlog_time
	</td></tr>
	<tr><td align=center class=\"bl\">
	Online Time
	</td><td  >
	$lastlog_session_time
	</td></tr>";
	
echo "	</table>";
echo "	</table>";
echo "</table>";
echo "

	<br>
<table><tr><td>
<table border=0 width=440 cellpadding=1 cellspacing=1>
<tr bgcolor=\"#666699\" valign=top>
<td class=\"bl\ width=340></td>
<td class=\"bl\ bgcolor=\"black\" width=200>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor=\"#666699\" align=right valign=top><th>
<font color=\"white\">Account Status For The Last 7 Days</font>&nbsp;
</th></tr>
</table>
</td></tr>
<tr bgcolor=\"black\" valign=top><td  class=\"bl\" colspan=2>
	<table class=\"tabTable\" border=0 width=100% cellpadding=12 cellspacing=0 bgcolor=\"#ffffd0\" valign=top>
	<tr bgcolor=\"#666699\" ><td class=\"bl\">
	<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor=\"#ffffe0\" valign=top>
	<tr><td  align=center class=\"bl\">Connections</td><td>
	<b><font color=\"darkblue\">$tot_conns</font></b></td></tr>
	<tr><td align=center class=\"bl\">Online time</td><td>
	<b><font color=\"darkblue\">$tot_time</td></tr></td></tr>
	<tr><td align=center class=\"bl\">Failed Logins</td><td>
	<b><font color=\"darkblue\">$tot_badlogins</td></tr></td></tr>
	<tr><td align=center class=\"bl\">Upload</td><td>
	$tot_input</td></tr></td></tr>
	<tr><td align=center class=\"bl\">Download</td><td>
	$tot_output</td></tr></td></tr>
	<tr><td align=center class=\"bl\">Average Time</td><td>
	$avg_time</td></tr></td></tr>
	<tr><td align=center class=\"bl\">Average Upload</td><td>
	$avg_input</td></tr></td></tr>
	<tr><td align=center class=\"bl\">Average Download</td><td>
	$avg_output</td></tr></td></tr>	
	</table></table>
	</table>
</td><td>
<table border=0 width=440 cellpadding=1 cellspacing=1>
<tr bgcolor=\"#666699\" valign=top>
<td class=\"bl\ width=340></td>
<td class=\"bl\ bgcolor=\"black\" width=200>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor=\"#666699\" align=right valign=top><th>
<font color=\"white\">Account Status For The Last Month</font>&nbsp;
</th></tr>
</table>
</td></tr>
<tr bgcolor=\"black\" valign=top><td  class=\"bl\" colspan=2>
	<table class=\"tabTable\" border=0 width=100% cellpadding=12 cellspacing=0 bgcolor=\"#ffffd0\" valign=top>
	<tr bgcolor=\"#666699\" ><td class=\"bl\">
	<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor=\"#ffffe0\" valign=top>
	<tr><td  align=center class=\"bl\">Connections</td><td>
	<b><font color=\"darkblue\">$tot_connsm</font></b></td></tr>
	<tr><td align=center class=\"bl\">Online time</td><td>
	<b><font color=\"darkblue\">$tot_timem</td></tr></td></tr>
	<tr><td align=center class=\"bl\">Failed Logins</td><td>
	<b><font color=\"darkblue\">$tot_badloginsm</td></tr></td></tr>
	<tr><td align=center class=\"bl\">Upload</td><td>
	$tot_inputm</td></tr></td></tr>
	<tr><td align=center class=\"bl\">Download</td><td>
	$tot_outputm</td></tr></td></tr>
	<tr><td align=center class=\"bl\">Average Time</td><td>
	$avg_timem</td></tr></td></tr>
	<tr><td align=center class=\"bl\">Average Upload</td><td>
	$avg_inputm</td></tr></td></tr>
	<tr><td align=center class=\"bl\">Average Download</td><td>
	$avg_outputm</td></tr></td></tr>	
	</table>
	</table>
	</table>
	</table>
</td></tr></table>

<br> 
<table border=0 width=440 cellpadding=1 cellspacing=1>
<tr bgcolor=\"#666699\" valign=top>
<td class=\"bl\ width=340></td>
<td class=\"bl\ bgcolor=\"black\" width=200>
<table border=0 width=100% cellpadding=2 cellspacing=0>
<tr bgcolor=\"#666699\" align=right valign=top><th>
<font color=\"white\">Global Account Status</font>&nbsp;
</th></tr>
</table>
</td></tr>
<tr bgcolor=\"black\" valign=top><td  class=\"bl\" colspan=2>
	<table class=\"tabTable\" border=0 width=100% cellpadding=12 cellspacing=0 bgcolor=\"#ffffd0\" valign=top>
	<tr bgcolor=\"#666699\" ><td class=\"bl\">
	<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor=\"#ffffe0\" valign=top>
	<tr><td  align=center class=\"bl\">Connections</td><td>
	<b><font color=\"darkblue\">$tot_connsg</font></b></td></tr>
	<tr><td align=center class=\"bl\">Online time</td><td>
	<b><font color=\"darkblue\">$tot_timeg</td></tr></td></tr>
	<tr><td align=center class=\"bl\">Failed Logins</td><td>
	<b><font color=\"darkblue\">$tot_badloginsg</td></tr></td></tr>
	<tr><td align=center class=\"bl\">Upload</td><td>
	$tot_inputg</td></tr></td></tr>
	<tr><td align=center class=\"bl\">Download</td><td>
	$tot_outputg</td></tr></td></tr>
	<tr><td align=center class=\"bl\">Average Time</td><td>
	$avg_timeg</td></tr></td></tr>
	<tr><td align=center class=\"bl\">Average Upload</td><td>
	$avg_inputg</td></tr></td></tr>
	<tr><td align=center class=\"bl\">Average Download</td><td>
	$avg_outputg</td></tr></td></tr>	
	</table>
	</table>
</table>";
?>

Return current item: phpMyPrepaid