Location: PHPKode > scripts > PHP Link Directory Script > linkdirectory/www/admin.php
<?php
/* PHP Link Directory Copyright 2011 Robert Rook */
require('dblogon.php');
require('userhead.php');

$msg = "";
$err = "";

$page_title = "Administration Homepage";
require('admin_l.php');

if(isset($_GET['cmd']) && $_GET['cmd']=="welcome") {
	/* Show welcome message and number of pending links (if appropriate) */
	
	if($userinf['badmin']>=3 && $ldir_adminvalidates) {
		$sql = ($ldir_validateemail?" AND bverified=1":"");
		$res = mysql_query("SELECT COUNT(*) FROM {$prefix}link WHERE bactive=0{$sql}", $db);
		$count = mysql_result($res, 0);
		
		if($count) {
			echo "There are currently ".number_format($count)." links awaiting Administrative ";
			echo "review for acceptance.\n<ul><li><a href=\"admin_link.php?ltype=pending\">";
			echo "View these links</a></li></ul>\n";
		}
	}
} else if(isset($_GET['cmd']) && $_GET['cmd']=="lowaccess") {
	/* Show error for low access */
echo <<<ENDHTML
<h2>Insufficient Access</h2>
<p>You have attempted to access an area of the Administration section that
you do not have enough access for.  If you believe you should have access
to this section, please contact the Directory owner.</p>
ENDHTML;
}

echo <<<ENDHTML
	<ul>
		<li><a href="{$site_url}/preferences.php">Manage account settings</a>
			<p>View or change your account settings such as email address, contact name,
			and secret question/answer.</p></li>
	</ul>
ENDHTML;

/* Show site owner reset link */
if($userinf['badmin']>=9) {
echo <<<ENDHTML
	<b>Website reset</b>
	<p>Should you need to, you can reset certain MySQL tables for this site, or,
	should it become necessary, you can flush the whole database (reset all
	existing information).</p>
	<ul><li><a href="setup.php">Proceed to the Site Database Setup page</a></li></ul>
ENDHTML;
}

require('admin_r.php');
?>
Return current item: PHP Link Directory Script