<?
if (!isset($fc_gebucht)) $fc_gebucht = '';
if (!isset($fc_menge)) $fc_menge = '';
if (!isset($fc_wert)) $fc_wert = '';
if (!isset($in_fc_gebucht)) $in_fc_gebucht = '';
if (!isset($in_fc_menge)) $in_fc_menge = '';
if (!isset($in_fc_wert)) $in_fc_wert = '';
$kontostats = mysql_fetch_array(db_query("SELECT COUNT(uid) AS kd_uid , SUM(kontostand) AS kd_kontostand , SUM(klicks) AS kd_klicks , SUM(angebettelt) AS kd_angebettelt , SUM(kv) AS kd_kv , SUM(bv) AS kd_bv FROM ".$db_prefix."_kontodaten"));
$werberdaten = mysql_fetch_array(db_query("SELECT SUM(gesamt) AS wd_gesamt FROM ".$db_prefix."_werberdaten"));
$ex_fc = db_query("SELECT * FROM ".$db_prefix."_gebuchte_werbung WHERE menge >= 1 and werbeart = 'forcedbanner' and status = '1'");
while ($count = mysql_fetch_array($ex_fc)) {
$fc_gebucht++;
$fc_menge = $fc_menge + $count['menge'];
$fc_wert = $fc_wert + ($count['verdienst']*$count['menge']);
}
$heute = strtotime("".date("m")."/".date("d")."/".date("Y").""); // Format mm.tt.yyyy
$seitenstart = strtotime("04/02/2005"); // Format mm.tt.yyyy
$tage = ($heute - $seitenstart) / 86400;
if ($tage <= 1) $tage = 1;
?>
<?head("Mediadaten - $seitenname");?>
<table width="100%" border="0" cellpadding="1" cellspacing="1">
<tr>
<td width="50%">Start dieser Seite</td>
<td width="50%"><?=date("d.m.Y",$seitenstart);?></td>
</tr>
<tr>
<td width="50%">Guthaben aller User</td>
<td width="50%"><?=@number_format($kontostats['kd_kontostand'],2,",",".");?> <?=$waehrung;?></td>
</tr>
<tr>
<td width="50%">Guthaben Ø pro User</td>
<td width="50%"><?=@number_format($kontostats['kd_kontostand'] / $kontostats['kd_uid'],2,",",".");?> <?=$waehrung;?></td>
</tr>
<tr>
<td width="50%">Angemeldete User</td>
<td width="50%"><?=@number_format($kontostats['kd_uid'],0,",",".");?></td>
</tr>
<tr>
<td width="50%">Anmeldungen pro Tag</td>
<td width="50%"><?=@number_format($kontostats['kd_uid'] / $tage,2,",",".");?></td>
</tr>
</table>
<?foot();?>
<?head("Mediadaten - Diverses");?>
<table width="100%" border="0" cellpadding="1" cellspacing="1">
<tr>
<td width="50%">Forcedklicks aller User</td>
<td width="50%"><?=@number_format($kontostats['kd_klicks'],0,",",".");?> Klicks</td>
</tr>
<tr>
<td width="50%">Verdienst bei allen Forcedklicks</td>
<td width="50%"><?=@number_format($kontostats['kd_kv'],2,",",".");?> <?=$waehrung;?></td>
</tr>
<tr>
<td width="50%">Ø Verdienst pro Klick</td>
<td width="50%"><?=@number_format($kontostats['kd_kv']/$kontostats['kd_klicks'],2,",",".");?> <?=$waehrung;?></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="1" cellspacing="1">
<tr>
<td width="50%">Bettelaufrufe alle User</td>
<td width="50%"><?=@number_format($kontostats['kd_angebettelt'],0,",",".");?> Aufrufe</td>
</tr>
<tr>
<td width="50%">Verdienst bei allen Bettelaufrufen</td>
<td width="50%"><?=@number_format($kontostats['kd_bv'],2,",",".");?> <?=$waehrung;?></td>
</tr>
<tr>
<td width="50%">Ø Verdienst pro Aufruf</td>
<td width="50%"><?=@number_format($kontostats['kd_bv']/$kontostats['kd_angebettelt'],2,",",".");?> <?=$waehrung;?></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="1" cellspacing="1">
<tr>
<td width="50%">Refverdienste für alle Werber</td>
<td width="50%"><?=@number_format($werberdaten['wd_gesamt'],2,",",".");?> <?=$waehrung;?></td>
</tr>
</table>
<?foot();?>
<?head("Mediadaten - Werbung");?>
<table width="100%" border="0" cellpadding="1" cellspacing="1">
<tr>
<td width="50%">Forcedklick Kampagnen</td>
<td width="50%"><?=@number_format($fc_gebucht,0,",",". ");?> Kampagnen</td>
</tr>
<tr>
<td width="50%">Forcedklick Restklicks</td>
<td width="50%"><?=@number_format($fc_menge,0,",",".") ;?> Klicks</td>
</tr>
<tr>
<td width="50%">Forcedklicks Gesamtwert</td>
<td width="50%"><?=@number_format($fc_wert,2,",","."); ?> <?=$waehrung;?></td>
</tr>
</table>
<?foot();?>