File: /var/www/web37/htdocs/arschficken/admin/main.php
<?php
############################################
### Top-XL - Main Admin Sreen main.php
############################################
/// 1. You are NOT entiteld to rent, lease, transfer, reproduce or distribute this Software.
/// 2. You are entiteld to adapt, and modify the Software to your need.
/// 3. You can use this Script on all of YOUR Domains.
/// 4. Any modification or removal to the links in the footer and member area shall terminate this license immediately .
/// 5. The Script has been tested on different Servers and found free of any notable errors by the author. The Author shall not in any case be liable for any special, incidental indirect or other similar damages arising from the use of this Script.
/// 6. Author: Simon Zehender - Contact: https://www.paddelberg.de
////////////////////////////////////////////
////////////////////////////////////////////
if ($scriptpath!=$_SERVER['DOCUMENT_ROOT'])
{echo "Are you looking for something?";exit;}
if (file_exists("install.php") or file_exists("update.php"))
{
echo "<div align=\"center\"><h1 style=\"font-size:30px;\"><font color=\"#FF0000\">".$text_warning."<br>";
if (file_exists("install.php"))
{echo $text_deleteinstall."<br>";}
if (file_exists("update.php"))
{echo "You must delete the file update.php in the admin/ folder!";}
echo "</font></h1></div>";
}
if ($config['sorting']=="out")
{$sorter="Hits Out";}
if ($config['sorting']=="outtotal")
{$sorter="Hits Out Total";}
if ($config['sorting']=="intotal")
{$sorter="Hits In Total";}
if ($config['sorting']=="in")
{$sorter="Hits In";}
/// count all accounts
$db -> query ("SELECT COUNT(id) as cnt FROM ".$topxl_user_table." WHERE active='yes'");
$row = $db -> fetch ();
$allusers=$row["cnt"];
/// get Hits last period
$bevorlastreset=$config['lastreset']-$config['resettime'];
$lasttimehitin=get_stats_overview("validin","validin='yes' and timestamp <= '".$config['lastreset']."' and timestamp >= '".$bevorlastreset."'",$topxl_hits_table,$db);
$lasttimehitout=get_stats_overview("validout","validout='yes' and timestamp <= '".$config['lastreset']."' and timestamp >= '".$bevorlastreset."'",$topxl_hits_table,$db);
/// gets hist this period and total hits
$db -> query ("SELECT sum(hitintotal) AS tisumme,sum(hitouttotal) AS tosumme, sum(hitin) AS insumme,sum(hitout) AS outsumme FROM ".$topxl_user_table." WHERE active='yes'");
$counthitsrow = $db -> fetch ();
$thistimehitin=$counthitsrow['insumme'];
$thistimehitout=$counthitsrow['outsumme'];
$allhitsin=$counthitsrow['tisumme'];
$allhitsout=$counthitsrow['tosumme'];
/// get other data
$resetevery=$config['resettime']/86400;
$nextreset=$config['lastreset']+$config['resettime'];
$nextreset=date("Y-m-d:H-i-s", $nextreset);
$lastreset1=date("Y-m-d:H-i-s", $config['lastreset']);
$now=time();
//// count ativ, new and locked users
$inactivetime1=$now-$config['inactivetime'];
$checkvalidationdate=$now-$config['newtime'];
$activeuser=0;
$newaccounts=0;
$lockedaccounts=0;
$markednewsusers=0;
$db -> query ("SELECT * FROM ".$topxl_user_table);
while($data = $db -> fetch ())
{
if($data['lastactive']>$inactivetime1)
{$activeuser++;}
if($data['newentry']=="yes")
{$newaccounts++;}
if($data['active']=="no" and $data['newentry']!="yes")
{$lockedaccounts++;}
if($data['validationdate']>=$checkvalidationdate)
{$markednewsusers++;}
}
$inactiveusers=$allusers-$activeuser;
$ratioinout=get_ratio($thistimehitin,$thistimehitout);
$ratiolinlout=get_ratio($lasttimehitin,$lasttimehitout);
$ratiotintout=get_ratio($allhitsin,$allhitsout);
/// html to display
$main_content="
<table width=\"874\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"#CCCCCC\">
<tr>
<td height=\"35\" colspan=\"13\" bgcolor=\"#FFFFFF\" class=\"top\"><strong class=\"heading\">".$text_mainsection."</strong></td>
</tr>
<tr>
<td valign=\"top\" bgcolor=\"#E4E4E4\" nowrap align=\"center\">
".$text_accounts."
</td>
<td valign=\"top\" bgcolor=\"#E4E4E4\" nowrap align=\"center\">
".$text_active."
</td>
<td valign=\"top\" bgcolor=\"#E4E4E4\" nowrap align=\"center\">
".$text_inactiveuser."
</td>
</td>
<td valign=\"top\" bgcolor=\"#E4E4E4\" nowrap align=\"center\">
".$text_notvalid."
</td>
<td valign=\"top\" bgcolor=\"#E4E4E4\" nowrap align=\"center\">
".$text_new."
</td>
<td valign=\"top\" bgcolor=\"#E4E4E4\" nowrap align=\"center\">
".$text_newsignups."
</td>
<td valign=\"top\" bgcolor=\"#E4E4E4\" nowrap align=\"center\">
".$text_deleted."
</td>
<td valign=\"top\" bgcolor=\"#E4E4E4\" nowrap align=\"center\">
".$text_hitout."
</td>
<td valign=\"top\" bgcolor=\"#E4E4E4\" nowrap align=\"center\">
".$text_hitin."
</td>
<td valign=\"top\" bgcolor=\"#E4E4E4\" nowrap align=\"center\">
".$text_ratiobeetween."
</td>
<td valign=\"top\" bgcolor=\"#E4E4E4\" nowrap align=\"center\">
".$text_lout."
</td>
<td valign=\"top\" bgcolor=\"#E4E4E4\" nowrap align=\"center\">
".$text_lin."
</td>
<td valign=\"top\" bgcolor=\"#E4E4E4\" nowrap align=\"center\">
".$text_ratiobeetween."
</td>
</tr>
<tr>
<td valign=\"top\" bgcolor=\"#FFFFFF\" align=\"center\">
".$allusers."
</td>
<td valign=\"top\" bgcolor=\"#FFFFFF\" align=\"center\">
".$activeuser."
</td>
<td valign=\"top\" bgcolor=\"#FFFFFF\" align=\"center\">
".$inactiveusers."
</td>
<td valign=\"top\" bgcolor=\"#FFFFFF\" align=\"center\">
".$lockedaccounts."
</td>
<td valign=\"top\" bgcolor=\"#FFFFFF\" align=\"center\">
".$markednewsusers."
</td>
<td valign=\"top\" bgcolor=\"#FFFFFF\" align=\"center\">
".$newaccounts."
</td>
<td valign=\"top\" bgcolor=\"#FFFFFF\" align=\"center\">
".$config['deletedsites']."
</td>
<td valign=\"top\" bgcolor=\"#FFFFFF\" align=\"center\">
".$thistimehitout."
</td>
<td valign=\"top\" bgcolor=\"#FFFFFF\" align=\"center\">
".$thistimehitin."
</td>
<td valign=\"top\" bgcolor=\"#FFFFFF\" nowrap align=\"center\">
".$ratioinout."/1
</td>
<td valign=\"top\" bgcolor=\"#FFFFFF\" align=\"center\">
".$lasttimehitout."
</td>
<td valign=\"top\" bgcolor=\"#FFFFFF\" align=\"center\">
".$lasttimehitin."
</td>
<td valign=\"top\" bgcolor=\"#FFFFFF\" nowrap align=\"center\">
".$ratiolinlout."/1
</td>
</tr>
<tr>
<td bgcolor=\"#FFFFFF\" colspan=\"13\" height=\"20\"></td>
</tr>
<table width=\"874\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"#CCCCCC\">
<tr>
<td valign=\"top\" bgcolor=\"#E4E4E4\" nowrap align=\"center\">
".$text_totalouts."
</td>
<td valign=\"top\" bgcolor=\"#E4E4E4\" nowrap align=\"center\">
".$text_totalins."
</td>
<td valign=\"top\" bgcolor=\"#E4E4E4\" nowrap align=\"center\">
".$text_ratiobeetween."
</td>
<td valign=\"top\" bgcolor=\"#E4E4E4\" nowrap align=\"center\">
".$text_sorting."
</td>
<td valign=\"top\" bgcolor=\"#E4E4E4\" nowrap align=\"center\">
".$text_resetevery."
</td>
<td valign=\"top\" bgcolor=\"#E4E4E4\" nowrap align=\"center\">
".$text_nextreset."
</td>
<td valign=\"top\" bgcolor=\"#E4E4E4\" nowrap align=\"center\">
".$text_lastreset."
</td>
<td valign=\"top\" bgcolor=\"#E4E4E4\" nowrap align=\"center\">
".$text_reftype."
</td>
</tr>
<tr>
<td valign=\"top\" bgcolor=\"#FFFFFF\" nowrap align=\"center\">
".$allhitsout."
</td>
<td valign=\"top\" bgcolor=\"#FFFFFF\" nowrap align=\"center\">
".$allhitsin."
</td>
<td valign=\"top\" bgcolor=\"#FFFFFF\" nowrap align=\"center\">
".$ratiotintout."/1
</td>
<td valign=\"top\" bgcolor=\"#FFFFFF\" align=\"center\">
".$sorter."
</td>
<td valign=\"top\" bgcolor=\"#FFFFFF\" align=\"center\">
".$resetevery." ".$text_days."
</td>
<td valign=\"top\" bgcolor=\"#FFFFFF\" nowrap align=\"center\">
".$nextreset."
</td>
<td valign=\"top\" bgcolor=\"#FFFFFF\" nowrap align=\"center\">
".$lastreset1."
</td>
<td valign=\"top\" bgcolor=\"#FFFFFF\" nowrap align=\"center\">";
if ($config['reftype']=="textlink")
{$getreftype= $text_textlink;}
elseif ($config['reftype']=="banner")
{$getreftype=$text_banner;}
elseif ($config['reftype']=="textban")
{$getreftype=$text_textban;}
$main_content.=$getreftype."
</td>
</tr>
</table>
<table width=\"874\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"#CCCCCC\">
<tr>
<td bgcolor=\"#FFFFFF\" colspan=\"13\" height=\"20\"></td>
</tr>
</table>
<table width=\"874\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"#CCCCCC\">
<tr>
<td valign=\"top\" bgcolor=\"#E4E4E4\" nowrap align=\"center\">
".$text_viewstoday."
</td>
<td valign=\"top\" bgcolor=\"#E4E4E4\" nowrap align=\"center\">
".$text_viewsyesterday."
</td>
<td valign=\"top\" bgcolor=\"#E4E4E4\" nowrap align=\"center\">
".$text_viewstotal."
</td>
<td valign=\"top\" bgcolor=\"#E4E4E4\" nowrap align=\"center\">
".$text_loadstotal."
</td>
<td valign=\"top\" bgcolor=\"#E4E4E4\" nowrap align=\"center\">
".$text_version."
</td>
</tr>
<tr>
<td valign=\"top\" bgcolor=\"#FFFFFF\" nowrap align=\"center\">
".$config['hitstoday']."
</td>
<td valign=\"top\" bgcolor=\"#FFFFFF\" nowrap align=\"center\">
". $config['hitsyesterday']."
</td>
<td valign=\"top\" bgcolor=\"#FFFFFF\" nowrap align=\"center\">
".$config['hitstotal']."
</td>
<td valign=\"top\" bgcolor=\"#FFFFFF\" align=\"center\">
".$config['loadstotal']."
</td>
<td valign=\"top\" bgcolor=\"#FFFFFF\" nowrap align=\"center\">
".$v."
</td>
</tr>
</table>
<tr>
<td bgcolor=\"#FFFFFF\" colspan=\"13\" height=\"28\"><strong>".$text_bug_report."</strong></td>
</tr>
<tr>
<td bgcolor=\"#FFFFFF\" colspan=\"13\" class=\"small\">
".$text_exp_bug_report."
</td>
</tr>
<tr>
<td bgcolor=\"#FFFFFF\" colspan=\"13\" height=\"28\"><strong>".$text_legend."</strong></td>
</tr>
<tr>
<td bgcolor=\"#FFFFFF\" colspan=\"13\" class=\"small\">
<strong>".$text_new.":</strong> ".$text_exp_new."<br>
<strong>".$text_newsignups.":</strong> ".$text_exp_newsignups."<br>
<strong>".$text_hitin." / ".$text_hitout.":</strong> ".$text_exp_currenthits."<br>
<strong>".$text_lin." / ".$text_lout.":</strong> ".$text_exp_lasthits."<br>
<strong>".$text_totalins." / ".$text_totalouts.":</strong> ".$text_exp_totalhits."<br>
</td>
</tr>
<tr>
<td bgcolor=\"#FFFFFF\" colspan=\"13\" height=\"28\"><strong>News/Updates</strong></td>
</tr>
<tr>
<td bgcolor=\"#FFFFFF\" colspan=\"13\" class=\"small\">
<iframe width=\"874\" height=\"60\" marginheight=\"0\" marginwidth=\"0\" frameborder=\"0\" src=\"https://www.paddelberg.de/gratis-toplisten-script/versioncheck.php?v=".$v."&s=".$config['topsiteurl']."/".$config['filename']."\"></iframe>
</td>
</tr>
</table>";
/// Template
if(!file_exists($file))
{echo "The template ".$file." does not exist."; exit;}
$fp1=fopen($file,"r");
$zeile=fread ($fp1, filesize ($file));
include("template.php");
echo $zeile;
exit;
?>