Exemplo n.º 1
0
 public function get_rsvp_users($event_id = 0)
 {
     $event_id = $event_id ? $event_id : $this->id;
     if ($event_id) {
         $rsvp = new WT_RSVP();
         $users = $rsvp->get_users_by_event($event_id, 0, 50);
         $result = array();
         foreach ($users["users"] as $user) {
             $user_data = get_userdata($user["rsvp_user"]);
             $result[] = array("id" => $user["rsvp_id"], "nickname" => $user_data->nickname);
         }
         return $result;
     }
     return array();
 }
Exemplo n.º 2
0
            $thumbnails = $event->gallery($event->data["event_gallery"]);
            $data["gallery_markup"] = $tpl->gallery(array("thumbnails" => $thumbnails, "total" => count($thumbnails)), false);
        }
        if ($event->is_video()) {
            $videos = $event->video($event->data["event_videos"]);
            $data["video_markup"] = $tpl->videos(array("videos" => $videos, "total" => count($videos)), false);
        }
        if ($event->is_flickr()) {
            $data["flickr_markup"] = $tpl->flickr($event->flickr("event"), false);
        }
        if ($event->is_post()) {
            $posts = $event->posts($event->data["event_category"]);
            $data["news_markup"] = $tpl->posts(array("posts" => $posts, "total" => count($posts)), false);
        }
        if ($event->is_rsvp()) {
            $rsvp = new WT_RSVP();
            $rsvp_users = $rsvp->get_users_by_event($event->id);
            $data["attending_markup"] = $tpl->rsvp($rsvp->template($rsvp_users), false);
        }
        if ($event->is_comments()) {
            $data["comments_markup"] = $tpl->comments($event->comments(), false);
        }
        $tpl->event($data);
        echo wt_load_script("all");
        echo wt_load_script("event");
    }
}
if ($artist) {
    if ($artist->is_artist()) {
        $data = $artist->template();
        $attachment = new WT_Attachment();
Exemplo n.º 3
0
     break;
     //RSVP
 //RSVP
 case "not-attend":
     $rsvp = new WT_RSVP();
     $rsvp->notattend_event($_POST["event_id"]);
     $rsvp->panel_markup($_POST["event_id"]);
     break;
 case "attend":
     $rsvp = new WT_RSVP($_POST["event_id"]);
     $rsvp->attend_event($_POST["event_id"]);
     $rsvp->panel_markup($_POST["event_id"]);
     break;
 case "delete-rsvp":
     if ($_POST["rsvp_id"]) {
         $rsvp = new WT_RSVP($_POST["rsvp_id"]);
         $rsvp->remove();
         $rsvp->db_response("json");
         //echo json_encode(array("type"=>"success"));
     }
     break;
     // EVENTS
 // EVENTS
 case "get_event":
     $event = new WT_Event($_POST["event_id"]);
     if (!empty($_POST["event_id"])) {
         $event->retrieve();
     } else {
         $event->defaults();
     }
     echo json_encode($event->db_out(null, 0));