示例#1
0
 public static function AjaxReferer($location, $referer = 1, $addon = '')
 {
     $url = GlobalCore::SubURL($_SERVER['REQUEST_URI']);
     if ($url['ajax'] == 1) {
         GlobalCore::returnAjaxStatus($addon);
     } elseif (GlobalCore::nwReferer() && $referer == 1) {
         GlobalCore::nwHeader('Location: ' . GlobalCore::nwReferer());
     } else {
         GlobalCore::nwHeader('Location: ' . $location);
     }
 }
示例#2
0
            }
            $settings = NowhereCore::FetchSettings();
            include GlobalCore::template('settings');
        } else {
            GlobalCore::nwHeader('Location: ' . NWDIR);
        }
        break;
    case 'output':
        if ($nw_uid) {
            include GlobalCore::template('output');
        } else {
            GlobalCore::nwHeader('Location: ' . NWDIR);
        }
        break;
    case 'js':
        $status = NowhereCore::FetchUserStatus(1, 16, 16, 1);
        $url = GlobalCore::SubURL($_SERVER['REQUEST_URI']);
        $limit = isset($url['limit']) ? intval(trim($url['limit'])) : 1;
        GlobalCore::nwHeader('Content-type: text/javascript; charset=utf-8');
        include GlobalCore::template('js');
        break;
    case 'feed':
        $status = NowhereCore::FetchUserStatus(1, 16, 16, 1);
        GlobalCore::nwHeader("Content-type: application/xml");
        echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
        include GlobalCore::template('feed');
        break;
    case 'login':
        include GlobalCore::template('login');
        break;
}