HEX
Server: Apache/2.4.25 (Debian)
System: Linux server17 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
User: web37 (1062)
PHP: 7.4.30
Disabled: show_source, highlight_file, apache_child_terminate, apache_get_modules, apache_note, apache_setenv, virtual, dl, disk_total_space, posix_getpwnam, posix_getpwuid, posix_mkfifo, posix_mknod, posix_setpgid, posix_setsid, posix_setuid, posix_uname, proc_nice, openlog, syslog, pfsockopen
Upload Files
File: /var/www/web37/htdocs/arschficken/admin/active.php
<?php
############################################
### Top-XL - Inactive Users inactive.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 ($do=="changeinactive" or $do=="inactive")
	{$siteholder="inactive";$fsiteholder="active";$textholder=$text_active1;}

if ($do=="changeactive" or $do=="active")
	{$siteholder="active";$fsiteholder="inactive";$textholder=$text_inactiveuser;}

$start = !empty ($_GET["start"]) && is_numeric ($_GET["start"]) ? safety ($_GET["start"]) : 0;
$show = !empty ($_GET["show"]) ? safety ($_GET["show"]) : '';

$sorter = !empty ($_GET["sorter"]) ? safety($_GET["sorter"]) : '';
$config['inactivetime'] = !empty ($_POST["inactivetime"]) ? safety ($_POST["inactivetime"]) : '';

$menu = '';
$ids = '';

if (empty ($config['inactivetime']))
	{$config['inactivetime'] = !empty ($_GET["inactivetime"]) ? safety ($_GET["inactivetime"]) : '';}

if (empty ($config['inactivetime']) || !is_numeric ($config['inactivetime']))
	{
	$db -> query("SELECT inactivetime FROM ".$topxl_admin_table."");
	$inactivetimeget = $db -> fetch ();	
	$config['inactivetime'] = $inactivetimeget['inactivetime'];
	$config['inactivetime'] = $config['inactivetime']/86400;
	}

$_POST["accountsspersite"] = !empty ($_POST["accountsspersite"]) ? safety ($_POST["accountsspersite"]) : '';

$accountsspersite = check_accountspersite($_POST["accountsspersite"], $config['linkspersite'], $show);

if ($do=="change".$siteholder)
	{
	$ids = !empty ($_POST["ids"]) ? safety(trim($_POST["ids"])) : '';
	$ids=substr($ids, 0, -1);
	$ids=explode(",",$ids);
	$max=(count($ids));
	for ($i= 0; $i<=$max; $i++) 
		{
		$status = !empty ($_POST[$ids[$i]]) ? safety ($_POST[$ids[$i]]) : '';
		if ($status=="yes")
			{$db -> query ("Update ".$topxl_user_table." SET active='no' WHERE id=".$ids[$i]);}
		}
	header ("Location: index.php?do=".$siteholder."&start=".$start."&inactivetime=".$config['inactivetime']."&sorter=".$sorter."&accountsspersite=".$accountsspersite);
	exit;
	}

$fromsite="inactive";
$sortid="idasc";
$sorturl="urlasc";
$sorttin="tindesc";
$sorttout="toutdesc";
$sortfecha="fechadesc";
if ($sorter=="iddesc")
	{$sqlholder="ORDER BY id DESC";}
elseif ($sorter=="idasc")
	{
	$sqlholder="ORDER BY id ASC";
	$sortid="iddesc";
	}
elseif ($sorter=="urldesc")
	{$sqlholder="ORDER BY url DESC";}
elseif ($sorter=="urlasc")
	{
	$sqlholder="ORDER BY url ASC";
	$sorturl="urldesc";
	}
elseif ($sorter=="tindesc")
	{
	$sqlholder="ORDER BY hitintotal DESC";
	$sorttin="tinasc";
	}		
elseif ($sorter=="tinasc")
	{$sqlholder="ORDER BY hitintotal ASC";}
elseif ($sorter=="toutdesc")
	{
	$sqlholder="ORDER BY hitouttotal DESC";
	$sorttout="toutasc";
	}	
elseif ($sorter=="toutasc")
	{$sqlholder="ORDER BY hitouttotal ASC";}
elseif ($sorter=="fechaasc")
	{
	$sqlholder="ORDER BY lastactive ASC";
	$sortfecha="fechadesc";
	}
else 
	{
	$sqlholder="ORDER BY lastactive DESC";
	$sortfecha="fechaasc";
	$sorter="fechadesc";
	}

$now=time();
$inactivetime1=$now-($config['inactivetime']*86400);

if ($do == "changeactive" || $do == "active")
	{$db -> query ("SELECT id FROM ".$topxl_user_table." WHERE active='yes' and lastactive>='".$inactivetime1."'");}

elseif ($do == "changeinactive" || $do == "inactive")
	{$db -> query ("SELECT id FROM ".$topxl_user_table." WHERE active='yes' and lastactive<'".$inactivetime1."'");}
	
$allusers = $db -> numRows ();

// the page-forward and backward links
if ($allusers > $accountsspersite)
	{
	$max=$allusers/$accountsspersite;
	$max=ceil($max);
	$next=0;
	for($i=0; $i < $max; $i++)
		{
		if ($next==$start)
			{$menu.="";}
		else
			{
			if ($next=="0")
				{$menu.="<a href=\"index.php?do=".$siteholder."&sorter=".$sorter."&inactivetime=".$config['inactivetime']."&show=".$show."&accountsspersite=".$accountsspersite."\"><b>1</b></a> ";}			
			else
				{
				$nextsite=$i+1;
				$menu.="<a href=\"index.php?do=".$siteholder."&start=".$next."&inactivetime=".$config['inactivetime']."&accountsspersite=".$accountsspersite."&sorter=".$sorter."&show=".$show."\"><b>".$nextsite."</b></a> ";
				}
			}
		$next=$next+$accountsspersite;
		}
	}
$next=$start;
$rowmarker=0;
$main_content="
<table width=\"874\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"#CCCCCC\">
	<tr>
		<td height=\"35\" colspan=\"11\" bgcolor=\"#FFFFFF\" class=\"top\"><strong class=\"heading\">".$text_allinactiveusers."</strong></td>
	</tr>
	<form name=\"form2\" method=\"post\" action=\"index.php?do=".$siteholder."&sorter=".$sorter."&start=".$start."\">
	<tr>
		<td height=\"35\" colspan=\"12\" bgcolor=\"#FFFFFF\" class=\"top\" style=\"padding:0px;\">
			<table width=\"872\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
				<tr>
					<td height=\"20\" width=\"273\" bgcolor=\"#FFFFFF\" align=\"left\" valign=\"middle\" class=\"top\" style=\"border-right:1px solid #CCCCCC;\">
					<a href=\"index.php?do=".$fsiteholder."\"><strong>".$textholder."</strong></a> | 
					<a href=\"index.php?do=search\"><strong>".$text_searchaccount."</strong></a> | 
					<a href=\"index.php?do=user&show=toplike\"><strong>".$text_showtopsitelike."</strong></a>
					</td>
					<td width=\"167\" bgcolor=\"#FFFFFF\" align=\"center\" valign=\"middle\">
					<strong>".$text_setinactivetime.":</strong> <input type=\"text\" name=\"inactivetime\" value=\"".$config['inactivetime']."\" style=\"width:25px;\"> <strong>".$text_days."</strong> 
					</td>
					<td width=\"157\" bgcolor=\"#FFFFFF\" align=\"center\" valign=\"middle\" style=\"border-left:1px solid #CCCCCC;\">
					<strong>".$text_show."</strong> 
					<input type=\"text\" name=\"accountsspersite\" value=\"".$accountsspersite."\" style=\"width:25px;height:16px;\"> <strong>".$text_persite."</strong>
					</td>
					<td width=\"83\" bgcolor=\"#FFFFFF\" align=\"center\" valign=\"middle\" style=\"border-left:1px solid #CCCCCC;\"> 
					<input name=\"submit\" type=\"submit\" class=\"submitbuton\" value=\"".$text_submit."\" style=\"width:80px;height:22px;\">
					</td>
					<td width=\"186\" bgcolor=\"#FFFFFF\" align=\"left\" valign=\"middle\" class=\"top\" style=\"border-left:1px solid #CCCCCC;\">
					<strong>".$text_sitemenu."</strong> ".$menu."
					</td>
				</tr>
			</table>
	</tr>
	</form>
	<form name=\"form1\" method=\"post\" action=\"index.php?do=change".$siteholder."&inactivetime=".$config['inactivetime']."&accountsspersite=".$accountsspersite."&sorter=".$sorter."&start=".$start."\">
	<tr>
		<td width=\"40\" bgcolor=\"#E4E4E4\" align=\"right\" nowrap>
		<a href=\"index.php?do=".$siteholder."&inactivetime=".$config['inactivetime']."&accountsspersite=".$accountsspersite."&sorter=".$sortid."\">".$text_id."</a></td>
		<td width=\"417\" bgcolor=\"#E4E4E4\" align=\"center\">
		<a href=\"index.php?do=".$siteholder."&inactivetime=".$config['inactivetime']."&accountsspersite=".$accountsspersite."&sorter=".$sorturl."\">".$text_url."</a></td>
		<td width=\"150\" bgcolor=\"#E4E4E4\" align=\"center\" nowrap>
		<a href=\"index.php?do=".$siteholder."&inactivetime=".$config['inactivetime']."&accountsspersite=".$accountsspersite."&sorter=".$sortfecha."\">".$text_lasthit."</a> 
		</td>
		<td width=\"40\" bgcolor=\"#E4E4E4\" align=\"right\" nowrap>
		<a href=\"index.php?do=".$siteholder."&inactivetime=".$config['inactivetime']."&accountsspersite=".$accountsspersite."&sorter=".$sorttin."\">".$text_totalins."</a>
		</td>
		<td width=\"45\" bgcolor=\"#E4E4E4\" align=\"right\" nowrap>
		<a href=\"index.php?do=".$siteholder."&inactivetime=".$config['inactivetime']."&accountsspersite=".$accountsspersite."&sorter=".$sorttout."\">".$text_totalouts."</a>
		<td width=\"40\" bgcolor=\"#E4E4E4\" align=\"right\">".$text_email."</td>
		<td width=\"55\" bgcolor=\"#E4E4E4\" align=\"center\"><a href=\"index.php?do=validate\">".$text_status."</a></td>
		<td width=\"30\" bgcolor=\"#E4E4E4\" align=\"right\">".$text_del."</td>
		<td width=\"30\" bgcolor=\"#E4E4E4\" align=\"right\">".$text_edit."</td>
		<td width=\"40\" bgcolor=\"#E4E4E4\" align=\"right\">".$text_show."</td>
	</tr>";
