All pastes #730270 Raw Edit

Untitled

public php v1 · immutable
·published 2007-10-09 02:16 UTC
rendered paste body
<?PHP	require(getcwd() . "/inc/config.php");	$connection = @mysql_connect($db_host, $db_user, $db_password) or die("Error connecting to the database!");	require(getcwd() . "/header.php");		mysql_select_db($db_name, $connection);	$videoquery = "SELECT * FROM video ORDER BY date_auto DESC";	$videoresult = mysql_query($videoquery, $connection);	$videorows = mysql_num_rows($videoresult);		if ($videorows == 0)	{		echo('<h1>Doh...</h1>Looks like nothing has been posted here yet.  <a href="submit.php">Submit</a> a video or check back later.');	}	else	{			for ($videos = 0; $videos < $videorows; $videos++)		{			$id = mysql_result($videoresult, $videos, "id");			$title = mysql_result($videoresult, $videos, "title");			$poster = mysql_result($videoresult, $videos, "poster");			$posterurl = mysql_result($videoresult, $videos, "posterurl");			$category = mysql_result($videoresult, $videos, "category");			$embed = mysql_result($videoresult, $videos, "embed");			$description = mysql_result($videoresult, $videos, "description");			$show_date = mysql_result($videoresult, $videos, "date_auto");			$date = date("m/d/Y h:i:s", $show_date);			$rating = mysql_result($videoresult, $videos, "rating");						echo('				<div class="video_post">				<div class="video_rating">'.$rating.'</div>				<div class="video_head"><a href="view.php?id="'.$id.'" title="'.$title.'">'.$title.' '.$id.'</a></div>				<div class="video_desc">'.$description.'</div>				<div style="clear:both"></div>				</div>				<br />			');		}	}	require(getcwd() . "/footer.php");?>