Example #1
0
// BEGIN Session management
// Check user
$user_id = ($needlogin ? rss_get_user() : ANONYMOUS);
if(($user_id == ANONYMOUS) && AUTOLOGIN)
{
	// Start session management
	$user->session_begin();
	$auth->acl($user->data);
	$user->setup();
	// End session management
	$user_id = $user->data['user_id'];
}
else
{
	$user->data = rss_session_begin($user_id, $user_ip, 0);
	$user->setup();
}

$username = $user->data['username'];
// END session management

// BEGIN Cache Mod
if(($user_id == ANONYMOUS) && $use_cached)
{
	$MyETag = '"RSS' . gmdate('YmdHis', $cachefiletime) . $verinfo . '"';
	$MyGMTtime = gmdate('D, d M Y H:i:s', $cachefiletime) . ' GMT';
	if(!empty($_SERVER['SERVER_SOFTWARE']) && strstr($_SERVER['SERVER_SOFTWARE'], 'Apache/2'))
	{
		header('Cache-Control: no-cache, pre-check=0, post-check=0, max-age=0');
	}
Example #2
0
if ($topics_only == 1) {
    $sql_topics_only_where = 'AND p.post_id = t.topic_first_post_id';
}
if ($topics_view != 0) {
    $sql_topic_view = 'AND t.topic_id =' . $topics_view;
}
//
// BEGIN Session management
//
// Check user
$user_id = $needlogin ? rss_get_user() : ANONYMOUS;
if ($user_id == ANONYMOUS && AUTOLOGIN) {
    $userdata = session_pagestart($user_ip, PAGE_RSS);
    $user_id = $userdata["user_id"];
} else {
    $userdata = rss_session_begin($user_id, $user_ip, PAGE_RSS);
}
init_userprefs($userdata);
$username = $userdata["username"];
//
// END session management
//
// BEGIN Cache Mod
if ($user_id == ANONYMOUS && $use_cached) {
    $MyETag = '"RSS' . gmdate("YmdHis", $cachefiletime) . $verinfo . '"';
    $MyGMTtime = gmdate("D, d M Y H:i:s", $cachefiletime) . " GMT";
    if (!empty($HTTP_SERVER_VARS['SERVER_SOFTWARE']) && strstr($HTTP_SERVER_VARS['SERVER_SOFTWARE'], 'Apache/2')) {
        header('Cache-Control: no-cache, pre-check=0, post-check=0, max-age=0');
    } else {
        header('Cache-Control: private, pre-check=0, post-check=0, max-age=0');
    }