Ich empfehle dir das ajax addon da ises schon drin ansonsten das hier
Paidlinks
PHP-Code:
$gesamt = mysql_fetch_array(db_query("SELECT COUNT(tan) AS ganzahl FROM ".$db_prefix."_gebuchte_werbung WHERE werbeart = 'paidlinks' AND menge > 0 AND status = 1 AND verdienst > 0 AND sponsor != '".$_SESSION['uid']."'")) OR die(mysql_error());
$uebrig = mysql_fetch_array(db_query("SELECT COUNT(t1.tan) AS uanzahl FROM ".$db_prefix."_gebuchte_werbung AS t1 LEFT OUTER JOIN ".$db_prefix."_reloads AS t2 ON (t2.tan = t1.tan AND (t2.uid = ".$_SESSION['uid']." OR t2.ip = '".$ip."') AND t2.bis >= '".time()."') WHERE t2.tan IS NULL AND t1.werbeart = 'paidlinks' AND t1.menge > 0 AND t1.status = 1 AND t1.verdienst > 0 AND t1.sponsor != '".$_SESSION['uid']."'")) OR die(mysql_error());
echo '
<table cellspacing="4" cellpadding="0">
<tr>
<td align="center">Paidlinks gesamt: '.$gesamt['ganzahl'].'</td>
<td> </td>
<td align="center">Paidlinks uebrig: '.$uebrig['uanzahl'].'</td>
</tr>
</table>
';
Paidmails
PHP-Code:
$gesamt = mysql_fetch_array(db_query("SELECT COUNT(tan) AS ganzahl FROM ".$db_prefix."_gebuchte_werbung WHERE werbeart = 'paidmail' AND menge > 0 AND status = 1 AND verdienst > 0 AND sponsor != '".$_SESSION['uid']."'")) OR die(mysql_error());
$uebrig = mysql_fetch_array(db_query("SELECT COUNT(t1.tan) AS uanzahl FROM ".$db_prefix."_gebuchte_werbung AS t1 LEFT OUTER JOIN ".$db_prefix."_reloads AS t2 ON (t2.tan = t1.tan AND (t2.uid = ".$_SESSION['uid']." OR t2.ip = '".$ip."') AND t2.bis >= '".time()."') WHERE t2.tan IS NULL AND t1.werbeart = 'paidmail' AND t1.menge > 0 AND t1.status = 1 AND t1.verdienst > 0 AND t1.sponsor != '".$_SESSION['uid']."'")) OR die(mysql_error());
echo '
<table cellspacing="4" cellpadding="0">
<tr>
<td align="center">Paidmails gesamt: '.$gesamt['ganzahl'].'</td>
<td> </td>
<td align="center">Paidmails uebrig: '.$uebrig['uanzahl'].'</td>
</tr>
</table>
';