Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width">
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
- <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
- </head>
- <body>
- <div class="panel panel-default">
- <!-- Default panel contents -->
- <div class="panel-heading"><h3>Fahandungs-Liste | DieFreimaurer</h3></div>
- <div class="panel-body">
- </br>
- <?php
- $username = "root";
- $password = "#Lappen123247#";
- $hostname = "localhost";
- $db_name = "a3";
- if( $_GET["edit"] and $_GET["pid"]) {
- $pid = $_GET["pid"];
- $_link = mysql_connect($hostname, $username, $password);
- if (!$_link)
- {
- die("Keine Verbindung zur Datenbank möglich: " .
- mysql_error());
- }
- mysql_select_db($db_name, $_link);
- $_wantedCrimes;
- $_wantedName;
- $_wantedBounty;
- $_sql = "SELECT * FROM wanted WHERE wantedID=" . $pid;
- $knast = "";
- $reason;
- $minute;
- $_resultat = mysql_query($_sql, $_link);
- while($row = mysql_fetch_assoc($_resultat)) {
- $_wantedCrimes = $row["wantedCrimes"];
- $_wantedName = $row["wantedName"];
- $_wantedBounty = $row["wantedBounty"];
- 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") {
- $knast = "Ja";
- 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"){
- $reason = "Mord/Kill + Geld über 1Mio";
- $minute = $row["wantedBounty"] / 100000;
- $minute = round($minute);
- $minute = $minute + 15;
- }elseif(strpos($row["wantedCrimes"] ,'Mord')!==false or strpos($row["wantedCrimes"] ,'Überfahren einer Person')!==false or strpos($row["wantedCrimes"] ,'Töten eines Polizisten')!==false){
- $reason = "Mord/Kill";
- $minute = $row["wantedBounty"] / 100000;
- $minute = round($minute);
- $minute = $minute + 15;
- }elseif($row["wantedBounty"] > "999999"){
- $reason = " Geld über 1Mio";
- $minute = $row["wantedBounty"] / 100000;
- $minute = round($minute);
- $minute = $minute + 15;
- }
- }else{
- $knast = "Nein";
- }
- }
- $string = $_wantedCrimes;
- $string = str_replace("ä", "ä", $string);
- $string = str_replace("ü", "ü", $string);
- $string = str_replace("ö", "ö", $string);
- $string = str_replace("Ä", "Ä", $string);
- $string = str_replace("Ü", "Ü", $string);
- $string = str_replace("Ö", "Ö", $string);
- $string = str_replace("ß", "ß", $string);
- $_wantedCrimes = $string;
- $prozent = $_wantedBounty / "1000000" * "100";
- if ($knast == "Ja"){
- echo('<div class="row">
- <div class="panel panel-default"><div class="panel-body">' . '<h4>Name: ' . $_wantedName . '</h4>' . '<h4>Geht ins Gefängnis?: ' . $knast . '</h4>' . '
- </br><font color="red"><h4>Kopfgeld:' . $_wantedBounty .'$ </br> Grund: ' . $reason . ' | ' . $minute . 'min. </h4></br>
- </font>
- <div class="col-xs-12 col-sm-6 col-md-8">
- </br>
- <div class="progress">
- <div class="progress-bar progress-bar-success progress-bar-striped active" style="width: 55%">
- <span class="sr-only">55% Complete (success)</span>
- </div>
- <div class="progress-bar progress-bar-warning progress-bar-striped active" style="width: 30%">
- <span class="sr-only">30% Complete (warning)</span>
- </div>
- <div class="progress-bar progress-bar-danger progress-bar-striped active" style="width: 15%">
- <span class="sr-only">15% Complete (danger)</span>
- </div>
- </div>
- </div>');
- }else{
- $_p1;
- $_p2;
- $_p3;
- if($prozent <= "55"){
- $_p1 = $prozent . "%";
- $_p2 = "0%";
- $_p3 = "0%";
- }elseif($prozent < "85"){
- $_p1 = "55%";
- $_p2tmp = $prozent - "55";
- $_p2 = $_p2tmp . "%";
- $_p3 = "0%";
- }elseif($prozent >= "85"){
- $_p1 = "55%";
- $_p2 = "30%";
- $_p3tmp = $prozent - "85";
- $_p3 = $_p3tmp . "%";
- }
- echo('<div class="row">
- <div class="panel panel-default"><div class="panel-body">' . '<h4>Name: ' . $_wantedName . '</h4>' . '<h4>Geht ins Gefängnis?: ' . $knast . '</h4>' . '</br><h4>Kopfgeld:' . $_wantedBounty .'$</h4></br></div></div>
- <div class="col-xs-12 col-sm-6 col-md-8">
- <div class="progress">
- <div class="progress-bar progress-bar-success progress-bar-striped active" style="width: ' . $_p1 .'">
- <span class="sr-only">'. $_p1 .' Complete (success)</span>
- </div>
- <div class="progress-bar progress-bar-warning progress-bar-striped active" style="width: '. $_p2 .'">
- <span class="sr-only">'. $_p2 .' Complete (warning)</span>
- </div>
- <div class="progress-bar progress-bar-danger progress-bar-striped active" style="width: '. $_p3 .'">
- <span class="sr-only">'. $_p3 .' Complete (danger)</span>
- </div>
- </div></div>
- </div>');
- }
- function GetBetween($string, $start, $end)
- {
- $pos = stripos($string, $start);
- $str = substr($string, $pos);
- $str_two = substr($str, strlen($start));
- $second_pos = stripos($str_two, $end);
- $str_three = substr($str_two, 0, $second_pos);
- $get_tmp = trim($str_three); // remove whitespaces
- if(preg_match_all('/\d+/', $get_tmp, $numbers))
- return end($numbers[0]);
- }
- echo('<div class="row"><div class="col-md-8">');
- echo('<table class="table table-striped table-hover table-bordered" id="tblData">
- <thead>
- <tr>
- <th>Straftat</th>
- <th>Anzahl</th>
- </tr>
- </thead>
- <tbody>');
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Totschlag'");
- if(strpos($_wantedCrimes,"'Totschlag'")!== false){
- echo('<tr><td>Totschlag</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Gefaengnisausbruch");
- if(strpos($_wantedCrimes,"'Gefaengnisausbruch'")!== false){
- echo('<tr><td>Gefaengnisausbruch</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Raub");
- if(strpos($_wantedCrimes,"'Raub'")!== false){
- echo('<tr><td>Raub</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'verscuhter Raub");
- if(strpos($_wantedCrimes,"'verscuhter Raub'")!== false){
- echo('<tr><td>verscuhter Raub</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'versuchter Autodiebstahl");
- if(strpos($_wantedCrimes,"'versuchter Autodiebstahl'")!== false){
- echo('<tr><td>versuchter Autodiebstahl</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Nutzung illergaler Sprengstoffe");
- if(strpos($_wantedCrimes,"'Nutzung illergaler Sprengstoffe'")!== false){
- echo('<tr><td>Nutzung illergaler Sprengstoffe</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Raubueberfall");
- if(strpos($_wantedCrimes,"'Raubueberfall'")!== false){
- echo('<tr><td>Raubueberfall</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'[',",'Entführung']");
- if(strpos($_wantedCrimes,"'Entführung'")!== false){
- echo('<tr><td>Entführung</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'verscuhte Entf&uum;hrung");
- if(strpos($_wantedCrimes,"'verscuhte Entführung'")!== false){
- echo('<tr><td>verscuhte Entführung</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Autodiebstahl");
- if(strpos($_wantedCrimes,"'Autodiebstahl'")!== false){
- echo('<tr><td>Autodiebstahl</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'versuchter Autodiebstahl");
- if(strpos($_wantedCrimes,"'versuchter Autodiebstahl'")!== false){
- echo('<tr><td>versuchter Autodiebstahl</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Fahrerflucht");
- if(strpos($_wantedCrimes,"'Fahrerflucht'")!== false){
- echo('<tr><td>Fahrerflucht</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'[',",'Drogenbesitz']");
- if(strpos($_wantedCrimes,"'Drogenbesitz'")!== false){
- echo('<tr><td>Drogenbesitz</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Versuch Drogen in Umlauf bringen");
- if(strpos($_wantedCrimes,"'Versuch Drogen in Umlauf bringen'")!== false){
- echo('<tr><td>Versuch Drogen in Umlauf bringen</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Drogenhandel");
- if(strpos($_wantedCrimes,"'Drogenhandel'")!== false){
- echo('<tr><td>Drogenhandel</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Fahren ohne Führerschein");
- if(strpos($_wantedCrimes,"'Fahren ohne Führerschein'")!== false){
- echo('<tr><td>Fahren ohne Führerschein</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Versuchter Diebstahl Fahrzeugs");
- if(strpos($_wantedCrimes,"'Versuchter Diebstahl Fahrzeugs'")!== false){
- echo('<tr><td>Versuchter Diebstahl Fahrzeugs</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Diebstahl/Führen e.fremden Zivilfahrzeugs");
- if(strpos($_wantedCrimes,"'Diebstahl/Führen e.fremden Zivilfahrzeugs'")!== false){
- echo('<tr><td>Diebstahl/Führen e.fremden Zivilfahrzeugs</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Fahren ohne Licht");
- if(strpos($_wantedCrimes,"'Fahren ohne Licht'")!== false){
- echo('<tr><td>Fahren ohne Licht</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Überhöhte Geschwindigkeit");
- if(strpos($_wantedCrimes,"'Überhöhte Geschwindigkeit'")!== false){
- echo('<tr><td>Überhöhte Geschwindigkeit</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Gefährliche Fahrweise");
- if(strpos($_wantedCrimes,"'Gefährliche Fahrweise'")!== false){
- echo('<tr><td>Gefährliche Fahrweise</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Versuchter Diebstahl e.Polizeifahrzeugs");
- if(strpos($_wantedCrimes,"'Versuchter Diebstahl e.Polizeifahrzeugs'")!== false){
- echo('<tr><td>Versuchter Diebstahl e.Polizeifahrzeugs</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Diebstahl von Polizeifahrzeugen");
- if(strpos($_wantedCrimes,"'Diebstahl von Polizeifahrzeugen'")!== false){
- echo('<tr><td>Diebstahl von Polizeifahrzeugen</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Landen in einer Flugverbotszone");
- if(strpos($_wantedCrimes,"'Landen in einer Flugverbotszone'")!== false){
- echo('<tr><td>Landen in einer Flugverbotszone</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Fahren von illegalen Fahrzeugen");
- if(strpos($_wantedCrimes,"'Fahren von illegalen Fahrzeugen'")!== false){
- echo('<tr><td>Fahren von illegalen Fahrzeugen</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Unfallverursacher/Fahrerflucht nach Unfall");
- if(strpos($_wantedCrimes,"'Unfallverursacher/Fahrerflucht nach Unfall'")!== false){
- echo('<tr><td>Unfallverursacher/Fahrerflucht nach Unfall</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Fahrerflucht vor der Polizei");
- if(strpos($_wantedCrimes,"'Fahrerflucht vor der Polizei'")!== false){
- echo('<tr><td>Fahrerflucht vor der Polizei</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Überfahren eines anderen Spielers");
- if(strpos($_wantedCrimes,"'Überfahren eines anderen Spielers'")!== false){
- echo('<tr><td>Überfahren eines anderen Spielers</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Illegale Strassensperren");
- if(strpos($_wantedCrimes,"'Illegale Strassensperren'")!== false){
- echo('<tr><td>Illegale Strassensperren</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Widerstand gegen die Staatsgewalt");
- if(strpos($_wantedCrimes,"'Widerstand gegen die Staatsgewalt'")!== false){
- echo('<tr><td>Widerstand gegen die Staatsgewalt</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Nicht befolgen e.pol.Anordnung");
- if(strpos($_wantedCrimes,"'Nicht befolgen e.pol.Anordnung'")!== false){
- echo('<tr><td>Nicht befolgen e.pol.Anordnung</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Beamtenbeleidigung");
- if(strpos($_wantedCrimes,"'Beamtenbeleidigung'")!== false){
- echo('<tr><td>Beamtenbeleidigung</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Belästigung eines Polizisten");
- if(strpos($_wantedCrimes,"'Belästigung eines Polizisten'")!== false){
- echo('<tr><td>Belästigung eines Polizisten</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Betreten der pol.Sperrzone");
- if(strpos($_wantedCrimes,"'Betreten der pol.Sperrzone'")!== false){
- echo('<tr><td>Betreten der pol.Sperrzone</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Töten eines Polizisten");
- if(strpos($_wantedCrimes,"'Töten eines Polizisten'")!== false){
- echo('<tr><td>Töten eines Polizisten</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Beschuss auf Polizei/Beamte/Eigentum");
- if(strpos($_wantedCrimes,"'Beschuss auf Polizei/Beamte/Eigentum'")!== false){
- echo('<tr><td>Beschuss auf Polizei/Beamte/Eigentum</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Zerstörung von Polizeieigentum");
- if(strpos($_wantedCrimes,"'Zerstörung von Polizeieigentum'")!== false){
- echo('<tr><td>Zerstörung von Polizeieigentum</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Drogendelikte");
- if(strpos($_wantedCrimes,"'Drogendelikte'")!== false){
- echo('<tr><td>Drogendelikte</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Waffenbesitz ohne Lizenz");
- if(strpos($_wantedCrimes,"'Waffenbesitz ohne Lizenz'")!== false){
- echo('<tr><td>Waffenbesitz ohne Lizenz</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Mit gez.Waffe durch Stadt");
- if(strpos($_wantedCrimes,"'Mit gez.Waffe durch Stadt'")!== false){
- echo('<tr><td>Mit gez.Waffe durch Stadt</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Besitz einer verbotenen Waffe");
- if(strpos($_wantedCrimes,"'Besitz einer verbotenen Waffe'")!== false){
- echo('<tr><td>Besitz einer verbotenen Waffe</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Schusswaffengebrauch innerhalb Stadt");
- if(strpos($_wantedCrimes,"'Schusswaffengebrauch innerhalb Stadt'")!== false){
- echo('<tr><td>Schusswaffengebrauch innerhalb Stadt</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Geiselnahme");
- if(strpos($_wantedCrimes,"'Geiselnahme'")!== false){
- echo('<tr><td>Geiselnahme</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Überfall auf Personen/Fahrzeuge");
- if(strpos($_wantedCrimes,"'Überfall auf Personen/Fahrzeuge'")!== false){
- echo('<tr><td>Überfall auf Personen/Fahrzeuge</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Bankraub");
- if(strpos($_wantedCrimes,"'Bankraub'")!== false){
- echo('<tr><td>Bankraub</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'[',",'Mord']");
- if(strpos($_wantedCrimes,"'Mord'")!== false){
- echo('<tr><td>Mord</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Aufstand");
- if(strpos($_wantedCrimes,"'Aufstand'")!== false){
- echo('<tr><td>Aufstand</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Angriff durch Rebellen");
- if(strpos($_wantedCrimes,"'Angriff durch Rebellen'")!== false){
- echo('<tr><td>Angriff durch Rebellen</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Angriff/Belagerung von Hauptstädten");
- if(strpos($_wantedCrimes,"'Angriff/Belagerung von Hauptstädten'")!== false){
- echo('<tr><td>Angriff/Belagerung von Hauptstädten</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Vers.Landung in einer Flugverbotszone");
- if(strpos($_wantedCrimes,"'Vers.Landung in einer Flugverbotszone'")!== false){
- echo('<tr><td>Vers.Landung in einer Flugverbotszone</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Fliegen/Schweben unterhalb 150m ü.Stadt");
- if(strpos($_wantedCrimes,"'Fliegen/Schweben unterhalb 150m ü.Stadt'")!== false){
- echo('<tr><td>Fliegen/Schweben unterhalb 150m ü.Stadt</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Ausbruch aus dem Gefaengnis");
- if(strpos($_wantedCrimes,"'Ausbruch aus dem Gefaengnis'")!== false){
- echo('<tr><td>Ausbruch aus dem Gefaengnis</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Fliegen ohne Fluglizenz");
- if(strpos($_wantedCrimes,"'Fliegen ohne Fluglizenz'")!== false){
- echo('<tr><td>Fliegen ohne Fluglizenz</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'"[',",'Dauerhaft störendes Hupen");
- if(strpos($_wantedCrimes,"'Dauerhaft störendes Hupen'")!== false){
- echo('<tr><td>Dauerhaft störendes Hupen</td><td>' . $strafe_tmp . '</td></tr>');
- }
- $strafe_tmp = GetBetween($_wantedCrimes,'[',",'Handel mit exotischen Gütern");
- if(strpos($_wantedCrimes,"'Handel mit exotischen Gütern'")!== false){
- echo('<tr><td>Handel mit exotischen Gütern</td><td>' . $strafe_tmp . '</td></tr>');
- }
- echo('</tbody></table></div></div></br></br>');
- echo('<a href="?" class="btn btn-default">Zurück</a></br>');
- mysql_close($_link);
- }else{
- echo('<div class="input-group">
- <span class="input-group-addon" id="basic-addon1">@</span>
- <input type="text" class="form-control" placeholder="Player search..." aria-describedby="basic-addon1" id="search">
- </div>
- </br>
- <table class="table table-striped table-hover table-bordered" id="tblData">
- <thead>
- <tr>
- <th>Name</th>
- <th>Kopfgeld</th>
- <th>Muss ins Gefängnis</th>
- <th>Actions</th>
- </tr>
- </thead>
- <tbody>');
- $_link = mysql_connect($hostname, $username, $password);
- if (!$_link)
- {
- die("Keine Verbindung zur Datenbank möglich: " .
- mysql_error());
- }
- mysql_select_db($db_name, $_link);
- $_sql = "SELECT * FROM wanted WHERE active=1";
- $_resultat = mysql_query($_sql, $_link);
- while($row = mysql_fetch_assoc($_resultat)) {
- $knast = "";
- 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") {
- $knast = "Ja";
- }else{
- $knast = "Nein";
- }
- $string = $row["wantedName"];
- $string = str_replace("ä", "ä", $string);
- $string = str_replace("ü", "ü", $string);
- $string = str_replace("ö", "ö", $string);
- $string = str_replace("Ä", "Ä", $string);
- $string = str_replace("Ü", "Ü", $string);
- $string = str_replace("Ö", "Ö", $string);
- $string = str_replace("ß", "ß", $string);
- $string = str_replace("´", "", $string);
- echo('<tr><td>' . $string . '</td><td>' . $row["wantedBounty"] . '$</th><td>' . $knast. '</th><td><a href="?edit=1&pid=' . $row["wantedID"] . '">Editieren</a></td></tr>');
- }mysql_close($_link);
- echo(' </tbody>
- </table>
- </div>');
- }
- ?>
- </br>
- <footer class="footer">
- <div class="container">
- <p class="text-muted" style=" text-align: center;">Made by Rentner Reiner @PineappleNET</p>
- </div>
- </footer>
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
- <script type="text/javascript">
- $(document).ready(function()
- {
- $('#search').keyup(function()
- {
- searchTable($(this).val());
- });
- });
- function searchTable(inputVal)
- {
- var table = $('#tblData');
- table.find('tr').each(function(index, row)
- {
- var allCells = $(row).find('td');
- if(allCells.length > 0)
- {
- var found = false;
- allCells.each(function(index, td)
- {
- var regExp = new RegExp(inputVal, 'i');
- if(regExp.test($(td).text()))
- {
- found = true;
- return false;
- }
- });
- if(found == true)$(row).show();else $(row).hide();
- }
- });
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement