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/functions.php
<?php
############################################
### Top-XL - Topsite Language File English lang/en.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;
	}

function safety($var)
	{return strip_tags (addslashes ($var));}

function get_lang($stanlang)
	{
	$lang = !empty ($_SERVER["HTTP_ACCEPT_LANGUAGE"]) ? substr (safety ($_SERVER["HTTP_ACCEPT_LANGUAGE"]), 0, 2) : '';
	return empty ($lang) ? $stanlang : $lang;
	}

function get_lang_file($language,$stanlang,$langarray,$langdetect)
	{
	if ($langdetect=="no")
		{return $stanlang;}
	$langarray=explode(",",$langarray);
	$max=count($langarray);
	for($i=0;$i<$max;$i++)
		{
		if ($langarray[$i]==$language)
			{return $langarray[$i];}
		}
	return $stanlang;
	}

function useragent($browser) 
	{
	if ( strpos($browser, 'Gecko')) 
		{ 
		if (strpos($browser, 'Netscape')) 
			{$browser = 'Netscape';} 
		elseif (strpos($browser, 'Firefox'))  
			{$browser = 'Firefox';}  
		elseif (strpos($browser, 'Konqueror'))
			{$browser = 'Konqueror';} 
		elseif (strpos($browser, "Thunderbird"))
			{$browser = 'Thunderbird';}
		else {$browser = 'Mozilla';} 
		} 
	elseif (strpos($browser, 'MSIE')) 
      	{ 
		if (strpos($browser, 'Opera')) {$browser = 'Opera';}
        else {$browser = 'I. Ex.';} 
		} 		
	elseif (strpos($browser, "Opera"))
		{$browser = 'Opera';}
	elseif (strpos($browser, "Epiphany"))
		{$browser = 'Epiphany';}
	elseif (strpos($browser, "Thunderbird"))
		{$browser = 'Thunderbird';}	
	elseif (strpos($browser, "Konqueror"))
		{$browser = 'Konqueror';}
	else 
		{$browser = 'Other';}
	
	return $browser;
	}

function slashcheck($url) 
	{
	$result = 1; /// Dateiname vorhanden
	if (!preg_match ("@\.htm|\.html|\.php|\.asp|\.swf|\.cgi|\.shtml@i",$url))
		{
		$url_info = parse_url($url);
		$result = 2; /// kein Dateiname und slash am ende
		if (empty ($url_info['query']))
			{
			$urlcheck = substr (strrchr ($url, "/"), 1 ); 
			if ($urlcheck and $urlcheck != '/') 
			   {$result = 3;} /// kein Dateiname und kein slash am ende
		   }
		}
	return $result;
	}

function check_accountspersite($accountsspersite,$linkspersite,$show)
	{
	if (empty ($accountsspersite))
		{$accountsspersite = !empty ($_GET["accountsspersite"]) ? safety($_GET["accountsspersite"]) : '';}	
	if ((empty ($accountsspersite) || (!is_numeric($accountsspersite)) and $show!="toplike"))
		{$accountsspersite=25;}
	return $accountsspersite;
	}

function get_stats_overview($sqlcount, $sqlwhere, $topxl_hits_table, $db)
	{
	$db -> query ("SELECT count(".$sqlcount.") AS hits FROM ".$topxl_hits_table." WHERE ".$sqlwhere); 
	$data =$db -> fetch ();
	return $data['hits'];
	}

function get_ratio($number1,$number2)
	{
	if (!empty ($number1) && !empty ($number2))
		{
		$ratio = $number2/$number1;
		$ratio = substr($ratio, 0, 4);
		}
	else 
		{$ratio = 1;}

	return $ratio;
	}

function validateEmail ($email)
	{
	if (function_exists ('filter_var')) 
		{return (filter_var ($email, FILTER_VALIDATE_EMAIL) === false) ? false : true;}
	
	else # reEx from http://hexillion.com/samples/#Regex
		{return preg_match('/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/', $email);}
	}

function html_special_chars ($var)
	{return htmlspecialchars ($var, ENT_COMPAT, 'UTF-8', false);}

function check_new_lang_files($langarray)
	{
	$handle=opendir('../lang/'); 
	$newlangs='';
	while ($file = readdir ($handle)) 
		{
		if ($file != "." && $file != ".." && $file != "index.html" && $file != "index.htm" && $file != "index.php"  && $file != ".htaccess" && strpos($file, "members") === false) 
			{
			$datei=str_replace(".php","",$file);
			if(!preg_match("/".$datei."/i",$langarray))
				{$newlangs.=$datei.",";}
			}
		}
	$newlangs=substr($newlangs,0,-1);
	return $newlangs;
	}

function bannercheck($bannerurl,$url_protocols)
	{
	if (!preg_match ("@^".$url_protocols."@", $bannerurl))
		{return 1;}	
	if (strlen($bannerurl) > 255)
		{return 2;}
	$ext=strrchr($bannerurl,'.');
	$limitedext=array(".gif",".jpg",".jpeg",".png"); 
	if (!in_array($ext,$limitedext))
		{return 3;}
	}

function get_design_file()
	{
	$handle=opendir('../html/'); 
	$files='';
	while ($file = readdir ($handle)) 
		{ 
		if ($file != "." && $file != ".." && !preg_match("@\.php|\.html|\.htaccess|\.gif|\.jpg|\.png|\.jpeg@i",$file)) 
			{
			$file = trim($file); 
			$files .= $file.",";
			}
		}
	$files=substr($files,0,-1);
	if(strpos($files, ','))
		{$files=explode(",",$files);}
	return $files;
	}
?>