professional-sql-02-public-files-verify.php / php
<?php // include shared code include '../lib/common.php'; include '../lib/db.php'; include '../lib/functions.php'; include '../lib/User.php'; // make sure we have a user id and activation token if (!isset(_GET['token'])) { <p><strong>Incomplete information ' . 'was received.</strong></p> <p>Please try again.</p>'; include '../templates/template-page.php'; exit(); } // validate userid if (!user = User::getById(GLOBALS['TEMPLATE']['content'] = '<p><strong>No such account.</strong>' . '</p> <p>Please try again.</p>'; } // make sure the account is not active else { if (GLOBALS['TEMPLATE']['content'] = '<p><strong>That account ' . 'has already been verified.</strong></p>'; } // activate the account else { if (_GET['token'])) { <p><strong>Thank you ' . 'for verifying your account.</strong></p> <p>You may ' . 'now <a href=<login.php>>login</a>.</p>'; } else { GLOBALS['TEMPLATE']['content'] = '<p><strong>You provided ' . 'invalid data.</strong></p> <p>Please try again.</p>'; } } } // display the page include '../templates/template-page.php'; ?>
(C) Æliens 20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.