Hab das mal so gemacht. Ist aber nicht getestet.
PHP-Code:
<?
userstatus ();
head ('Paidbanner');
$fbanner = db_query("SELECT * FROM ".$db_prefix."_gebuchte_werbung WHERE menge >='1' and werbeart = 'forcedbanner' and status = '1'");
while($fa=mysql_fetch_array($fbanner)){
$int_reload = db_query("SELECT * FROM ".$db_prefix."_reloads WHERE tan='".$fa['tan']."' and (uid='".$_SESSION['uid']."' or ip='".$ip."') and bis >= ".time()."");
$stat_gesamt++;
$stat_verguetung = $stat_verguetung+$fa['verdienst'];
$stat_aufenthalt = $stat_aufenthalt+$fa['aufendhalt'];
if (mysql_num_rows($int_reload) > 0) { $stat_reload++; }
}
echo "<center>";
echo "Aktive Paidbanner: ".number_format(($stat_gesamt-$stat_reload),0,',','.')." | Reloadsperre: ".number_format($stat_reload,0,',','.');
echo " <br /> ";
echo "Ø Aufenthalt: ".number_format(($stat_aufenthalt/$stat_gesamt),2,',','.')." Sek. | ";
echo "Ø Durchlauf: ".number_format(($stat_gesamt*($stat_verguetung/$stat_gesamt)),2,',','.')." ".$waehrung." | ";
echo "Ø Vergütung: ".number_format(($stat_verguetung/$stat_gesamt),2,',','.')." ".$waehrung;
echo "</center><br /><br />";
$usr = mysql_fetch_assoc (db_query ('SELECT max_forced FROM '.$db_prefix.'_userdaten WHERE uid = '.$_SESSION['uid'].' LIMIT 1'));
$fbanner = db_query ('SELECT t1.*
FROM '.$db_prefix.'_gebuchte_werbung t1
LEFT JOIN '.$db_prefix.'_reloads t2
ON (t1.tan = t2.tan AND (t2.uid = '.$_SESSION['uid'].' OR t2.ip = "'.$ip.'") AND t2.bis >= '.time().')
WHERE t2.tan IS NULL AND t1.werbeart = "forcedbanner" AND t1.menge > 0 AND t1.status = 1 AND t1.verdienst > 0 AND t1.sponsor != '.$_SESSION['uid'].' ORDER BY t1.verdienst DESC LIMIT '.$usr['max_forced'].'');
while ($f_banner = mysql_fetch_assoc ($fbanner)){
echo '<div align="center" id="banner_'.$f_banner['tan'].'"><a href="fc.php?tan='.$f_banner['tan'].'" target="_blank"><img src="'.$f_banner['banner'].'" border="0" height="60" width="468" alt="'.$f_banner['tan'].'" onClick="document.getElementById(\'banner_'.$f_banner['tan'].'\').style.display=\'none\';"></a>'
. '<br>Reload:'. $f_banner['reload']/3600 .' Std. | Verdienst: '.number_format($f_banner['verdienst'],2,',','.').' | Aufenthalt: '.$f_banner['aufendhalt'].' Sekunden<br><b><a href="?content=/verdienen/framebrecher&tan='.$f_banner['tan'].'&sponsor='.$f_banner['sponsor'].'">TAN: '.$f_banner['tan'].'</a></b> << Framebrecher melden<br/><br></div>';
$x_banner++;
}
if ($x_banner <= 0) {
$bonusbanner = db_query("SELECT * FROM ".$db_prefix."_gebuchte_werbung WHERE menge >='1' and werbeart = 'forcedbanner' and sponsor = 'Bonusbanner' and status = '1' and sponsor != '".$_SESSION['uid']."' ORDER BY RAND()");
while($b_banner=mysql_fetch_array($bonusbanner)){
$int_reload = db_query("SELECT * FROM ".$db_prefix."_reloads WHERE tan='".$b_banner['tan']."' and (uid='".$_SESSION['uid']."' or ip='".$ip."') and bis >= ".time()."");
if (!mysql_num_rows($int_reload) && $y_banner <= ($max_banner['max_forced']-1)) {
echo '<div align="center" id="banner_'.$y_banner.'"><a href="fc.php?tan='.$b_banner['tan'].'" target="_blank"><img src="'.$b_banner['banner'].'" border="0" height="60" width="468" alt="" onClick="document.getElementById(\'banner_'.$y_banner.'\').style.display=\'none\';"></a>
<br>
<b>Bonusbanner</b> | Verdienst: '.number_format($b_banner['verdienst'],2,',','.').' '.$waehrung.' | Aufendhalt:'.$b_banner['aufendhalt'].' Sekunden<br><br></div>';
$y_banner++;
echo '<div align="center"><form action="" method="post"><input type="Submit" name="mehr_banner" value="Weitere Banner ?"></form></div>';
}
}
}
elseif ($x_banner <= 0 && $y_banner <= 0){
echo '<div align="center"><font color="#FF0000"><b>Alle Banner im Reload !</b></font></div>';
} else {
echo '<div align="center"><form action="" method="post"><input type="Submit" name="mehr_banner" value="Weitere Banner ?"></form></div>';
}
foot ();
?>
<?if($_SESSION['login'] == 'true'){
include("content/shoutbox.php");
}?>