<?php
//The photo class that the program will use
//Photo class definition
class Photo {
	public $id;
	public $user;
	public $view;
	public $fileName;
	public $theDate;
	public $theTime;
	public $theLat;
	public $theLong;
	public $theCity;
	
	public function fillFromJSON($json)
	{
		$obj = json_decode($json);
		$AAobj = json_decode($json, true);

		$this->id = $obj->id;
		$this->user = $obj->user;
		$this->view = $obj->view;
		$this->fileName = $obj->fileName;
		$this->theDate = $obj->theDate;
		$this->theTime = $obj->theTime;
		$this->theLat = $obj->theLat;
		$this->theLong = $obj->theLong;
		$this->theCity = $obj->theCity;
	}
	public function Display()
	{
		echo "ID: $this->id, User: $this->user, Privacy: $this->view, 
		File: $this->fileName, Date: $this->theDate, 
		Time: $this->theTime, Lat: $this->theLat, 
		Long: $this->theLong, City: $this->theCity <br>";
	}
}
?>