<?php
$anzuser=mysql_query("SELECT id FROM ".$dbx."_user"); $amin=time()-500; $useronline=mysql_query("SELECT online FROM ".$dbx."_user WHERE online > '".$amin."'"); $usermale=mysql_query("SELECT id FROM ".$dbx."_user WHERE geschlecht='m'"); $prozentmale = round(mysql_num_rows($usermale) * 100 / mysql_num_rows($anzuser)); $prozentfemale = round(100 - $prozentmale); $userde=mysql_query("SELECT id FROM ".$dbx."_user WHERE land='de'"); $prozentde = round(mysql_num_rows($userde) * 100 / mysql_num_rows($anzuser)); $prozentnichtde = round(100 - $prozentde); $dv18=time()-(31556926*18); $dv40=time()-(31556926*40); $useru18=mysql_query("SELECT id FROM ".$dbx."_user WHERE geburtsdatum>".$dv18); $user1840=mysql_query("SELECT id FROM ".$dbx."_user WHERE geburtsdatum<".$dv18." AND geburtsdatum>".$dv40); $prozentu18 = round(mysql_num_rows($useru18) * 100 / mysql_num_rows($anzuser)); $prozent1840 = round(mysql_num_rows($user1840) * 100 / mysql_num_rows($anzuser)); $prozent40u = round(100 - $prozentu18 - $prozent1840); echo "<table border=0 cellspacing=2 cellpadding=2><tr><td class=small>Зарегистрировано:</td><td bgcolor=#f7f7f7><b>".mysql_num_rows($anzuser)."</b></td></tr><tr><td class=small>Онлайн:</td><td bgcolor=#f7f7f7><b>".mysql_num_rows($useronline)."</b></td></tr></table><table border=0 cellspacing=0 cellpadding=2 width=100%><tr>
<td><br><div style=\"background-color:#f7f7f7;border-bottom:1px solid #ddd;padding:4px;\" class=small>Какоко пола пользователи?</div><img src=\"http://chart.apis.google.com/chart?cht=p3&chd=t:".$prozentmale.",".$prozentfemale."&chs=295x70&chl=".$prozentmale."% maennlich|".$prozentfemale."% weiblich\"></td>
<td align=right><br><div style=\"background-color:#f7f7f7;border-bottom:1px solid #ddd;padding:4px;text-align:left;\" class=small>Страны пользователей?</div><img src=\"http://chart.apis.google.com/chart?cht=p3&chd=t:".$prozentde.",".$prozentnichtde."&chs=295x70&chl=".$prozentde."% Deutschland|".$prozentnichtde."% Ausland\"></td>
</tr><tr>
<td><br><div style=\"background-color:#f7f7f7;border-bottom:1px solid #ddd;padding:4px;\" class=small>Возвраст</div><img src=\"http://chart.apis.google.com/chart?cht=p3&chd=t:".$prozentu18.",".$prozent1840.",".$prozent40u."&chs=295x70&chl=".$prozentu18."% unter 18|".$prozent1840."% 18 bis 40|".$prozent40u."% ueber 40\"></td>
</tr></table>"; ?>