diff options
author | Hugues Hiegel <hugues@hiegel.fr> | 2009-06-15 14:06:14 +0200 |
---|---|---|
committer | Hugues Hiegel <hugues@hiegel.fr> | 2009-06-15 14:06:14 +0200 |
commit | 5610b8163ade4ebaf7a91e9452a8c31d9b71b1fe (patch) | |
tree | 8b71ff39fbc5b65d0f5b0167e73f3d05b24376f1 | |
parent | c6ed2dc2c8104543e309a748973e12de8e958601 (diff) |
Humm... big big bug onto mysql queries..
-rw-r--r-- | BigLine.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/BigLine.php b/BigLine.php index ac6a2be..b61a429 100644 --- a/BigLine.php +++ b/BigLine.php @@ -92,8 +92,7 @@ else if ( !is_file($Cache) OR (filemtime($Cache) < $data['lastupdate']) - OR !filesize($Cache) - OR $username == "gugusse") + OR !filesize($Cache)) { $duration = $_SERVER['REQUEST_TIME'] - $statsstart; @@ -203,7 +202,7 @@ else imagepng($img, $Cache); imagedestroy($img); - $QUERY=sprintf("REPLACE INTO badges (username, type, style, color, lastupdate, png) VALUES ('\$s','\$s','\$s','\$s', \$s, '\$s');", + $QUERY=sprintf("REPLACE INTO badges (username, type, style, color, lastupdate, png) VALUES ('%s','%s','%s','%s', %s, '%s');", $username, $type, $style, @@ -256,7 +255,7 @@ function make_db_cache($username){ if ($data['playcount'] != 0) { - $QUERY=(sprintf("REPLACE INTO users (statsstart,playcount,lastupdate,username) VALUES ('\$s',\$s,'\$s','\$s');", + $QUERY=(sprintf("REPLACE INTO users (statsstart,playcount,lastupdate,username) VALUES ('%s',%s,'%s','%s');", time(), $data['playcount'], gpc_addslashes($data['statsstart']), gpc_addslashes(strtolower($username)))); mysql_query($QUERY); } @@ -272,7 +271,7 @@ function touch_badge($username, $type, $style, $color) $hits = $data["hits"]; $hits++; - $QUERY=sprintf("UPDATE badges SET hits=\$s, lasthit='\$s' WHERE username='\$s' AND type='$type' AND style='$style' AND color='$color';", + $QUERY=sprintf("UPDATE badges SET hits=%s, lasthit='%s' WHERE username='%s' AND type='$type' AND style='$style' AND color='$color';", $hits, time(), gpc_addslashes(strtolower($username))); //echo $QUERY; mysql_query($QUERY); |