Example #1
0
		else
			{pageNotFound(); return;}
	}
	else if($blocks[0] == 'chat')
	{
		//DISPLAY THE CHAT
		require_once('/var/www/html/api/conversation/obj/Conversation.php');
		$chattingWithUserID = $blocks[1];
		$Friend = new User($chattingWithUserID);
		
		if(!$Friend->exists)
			{ echo pageNotFound(); return; }
		
		//Friend exists, get their conversation
		$User =  new User($_SESSION['userID']);
		$Conversation = $Friend->getConversationWith($User->ID, true);

		if(!$Conversation->exists)
			{ pageNotFound(); return; }
			
		//Show their conversation
		$title = $User->row['fName']." ".$User->row['lName']." - Chat";
		$content = '/var/www/html/src/html/chat/conversation.html';
		require_once('/var/www/html/src/html/blank.html');
		return true;
	}
	else
		{pageNotFound(); return;}
}
else
	{pageNotFound(); return;}