function AdminPermission($grp) { global $MyAdminPermissions; if (!isset($MyAdminPermissions[$grp])) { $MyAdminPermissions[$grp] = CheckAdminPermission(GetAdminUser(), $grp); } return $MyAdminPermissions[$grp]; }
$messageStack->add(ERROR_NO_DEFAULT_CURRENCY_DEFINED, 'error'); } // check if a default language is set if (!defined('DEFAULT_LANGUAGE')) { $messageStack->add(ERROR_NO_DEFAULT_LANGUAGE_DEFINED, 'error'); } if (function_exists('ini_get') && (bool) ini_get('file_uploads') == false) { $messageStack->add(WARNING_FILE_UPLOADS_DISABLED, 'warning'); } require DIR_FS_FUNCTIONS . 'admins.php'; if (!GetAdminUser()) { include DIR_FS_INCLUDES . 'login.php'; exit; } if (!CheckAdminPermission(GetAdminUser(), defined('ADMIN_PERMISSION') ? preg_split('/,/', ADMIN_PERMISSION) : GetAdminFilePermissions(preg_replace('|.*/|', '', $_SERVER['SCRIPT_FILENAME'])))) { echo "Access denied for " . GetAdminUser() . "\n"; error_log('Access denied for ' . GetAdminUser() . ' at ' . $_SERVER['SCRIPT_FILENAME']); exit; } if (defined('SITE_EXPIRE') && SITE_EXPIRE > 0 && time() > SITE_EXPIRE) { if (CheckAdminPermission(GetAdminUser(), 'SUPER')) { $messageStack->add('Account "' . DB_DATABASE . '" has expired', 'warning'); } else { header('Location: http://www.intensecart.com/expired.html'); exit; } } require DIR_FS_INCLUDES . 'add_ccgvdc_application_top.php'; // CCGV // Include OSC-AFFILIATE require DIR_FS_INCLUDES . 'affiliate_application_top.php';