<?php
namespace Plugin\RedeemCode;

define('__PATH_REDEEMCODE_ROOT__', __PATH_PLUGINS__.'redeemcode/');
define('__REDEEMCODE_HOME__', __BASE_URL__.'redeem/');

$extra_admincp_sidebar[] = array(
    'Redeem Code', array(
        array('Settings','redeem&page=settings'),
        array('Create','redeem&page=create'),
        array('List','redeem&page=list'),
        array('Logs','redeem&page=logs')
    )
);

$langCode = config('language_default', true);
$langFile = __PATH_REDEEMCODE_ROOT__.'languages/'.$langCode.'/language.php';
if(!is_file($langFile)) $langFile = __PATH_REDEEMCODE_ROOT__.'languages/en/language.php';
if(!@include_once($langFile)) throw new \Exception('Error loading redeem code language file.');
if(!@include_once(__PATH_REDEEMCODE_ROOT__.'classes/class.redeemcode.php')) throw new \Exception(lang('redeemcode_error_1', true));
