Example #1
0
 *   View license.txt in the root, or visit http://creativecommons.org/licenses/by-nc-sa/3.0/
 *
 * @author Nabeel Shahzad
 * @copyright Copyright (c) 2008, Nabeel Shahzad
 * @link http://www.phpvms.net
 * @license http://creativecommons.org/licenses/by-nc-sa/3.0/
 */
/**
 * phpVMS Installer File
 *  "Boot" file includes our basic "needs" for the installer
 */
define('SITE_ROOT', dirname(dirname(__FILE__)));
define('CORE_PATH', SITE_ROOT . '/core');
define('CLASS_PATH', CORE_PATH . '/classes');
if (!file_exists(CORE_PATH . '/local.config.php') || filesize(CORE_PATH . '/local.config.php') == 0) {
    define('DS', DIRECTORY_SEPARATOR);
    /* Include just some basic files to get the install going */
    include CLASS_PATH . '/ezdb/ezdb.class.php';
    include CLASS_PATH . '/CodonCache.class.php';
    include CLASS_PATH . '/CodonData.class.php';
    include CLASS_PATH . '/Config.class.php';
    include CLASS_PATH . '/Debug.class.php';
    include CLASS_PATH . '/Template.class.php';
    include CLASS_PATH . '/TemplateSet.class.php';
    include CORE_PATH . '/common/SettingsData.class.php';
} else {
    include CORE_PATH . '/codon.config.php';
}
include 'Installer.class.php';
Template::SetTemplatePath(SITE_ROOT . '/install/templates');
Example #2
0
 * 
 */
$revision = file_get_contents(CORE_PATH . '/version');
define('PHPVMS_VERSION', '2.1.' . $revision);
Config::Set('TEMPLATE_USE_CACHE', false);
Config::Set('TEMPLATE_CACHE_EXPIRE', '24');
Config::Set('DBASE_USE_CACHE', false);
Config::Set('CACHE_PATH', SITE_ROOT . '/core/cache');
Config::Set('TPL_EXTENSION', '.tpl');
Config::Set('BASE_TEMPLATE_PATH', SITE_ROOT . '/core/templates');
if (defined('ADMIN_PANEL') && ADMIN_PANEL === true) {
    Template::SetTemplatePath(SITE_ROOT . '/admin/templates');
    define('CODON_MODULES_PATH', SITE_ROOT . '/admin/modules');
    define('CODON_DEFAULT_MODULE', 'Dashboard');
} else {
    Template::SetTemplatePath(Config::Get('BASE_TEMPLATE_PATH'));
    define('CODON_MODULES_PATH', SITE_ROOT . '/core/modules');
    define('CODON_DEFAULT_MODULE', 'Frontpage');
    /*Config::Set('MODULES_PATH', SITE_ROOT.'/core/modules');
    	Config::Set('DEFAULT_MODULE', 'Frontpage');
    	Config::Set('MODULES_AUTOLOAD', true);*/
}
/* Cache settings */
$cache_settings = array('active' => true, 'engine' => 'file', 'location' => CACHE_PATH, 'prefix' => 'phpvms_', 'profiles' => array('default' => array('duration' => '+10 minutes'), 'short' => array('duration' => '+3 minutes'), '15minute' => array('duration' => '+15 minutes'), 'medium' => array('duration' => '+1 hour'), 'long' => array('duration' => '+6 hours')));
Config::Set('CACHE_KEY_LIST', array('all_airline_active', 'all_airlines', 'start_date', 'months_since_start', 'years_since_start', 'stats_aircraft_usage', 'all_settings', 'total_flights', 'top_routes', 'users_online', 'guests_online', 'pilot_count', 'total_pax_carried', 'flights_today', 'fuel_burned', 'miles_flown', 'aircraft_in_fleet', 'total_news_items', 'total_schedules', 'all_groups', 'all_ranks'));
Config::Set('TABLE_LIST', array('acarsdata', 'adminlog', 'aircraft', 'airlines', 'airports', 'awards', 'awardsgranted', 'bids', 'customfields', 'downloads', 'expenselog', 'expenses', 'fieldvalues', 'financedata', 'fuelprices', 'groupmembers', 'groups', 'navdata', 'news', 'pages', 'pilots', 'pirepcomments', 'pirepfields', 'pireps', 'pirepvalues', 'ranks', 'schedules', 'sessions', 'settings', 'updates'));
/* VACentral */
Config::Set('VACENTRAL_ENABLED', false);
Config::Set('VACENTRAL_DEBUG_MODE', false);
Config::Set('VACENTRAL_DEBUG_DETAIL', 0);
Config::Set('VACENTRAL_API_SERVER', 'http://api.phpvms.net');
Example #3
0
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * @author Nabeel Shahzad
 * @copyright Copyright (c) 2008, Nabeel Shahzad
 * @link http://www.nsslive.net/codon
 * @license BSD License
 * @package codon_core
 */
/**
 * @author Nabeel Shahzad <www.phpvms.net>
 * @desc Handles AJAX calls
 */
define('ADMIN_PANEL', true);
include '../core/codon.config.php';
error_reporting(E_ALL ^ E_NOTICE);
if (!Auth::LoggedIn() || !PilotGroups::group_has_perm(Auth::$usergroups, ACCESS_ADMIN)) {
    Debug::showCritical('Unauthorized access!');
    die;
}
Template::SetTemplatePath(dirname(__FILE__) . '/templates');
MainController::runAllActions();
# Force connection close
DB::close();