Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2016
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.13 KB | None | 0 0
  1. <html>
  2. <head>
  3. <meta charset="utf-8">
  4. <meta name="viewport" content="width=device-width">
  5. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
  6. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
  7. <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
  8. </head>
  9. <body>
  10. <div class="panel panel-default">
  11. <!-- Default panel contents -->
  12. <div class="panel-heading"><h3>Fahandungs-Liste | DieFreimaurer</h3></div>
  13. <div class="panel-body">
  14. </br>
  15. <?php
  16. $username = "root";
  17. $password = "#Lappen123247#";
  18. $hostname = "localhost";
  19. $db_name = "a3";
  20. if( $_GET["edit"] and $_GET["pid"]) {
  21. $pid = $_GET["pid"];
  22. $_link = mysql_connect($hostname, $username, $password);
  23. if (!$_link)
  24. {
  25. die("Keine Verbindung zur Datenbank möglich: " .
  26. mysql_error());
  27. }
  28. mysql_select_db($db_name, $_link);
  29. $_wantedCrimes;
  30. $_wantedName;
  31. $_wantedBounty;
  32. $_sql = "SELECT * FROM wanted WHERE wantedID=" . $pid;
  33. $knast = "";
  34. $reason;
  35. $minute;
  36. $_resultat = mysql_query($_sql, $_link);
  37. while($row = mysql_fetch_assoc($_resultat)) {
  38. $_wantedCrimes = $row["wantedCrimes"];
  39. $_wantedName = $row["wantedName"];
  40. $_wantedBounty = $row["wantedBounty"];
  41. if (strpos($row["wantedCrimes"] ,'Mord')!==false or strpos($row["wantedCrimes"] ,'Überfahren einer Person')!==false or strpos($row["wantedCrimes"] ,'Töten eines Polizisten')!==false or $row["wantedBounty"] > "999999") {
  42. $knast = "Ja";
  43. if(strpos($row["wantedCrimes"] ,'Mord')!==false or strpos($row["wantedCrimes"] ,'Überfahren einer Person')!==false or strpos($row["wantedCrimes"] ,'Töten eines Polizisten')!==false and $row["wantedBounty"] > "999999"){
  44. $reason = "Mord/Kill + Geld &uuml;ber 1Mio";
  45. $minute = $row["wantedBounty"] / 100000;
  46. $minute = round($minute);
  47. $minute = $minute + 15;
  48. }elseif(strpos($row["wantedCrimes"] ,'Mord')!==false or strpos($row["wantedCrimes"] ,'Überfahren einer Person')!==false or strpos($row["wantedCrimes"] ,'Töten eines Polizisten')!==false){
  49. $reason = "Mord/Kill";
  50. $minute = $row["wantedBounty"] / 100000;
  51. $minute = round($minute);
  52. $minute = $minute + 15;
  53. }elseif($row["wantedBounty"] > "999999"){
  54. $reason = " Geld &uuml;ber 1Mio";
  55. $minute = $row["wantedBounty"] / 100000;
  56. $minute = round($minute);
  57. $minute = $minute + 15;
  58. }
  59. }else{
  60. $knast = "Nein";
  61. }
  62.  
  63. }
  64. $string = $_wantedCrimes;
  65. $string = str_replace("ä", "&auml;", $string);
  66. $string = str_replace("ü", "&uuml;", $string);
  67. $string = str_replace("ö", "&ouml;", $string);
  68. $string = str_replace("Ä", "&Auml;", $string);
  69. $string = str_replace("Ü", "&Uuml;", $string);
  70. $string = str_replace("Ö", "&Ouml;", $string);
  71. $string = str_replace("ß", "&szlig;", $string);
  72. $_wantedCrimes = $string;
  73. $prozent = $_wantedBounty / "1000000" * "100";
  74. if ($knast == "Ja"){
  75. echo('<div class="row">
  76. <div class="panel panel-default"><div class="panel-body">' . '<h4>Name: ' . $_wantedName . '</h4>' . '<h4>Geht ins Gef&auml;ngnis?: ' . $knast . '</h4>' . '
  77. </br><font color="red"><h4>Kopfgeld:' . $_wantedBounty .'$ </br> Grund: ' . $reason . ' | ' . $minute . 'min. </h4></br>
  78. </font>
  79. <div class="col-xs-12 col-sm-6 col-md-8">
  80. </br>
  81. <div class="progress">
  82. <div class="progress-bar progress-bar-success progress-bar-striped active" style="width: 55%">
  83. <span class="sr-only">55% Complete (success)</span>
  84. </div>
  85. <div class="progress-bar progress-bar-warning progress-bar-striped active" style="width: 30%">
  86. <span class="sr-only">30% Complete (warning)</span>
  87. </div>
  88. <div class="progress-bar progress-bar-danger progress-bar-striped active" style="width: 15%">
  89. <span class="sr-only">15% Complete (danger)</span>
  90. </div>
  91. </div>
  92. </div>');
  93. }else{
  94. $_p1;
  95. $_p2;
  96. $_p3;
  97. if($prozent <= "55"){
  98. $_p1 = $prozent . "%";
  99. $_p2 = "0%";
  100. $_p3 = "0%";
  101. }elseif($prozent < "85"){
  102. $_p1 = "55%";
  103. $_p2tmp = $prozent - "55";
  104. $_p2 = $_p2tmp . "%";
  105. $_p3 = "0%";
  106. }elseif($prozent >= "85"){
  107. $_p1 = "55%";
  108. $_p2 = "30%";
  109. $_p3tmp = $prozent - "85";
  110. $_p3 = $_p3tmp . "%";
  111.  
  112. }
  113. echo('<div class="row">
  114. <div class="panel panel-default"><div class="panel-body">' . '<h4>Name: ' . $_wantedName . '</h4>' . '<h4>Geht ins Gef&auml;ngnis?: ' . $knast . '</h4>' . '</br><h4>Kopfgeld:' . $_wantedBounty .'$</h4></br></div></div>
  115. <div class="col-xs-12 col-sm-6 col-md-8">
  116. <div class="progress">
  117. <div class="progress-bar progress-bar-success progress-bar-striped active" style="width: ' . $_p1 .'">
  118. <span class="sr-only">'. $_p1 .' Complete (success)</span>
  119. </div>
  120. <div class="progress-bar progress-bar-warning progress-bar-striped active" style="width: '. $_p2 .'">
  121. <span class="sr-only">'. $_p2 .' Complete (warning)</span>
  122. </div>
  123. <div class="progress-bar progress-bar-danger progress-bar-striped active" style="width: '. $_p3 .'">
  124. <span class="sr-only">'. $_p3 .' Complete (danger)</span>
  125. </div>
  126. </div></div>
  127. </div>');
  128. }
  129. function GetBetween($string, $start, $end)
  130. {
  131. $pos = stripos($string, $start);
  132.  
  133. $str = substr($string, $pos);
  134.  
  135. $str_two = substr($str, strlen($start));
  136.  
  137. $second_pos = stripos($str_two, $end);
  138.  
  139. $str_three = substr($str_two, 0, $second_pos);
  140.  
  141. $get_tmp = trim($str_three); // remove whitespaces
  142.  
  143. if(preg_match_all('/\d+/', $get_tmp, $numbers))
  144. return end($numbers[0]);
  145. }
  146. echo('<div class="row"><div class="col-md-8">');
  147. echo('<table class="table table-striped table-hover table-bordered" id="tblData">
  148. <thead>
  149. <tr>
  150. <th>Straftat</th>
  151. <th>Anzahl</th>
  152. </tr>
  153. </thead>
  154. <tbody>');
  155. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Totschlag'");
  156. if(strpos($_wantedCrimes,"'Totschlag'")!== false){
  157. echo('<tr><td>Totschlag</td><td>' . $strafe_tmp . '</td></tr>');
  158. }
  159. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Gefaengnisausbruch");
  160. if(strpos($_wantedCrimes,"'Gefaengnisausbruch'")!== false){
  161. echo('<tr><td>Gefaengnisausbruch</td><td>' . $strafe_tmp . '</td></tr>');
  162. }
  163. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Raub");
  164. if(strpos($_wantedCrimes,"'Raub'")!== false){
  165. echo('<tr><td>Raub</td><td>' . $strafe_tmp . '</td></tr>');
  166. }
  167. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'verscuhter Raub");
  168. if(strpos($_wantedCrimes,"'verscuhter Raub'")!== false){
  169. echo('<tr><td>verscuhter Raub</td><td>' . $strafe_tmp . '</td></tr>');
  170. }
  171. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'versuchter Autodiebstahl");
  172. if(strpos($_wantedCrimes,"'versuchter Autodiebstahl'")!== false){
  173. echo('<tr><td>versuchter Autodiebstahl</td><td>' . $strafe_tmp . '</td></tr>');
  174. }
  175. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Nutzung illergaler Sprengstoffe");
  176. if(strpos($_wantedCrimes,"'Nutzung illergaler Sprengstoffe'")!== false){
  177. echo('<tr><td>Nutzung illergaler Sprengstoffe</td><td>' . $strafe_tmp . '</td></tr>');
  178. }
  179. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Raubueberfall");
  180. if(strpos($_wantedCrimes,"'Raubueberfall'")!== false){
  181. echo('<tr><td>Raubueberfall</td><td>' . $strafe_tmp . '</td></tr>');
  182. }
  183. $strafe_tmp = GetBetween($_wantedCrimes,'[',",'Entf&uuml;hrung']");
  184. if(strpos($_wantedCrimes,"'Entf&uuml;hrung'")!== false){
  185. echo('<tr><td>Entf&uuml;hrung</td><td>' . $strafe_tmp . '</td></tr>');
  186. }
  187. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'verscuhte Entf&uum;hrung");
  188. if(strpos($_wantedCrimes,"'verscuhte Entf&uuml;hrung'")!== false){
  189. echo('<tr><td>verscuhte Entf&uumlhrung</td><td>' . $strafe_tmp . '</td></tr>');
  190. }
  191. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Autodiebstahl");
  192. if(strpos($_wantedCrimes,"'Autodiebstahl'")!== false){
  193. echo('<tr><td>Autodiebstahl</td><td>' . $strafe_tmp . '</td></tr>');
  194. }
  195. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'versuchter Autodiebstahl");
  196. if(strpos($_wantedCrimes,"'versuchter Autodiebstahl'")!== false){
  197. echo('<tr><td>versuchter Autodiebstahl</td><td>' . $strafe_tmp . '</td></tr>');
  198. }
  199. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Fahrerflucht");
  200. if(strpos($_wantedCrimes,"'Fahrerflucht'")!== false){
  201. echo('<tr><td>Fahrerflucht</td><td>' . $strafe_tmp . '</td></tr>');
  202. }
  203. $strafe_tmp = GetBetween($_wantedCrimes,'[',",'Drogenbesitz']");
  204. if(strpos($_wantedCrimes,"'Drogenbesitz'")!== false){
  205. echo('<tr><td>Drogenbesitz</td><td>' . $strafe_tmp . '</td></tr>');
  206. }
  207. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Versuch Drogen in Umlauf bringen");
  208. if(strpos($_wantedCrimes,"'Versuch Drogen in Umlauf bringen'")!== false){
  209. echo('<tr><td>Versuch Drogen in Umlauf bringen</td><td>' . $strafe_tmp . '</td></tr>');
  210. }
  211. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Drogenhandel");
  212. if(strpos($_wantedCrimes,"'Drogenhandel'")!== false){
  213. echo('<tr><td>Drogenhandel</td><td>' . $strafe_tmp . '</td></tr>');
  214. }
  215. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Fahren ohne F&uuml;hrerschein");
  216. if(strpos($_wantedCrimes,"'Fahren ohne F&uuml;hrerschein'")!== false){
  217. echo('<tr><td>Fahren ohne F&uuml;hrerschein</td><td>' . $strafe_tmp . '</td></tr>');
  218. }
  219. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Versuchter Diebstahl Fahrzeugs");
  220. if(strpos($_wantedCrimes,"'Versuchter Diebstahl Fahrzeugs'")!== false){
  221. echo('<tr><td>Versuchter Diebstahl Fahrzeugs</td><td>' . $strafe_tmp . '</td></tr>');
  222. }
  223. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Diebstahl/F&uuml;hren e.fremden Zivilfahrzeugs");
  224. if(strpos($_wantedCrimes,"'Diebstahl/F&uuml;hren e.fremden Zivilfahrzeugs'")!== false){
  225. echo('<tr><td>Diebstahl/F&uuml;hren e.fremden Zivilfahrzeugs</td><td>' . $strafe_tmp . '</td></tr>');
  226. }
  227. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Fahren ohne Licht");
  228. if(strpos($_wantedCrimes,"'Fahren ohne Licht'")!== false){
  229. echo('<tr><td>Fahren ohne Licht</td><td>' . $strafe_tmp . '</td></tr>');
  230. }
  231. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'&Uuml;berh&ouml;hte Geschwindigkeit");
  232. if(strpos($_wantedCrimes,"'&Uuml;berh&ouml;hte Geschwindigkeit'")!== false){
  233. echo('<tr><td>&Uuml;berh&ouml;hte Geschwindigkeit</td><td>' . $strafe_tmp . '</td></tr>');
  234. }
  235. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Gef&auml;hrliche Fahrweise");
  236. if(strpos($_wantedCrimes,"'Gef&auml;hrliche Fahrweise'")!== false){
  237. echo('<tr><td>Gef&auml;hrliche Fahrweise</td><td>' . $strafe_tmp . '</td></tr>');
  238. }
  239. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Versuchter Diebstahl e.Polizeifahrzeugs");
  240. if(strpos($_wantedCrimes,"'Versuchter Diebstahl e.Polizeifahrzeugs'")!== false){
  241. echo('<tr><td>Versuchter Diebstahl e.Polizeifahrzeugs</td><td>' . $strafe_tmp . '</td></tr>');
  242. }
  243. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Diebstahl von Polizeifahrzeugen");
  244. if(strpos($_wantedCrimes,"'Diebstahl von Polizeifahrzeugen'")!== false){
  245. echo('<tr><td>Diebstahl von Polizeifahrzeugen</td><td>' . $strafe_tmp . '</td></tr>');
  246. }
  247. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Landen in einer Flugverbotszone");
  248. if(strpos($_wantedCrimes,"'Landen in einer Flugverbotszone'")!== false){
  249. echo('<tr><td>Landen in einer Flugverbotszone</td><td>' . $strafe_tmp . '</td></tr>');
  250. }
  251. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Fahren von illegalen Fahrzeugen");
  252. if(strpos($_wantedCrimes,"'Fahren von illegalen Fahrzeugen'")!== false){
  253. echo('<tr><td>Fahren von illegalen Fahrzeugen</td><td>' . $strafe_tmp . '</td></tr>');
  254. }
  255. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Unfallverursacher/Fahrerflucht nach Unfall");
  256. if(strpos($_wantedCrimes,"'Unfallverursacher/Fahrerflucht nach Unfall'")!== false){
  257. echo('<tr><td>Unfallverursacher/Fahrerflucht nach Unfall</td><td>' . $strafe_tmp . '</td></tr>');
  258. }
  259. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Fahrerflucht vor der Polizei");
  260. if(strpos($_wantedCrimes,"'Fahrerflucht vor der Polizei'")!== false){
  261. echo('<tr><td>Fahrerflucht vor der Polizei</td><td>' . $strafe_tmp . '</td></tr>');
  262. }
  263. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'&Uuml;berfahren eines anderen Spielers");
  264. if(strpos($_wantedCrimes,"'&Uuml;berfahren eines anderen Spielers'")!== false){
  265. echo('<tr><td>&Uuml;berfahren eines anderen Spielers</td><td>' . $strafe_tmp . '</td></tr>');
  266. }
  267. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Illegale Strassensperren");
  268. if(strpos($_wantedCrimes,"'Illegale Strassensperren'")!== false){
  269. echo('<tr><td>Illegale Strassensperren</td><td>' . $strafe_tmp . '</td></tr>');
  270. }
  271. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Widerstand gegen die Staatsgewalt");
  272. if(strpos($_wantedCrimes,"'Widerstand gegen die Staatsgewalt'")!== false){
  273. echo('<tr><td>Widerstand gegen die Staatsgewalt</td><td>' . $strafe_tmp . '</td></tr>');
  274. }
  275. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Nicht befolgen e.pol.Anordnung");
  276. if(strpos($_wantedCrimes,"'Nicht befolgen e.pol.Anordnung'")!== false){
  277. echo('<tr><td>Nicht befolgen e.pol.Anordnung</td><td>' . $strafe_tmp . '</td></tr>');
  278. }
  279. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Beamtenbeleidigung");
  280. if(strpos($_wantedCrimes,"'Beamtenbeleidigung'")!== false){
  281. echo('<tr><td>Beamtenbeleidigung</td><td>' . $strafe_tmp . '</td></tr>');
  282. }
  283. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Bel&auml;stigung eines Polizisten");
  284. if(strpos($_wantedCrimes,"'Bel&auml;stigung eines Polizisten'")!== false){
  285. echo('<tr><td>Bel&auml;stigung eines Polizisten</td><td>' . $strafe_tmp . '</td></tr>');
  286. }
  287. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Betreten der pol.Sperrzone");
  288. if(strpos($_wantedCrimes,"'Betreten der pol.Sperrzone'")!== false){
  289. echo('<tr><td>Betreten der pol.Sperrzone</td><td>' . $strafe_tmp . '</td></tr>');
  290. }
  291. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'T&ouml;ten eines Polizisten");
  292. if(strpos($_wantedCrimes,"'T&ouml;ten eines Polizisten'")!== false){
  293. echo('<tr><td>T&ouml;ten eines Polizisten</td><td>' . $strafe_tmp . '</td></tr>');
  294. }
  295. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Beschuss auf Polizei/Beamte/Eigentum");
  296. if(strpos($_wantedCrimes,"'Beschuss auf Polizei/Beamte/Eigentum'")!== false){
  297. echo('<tr><td>Beschuss auf Polizei/Beamte/Eigentum</td><td>' . $strafe_tmp . '</td></tr>');
  298. }
  299. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Zerst&ouml;rung von Polizeieigentum");
  300. if(strpos($_wantedCrimes,"'Zerst&ouml;rung von Polizeieigentum'")!== false){
  301. echo('<tr><td>Zerst&ouml;rung von Polizeieigentum</td><td>' . $strafe_tmp . '</td></tr>');
  302. }
  303. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Drogendelikte");
  304. if(strpos($_wantedCrimes,"'Drogendelikte'")!== false){
  305. echo('<tr><td>Drogendelikte</td><td>' . $strafe_tmp . '</td></tr>');
  306. }
  307. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Waffenbesitz ohne Lizenz");
  308. if(strpos($_wantedCrimes,"'Waffenbesitz ohne Lizenz'")!== false){
  309. echo('<tr><td>Waffenbesitz ohne Lizenz</td><td>' . $strafe_tmp . '</td></tr>');
  310. }
  311. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Mit gez.Waffe durch Stadt");
  312. if(strpos($_wantedCrimes,"'Mit gez.Waffe durch Stadt'")!== false){
  313. echo('<tr><td>Mit gez.Waffe durch Stadt</td><td>' . $strafe_tmp . '</td></tr>');
  314. }
  315. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Besitz einer verbotenen Waffe");
  316. if(strpos($_wantedCrimes,"'Besitz einer verbotenen Waffe'")!== false){
  317. echo('<tr><td>Besitz einer verbotenen Waffe</td><td>' . $strafe_tmp . '</td></tr>');
  318. }
  319. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Schusswaffengebrauch innerhalb Stadt");
  320. if(strpos($_wantedCrimes,"'Schusswaffengebrauch innerhalb Stadt'")!== false){
  321. echo('<tr><td>Schusswaffengebrauch innerhalb Stadt</td><td>' . $strafe_tmp . '</td></tr>');
  322. }
  323. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Geiselnahme");
  324. if(strpos($_wantedCrimes,"'Geiselnahme'")!== false){
  325. echo('<tr><td>Geiselnahme</td><td>' . $strafe_tmp . '</td></tr>');
  326. }
  327. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'&Uuml;berfall auf Personen/Fahrzeuge");
  328. if(strpos($_wantedCrimes,"'&Uuml;berfall auf Personen/Fahrzeuge'")!== false){
  329. echo('<tr><td>&Uuml;berfall auf Personen/Fahrzeuge</td><td>' . $strafe_tmp . '</td></tr>');
  330. }
  331. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Bankraub");
  332. if(strpos($_wantedCrimes,"'Bankraub'")!== false){
  333. echo('<tr><td>Bankraub</td><td>' . $strafe_tmp . '</td></tr>');
  334. }
  335. $strafe_tmp = GetBetween($_wantedCrimes,'[',",'Mord']");
  336. if(strpos($_wantedCrimes,"'Mord'")!== false){
  337. echo('<tr><td>Mord</td><td>' . $strafe_tmp . '</td></tr>');
  338. }
  339. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Aufstand");
  340. if(strpos($_wantedCrimes,"'Aufstand'")!== false){
  341. echo('<tr><td>Aufstand</td><td>' . $strafe_tmp . '</td></tr>');
  342. }
  343. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Angriff durch Rebellen");
  344. if(strpos($_wantedCrimes,"'Angriff durch Rebellen'")!== false){
  345. echo('<tr><td>Angriff durch Rebellen</td><td>' . $strafe_tmp . '</td></tr>');
  346. }
  347. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Angriff/Belagerung von Hauptst&auml;dten");
  348. if(strpos($_wantedCrimes,"'Angriff/Belagerung von Hauptst&auml;dten'")!== false){
  349. echo('<tr><td>Angriff/Belagerung von Hauptst&auml;dten</td><td>' . $strafe_tmp . '</td></tr>');
  350. }
  351. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Vers.Landung in einer Flugverbotszone");
  352. if(strpos($_wantedCrimes,"'Vers.Landung in einer Flugverbotszone'")!== false){
  353. echo('<tr><td>Vers.Landung in einer Flugverbotszone</td><td>' . $strafe_tmp . '</td></tr>');
  354. }
  355. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Fliegen/Schweben unterhalb 150m &uuml;.Stadt");
  356. if(strpos($_wantedCrimes,"'Fliegen/Schweben unterhalb 150m &uuml;.Stadt'")!== false){
  357. echo('<tr><td>Fliegen/Schweben unterhalb 150m &uuml;.Stadt</td><td>' . $strafe_tmp . '</td></tr>');
  358. }
  359. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Ausbruch aus dem Gefaengnis");
  360. if(strpos($_wantedCrimes,"'Ausbruch aus dem Gefaengnis'")!== false){
  361. echo('<tr><td>Ausbruch aus dem Gefaengnis</td><td>' . $strafe_tmp . '</td></tr>');
  362. }
  363. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Fliegen ohne Fluglizenz");
  364. if(strpos($_wantedCrimes,"'Fliegen ohne Fluglizenz'")!== false){
  365. echo('<tr><td>Fliegen ohne Fluglizenz</td><td>' . $strafe_tmp . '</td></tr>');
  366. }
  367. $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Dauerhaft st&ouml;rendes Hupen");
  368. if(strpos($_wantedCrimes,"'Dauerhaft st&ouml;rendes Hupen'")!== false){
  369. echo('<tr><td>Dauerhaft st&ouml;rendes Hupen</td><td>' . $strafe_tmp . '</td></tr>');
  370. }
  371. $strafe_tmp = GetBetween($_wantedCrimes,'[',",'Handel mit exotischen G&uuml;tern");
  372. if(strpos($_wantedCrimes,"'Handel mit exotischen G&uuml;tern'")!== false){
  373. echo('<tr><td>Handel mit exotischen G&uuml;tern</td><td>' . $strafe_tmp . '</td></tr>');
  374. }
  375.  
  376. echo('</tbody></table></div></div></br></br>');
  377. echo('<a href="?" class="btn btn-default">Zur&uuml;ck</a></br>');
  378. mysql_close($_link);
  379. }else{
  380. echo('<div class="input-group">
  381. <span class="input-group-addon" id="basic-addon1">@</span>
  382. <input type="text" class="form-control" placeholder="Player search..." aria-describedby="basic-addon1" id="search">
  383. </div>
  384. </br>
  385. <table class="table table-striped table-hover table-bordered" id="tblData">
  386. <thead>
  387. <tr>
  388. <th>Name</th>
  389. <th>Kopfgeld</th>
  390. <th>Muss ins Gef&auml;ngnis</th>
  391. <th>Actions</th>
  392. </tr>
  393. </thead>
  394. <tbody>');
  395. $_link = mysql_connect($hostname, $username, $password);
  396. if (!$_link)
  397. {
  398. die("Keine Verbindung zur Datenbank m&ouml;glich: " .
  399. mysql_error());
  400. }
  401. mysql_select_db($db_name, $_link);
  402.  
  403. $_sql = "SELECT * FROM wanted WHERE active=1";
  404. $_resultat = mysql_query($_sql, $_link);
  405. while($row = mysql_fetch_assoc($_resultat)) {
  406. $knast = "";
  407. if (strpos($row["wantedCrimes"] ,'Mord')!==false or strpos($row["wantedCrimes"] ,'Überfahren einer Person')!==false or strpos($row["wantedCrimes"] ,'Töten eines Polizisten')!==false or $row["wantedBounty"] > "999999") {
  408. $knast = "Ja";
  409. }else{
  410. $knast = "Nein";
  411. }
  412. $string = $row["wantedName"];
  413. $string = str_replace("ä", "&auml;", $string);
  414. $string = str_replace("ü", "&uuml;", $string);
  415. $string = str_replace("ö", "&ouml;", $string);
  416. $string = str_replace("Ä", "&Auml;", $string);
  417. $string = str_replace("Ü", "&Uuml;", $string);
  418. $string = str_replace("Ö", "&Ouml;", $string);
  419. $string = str_replace("ß", "&szlig;", $string);
  420. $string = str_replace("´", "", $string);
  421.  
  422. echo('<tr><td>' . $string . '</td><td>' . $row["wantedBounty"] . '$</th><td>' . $knast. '</th><td><a href="?edit=1&pid=' . $row["wantedID"] . '">Editieren</a></td></tr>');
  423. }mysql_close($_link);
  424. echo(' </tbody>
  425. </table>
  426. </div>');
  427. }
  428. ?>
  429. </br>
  430. <footer class="footer">
  431. <div class="container">
  432. <p class="text-muted" style=" text-align: center;">Made by Rentner Reiner @PineappleNET</p>
  433. </div>
  434. </footer>
  435. <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
  436. <script type="text/javascript">
  437. $(document).ready(function()
  438. {
  439. $('#search').keyup(function()
  440. {
  441. searchTable($(this).val());
  442. });
  443. });
  444. function searchTable(inputVal)
  445. {
  446. var table = $('#tblData');
  447. table.find('tr').each(function(index, row)
  448. {
  449. var allCells = $(row).find('td');
  450. if(allCells.length > 0)
  451. {
  452. var found = false;
  453. allCells.each(function(index, td)
  454. {
  455. var regExp = new RegExp(inputVal, 'i');
  456. if(regExp.test($(td).text()))
  457. {
  458. found = true;
  459. return false;
  460. }
  461. });
  462. if(found == true)$(row).show();else $(row).hide();
  463. }
  464. });
  465. }
  466. </script>
  467. </body>
  468. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement