"; $con = mysql_connect("olavz.mysql.domeneshop.no", "olavz", "1212Olav16"); if(!$con) { die("
Error"); } mysql_select_db("olavz"); if(isset($_POST['submit'])) { echo ""; $txt = $_POST['txt']; $query = explode("\n", $txt); foreach($query as $line) { if(strlen($line) < 8) { echo "
Bad input:: "; } else { // # 19 "HI! ><)))'> FISHZ" STEAM_0:1:9574598 27:54 36 0 active $x = stripslashes($line); $x = str_replace("'","|", $x); $x = strstr($x ,'"'); $x = substr($x, 1, -1); $xpos = strpos($x, '"'); $xn = substr($x, 0, $xpos); $sid = substr($x, $xpos+2, -1); $sidpos = strpos($sid, " "); $sid = substr($sid, 0, $sidpos); $q = mysql_query("SELECT * FROM steamid WHERE s_steam='$sid'"); $numq = mysql_num_rows($q); $date = date("d/m/Y"); if($numq >= 1) { // Oppdater $see = mysql_fetch_array($q); $s_id = $see['s_id']; $q2 = mysql_query("SELECT * FROM steamid, steamid_alias WHERE a_ref=s_id and s_steam='$sid'"); while($see = mysql_fetch_array($q2)) { $nick = $see['a_alias']; if(strtolower($nick) == strtolower($xn)) { // Eksisterer $eksisterer = "fant"; } empty($nick); } if($eksisterer == "fant") { echo "
EXIST:: $xn "; } else { mysql_query("INSERT INTO steamid_alias (`a_ref`, `a_alias`, `a_date`) VALUES ('$s_id', '$xn', '$date')"); echo "
SATT INN:: $xn "; } $eksisterer = ""; } else { // Sett inn.. mysql_query("INSERT INTO steamid (`s_steam`, `s_date`) VALUES ('$sid', '$date')"); $q = mysql_query("SELECT * FROM steamid WHERE s_steam='$sid'"); $see = mysql_fetch_array($q); $s_id = $see['s_id']; $q = mysql_query("INSERT INTO steamid_alias (`a_ref`, `a_alias`, `a_date`) VALUES ('$s_id', '$xn', '$date')"); echo "
NY:: $xn "; } } } echo "
"; echo "OPPDATERT! Dagens update-date: $date"; } ?>