Location: PHPKode > projects > OmegaBB > omegabb-0.8.1/update.php
<?php
/*OmegaBB 0.8.1*/

header( 'Cache-control: no-cache' );
header( 'Cache-control: no-store' );
header( 'Pragma: no-cache' );
header( 'Expires: 0' ); 

    require_once('omegabb.php');
	
    $user_id=GetParam($_REQUEST,'user_id','');
    $thread_watching=GetParam($_REQUEST,'thread_watching','');
    $hitf=GetParam($_REQUEST,'hitf','');
    $last_update=GetParam($_REQUEST,'last_update','');
    $hipt=GetParam($_REQUEST,'hipt','');
    $nrt=GetParam($_REQUEST,'nrt','');
	$last_wiki_revision=GetParam($_REQUEST,'last_wiki_revision','');	
	
    $auth_ret = Check_Auth();
	
    if( $auth_ret <= 0) {
       echo "0^?User not logged in, auth_ret: $auth_ret";
       return;
    }   

    $debug_string = "";
    $return_code = 4;
        
    if ($nrt) {
       update_read_threads($auth_ret,$nrt);
    }
    
    if ($last_update == 0) {
       $output = SendUnreadThreads($auth_ret);
    } else {
       $output = SendUpdatedThreads($auth_ret,$last_update);
    }

	$output .= "^*" . GetForumsDeltas($hitf);
    
	//both are set when you're watching a thread and on the last page of that thread
    if ($thread_watching && $hipt) {
       $output .= "^*" . GetThreadUpdate($thread_watching,$hipt);
    }  else {
	   $output .= "^*0^?0^?0^?0^?";
	}
	
	//both are set when you're watching an article and are on the first page of that article
	if ($thread_watching && ($last_wiki_revision != "")) {
       $output .= "^*" . CheckForWikiUpdate($thread_watching,$last_wiki_revision);
    }  else {
	   $output .= "^*0";
	}
	
    //echo $return_code . "^*" . $output . "^*" 
	echo $return_code . "^*" . $output;

?> 
Return current item: OmegaBB