Example #1
0
	public function areMatched($userID_a, $userID_b)
	{
		$User_a = new User($userID_a, $this->PDOconn);
		$User_b = new User($userID_b, $this->PDOconn);
		
		$matchID_a = $User_a->getCurrentMatchID();
		
		//echo "matchID_a: ".$matchID_a;
			
			if($matchID_a == '')
				return false;
		
		$matchID_b = $User_b->getCurrentMatchID();
		
		if($User_a->getCurrentMatchID() == $User_b->getCurrentMatchID())
			return true;
		
		
		
		return false;
	}
Example #2
0
		$User = new User($_GET['user']);
		if(!$User->exists) return false;
		
		if($User->verify($_GET['key']))
			header('Location: http://gocollegedays.com');
	}
	
	if(isset($_SESSION['userID']))
	{
		$User = new User($_SESSION['userID']);
		$Viewer = $User;
		
		//Is matching?
		if($User->row['matching'] > 0 && $User->isVerified())
		{
			$matchID = $User->getCurrentMatchID();
			
			if($matchID != '')
				$content = '/var/www/html/src/html/home/home.html';
			else
				$content = '/var/www/html/src/html/home/unmatched.html';

			$title = 'CollegeDays';
			require_once('/var/www/html/src/html/blank.html');
			echo "<script src='/src/js/logout.js'></script>";	
		}
		else
		{
			$title = 'CollegeDays';
			$content = '/var/www/html/src/html/preferences.html';
			require_once('/var/www/html/src/html/blank.html');	
Example #3
0
<?
	/*
	filename: /html/api/match/retrieve/index.php
	parameters: 
		$_POST['match'] = the ID of the match
		
	description:
		Retrieve the match by the provided ID, if the match
		doesn't exist or is not provided, provide the user's current match.
		If the user doesn't have a current match, make a new match.
	*/
	include_once('/var/www/html/src/php/setup.php');
	include_once('/var/www/html/api/user/obj/User.php');
	include_once('/var/www/html/api/match/obj/Match.php');

	$User = new User('user_ElXgRhBEUmr28PgoKxkFLcs6GKuEe2CZ');
	echo "Current match: ".$User->getCurrentMatchID();
	
?>