Example #1
0
 /**
  *  Convert type ID into something meaningful for human
  */
 public static function type_return($type_id, $user_id, $beer_id, $text = null, $place_id = null, $img_id = null)
 {
     switch ($type_id) {
         //User had this drink
         case '101':
             return "had this drink!";
             break;
             //User like this
         //User like this
         case '102':
             return "like this";
             break;
             //User want this
         //User want this
         case '103':
             return "want this";
             break;
             //Image posted
         //Image posted
         case '200':
             $data = BeerImg::getImage($img_id);
             return " uploaded " . "<img src=\"{$data->path}\" class=\"img-responsive\">";
             break;
             //Check-in
         //Check-in
         case '300':
             $data = Places::userBeerPlace($user_id, $beer_id, $place_id);
             return "check in " . GlobalUrl::place_url($data) . " having " . $data->beer;
             break;
     }
 }