<?php include_once 'includes/header.php'; $user_name = mysql_real_escape_string($_GET['user']); $user_id = name_to_id($user_name); $photo_result = mysql_query("SELECT * FROM photos WHERE user_id='{$user_id}' ORDER BY photo_views DESC LIMIT 0, 100"); $photo_count = mysql_num_rows($photo_result); if ($photo_count == 0) { echo 'No images have been uploaded by this user.'; } else { while ($photo_row = mysql_fetch_assoc($photo_result)) { $date = date("Y\\-m\\-d H:i:s"); echo '<b><h1>' . $photo_row['photo_title'] . '</h1></b>' . resize_img($photo_row['photo_name'], $photo_row['user_id']) . '<br />' . views($photo_row['photo_name'], $date) . '<br />'; } } include_once 'includes/footer.php';
show_no_cache_headers(); print htmlentities('Location: ' . $redirect_url . '&print=1'); exit; } // otherwise, by default, redirect them and exit show_no_cache_headers(); header('Location: ' . $redirect_url); exit; } require_once LIB . '/sdo2.php'; require_once LIB . '/memcaching.php'; $mc = new Memcaching(); $dbwrite = array('host' => DBHOST, 'name' => DBNAME, 'user' => DBUSER, 'pass' => DBPASS); $sdo = new SDO2($mc, $dbwrite); // get OS ID $os_id = name_to_id($sdo, 'mirror_os', 'id', 'name', $os_name); // get product for this language (if applicable) $buf = $sdo->get_one("\n SELECT prod.id, prod.ssl_only FROM mirror_products AS prod\n LEFT JOIN mirror_product_langs AS langs ON (prod.id = langs.product_id)\n WHERE prod.name LIKE ?\n AND (langs.language LIKE ? OR langs.language IS NULL)", array($product_name, $where_lang), SDO2::FETCH_ASSOC); if (!empty($buf['id'])) { $product_id = $buf['id']; $ssl_only = $buf['ssl_only']; } else { $product_id = null; $ssl_only = 0; } // do we have a valid os and product? if (!empty($os_id) && !empty($product_id)) { $location = $sdo->get_one("\n SELECT\n id,\n path\n FROM\n mirror_locations\n WHERE\n product_id = ? AND \n os_id = ?", array($product_id, $os_id)); $client_ip = null; $fallback_global = FALSE; // False means we WILL fall back.