Location: PHPKode > projects > Chirp: The Microblog > chirp.v.1.1/image.php
<?php

	include("includes/config.inc.php");

	include("includes/db.inc.php");



	if(isset($_GET['img']) && !empty($_GET['img'])){

		if(is_numeric($_GET['img'])){

			$img = htmlspecialchars($_GET['img'],ENT_QUOTES);

			$result = mysql_query('SELECT IMAGE FROM `public_profile` WHERE USERID  = '.$img.' LIMIT 1');

			$cnt = @mysql_num_rows($result);

			if ($cnt > 0){

				$row = @mysql_fetch_array($result);

				$image = $row['IMAGE'];

			}

			mysql_close($connection);

			if (strlen($image) < 5){

				$image = file_get_contents('def/default_avatar.jpg');

			}

			print $image;

		}

	}

?>
Return current item: Chirp: The Microblog