<?php
/**
 * VIP
 * https://webenginecms.org/
 * 
 * @version 1.0.0
 * @author Lautaro Angelico <http://lautaroangelico.com/>
 * @copyright (c) 2013-2019 Lautaro Angelico, All Rights Reserved
 * @build 3d220b662522c313f5980cd685842c3d
 */

// namespace
namespace Plugin\VIP;

// plugin root
define('__PATH_VIP_ROOT__', __PATH_PLUGINS__.'vip/');

// plugin home url
define('__VIP_HOME__', __BASE_URL__.'vip/');

// admincp
$extra_admincp_sidebar[] = array(
    'VIP', array(
        array('Settings','vip&page=settings'),
        array('Logs','vip&page=logs'),
    )
);

// language phrases
if(file_exists(__PATH_VIP_ROOT__ . 'languages/'.config('language_default', true).'/language.php')) {
	// attempt to load same language as website
	if(!@include_once(__PATH_VIP_ROOT__ . 'languages/'.config('language_default', true).'/language.php')) throw new Exception('Error loading language file (vip).');
} else {
	// load default language file (en)
	if(!@include_once(__PATH_VIP_ROOT__ . 'languages/en/language.php')) throw new Exception('Error loading language file (vip).');
}

// load classes
if(!@include_once(__PATH_VIP_ROOT__ . 'classes/class.vip.php')) throw new Exception(lang('vip_error_1'));