示例#1
0
if (!isset($rootpath)) {
    $rootpath = './';
}
require_once './lib/common.inc.php';
$ocWP = $GLOBALS['oc_waypoint'];
$no_tpl_build = false;
//Preprocessing
if ($error == false) {
    if ($usr == false) {
        //user logged in?
        $target = urlencode(tpl_get_current_page());
        tpl_redirect('login.php?target=' . $target);
    } else {
        $db = \lib\Database\DataBaseSingleton::Instance();
        $user = new \lib\Objects\User\User(array('userId' => $usr['userid']));
        $user->loadExtendedSettings();
        $default_country = getDefaultCountry($usr, $lang);
        if (isset($_REQUEST['newcache_info'])) {
            $newcache_info = $_REQUEST['newcache_info'];
        } else {
            $newcache_info = 1;
        }
        if ($newcache_info == 1) {
            // display info about register new cache
            $tplname = 'newcache_info';
        } else {
            //set here the template to process
            $tplname = 'newcache';
        }
        require_once $rootpath . '/lib/caches.inc.php';
        require_once $stylepath . '/newcache.inc.php';