multi_query($query)) { $result = $mysqli->use_result(); $row = $result->fetch_row(); $APPID = $row[1]; $APPSECRET = $row[2]; } ?>id = $id; $this->created_time = $created_time; $this->updated_time = $updated_time; $this->type = $type; $this->status_type = $status_type; } //setter function set_id($id){ $this->id = $id; } function set_message($message){ $this->message = $message; } function set_picture($picture){ $this->picture = $picture; } function set_link($link){ if(strpos($link, "https://www.facebook.com")){ $this->link = "https://www.facebook.com".$link; } else{ $this->link = $link; } } function set_name($name){ $this->name = $name; } function set_description($description){ $this->description = $description; } function set_created_time($created_time){ $this->name = $created_time; } function set_updated_time($updated_time){ $this->updated_time = $updated_time; } function set_type($type){ $this->type = $type; } function set_status_type($status_type){ $this->status_type = $status_type; } function set_story($story){ $this->story = $story; } function set_source($source){ $this->source = $source; } //getter function get_id(){ return $this->id; } function get_message(){ return $this->message; } function get_picture(){ return $this->picture; } function get_link(){ return $this->link; } function get_name(){ return $this->name; } function get_created_time(){ return $this->created_time; } function get_updated_time(){ return $this->updated_time; } function get_type(){ return $this->type; } function get_status_type(){ return $this->status_type; } function get_story(){ return $this->story; } function get_source(){ return $this->source; } function get_description(){ return $this->description; } function get_date($selector){ $date = ""; if($selector=="created"){ $date = $this->get_created_time(); } if($selector=="updated"){ $date = $this->get_updated_time(); } return substr($date,8,2).".".substr($date,5,2).".".substr($date,0,4); } function get_post(){ switch($this->get_status_type()){ case "added_photos": $result = "
".$this->get_date("created").": "; if(property_exists($this, 'message') && $this->message!=null){ $result .= $this->message."

"; } if(property_exists($this ,'link') && $this->link!=null){ $result .= "

link."\">"; } if(property_exists($this, 'picture') && $this->picture!=null){ $result .= "picture."\" />"; } else{ $result .= $this->story; } if(property_exists($this, 'link') && $this->link!=null){ $result .= "

"; } $result .= "
"; break; case "mobile_status_update": $result = "
".$this->get_date("created").": ".$this->message."

"; if(property_exists($this, 'picture') && $this->picture!=null){ $result .= "

picture."\"/>

"; } $result .= "
"; break; case "shared_story": $result = "
".$this->get_date("created").": ".$this->message."

"; if(property_exists($this, 'picture') && $this->picture!=null){ $result .= "

picture."\" />

"; } if(property_exists($this, 'link') && $this->link!=null){ $result .= "

link."\">"; if(property_exists($this, 'name') && $this->name!=null){ $result .= $this->name; } if(property_exists($this, 'description') && $this->description!=null){ $result .= " - ".$this->description; } if(!property_exists($this, 'name') && $this->name==null && property_exists(!$this, 'description') && $this->description=null){ $result .= $this->story; } $result .= "

"; } $result .= "
"; break; case "added_video": $result = "
".$this->get_date("created").": "; if(property_exists($this, 'message') && $this->message!=null){ $result .= $this->message."

"; } if(property_exists($this ,'source') && $this->source!=null){ $result .= ""; } if(property_exists($this, 'name') && $this->name!=null){ $result .= "
".$this->name."
"; } $result .= "

"; break; default: break; } //return $result; return "
".$result."
"; } }