# # 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 . global $gettext_tables; define('PATH', dirname(__FILE__) . '/'); //If the file update.php exists, we abort running Jisko because some changes to the database need to be applied if (file_exists(PATH.'update.php')) { die('Please run the file update.php and then follow the instructions before using Jisko.

update.php'); } require(PATH.'config.php'); if (defined('MAINTENANCE')) header('Location: '.BASE.'pages/maintenance.php'); require(PATH.'includes/functions.php'); require(PATH.'includes/db.php'); //Due to issues with the API, we need to rename 'users' to 'users_files' if (file_exists(PATH.'users/')) { $res = rename(PATH.'users/', PATH.'users_files'); if (!$res) die('There was an error while trying to rename the folder "users" to "users_files". Please rename it to run Jisko properly'); } //connect to the database. $db = new DB(DB_HOST, DB_PORT, DB_USER, DB_PASSWORD); if (!$db) die('MySQL error! Check your config.php'); else { $db->select(DB_NAME); import('streams'); import('gettext'); import('structure'); import('router'); import('forms'); import('mails'); import('notes'); $mailing = new mailing(); checkUser(); global $_USER; if ($_USER) { $db->updateLastSeen($_USER['ID'], time()); } } ?>