if ($do=="changeinactive" or $do=="inactive")
	{$db -> query ("SELECT * FROM ".$topxl_user_table." WHERE active='yes' and lastactive<'".$inactivetime1."' $sqlholder LIMIT ".$start.",".$accountsspersite);}

elseif ($do=="changeactive" or $do=="active")
	{$db -> query ("SELECT * FROM ".$topxl_user_table." WHERE active='yes' and lastactive>='".$inactivetime1."' GROUP BY id ".$sqlholder." LIMIT ".$start.",".$accountsspersite);}

while ($usergetrows = $db -> fetch ())
	{
	$fecha=$usergetrows['lastactive'];
	if (empty ($fecha))
		{$fecha="Not found";}
	else
		{$fecha=date("d.m.y--H.i.s",$fecha);}

	$ids.=$usergetrows['id'].",";
	$rowmarker++;
	if ($rowmarker==2)
		{$tdbgcolor="bgcolor=\"#F7F7F7\"";$rowmarker=0;}
	else
		{$tdbgcolor="bgcolor=\"#FFFFFF\"";}
	$main_content.="
	<tr>
		<td ".$tdbgcolor." align=\"right\">".$usergetrows['id']."</td>
		<td ".$tdbgcolor." nowrap><div id=\"Layer1\" style=\"position:relativ; width:340px; height:22px; z-index:1; overflow: hidden;\"><a href=\"".stripslashes ($usergetrows['url'])."\" target=\"_blank\">".stripslashes ($usergetrows['url'])."</a></div></td>
		<td ".$tdbgcolor." align=\"center\">".$fecha."</td>
		<td ".$tdbgcolor." align=\"right\">".$usergetrows['hitintotal']."</td>
		<td ".$tdbgcolor." align=\"right\">".$usergetrows['hitouttotal']."</td>
		<td ".$tdbgcolor." align=\"right\"><a href=\"mailto:".stripslashes ($usergetrows['email'])."\" target=\"_blank\">".$text_email."</a></td>
		<td ".$tdbgcolor." align=\"right\">
		<select name=\"".$usergetrows['id']."\">
		<option value=\"no\"";
		if ($usergetrows['active']=="yes")
			{$main_content.=" selected";}
		$main_content.=">".$text_no."</option>
		<option value=\"yes\"";
		if ($usergetrows['active']=="no")
			{$main_content.=" selected";}
		$main_content.=">".$text_yes."</option>";
		$main_content.=" 
		</select>
		</td>
		<td ".$tdbgcolor." align=\"right\"><a href=\"index.php?do=delete&id=".$usergetrows['id']."&fromsite=".$fromsite."\">".$text_del."</a></td>
		<td ".$tdbgcolor." align=\"right\"><a href=\"index.php?do=editaccount&id=".$usergetrows['id']."&fromsite=".$fromsite."\">".$text_edit."</a></td>
		<td ".$tdbgcolor." align=\"right\"><a href=\"".$config['topsiteurl']."/members/index.php?do=main&id=".$usergetrows['id']."\" target=\"_blank\">".$text_show."</a></td>
	</tr>";	
	}

$main_content.="
		<tr>
			<td height=\"42\" colspan=\"11\" bgcolor=\"#FFFFFF\" align=\"right\"><input type=\"hidden\" name=\"ids\" value=\"".$ids."\"><input type=\"hidden\" name=\"sorter\" value=\"".$sorter."\"><input type=\"hidden\" name=\"start\" value=\"".$start."\"><input name=\"submit\" type=\"submit\" class=\"submitbuton\" value=\"".$text_submit."\"></td>
		</tr>
	</form>
</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;
?>