PageRenderTime 46ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/brain/users.php

https://bitbucket.org/obsidian/selador
PHP | 575 lines | 473 code | 68 blank | 34 comment | 101 complexity | a8bc3aafc0076135b302754a7e10a813 MD5 | raw file
Possible License(s): AGPL-3.0, LGPL-2.1
  1. <?php
  2. /* users.php - Front-end code for working with users in admin view
  3. *
  4. * Copyright (C) 2006, 2007, 2008 Kevin Read, Simone Schaefer
  5. *
  6. * This file is part of Selador, a browser-based fantasy strategy game
  7. *
  8. * This program is distributed under the terms of the GNU Affero General Public License.
  9. *
  10. *
  11. * Selador is free software: you can redistribute it and/or modify
  12. * it under the terms of the GNU Affero General Public License as published by
  13. * the Free Software Foundation, either version 3 of the License, or
  14. * any later version.
  15. *
  16. * Selador is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU Affero General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU Affero General Public License
  22. * along with Selador. If not, see <http://www.gnu.org/licenses/>.
  23. **/
  24. // Don't push - this code is crude
  25. $uid = (int)$_REQUEST['id'];
  26. if ($priv & SEE_PLAYER_OVERVIEW || $priv & SEE_PLAYER_ACTIONS || $priv & BLOCK)
  27. {
  28. if (isset ($_REQUEST['cmd']))
  29. $cmd = $_REQUEST['cmd'];
  30. else
  31. $cmd = "overview";
  32. ?>
  33. <br>
  34. <table width="900px"><tr>
  35. <td><b>Benutzer</b></td>
  36. <th><a href="admin.php?module=users&cmd=overview">&Uuml;bersicht</th>
  37. <?php
  38. if (isset ($_REQUEST['id']))
  39. {
  40. if (($cmd == "view") && ($priv & BLOCK))
  41. echo '<th><a href="admin.php?module=users&cmd=incidents&id='.$uid.'">Vorfälle</th>';
  42. else
  43. {
  44. if ($cmd == "incidents")
  45. echo '<th><a href="admin.php?module=users&cmd=view&id='.$uid.'">Protokoll</th>';
  46. }
  47. }
  48. ?>
  49. </table>
  50. <?php
  51. $etypes = array (1=>"Gebäude", 2=>"Forschung", 3=>"Einheiten", 4=>"Angriff", 5=>"Spionage", 6=>"Unterstützung", 7=>"Raubzug", 10=>"Heimkehr", 11=>"Transport", 101=>"Aussenposten", 1000 => "Enklave", 1001 => "Farmland", 1002 => "Holzf&auml;ller", 1003 => "Steinbruch", 1004 => "Eisenmine", 2000=>"Admineingriff");
  52. $incidents = array (1=>"Pushen", 2=>"Bashen", 3=>"Beleidigung", 4=>"Rassismus", 5=>"Sexismus", "Diskriminierung", "Multi", "Bugusing");
  53. $resolutions = array (1=>"Verwarnung", 10=>"Zeitlich begrenzte Sperre", 200=>"Permanente Sperre");
  54. if ("overview" == $cmd)
  55. {
  56. ?>
  57. <table width="100%"><tr bgcolor="#d2d2d2">
  58. <th>Name</th><th>Punkte</th><th>Dörfer</th><th>Erstellt</th>
  59. <th>Letzte Aktion</th><th>Rasse</th><th>Klasse</th>
  60. </tr>
  61. <?php
  62. $query = "select A.uid, A.user, A.score, A.created, A.changed, count(B.villageid) as villages, C.name as race, D.name as class from user A, village B, races C, classes D where A.race=C.raceid and A.uid=B.uid and A.class=D.classid group by uid;";
  63. if (!($res = mysql_query ($query))) // Jetzt fragen wir den SQL-Server
  64. echo "Error: ".mysql_error()."<br>Query:".$query;
  65. while ($row = mysql_fetch_array ($res))
  66. {
  67. echo "<tr bgcolor=\"#eeeeee\"><td><a href=\"admin.php?module=users&cmd=view&id=".$row['uid']."\">".$row['user']."</a></td>";
  68. echo "<td>".$row['score']."</td>";
  69. echo "<td>".$row['villages']."</td>";
  70. echo "<td>".$row['created']."</td>";
  71. echo "<td>".$row['changed']."</td>";
  72. echo "<td>".$row['race']."</td>";
  73. echo "<td>".$row['class']."</td>";
  74. echo "<td>".$row['stamp']."</td>";
  75. echo "</tr>\n";
  76. }
  77. echo "</table>\n";
  78. }
  79. }
  80. if ($priv & SEE_PLAYERS_ACTIONS || $priv & GIVE_RESSOURCES)
  81. {
  82. $gone = 1000000;
  83. $query = "select *, time_to_sec(timediff(now(),stamp)) as gone from village where uid=".$uid;
  84. $selectstr = "<option value=\"0\" selected>---</option>";
  85. if (!($res = mysql_query ($query)))
  86. {
  87. echo "<b>Fehler beim Dorfauslesen: ".mysql_error ()."<br>Query: ".$query."</b>";
  88. exit ();
  89. }
  90. else
  91. {
  92. while ($vrow = mysql_fetch_array ($res))
  93. {
  94. $selectstr .= "<option value=\"".$vrow['villageid']."\">".$vrow['name']."</option>";
  95. if ($vrow['gone'] < $gone)
  96. $gone = $vrow['gone'];
  97. }
  98. }
  99. $hours = (int)($gone/3600);
  100. $minutes = ((int)($gone/60) % 60);
  101. if ($hours < 10)
  102. $timestr = "0".$hours;
  103. else
  104. $timestr = $hours;
  105. if ($minutes < 10)
  106. $timestr .= ":0".$minutes;
  107. else
  108. $timestr .= ":".$minutes;
  109. }
  110. if ( ($uid) > 0)
  111. {
  112. if ($priv & SEE_PLAYERS_ACTIONS || $priv & BLOCK)
  113. {
  114. $query = "select *, timediff(now(),changed) as lastaction from user where uid=".$uid;
  115. if (!($res = mysql_query ($query)))
  116. {
  117. echo "<b>Fehler beim Benutzerauslesen: ".mysql_error()."<br>Query: ".$query."</b>";
  118. }
  119. else
  120. {
  121. if (!($userrow = mysql_fetch_array ($res)))
  122. echo "<b>Fehler: Benutzer existiert nicht!</b>";
  123. else
  124. {
  125. echo "<form action=\"".$_SERVER['PHP_SELF']."\" method=\"POST\">";
  126. echo "<input type=\"hidden\" name=\"module\" value=\"".$module."\">";
  127. echo "<input type=\"hidden\" name=\"cmd\" value=\"".$cmd."\">";
  128. echo "<table class=\"inhalt\"><tr><td>Name: </td><td>".$userrow['user']."</td></tr>";
  129. echo "<tr><td>Punkte:</td><td>".$userrow['score']."</td></tr>";
  130. echo "<tr><td>eMail:</td><td>".$userrow['email']."</td></tr>";
  131. }
  132. }
  133. echo "<tr><td>Letzte Aktion:</td><td>".$row['changed'].". (vor ".$timestr." Stunden)</td></tr></table></form>";
  134. }
  135. if ($priv & SEND_HERO_HOME)
  136. {
  137. echo '<hr><h6>Held heimschicken</h6>';
  138. echo 'Symptom: Held existiert nicht in den Einheitenlisten. Auf der Heldseite steht etwas von "schlafend in ", aber ohne Namen dahinter';
  139. echo '<form action="'.$_SERVER['PHP_SELF'].'" method="POST">
  140. <input type="submit" name="sendHeroHome" value="Held heimschicken">
  141. <input type="hidden" name="id" value="'.$uid.'">
  142. <input type="hidden" name="module" value="users">
  143. <input type="hidden" name="cmd" value="view">
  144. ';
  145. if (isset($_POST['sendHeroHome']) || (isset ($_POST['sendReally']) ))
  146. {
  147. $query = "select hero_troopid from user where uid=".$uid;
  148. if ($res = mysql_query($query))
  149. {
  150. if ($row = mysql_fetch_array($res))
  151. {
  152. $troopid = (int)$row['hero_troopid'];
  153. $query = "select A.*, B.name, B.outpost_of from armies A, village B where A.location=B.villageid and A.troopid=".$troopid;
  154. if ($res = mysql_query($query))
  155. {
  156. if (mysql_num_rows($res) > 0 && !(isset ($_POST['sendReally'])))
  157. {
  158. echo 'Sieht eigentlich alles ok aus. Trotzdem fortfahren?';
  159. echo '<input type="submit" name="sendReally" value="Ja, weitermachen">';
  160. }
  161. if (mysql_num_rows($res) == 0 || (isset ($_POST['sendReally'])))
  162. {
  163. //echo 'uarg? '.$query;
  164. //ueberpruefen, ob der held noch irgendwo versteckt unterwegs ist
  165. $query = "select A.troopid, A.unitid, A.amount from troops A join armies B on (A.troopid=B.troopid) WHERE uid=".$uid." AND A.unitid=1000 AND A.amount > 0";
  166. if ($res = mysql_query($query))
  167. {
  168. if (mysql_num_rows($res) > 0)
  169. {
  170. if ($row = mysql_fetch_array($res))
  171. {
  172. $query = "delete from troops where troopid=".$row['troopid']." AND unitid=1000 and amount > 0";
  173. if (!mysql_query($query))
  174. echo 'Fehler: '.$query;
  175. }
  176. }
  177. //stadt suchen, in die der Held versetzt wird
  178. $query = "select villageid from village where uid=".$uid." and outpost_of=0 limit 1";
  179. if ($res = mysql_query($query))
  180. {
  181. if ($row = mysql_fetch_array($res))
  182. {
  183. $villageid = $row[0];
  184. //held wieder in eine troop in seiner Heimatstadt einfügen
  185. $query = "select troopid from armies where villageid=".$villageid." and location=".$villageid;
  186. if ($res = mysql_query($query))
  187. {
  188. if ($row = mysql_fetch_array($res))
  189. {
  190. $new_troopid = $row['troopid'];
  191. $query = "replace into troops (troopid, unitid, amount) values (".$new_troopid.", 1000, 1)";
  192. if (mysql_query($query))
  193. {
  194. //troopid des helden nullen
  195. $query ="update user set hero_troopid=0 , hero_location=".$villageid." where uid=".$uid ;
  196. if (mysql_query($query))
  197. {
  198. echo '<b>Erfolgreich zurückgeschickt.</b>';
  199. }
  200. else
  201. {
  202. echo 'Fehler: '.$query;
  203. }
  204. }
  205. else
  206. {
  207. echo 'Fehler: '.$query;
  208. }
  209. }
  210. }
  211. else
  212. {
  213. echo 'Fehler: '.$query;
  214. }
  215. }
  216. }
  217. }
  218. }
  219. }
  220. else
  221. {
  222. echo 'Fehler: '.$query;
  223. }
  224. }
  225. else
  226. {
  227. echo 'empty row: '.$query;
  228. }
  229. }
  230. else
  231. {
  232. echo 'Fehler: '.$query;
  233. }
  234. }
  235. echo '</form>';
  236. }
  237. }
  238. if ("view" == $cmd)
  239. {
  240. require_once ("event.php");
  241. require_once ("eventmap.php");
  242. require_once ("unitmap.php");
  243. //der spieler soll gsperrt werden
  244. if (isset($_POST['block']))
  245. {
  246. if ($priv & BLOCK)
  247. {
  248. //print_r($_POST);
  249. if (!isset($_POST['sure'] ))
  250. {
  251. echo "Haken setzen!";
  252. }
  253. else
  254. {
  255. if ($_POST['sure'] == 0) // benutzer entsperren
  256. $userstate = "NULL";
  257. else
  258. $userstate = "\"".mysql_real_escape_string(trim($_POST['until']))."\"";
  259. $uid = (int)$_REQUEST['id'];
  260. $query = "update user set userstate=".$userstate." where uid=".$uid;
  261. if (!mysql_query($query))
  262. echo "<b>Fehler beim Sperren: Query:".$query. ", Fehler: ".mysql_error()."</b>";
  263. else
  264. {
  265. //user entsperren: ggf muss inaktivitaet wieder zurueckgesetzt werden
  266. if ((int)$_POST['sure'] == 0)
  267. {
  268. $query = "update user set inactivity=1 where uid=".$uid;
  269. }
  270. //user sperren: ggf auf inaktiv setzen
  271. if (((int)$_POST['sure'] == 1) && ($_POST['make_inactive'] == 1))
  272. {
  273. $query = "update user set inactivity=3 where uid=".$uid;
  274. }
  275. if (!mysql_query($query))
  276. echo "<b>Fehler beim Inaktiv-Schalten: Query:".$query. ", Fehler: ".mysql_error()."</b>";
  277. echo "<b>User wurde ge/entsperrt</b>";
  278. $userrow['userstate'] = $_POST['until'];
  279. }
  280. }
  281. }
  282. else
  283. {
  284. echo '<span id="error">Du darfst keine Spieler sperren</span>';
  285. }
  286. }
  287. if (isset ($_REQUEST['Geben']))
  288. {
  289. if ($priv & GIVE_RESSOURCES)
  290. {
  291. if ((int)$_REQUEST['tovillage'])
  292. {
  293. $prefix = "";
  294. $query = "update village set ";
  295. if ($_REQUEST['ress1'])
  296. {
  297. $query .= "ress1=ress1+".(int)$_REQUEST['ress1'];
  298. $prefix = ",";
  299. }
  300. if ($_REQUEST['ress2'])
  301. {
  302. $query .= $prefix."ress2=ress2+".(int)$_REQUEST['ress2'];
  303. $prefix = ",";
  304. }
  305. if ($_REQUEST['ress3'])
  306. {
  307. $query .= $prefix."ress3=ress3+".(int)$_REQUEST['ress3'];
  308. $prefix = ",";
  309. }
  310. if ($_REQUEST['ress4'])
  311. {
  312. $query .= $prefix."ress4=ress4+".(int)$_REQUEST['ress4'];
  313. $prefix = ",";
  314. }
  315. $query .= " where villageid=".(int)$_REQUEST['tovillage'];
  316. if (!mysql_query ($query))
  317. {
  318. echo "<b>Die Aktion konnte nicht ausgeführt werden</b>";
  319. }
  320. else
  321. {
  322. // $query = "insert into operlog
  323. $query = "insert into eventlog (eid, uid1, village1, uid2, village2, fired, happened, type, state) values (0, ".$uid.", ".(int)$_REQUEST['tovillage'].", 0, 0, now(), now(), 2000, 1)";
  324. if (!mysql_query ($query))
  325. echo "<b>Cannot add evenlog entry for new village. Query: ".$query.", ".mysql_error()."</b>";
  326. else
  327. echo "<b>Rohstoffe gegeben. </b>";
  328. }
  329. }
  330. else
  331. echo "<span id=\"error\">Dorf angeben</span><br>";
  332. }
  333. else
  334. {
  335. echo '<span id="error">Du darfst keine Rohstoffe geben</span>';
  336. }
  337. }
  338. if ($priv & BLOCK)
  339. {
  340. echo "<hr><form action=\"".$_SERVER['PHP_SELF']."\" method=\"POST\">";
  341. echo "<table>";
  342. if ($userrow['userstate'])
  343. {
  344. echo "<tr><td colspan=\"2\"><span style=\"color:red\">Benutzer gesperrt bis ".$userrow['userstate'];
  345. if (2 == $userrow['inactivity'])
  346. {
  347. echo " und als inaktiv markiert";
  348. }
  349. echo "</span></td></tr>";
  350. $output = " entsperren ";
  351. $checkbox = 0;
  352. }
  353. else
  354. {
  355. $output = "sperren";
  356. $checkbox = 1;
  357. }
  358. echo "<tr><td colspan=\"2\"><br><input type=\"checkbox\" name=\"sure\" value=\"".$checkbox."\">Ja, Benutzer ".$output."
  359. \n<br> <br>";
  360. if (!$userrow['userstate'])
  361. echo "<input type=\"checkbox\" name=\"make_inactive\" value=\"1\">...und dabei als inaktiv markieren ";
  362. if (!$userrow['userstate'])
  363. echo ' <br><br>er soll gesperrt werden bis <input type="text" name="until"> (Format: JJJJ-MM-TT hh:mm:ss)';
  364. echo "<br><input type=\"submit\" name=\"block\" value=\"Benutzer ".$output."\"> ";
  365. echo "<input type=\"hidden\" name=\"id\" value=\"".$uid."\"><input type=\"hidden\" name=\"module\" value=\"users\"><input type=\"hidden\" name=\"cmd\" value=\"view\">";
  366. echo "</td></tr></table>";
  367. echo "</form>";
  368. }
  369. if ($priv & GIVE_RESSOURCES)
  370. {
  371. echo "<hr><form action=\"".$_SERVER['PHP_SELF']."\" method=\"POST\">";
  372. echo "<table><tr><td>Ress geben nach:</td>";
  373. echo "<td><select name=\"tovillage\" size=\"1\">".$selectstr."</select>&nbsp;Holz: ";
  374. echo "<input type=\"text\" size=\"6\" name=\"ress1\">&nbsp;Stein:&nbsp;<input type=\"text\" size=\"6\" name=\"ress2\">&nbsp;Eisen:&nbsp;<input type=\"text\" size=\"6\" name=\"ress3\">&nbsp;Gold&nbsp;<input type=\"text\" size=\"6\" name=\"ress4\">&nbsp;<input type=\"submit\" name=\"Geben\" value=\"Geben\"></td></tr><input type=\"hidden\" name=\"id\" value=\"".$uid."\"><input type=\"hidden\" name=\"module\" value=\"users\"><input type=\"hidden\" name=\"cmd\" value=\"view\"></table></form>";
  375. }
  376. if ($priv & SEE_PLAYERS_ACTIONS)
  377. {
  378. if (isset ($_REQUEST['p']))
  379. {
  380. $page = (int)$_REQUEST['p'];
  381. if ($page < 0)
  382. $page = 0;
  383. $pagestr = "<a href=\"".$_SERVER['PHP_SELF']."?p=".($page-1)."&module=users&cmd=view&id=".$uid."\">Zurück blättern</a>";
  384. }
  385. else
  386. $page = 0;
  387. $pagestr .= "&nbsp;&nbsp;<a href=\"".$_SERVER['PHP_SELF']."?p=".($page+1)."&module=users&cmd=view&id=".$uid."\">Vor blättern</a>";
  388. echo $pagestr;
  389. $query = "select A.*, B.user as fromwho, C.name as fromwhere, D.user as towho, E.name as towhere, F.ress1, F.ress2, F.ress3, F.ress4 from eventlog A left join user B on (A.uid1=B.uid) left join village C on (A.village1=C.villageid) left join user D on (A.uid2=D.uid and A.type in (4,5,6,7,10,11)) left join village E on (A.village2=E.villageid and A.type in (4,5,6,7,10,11)) left join old_transport F on (A.type=11 and A.param=F.merchantid and F.flag=0) where A.uid1=".$uid." or A.uid2=".$uid." order by A.fired desc limit ".($page*300).",300";
  390. // echo $query;
  391. if (!($res = mysql_query ($query)))
  392. {
  393. echo "<b>Fehler: Kann Eventlog nicht lesen: ".mysql_error()."<br>Query: ".$query."</b>";
  394. }
  395. else
  396. {
  397. echo "<table class=\"inhalt\" cellspacing=\"0\"><tr><th id=\"rundrum\">Fertig</th><th id=\"rundrum\">Ausgeführt</th><th id=\"rundrum\" colspan=\"2\">Von</th><th id=\"rundrum\" colspan=\"2\">Nach</th><th id=\"rundrum\">Art</th></tr>";
  398. while ($row = mysql_fetch_array ($res))
  399. {
  400. if ($row['state'] == 1)
  401. $color = "\"#33CC33\"";
  402. else
  403. $color = "\"#DDDDDD\"";
  404. echo "<tr><td id=\"rundrum\" bgcolor=".$color.">".$row['happened']."</td><td id=\"rundrum\" bgcolor=".$color.">".$row['fired']."</td>";
  405. echo "<td id=\"rundrum\">".$row['fromwho']." (".$row['uid1'].")</td><td id=\"rundrum\">".$row['fromwhere']." </td>";
  406. echo "<td id=\"rundrum\">".$row['towho']." (".$row['uid2'].")</td>";
  407. if ($row['type'] >= 1000)
  408. echo "<td id=\"rundrum\">(".($row['village2'] % WORLD_SIZEX)." | ".(int)($row['village2'] / WORLD_SIZEX).")</td>";
  409. else
  410. echo "<td id=\"rundrum\">".$row['towhere']."</td>";
  411. if (!isset ($etypes[$row['type']]))
  412. echo "<td id=\"rundrum\">".$row['type'].": ";
  413. else
  414. echo "<td id=\"rundrum\">".$etypes[$row['type']].": ";
  415. switch ($row['type'])
  416. {
  417. case BUILDING:
  418. echo $buildmap[$row['village2']]." ".$row['param'];
  419. break;
  420. case RESEARCH:
  421. echo $resmap[$row['param2']]." ".$row['param'];
  422. break;
  423. case RECRUITING:
  424. if ($row['state'])
  425. echo $row['village2']." ".$unitmap[$row['param']];
  426. else
  427. echo (int)($row['village2'] / $row['param2'])." ".$unitmap[$row['param']];
  428. break;
  429. case RETURNING:
  430. $query = "select coin,param from rep_loot where reportid=".$row['param2']." and value=".$row['uid1']." and coin<4";
  431. if (!($lres = mysql_query ($query)))
  432. echo "Fehler: ".$query.", ".mysql_error();
  433. else
  434. {
  435. while ($lrow = mysql_fetch_row ($lres))
  436. {
  437. $loot[($lrow[0]+1)] = $lrow[1];
  438. }
  439. echo "<img src=\"../gfx/holz.gif\">".$loot[1]."<img src=\"../gfx/lehm.gif\">".$loot[2];
  440. echo "<img src=\"../gfx/iron.gif\">".$loot[3]."<img src=\"../gfx/mana.gif\">".$loot[4];
  441. }
  442. break;
  443. case TRANSPORT:
  444. echo "<img src=\"../gfx/holz.gif\">".$row['ress1']."<img src=\"../gfx/lehm.gif\">".$row['ress2'];
  445. echo "<img src=\"../gfx/iron.gif\">".$row['ress3']."<img src=\"../gfx/mana.gif\">".$row['ress4'];
  446. break;
  447. case 1000:
  448. case 1001:
  449. case 1002:
  450. case 1003:
  451. case 1004:
  452. echo $row['param'];
  453. break;
  454. }
  455. echo "</td></tr>";
  456. }
  457. echo "</table>";
  458. }
  459. }
  460. }
  461. if ($cmd == "incidents" )
  462. {
  463. if ($priv & BLOCK)
  464. {
  465. if (isset ($_REQUEST['newinc']) && isset ($_REQUEST['type']))
  466. {
  467. $type = (int)$_REQUEST['type'];
  468. $query = "insert into incidents (uid1, type, state, resolution, creator) values (".$uid.", ".$type.", 0, 0, \"".$_SERVER['REMOTE_USER']."\")";
  469. if (!mysql_query ($query))
  470. echo "<b>Konnte ich leider nicht anlegen: ".mysql_error ();
  471. }
  472. echo "<form action=\"".$_SERVER['PHP_SELF']."\" method=\"POST\">";
  473. echo '
  474. <table><tr><th>Neuen Vorfall anlegen: <input type="hidden" name="id" value="'.$uid.'"><select name="type" size="1">';
  475. foreach ($incidents as $idx=>$this_inc)
  476. echo '<option value="'.$idx.'">'.$this_inc.'</option>';
  477. echo '</select></th><th>
  478. <input type="hidden" name="module" value="users"><input type="hidden" name="cmd" value="incidents">
  479. <input type="submit" name="newinc" value="Anlegen"></th></tr>';
  480. $query = "select * from incidents where uid1=".$uid;
  481. if (!($res = mysql_query ($query)))
  482. {
  483. echo "DB-Fehler :(".mysql_error();
  484. }
  485. else
  486. {
  487. if (!mysql_num_rows ($res))
  488. {
  489. echo "<tr><td colspan=\"3\"><b>Keine Vorfälle bisher</b></td></tr>";
  490. }
  491. else
  492. {
  493. echo '<tr><th>Wann</th><th>Vorfall</th><th>Admin</th></tr>';
  494. while ($row = mysql_fetch_array ($res))
  495. {
  496. echo '<tr><td>'.$row['stamp'].'</td><td><a href="'.$_SERVER['PHP_SELF'].'?module=users&cmd=incidents&id='.$uid.'&incid='.$row['incidentid'].'">'.$incidents[$row['type']].'</a></td><td>'.$row['creator'].'</td></tr>';
  497. }
  498. }
  499. }
  500. echo "</table></form>";
  501. }
  502. else
  503. {
  504. echo '<span id="error">Du darfst nicht sperren</span>';
  505. }
  506. }
  507. ?>