Location: PHPKode > scripts > PHP Link Directory Script > linkdirectory/www/admin.php
/* PHP Link Directory Copyright 2011 Robert Rook */

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

$page_title = "Administration Homepage";

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>

echo <<<ENDHTML
		<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>

/* 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>

Return current item: PHP Link Directory Script