Error"); } mysql_select_db("olavz"); if(isset($_POST['sok'])) { $query = htmlspecialchars($_POST['query']); $query = strtoupper($query); $query = str_replace(array("DROP", "AND", "OR", "IF", "SELECT", "WHERE", "FROM"), array("+","+","+", "+", "+", "+", "+"), $query); $check = substr($query, 0, 1); if($check != "S") { // FAIL, $query starter ikke med [S]TEAM_ $stop = "Feil sporring! Bruk hele steamid'n! Eks STEAM_1:291828"; } $check = substr($query, -3, -2); if(!is_numeric($check)) { $stop = "Feil sporring! Bruk hele steamid'n! Eks STEAM_1:291828"; } if($stop) { echo "$stop"; } else { $q = mysql_query("SELECT * FROM steamid, steamid_alias WHERE a_ref=s_id and s_steam='$query' ORDER BY a_id DESC"); echo "'$query' returnerte:
"; $qnum = mysql_num_rows($q); $output = ""; if($qnum > 0) { while($see = mysql_fetch_array($q)) { $output .= "
". $see['a_alias'] ."" . $see['a_date']; } } else { echo "Ingen treff"; } } } if($output) { echo " $output
"; } $q = mysql_query("SELECT * FROM steamid"); $num = mysql_num_rows($q); ?>
Vi har registrerte steam id's.