From: Hendrik <nh...@us...> - 2009-06-03 19:19:39
|
Update of /cvsroot/arianne/stendhal_website/content/admin In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv28472/content/admin Modified Files: playerhistory.php Log Message: added search function Index: playerhistory.php =================================================================== RCS file: /cvsroot/arianne/stendhal_website/content/admin/playerhistory.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** playerhistory.php 3 Jun 2009 19:05:44 -0000 1.1 --- playerhistory.php 3 Jun 2009 19:19:32 -0000 1.2 *************** *** 3,20 **** die("Ooops!"); } - startBox('Player History'); - $name=$_REQUEST["name"]; ! echo '<table class="prettytable"><tr><th>time</th><th>source</th><th>event</th><th>parameters</th></tr>'; ! $history = PlayerHistoryEntry::getPlayerHistoryEntriesForPlayer($name); ! foreach ($history as $entry) { ! echo '<tr><td>'.$entry->timedate.'</td><td>'.$entry->source.'</td><td>'.$entry->event.'</td><td>'.$entry->param.'</td></tr>'; } - echo '</table>'; - ?> - <p><b>These logs are for administrators eyes ONLY and should not be copied or pasted to others.</b></p> - <?php - endBox() ?> \ No newline at end of file --- 3,31 ---- die("Ooops!"); } $name=$_REQUEST["name"]; + startBox('Search Player'); + ?> + <form method="get" action=""> + <input type="hidden" name="id" value="content/admin/playerhistory"> + <input type="text" name="name" maxlength="60" value="<?php if (isset($name)) {echo htmlspecialchars($name);}?>"> + <input type="submit" name="sublogin" value="Search"> + </form> + <?php + endBox(); ! if (isset($name)) { ! startBox('History for Player '. htmlspecialchars($name)); ! echo '<table class="prettytable"><tr><th>time</th><th>source</th><th>event</th><th>parameters</th></tr>'; ! ! $history = PlayerHistoryEntry::getPlayerHistoryEntriesForPlayer($name); ! foreach ($history as $entry) { ! echo '<tr><td>'.htmlspecialchars($entry->timedate).'</td><td>'.htmlspecialchars($entry->source) ! .'</td><td>'.htmlspecialchars($entry->event).'</td><td>'.htmlspecialchars($entry->param).'</td></tr>'; ! } ! echo '</table>'; ! echo '<p><b>These logs are for administrators eyes ONLY and should not be copied or pasted to others.</b></p>'; ! ! endBox(); } ?> \ No newline at end of file |