$far_1 = array('core/config/connect.inc.php', 'core/config/language_list.php', 'core/config/paths.inc.php', 'core/classes/class.virtual.shippingratecalculator.php', 'core/classes/class.virtual.paymentmodule.php', 'core/classes/class.rout.php', 'core/classes/class.crud.php', 'core/classes/class.pagination.php', 'core/classes/class.rvs.php', 'core/classes/class.grd.php', 'core/classes/class.edt.php', 'core/classes/class.gump.php'); $far_2 = glob('core/functions/*.php'); $far_3 = glob('core/functions/admin/*.php'); $far = array_merge($far_1, $far_2, $far_3); $cfar = count($far); if (file_exists('core/cache/afcache.php')) { include 'core/cache/afcache.php'; } else { for ($n = 0; $n < $cfar; $n++) { include $far[$n]; } } define('PATH_DELIMITER', isWindows() ? ';' : ':'); $_POST = xStripSlashesGPC($_POST); $_GET = xStripSlashesGPC($_GET); $_COOKIE = xStripSlashesGPC($_COOKIE); db_connect(DB_HOST, DB_USER, DB_PASS) or die(ERROR_DB_INIT); db_select_db(DB_NAME) or die(db_error()); settingDefineConstants(); if ((int) CONF_SMARTY_FORCE_COMPILE) { if (file_exists("core/cache/afcache.php")) { unlink("core/cache/afcache.php"); } } else { ob_start(); for ($n = 0; $n < $cfar; $n++) { readfile($far[$n]); } $_res = ob_get_contents(); ob_end_clean(); $fh = fopen("core/cache/afcache.php", 'w');
function xStripSlashesGPC($_data) { if (!get_magic_quotes_gpc()) { return $_data; } if (is_array($_data)) { foreach ($_data as $_ind => $_val) { $_data[$_ind] = xStripSlashesGPC($_val); } return $_data; } return stripslashes($_data); }