<?php require_once "../app-controller/app-controller.php"; $appAutoload = new appAutoload(); $c = new controller(); set_error_handler('errorManagerExec'); extract($_POST); extract($_GET); $c->view($app, $view);
Jarifa 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 Jarifa. If not, see <http://www.gnu.org/licenses/>. */ require_once "inc/html.inc"; require_once "views/default.inc"; require_once "controller/controller.inc"; $ctr = new controller("es_ES.utf8"); // If the user has not been authenticated and there is not any action, the login screen must be shown if (!isset($_SESSION['userid']) and (empty($_POST) and empty($_GET))) { $ctr->view("login"); } // If the user has not been authenticated and the action is to authenticate, the controller tries to validate the user. If // the user is a right one, it shows the start page, else it shows the login screen again. if (!isset($_SESSION['userid']) and $_POST['action'] == 'auth') { if ($ctr->authenticate($_POST['userid'], $_POST['password'])) { $_GET['action'] = 'start'; } else { $ctr->view("login"); } } // If the user has been authenticated, then the actions can be parsed: if (isset($_SESSION['userid'])) { switch ($_GET['action']) { // Default screen case 'start':
$c->header(); ?> <!-- START CONTENT --> <div class="page cover bgp bg-fixed" style="background-image: url(<?php echo WEB_USERS . "/1/bg-3.jpg"; ?> );"> <?php $c->page(); ?> </div> <!-- END CONTENT --> <!-- START SIDEBARD --> <?php $c->quicksidebar(); ?> <!-- END SIDEBARD --> <!-- MODAL Include --> <?php $c->view("app", "bootstrap/modal"); ?> <?php $c->view("app", "footer"); ?> <i id="bodyProtect" class="icomoon-warning2 "></i> <?php $c->autoload->getJs(); ?> </body> </html>
public function __construct() { if (!self::$view) { self::$view = mPHP::$view; } }