All pastes #490247 Raw Edit

jeff

public php v1 · immutable
·published 2007-05-15 22:26 UTC
rendered paste body
<?php// STARTS A SESSION	session_start( ); // INCLUDE CONFIGURATION FOR DATABASE// DB NAME = crewc202	$link = @mysql_connect("localhost", "root", "Jethrob")	     or die("Could not connect");	$db = @mysql_select_db("crewc202",$link) 	     or die("Could not select database"); //PHPBB MODS	define('IN_PHPBB', true);	$phpbb_root_path = 'forum/';	include($phpbb_root_path . 'extension.inc');	include($phpbb_root_path . 'common.'.$phpEx);	include($phpbb_root_path . 'fetchposts.'.$phpEx);		$userdata = session_pagestart($user_ip, PAGE_INDEX);	init_userprefs($userdata);		$total_posts = get_db_stat('postcount');	$total_users = get_db_stat('usercount');	$total_topics = get_db_stat('topiccount');	$newest_userdata = get_db_stat('newestuser');	$newest_user = $newest_userdata['username'];	$newest_uid = $newest_userdata['user_id'];//GLOBAL FUNCTION FOR POSTS	function Post($_str) {	$_str      = strip_tags($_str, '<h1><h2><h3><h4><h5><pre><b><i><a><br><span><div><li><ol><img><font><embed>');	$_str      = nl2br($_str); 	return($_str);	}//GLOBAL FUNCTION FOR NAME	function Name($_str) {	$_str      = strip_tags($_str, '');	return($_str);	}//CODE FOR HIT COUNTER	$datei = fopen("hits.txt","r"); 	$count = fgets($datei,1000);	fclose($datei);	$count=$count + 1 ;	$datei = fopen("hits.txt","w"); 	fwrite($datei, $count);	fclose($datei);//PAGE SELECTOR	$page = $_GET['page']; ?><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"   "http://www.w3.org/TR/html4/strict.dtd"><html>	<head>		<title>Crew C202 - JeffBeagley - SpringfieldBlogger</title>		<link rel="stylesheet" type="text/css" href="style.css" media="screen" title="style sheet">	</head>	<body>		<div id="wrap">			<br />			<a href="index.php"><img src="banner.jpg" border="0" /></a>		<div id="avmenu">			<div class="announce"><!--//NAVIGATION-->				<p>					<strong>Pages:</strong><br />					- <a href="index.php">Home</a><br />					- <a href="index.php?page=videos">Videos</a><br />					- <a href="index.php?page=gallery">Gallery</a><br />					- <a href="index.php?page=users">User Galleries</a><br />				</p>				<p>				  Hits: <?php echo $count; ?><br />				  Members: <?php echo $total_users; ?>				</p>			</div>		</div><!--//CONTENT-->		<div id="content">			<br />			<!-- 			//GET CONTENT			-->						<!-- 			HOME			-->			<?php if ($page == '') { ?>				<h2>Crew C202</h2>				<p>					Welcome! First of all I would like to announce that we are not a club in any sort of way! We are simply a 'crew' if you will of really good friends that all share a common interest, but need a place to share all our experiences along the way!					</p>						<?php } ?>						<!-- 			VIDEOS			-->			<?php if ($page == 'videos') { ?>				<h2>Videos</h2>				<p>					<div>						<div style="float: left;">							<img src="videos/jeff1.jpg" />						</div>						<div style="float: left; margin-left: 3px;">							<h3><a href="">Jeff's Introduction</a></h3>								My 03 24v VR6 Jetta showing off my exhaust						</div>					</div>				</p>			<?php } ?>						<!--			USER GALLERIES			-->			<?php if ($page == 'users') { ?>				<h2>User Galleries</h2>				<p>					<table width="100%" cellspacing="0" cellpadding="0">						<?php						$sql = "SELECT * FROM `phpbb_users` ORDER BY 'user_id' ASC LIMIT 0 , 30000 ";						$query = mysql_query($sql);						while ($row = mysql_fetch_assoc($query)) { 						?>							<tr>								<td width="93">									<img src="videos/jeff1.jpg" />								</td>								<td>									<h3><a href=""><?php echo $row['username']; ?></a></h3><br>									desc								</td>							</tr>						<?php } ?>					</table>				</p>			<?php } ?>		</div>		</div>	</body></html>