Location: PHPKode > projects > DDL CMS > Upload these files to your webspace/topsites/image.php
<?PHP
require_once('./data/variables');

if( $_GET['id'] )
{
    $DB = mysql_connect($GLOBALS['HOSTNAME'], $GLOBALS['USERNAME'], $GLOBALS['PASSWORD']);

    mysql_select_db($GLOBALS['DATABASE'], $DB);

    $username = mysql_real_escape_string($_GET['id'], $DB);
    $result = mysql_query("SELECT Overall_Rank FROM topsites_Accounts WHERE Username='$username'", $DB);
    $account = mysql_fetch_array($result);

    mysql_close($DB);

    if( is_array($account) && $account['Overall_Rank'] != 0 && $account['Overall_Rank'] <= $GLOBALS['RANK_IMAGES'] )
    {
        header("Location: {$GLOBALS['BANNER_URL']}/{$account['Overall_Rank']}.gif");
        exit;
    }
}

header("Location: {$GLOBALS['BANNER_URL']}/standard.gif");

?>
Return current item: DDL CMS