$dbhost, 'username' => $dbuname, 'password' => $dbpass, 'database' => $dbname ); class mysqldb extends phpMySQLi_jacket { } define('IN_PHPBB', true); $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '../../phpbb3/'; #$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include($phpbb_root_path . 'common.' . $phpEx); // Start session management $user->session_begin(); $auth->acl($user->data); $user->setup(); $request->enable_super_globals(); if (strpos($user->data['username'], "[Bot]") !== false) return; $db_old = new mysqldb($opts); $id = (int) $db_old->real_escape_string($_REQUEST['id']); $query = "UPDATE tfgamessitedirectory.gamedownloads SET deadlink = 0 WHERE id = " . $id; $db_old->execute($query); $res = $db_old->select("SELECT gameid FROM tfgamessitedirectory.gamedownloads WHERE id = ". $id ." LIMIT 1"); $g = $res->fetch_assoc(); $gameid = $g['gameid']; unset($res); unset($g); echo "
Thanks for verifying this link works!


\n"; $query = "SELECT DISTINCT dl.version, gv.version AS gameversion FROM tfgamessitedirectory.gamedownloads AS dl JOIN tfgamessitedirectory.gameversion AS gv ON dl.version = gv.id WHERE dl.gameid = ". $gameid ." ORDER BY dl.id DESC"; $res = $db_old->select($query); while ($vers = $res->fetch_assoc()) { echo "
Version: ". $vers['gameversion'] ."
\n"; $query = "SELECT dl.id, dl.gameid, dl.downloadurl, dl.deadlink, dl.notes, g.author, g.authorname FROM tfgamessitedirectory.gamedownloads AS dl JOIN tfgamessitedirectory.game AS g ON dl.gameid = g.id WHERE dl.version = '". $vers['version'] ."' AND dl.gameid = " . $gameid . " ORDER BY dl.id DESC"; $res2 = $db_old->select($query); while ($dl = $res2->fetch_assoc()) { echo "
\n"; echo " "; echo " \n"; echo "
Download Now
\n"; echo "
"; // Check for a note if ($dl['notes'] != '' && $dl['notes'] != ' ') echo ""; else echo " "; echo "
\n"; echo " \n"; echo "

\n"; } } ?>