Пример #1
0
/**
 * Instanciates the Guestbook class to we can handle data
 */
$guestbook = new Guestbook();
/**
 * Instanciates the color parser
 * @see http://fish.stabb.de/index.php5?page=3&subpage=127
 */
$tmfcolorparser = new TMFColorParser('#ffffff');
/**
 * Looks for different actions
 */
if ($login && array_key_exists('post', $_POST)) {
    $guestbook->createPost($login, $_POST['post']);
} elseif ($login && $login == ADMIN_LOGIN && array_key_exists('delete', $_GET)) {
    $guestbook->deletePost($_GET['delete']);
}
/**
 * Get the page
 */
if (array_key_exists('page', $_GET)) {
    $page = abs((int) $_GET['page']);
} else {
    $page = 1;
}
/**
 * Generates the Login URL if needed
 */
if (!$login) {
    $loginURL = $trackmania->getLoginURL(SCOPE);
} else {