Allora audiens-permanence.php è così (PHP)
Codice PHP:
//Preparo i file da includere
include_once('../../xconf.php'); //File di configurazione
include_once('exec.php'); //Rilevamento delle impostazioni
//Invio dell'header e del flusso
header('Content-Type: image/gif');
echo base64_decode('R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=='); //Immagie fittizzia
@flush();
//Connessione a MySQL
mysql_connect($host, $dbuser, $dbpass);
mysql_select_db($database);
$request = $_SERVER['HTTP_REFERER'];
//Controllo se c'è un infiltrato...
if(strstr($request, 'audiens.php')) exit;
if(strstr($request, 'no-audiens.php')) exit;
if(strstr($request, 'audiens-permanence.php')) exit;
if(strstr($request, 'audiens-abort.php')) exit;
if(! strstr($request, $installed)) exit;
//Carico dal database la configurazione
$config = mysql_fetch_assoc(mysql_query("SELECT * FROM " . $prefix . "config"));
//Verifico se audiens è stato bloccato
if($config['islocked'] == 'on') exit;
//Verifico IP bloccati
$ip_l = explode(',', $lockip);
$z = 0;
while($z <= count($ip_l)-1)
{
$ipzone[] = trim($ip_l[$z]);
$z++;
}
if(in_array($_SERVER['REMOTE_ADDR'], $ipzone)) exit;
//Set variables from JavaScript
$time_before = $_GET['before'];
$time_onclose = $_GET['times'];
//Is Secure?
if(!isset($_SERVER['HTTP_REFERER']))
exit;
if((!is_numeric($time_betore)) || (! is_numeric($time_onclose)))
exit;
if((strlen($time_before) != 14) || (strlen($time_onclose) != 14))
exit;
//Now, make as seconds
$time_before = substr($time_before, 0 , 10);
$time_onclose = substr($time_onclose, 0 , 10);
//Calculate permanence
$permanence = $time_onclose - $time_before;
//Change results (audusers)
$audusers = mysql_fetch_assoc(mysql_query("SELECT permanence FROM " . $prefix . "audusers
WHERE ipaddress = '" . $_SERVER['REMOTE_ADDR'] . "'
AND day = '" . date('d') . "'
AND month = '" . date('n') . "'
AND year = '" . date('Y') . "'"));
$audusers = $audusers['permanence'] + $permanence;
//Change results (gntso)
$gntso = mysql_fetch_assoc(mysql_query("SELECT permanence FROM " . $prefix . "gntso
WHERE day = '" . date('d') . "'
AND month = '" . date('n') . "'
AND year = '" . date('Y') . "'"));
$gntso = $gntso['permanence'] + $permanence;
//Change results (pages)
$ranks = mysql_fetch_assoc(mysql_query("SELECT permanence FROM " . $prefix . "ranks
WHERE day = '" . date('d') . "'
AND month = '" . date('n') . "'
AND year = '" . date('Y') . "'
AND pagename = '" . $_SERVER['HTTP_REFERER'] . "'"));
$ranks = $ranks['permanence'] + $permanence;
//Write Permanence into users database
mysql_query("UPDATE " . $prefix . "audusers SET permanence = '" . $audusers . "'
WHERE ipaddress = '" . $_SERVER['REMOTE_ADDR'] . "'
AND day = '" . date('d') . "'
AND month = '" . date('n') . "'
AND year = '" . date('Y') . "'");
//Write Permanence into records database
mysql_query("UPDATE " . $prefix . "gntso SET permanence = '" . $gntso . "'
WHERE day = '" . date('d') . "'
AND month = '" . date('n') . "'
AND year = '" . date('Y') . "'");
//Write Permanence into pages database
mysql_query("UPDATE " . $prefix . "ranks SET permanence = '" . $ranks . "'
WHERE day = '" . date('d') . "'
AND month = '" . date('n') . "'
AND year = '" . date('Y') . "'
AND pagename = '" . $_SERVER['HTTP_REFERER'] . "'");
Cos'è che non va?