& Matías Parodi # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . # ## if (!defined('SECURITY')) { exit; } $sec = safe_str($_GET['sec']); switch ($sec) { case 'home': define('INC', './home.php'); define('SECTION', 'home'); define('TITLE', _('Inicio')); $css = array('styles', 'home', 'login'); break; case 'login': define('INC', './login.php'); define('SECTION', 'login'); define('TITLE', _('Identifícate')); $css = array('styles', 'home', 'login'); break; case 'register': define('INC', './register.php'); define('SECTION', 'register'); define('TITLE', _('Registro')); $css = array('styles', 'home', 'register', 'recaptcha', 'login'); $prototype = '/id=alpha/'; break; case 'logout': define('INC', './logout.php'); define('SECTION', 'logout'); break; case 'notes': define('INC', './notes.php'); define('SECTION', 'notes'); define('TITLE', _('Notas')); $css = array('styles', 'home', 'notes', 'pagination', 'login'); $prototype = '/action=alpha/p=int/'; break; case 'drop': define('INC', './drop_user.php'); define('SECTION', 'drop'); define('TITLE', _('Eliminación de usuario')); $css = array('styles', 'home'); $prototype = '/username=alpha/token=alpha/'; break; case 'forgot': define('INC', './forgot_password.php'); define('SECTION', 'forgot_password'); define('TITLE', _('Recuperar contraseña')); $css = array('styles', 'home', 'login'); $prototype = '/username=alpha/token=alpha/'; break; case 'avatar': define('INC', './avatar.php'); define('SECTION', 'avatar'); break; case 'invite': define('INC', './invite.php'); define('SECTION', 'invite'); break; case 'preferences': define('INC', './preferences.php'); define('SECTION', 'preferences'); define('TITLE', _('Preferencias')); $css = array('styles', 'home', 'notes', 'login'); $prototype = '/topic=alpha/'; break; case 'follow': define('INC', './follow.php'); define('SECTION', 'follow'); break; /* case 'new_group': define('INC', './new_group.php'); define('SECTION', 'new_group'); break; case 'groups': define('INC', './groups.php'); define('SECTION', 'groups'); $prototype = '/id=int/action=alpha/'; break; */ case 'favorites': define('INC', './favorites.php'); define('SECTION', 'favorites'); $prototype = '/username=alpha/permalink=int/'; break; case 'public': define('INC', './public_notes.php'); define('SECTION', 'public'); define('TITLE', _('Notas públicas')); $css = array('styles', 'home', 'notes', 'pagination', 'login'); $prototype = '/p=int/'; break; case 'followers': define('INC', './followers.php'); define('SECTION', 'followers'); define('TITLE', _('Seguidores')); $css = array('styles', 'home', 'follower', 'pagination', 'login', 'notes'); $prototype = '/username=alpha/p=int/'; break; case '': if (empty($_SESSION['ID_USER'])) { define('INC', './home.php'); define('SECTION', 'home'); define('TITLE', _('Inicio')); $css = array('styles', 'home', 'login'); } else { define('INC', './notes.php'); define('SECTION', 'notes'); define('TITLE', _('Notas')); $css = array('styles', 'home', 'notes', 'pagination', 'login'); } break; default: $username = safe_str($sec, true); define('INC', './profile.php'); define('SECTION', 'profile'); define('TITLE', $username); $css = array('styles', 'home', 'notes', 'pagination', 'login'); $prototype = '/action=alpha/p=int/'; } if (isset($prototype)) { $url = new url_handler($prototype); } if ($_SESSION['LOGIN'] === true) users_log(SECTION); ?>