<?php /* * Project: CTRL-WebAdmin * Author: Muris Pucic Trax <trax [AT] elektronika [DOT] ba> * Version: 1.0 */ if (!defined('_INDEX_')) { Header("Location: index.php"); die; } // create Ctrl object $ctrlAccount = new CtrlAccount(); $_s = isset($_REQUEST['s']) ? $_REQUEST['s'] : ''; $_x = isset($_REQUEST['x']) ? $_REQUEST['x'] : ''; switch ($_s) { // Re-send activation email case 'resend': if ($ctrlAccount->getIsLoggedIn()) { Header("Location: index.php"); die; } if (array_key_exists('email', $_GET) && filter_var($_GET['email'], FILTER_VALIDATE_EMAIL) && $ctrlAccount->resendActivationEmail($_GET['email'])) { $ctrlAccount->displayRegisterDone(array('email' => $_GET['email'])); } else { Header("Location: index.php?w=account&s=login"); // someone is playing... die; } break; // Account activation
<?php /* * Project: CTRL-WebAdmin * Author: Muris Pucic Trax <trax [AT] elektronika [DOT] ba> * Version: 1.0 */ if (!defined('_INDEX_')) { Header("Location: index.php"); die; } // create Ctrl object $ctrlDashboard = new CtrlDashboard(); $ctrlAccount = new CtrlAccount(); if (!$ctrlAccount->getIsLoggedIn()) { Header("Location: index.php?w=account&s=login"); die; } $_s = isset($_REQUEST['s']) ? $_REQUEST['s'] : ''; $_x = isset($_REQUEST['x']) ? $_REQUEST['x'] : ''; switch ($_s) { // Dashboard page = default default: $ctrlDashboard->displayDashboard(); break; }