",true); addnav("","donators.php?op=add1"); output("`bDonationpoints vergeben:`b`nCharakter: `nPunkte: `n",true); output("",true); if ($_GET['op']=="add2"){ if ($_GET['id']==$session['user']['acctid']){ $session['user']['donation']+=$_GET['amt']; } //ok to execute when this is the current user, they'll overwrite the value at the end of their page //hit, and this will allow the display table to update in real time. $sql = "UPDATE accounts SET donation=donation+'{$_GET['amt']}' WHERE acctid='{$_GET['id']}'"; db_query($sql); $_GET['op']=""; } if ($_GET['op']==""){ $sql = "SELECT name,donation,donationspent FROM accounts WHERE donation>0 ORDER BY donation DESC"; $result = db_query($sql); output("",true); output("",true); for ($i=0;$i",true); output("",true); output("",true); output("",true); } output("
NamePunkteAusgegeben
",true); output("`^{$row['name']}`0",true); output("`@".number_format($row['donation'])."`0`%".number_format($row['donationspent'])."`0
",true); }else if ($_GET['op']=="add1"){ $search="%"; for ($i=0;$i",true); output($row['name']." ({$row['donation']}/{$row['donationspent']})"); output("`n",true); addnav("","donators.php?op=add2&id={$row['acctid']}&amt={$_POST['amt']}"); } } page_footer(); ?>