vpnmanager 1.0.0 new theme
This commit is contained in:
@@ -51,165 +51,170 @@ function Potenz($sent_sum)
|
||||
?>
|
||||
|
||||
<!-- MAIN CONTENT BEGINN ################################################################################ -->
|
||||
<br />
|
||||
<form action="<?php echo $PHP_SELF; ?>" method="post">
|
||||
<select name="dirsort" size=1>
|
||||
<option <?php if($sort=="ASC") echo "selected";?> value="ASC">Up</option>
|
||||
<option <?php if($sort=="DESC") echo "selected";?> value="DESC">Down</option>
|
||||
</select>
|
||||
<!-- MAIN -->
|
||||
<div id="main">
|
||||
<div class="wrapper">
|
||||
<br />
|
||||
<form action="<?php echo $PHP_SELF; ?>" method="post">
|
||||
<select name="dirsort" size=1>
|
||||
<option <?php if($sort=="ASC") echo "selected";?> value="ASC">Up</option>
|
||||
<option <?php if($sort=="DESC") echo "selected";?> value="DESC">Down</option>
|
||||
</select>
|
||||
|
||||
<select name="table" size=1>
|
||||
<option <?php if($table=="year") echo "selected";?> value="year">Year</option>
|
||||
<option <?php if($table=="month") echo "selected";?> value="month">Month</option>
|
||||
<option <?php if($table=="connections") echo "selected";?> value="connections">All</option>
|
||||
</select>
|
||||
<select name="table" size=1>
|
||||
<option <?php if($table=="year") echo "selected";?> value="year">Year</option>
|
||||
<option <?php if($table=="month") echo "selected";?> value="month">Month</option>
|
||||
<option <?php if($table=="connections") echo "selected";?> value="connections">All</option>
|
||||
</select>
|
||||
|
||||
<input type="submit" value="go!" />
|
||||
</form>
|
||||
<input type="submit" value="go!" />
|
||||
</form>
|
||||
|
||||
<!-- Sorting Leiste Start-->
|
||||
<?
|
||||
// MYsql befehl basteln
|
||||
$sql = "SELECT * FROM $table ORDER BY $by $sort;";
|
||||
$result = mysql_query($sql);
|
||||
<!-- Sorting Leiste Start-->
|
||||
<?
|
||||
// MYsql befehl basteln
|
||||
$sql = "SELECT * FROM $table ORDER BY $by $sort;";
|
||||
$result = mysql_query($sql);
|
||||
|
||||
echo "<table border=1>";
|
||||
if($table=='connections')
|
||||
{
|
||||
echo "<tr><td>Start Time</td><td>Stop Time</td><td>Client IP</td><td>Download
|
||||
</td><td>Upload</td></tr>\n";
|
||||
}
|
||||
else if($table=='month')
|
||||
{
|
||||
echo "<tr><td>Month</td><td>Year</td><td>Connection Time</td><td>Download
|
||||
</td><td>Upload</td></tr>\n";
|
||||
}
|
||||
else if($table=='year')
|
||||
{
|
||||
echo "<tr><td>Year</td><td>Connection Time</td><td>Download
|
||||
</td><td>Upload</td></tr>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
// ------------------------------------------------ Mysql lesen
|
||||
if ($result)
|
||||
{
|
||||
//Zusammenzaehlen
|
||||
$time_sum=0;
|
||||
$month=0;
|
||||
$year=0;
|
||||
echo "<table border=1>";
|
||||
if($table=='connections')
|
||||
{
|
||||
echo "<tr><td>Start Time</td><td>Stop Time</td><td>Client IP</td><td>Download
|
||||
</td><td>Upload</td></tr>\n";
|
||||
}
|
||||
else if($table=='month')
|
||||
{
|
||||
echo "<tr><td>Month</td><td>Year</td><td>Connection Time</td><td>Download
|
||||
</td><td>Upload</td></tr>\n";
|
||||
}
|
||||
else if($table=='year')
|
||||
{
|
||||
echo "<tr><td>Year</td><td>Connection Time</td><td>Download
|
||||
</td><td>Upload</td></tr>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
// ------------------------------------------------ Mysql lesen
|
||||
if ($result)
|
||||
{
|
||||
//Zusammenzaehlen
|
||||
$time_sum=0;
|
||||
$month=0;
|
||||
$year=0;
|
||||
|
||||
$sent_sum=0;
|
||||
$received_sum=0;
|
||||
$sent_sum=0;
|
||||
$received_sum=0;
|
||||
|
||||
while ($ar=mysql_fetch_array($result,MYSQL_ASSOC))
|
||||
{
|
||||
if($table=='connections')
|
||||
{
|
||||
if($ar["stop"] != 0)
|
||||
{
|
||||
$stop = date("r",$ar["stop"]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$stop = "running session";
|
||||
}
|
||||
echo "<tr><td align=right>",date("r",$ar["start"]),"</td><td align=right>",$stop,"</td><td>",$ar["ip"],
|
||||
"</td><td align=right>",Potenz($ar["sent"]),"</td><td align=right>",Potenz($ar["received"]),
|
||||
"</td></tr>\n";
|
||||
}
|
||||
else if($table=='month')
|
||||
{
|
||||
if($month!=$ar["month"] && $month!=0)
|
||||
{
|
||||
$hour = floor($time_sum/3600);
|
||||
$min = floor($time_sum/60 - $hour *60);
|
||||
$sec = $time_sum-$hour*3600-$min*60;
|
||||
$timestring = $hour .":". $min .":". $sec;
|
||||
while ($ar=mysql_fetch_array($result,MYSQL_ASSOC))
|
||||
{
|
||||
if($table=='connections')
|
||||
{
|
||||
if($ar["stop"] != 0)
|
||||
{
|
||||
$stop = date("r",$ar["stop"]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$stop = "running session";
|
||||
}
|
||||
echo "<tr><td align=right>",date("r",$ar["start"]),"</td><td align=right>",$stop,"</td><td>",$ar["ip"],
|
||||
"</td><td align=right>",Potenz($ar["sent"]),"</td><td align=right>",Potenz($ar["received"]),
|
||||
"</td></tr>\n";
|
||||
}
|
||||
else if($table=='month')
|
||||
{
|
||||
if($month!=$ar["month"] && $month!=0)
|
||||
{
|
||||
$hour = floor($time_sum/3600);
|
||||
$min = floor($time_sum/60 - $hour *60);
|
||||
$sec = $time_sum-$hour*3600-$min*60;
|
||||
$timestring = $hour .":". $min .":". $sec;
|
||||
|
||||
$sent_sum_anz = Potenz($sent_sum);
|
||||
$received_sum_anz = Potenz($received_sum);
|
||||
$sent_sum_anz = Potenz($sent_sum);
|
||||
$received_sum_anz = Potenz($received_sum);
|
||||
|
||||
echo "<tr><td>",$month,"</td><td>",$year,"</td><td>",$timestring,
|
||||
"</td><td align=right>",$sent_sum_anz,"</td><td align=right>",$received_sum_anz,
|
||||
"</td></tr>\n";
|
||||
$sent_sum=0;
|
||||
$received_sum=0;
|
||||
$time_sum=0;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
$month=$ar["month"];
|
||||
$year=$ar["year"];
|
||||
$time_sum += $ar["time"];
|
||||
$sent_sum += $ar["sent"];
|
||||
$received_sum += $ar["received"];
|
||||
}
|
||||
else if($table=='year')
|
||||
{
|
||||
if($year!=$ar["year"] && $year!=0)
|
||||
{
|
||||
$hour = floor($time_sum/3600);
|
||||
$min = floor($time_sum/60 - $hour *60);
|
||||
$sec = $time_sum-$hour*3600-$min*60;
|
||||
$timestring = $hour .":". $min .":". $sec;
|
||||
echo "<tr><td>",$month,"</td><td>",$year,"</td><td>",$timestring,
|
||||
"</td><td align=right>",$sent_sum_anz,"</td><td align=right>",$received_sum_anz,
|
||||
"</td></tr>\n";
|
||||
$sent_sum=0;
|
||||
$received_sum=0;
|
||||
$time_sum=0;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
$month=$ar["month"];
|
||||
$year=$ar["year"];
|
||||
$time_sum += $ar["time"];
|
||||
$sent_sum += $ar["sent"];
|
||||
$received_sum += $ar["received"];
|
||||
}
|
||||
else if($table=='year')
|
||||
{
|
||||
if($year!=$ar["year"] && $year!=0)
|
||||
{
|
||||
$hour = floor($time_sum/3600);
|
||||
$min = floor($time_sum/60 - $hour *60);
|
||||
$sec = $time_sum-$hour*3600-$min*60;
|
||||
$timestring = $hour .":". $min .":". $sec;
|
||||
|
||||
$sent_sum_anz = Potenz($sent_sum);
|
||||
$received_sum_anz = Potenz($received_sum);
|
||||
$sent_sum_anz = Potenz($sent_sum);
|
||||
$received_sum_anz = Potenz($received_sum);
|
||||
|
||||
echo "<tr><td>",$year,"</td><td>",$timestring,
|
||||
"</td><td align=right>",$sent_sum_anz,"</td><td align=right>",$received_sum_anz,
|
||||
"</td></tr>\n";
|
||||
$sent_sum=0;
|
||||
$received_sum=0;
|
||||
$time_sum=0;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
$year=$ar["year"];
|
||||
$time_sum += $ar["time"];
|
||||
$sent_sum += $ar["sent"];
|
||||
$received_sum += $ar["received"];
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
//letzen Datensatz ausgeben
|
||||
$hour = floor($time_sum/3600);
|
||||
$min = floor($time_sum/60 - $hour *60);
|
||||
$sec = $time_sum-$hour*3600-$min*60;
|
||||
$timestring = $hour .":". $min .":". $sec;
|
||||
echo "<tr><td>",$year,"</td><td>",$timestring,
|
||||
"</td><td align=right>",$sent_sum_anz,"</td><td align=right>",$received_sum_anz,
|
||||
"</td></tr>\n";
|
||||
$sent_sum=0;
|
||||
$received_sum=0;
|
||||
$time_sum=0;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
$year=$ar["year"];
|
||||
$time_sum += $ar["time"];
|
||||
$sent_sum += $ar["sent"];
|
||||
$received_sum += $ar["received"];
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
//letzen Datensatz ausgeben
|
||||
$hour = floor($time_sum/3600);
|
||||
$min = floor($time_sum/60 - $hour *60);
|
||||
$sec = $time_sum-$hour*3600-$min*60;
|
||||
$timestring = $hour .":". $min .":". $sec;
|
||||
|
||||
$sent_sum_anz = Potenz($sent_sum);
|
||||
$received_sum_anz = Potenz($received_sum);
|
||||
$sent_sum_anz = Potenz($sent_sum);
|
||||
$received_sum_anz = Potenz($received_sum);
|
||||
|
||||
|
||||
if($table=='year')
|
||||
{
|
||||
echo "<tr><td>",$year,"</td><td>",$timestring,
|
||||
"</td><td align=right>",$sent_sum_anz,"</td><td align=right>",$received_sum_anz,
|
||||
"</td></tr>\n";
|
||||
}
|
||||
else if($table=='month')
|
||||
{
|
||||
echo "<tr><td>",$month,"</td><td>",$year,"</td><td>",$timestring,
|
||||
"</td><td align=right>",$sent_sum_anz,"</td><td align=right>",$received_sum_anz,
|
||||
"</td></tr>\n";
|
||||
}
|
||||
$sent_sum=0;
|
||||
$received_sum=0;
|
||||
$time_sum=0;
|
||||
//---------------------------------
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<br>";
|
||||
}
|
||||
echo "</table>";
|
||||
mysql_close();
|
||||
?>
|
||||
if($table=='year')
|
||||
{
|
||||
echo "<tr><td>",$year,"</td><td>",$timestring,
|
||||
"</td><td align=right>",$sent_sum_anz,"</td><td align=right>",$received_sum_anz,
|
||||
"</td></tr>\n";
|
||||
}
|
||||
else if($table=='month')
|
||||
{
|
||||
echo "<tr><td>",$month,"</td><td>",$year,"</td><td>",$timestring,
|
||||
"</td><td align=right>",$sent_sum_anz,"</td><td align=right>",$received_sum_anz,
|
||||
"</td></tr>\n";
|
||||
}
|
||||
$sent_sum=0;
|
||||
$received_sum=0;
|
||||
$time_sum=0;
|
||||
//---------------------------------
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<br>";
|
||||
}
|
||||
echo "</table>";
|
||||
mysql_close();
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END CONTENT BEGINN ################################################################################# -->
|
||||
|
Reference in New Issue
Block a user