Location: PHPKode > projects > SiteX > admin/guestbook_preview.php
<?PHP
ob_start();
session_start();
include("../includes/globals.php.inc");
include("../includes/functions.php");
include("../lang/English.php");
if(strtolower($sxSetup['Language']) != 'english') include("../lang/".$sxSetup['Language'].".php");
include("../themes/$THEME_FOLDER/config.php.inc");
if((!userEditor())AND(!userAdmin()))  loginError($sxLang['LoginRequired']);
if((userEditor())AND(!$sxSetup['EditorRightsGuestbookEdit']))  loginError($sxLang['LoginRequired']);

if(!$entryid)
{
	header("Location: guestbook_manager.php");
	die();
}

$sxTitleAddendum = $sxLang['AdminHeading'];
include("../themes/$THEME_FOLDER/header.php");

$query = "SELECT * FROM $DB_Guestbook WHERE id='$entryid'";
$result = mysql_query($query, $Link) or queryError("10", mysql_error());
$ROW = mysql_fetch_object($result);
?>
<script language="JavaScript" type="text/JavaScript">
<!--
function confirmDelete(theID,theName){
	if(confirm("<?PHP echo $sxLang['GeneralJSDeleteEntry1']; ?> '"+theName+"' <?PHP echo $sxLang['GeneralJSDeleteEntry2']; ?>")){
		window.location='<?PHP print "guestbook_manager.php?delete="; ?>'+theID;
	}
}
//-->
</script>     
<div class="bodyWrapper">
   <h1 class="sxAdminHeading"><?PHP echo $sxLang['GeneralHeadingPreview'].' '.getComponentName("3").' '.$sxLang['GeneralHeadingEntry']; ?></h1>
   <div class="sxAdminBreadcrumbs"><?PHP if(userAdmin()) { ?><a href="index.php"><?PHP echo $sxLang['AdminBreadcrumb']; ?><?PHP }?><?PHP if(userEditor()) { ?><a href="editor_index.php"><?PHP echo $sxLang['EditorBreadcrumb']; ?><?PHP }?></a> > <a href="guestbook_manager.php"><?PHP echo $sxLang['GeneralHeadingManage'].' '.getComponentName("3").' '.$sxLang['GeneralHeadingEntries']; ?></a> > <?PHP echo $sxLang['GeneralHeadingPreview'].' '.getComponentName("3").' '.$sxLang['GeneralHeadingEntry']; ?></div>   
   <?PHP echoMessage($message); ?>
   <p><a href="guestbook_manager.php"><?PHP echo $sxLang['GuestbookBack']; ?></a></p>
   <input style="width:90px;" name="approve" type="button" value="<?PHP echo $sxLang['ButtonApprove']; ?>" onclick="window.location='guestbook_manager.php?approve=<?PHP echo $entryid; ?>'" />
   <input style="width:90px;" name="disapprove" type="button" value="<?PHP echo $sxLang['ButtonDisapprove']; ?>" onclick="window.location='guestbook_manager.php?unapprove=<?PHP echo $entryid; ?>'" />
   <input style="width:90px;" name="delete" type="button" value="<?PHP echo $sxLang['ButtonDelete']; ?>" onclick="confirmDelete('<?PHP echo $entryid; ?>','<?PHP echo $ROW->name; ?>')" />
	<?PHP
	echo '<p><strong>';
	if($ROW->email) echo "<a href=\"mailto:$ROW->email\" rel=\"nofollow\">";
	echo $ROW->name;
	if($ROW->email) echo "</a>";
	echo '</strong>';
	if($ROW->website) echo ' <a href="' . $ROW->website . '" rel="nofollow" target="_blank">' . $sxLang['GuestbookWebsite'] . '</a>';
	echo '<br /><strong><span class="shadowText">' . fetchDate($ROW->timestamp, 1, 1) . '</span></strong>';
	echo '<br />' . nl2br($ROW->message) . '</p><br />';	
  ?>
  </div>
<?PHP
include("../themes/$THEME_FOLDER/footer.php");
ob_end_flush();
?>
Return current item: SiteX