Modules » '; printHeader($OC_modulesAR[OCC_MODULE_ID]['name'] . " Settings",1); require_once OCC_MODULE_ID . '/settings.inc'; printFooter(); exit; } // Is action extension valid elseif (preg_match("/\.(?:inc|sql)$/",$_REQUEST['action'])) { err('Request for module action is not permitted','Error'); } // Is module active elseif (!in_array($_REQUEST['module'],$OC_activeModulesAR)) { err('Module is not active','Error'); } // OK already else { define('OCC_MODULE_ID', $_REQUEST['module']); // Friendly URL? If so, decipher params if ((OCC_LICENSE=='P'.'ublic') && preg_match("/^oc_/",$_REQUEST['module'])){exit;} if (isset($_GET['ocparams']) && !empty($_GET['ocparams'])) { $params = ''; if (preg_match_all("/(\w+)--(\w+)_-/", $_GET['ocparams'], $matches)) { foreach ($matches[1] as $idx => $m) { if (($m != 'module') && ($m != 'action') && preg_match("/^[\w-]+$/", $m)) { $params .= '&' . $m . '=' . urlencode($matches[2][$idx]); $_GET[$m] = $matches[2][$idx]; } } } unset($_GET['ocparams']); define('OCC_SELF', $_SERVER['PHP_SELF'] . '?module=' . $_REQUEST['module'] . '&action=' . $_GET['action'] . $params); } elseif (isset($_SERVER['REQUEST_URI']) && strstr($_SERVER['REQUEST_URI'], '?')) { define('OCC_SELF', htmlspecialchars($_SERVER['REQUEST_URI'])); } elseif (isset($_SERVER['QUERY_STRING']) && strstr($_SERVER['QUERY_STRING'], '&')) { define('OCC_SELF', $_SERVER['PHP_SELF'] . '?' . htmlspecialchars($_SERVER['QUERY_STRING'])); } else { err('This server does not support REQUEST_URI or QUERY_STRING','Error'); } define('OCC_MODULE_REQUEST_BASE', $_SERVER['PHP_SELF'] . '?module=' . $_REQUEST['module']); require_once OCC_MODULE_ID . '/' . $_REQUEST['action']; exit; } exit; ?>