All pastes #385354 Raw Edit

Stuff

public text v1 · immutable
·published 2007-03-07 20:36 UTC
rendered paste body
<?php require_once("functions.php");
error_reporting(E_ALL ^ E_NOTICE);
 ?>
<div id="sidebar">
	<ul>
		<li class="home"><a href="index.php">Home</a></li>
		<li class="archives">Archives
			<ul>
				<li>January</li>
				<li>Febuary</li>
				<li>March</li>
			</ul>
		</li>
	</ul>
	<!--if not logged in, show login and register links-->
	<?php if (!loggedin()) { ?>	
	<ul>
	<li><a href='login.php'>Login</a></li>
    <li><a href='register.php'>Register</a></li>
	</ul>
	<?php 
	} //if is logged in and username matches cookie
	else { 
	$name = $_COOKIE["BlogName"];
	if (isset($_COOKIE["BlogName"]) && (checkname($name))) { ?>
	<strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Welcome <?php echo $name?>!</strong><br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="add_entry.php">Add an Entry</a><br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='logout.php'>Logout</a> <?php }
	// if there is a mismatch between cookie and db info, instruction to logout and log back in
	else { ?> There is a<br /> problem with<br /> your cookies.<br /> <a href='logout.php'>Logout</a> and log<br /> back in. 
	<?php;}
}
	
	?>
</div>