Beispiel #1
0
 function return_dpProEventCalendar()
 {
     global $dpProEventCalendar, $wpdb, $table_prefix, $post;
     $id = self::$id_calendar;
     $type = self::$type;
     $limit = self::$limit;
     $author = self::$author;
     $get = self::$get;
     $widget = self::$widget;
     $limit_description = self::$limit_description;
     $category = self::$category;
     $event_id = self::$event_id;
     $event = self::$event;
     $columns = self::$columns;
     $view = self::$view;
     $from = self::$from;
     $opts = self::$opts;
     if ($id == "") {
         $id = get_post_meta($post->ID, 'pec_id_calendar', true);
     }
     require_once dirname(__FILE__) . '/../classes/base.class.php';
     $dpProEventCalendar_class = new DpProEventCalendar(false, $id, null, null, $widget, $category, $event_id, $author, $event, $columns, $from, $view, $limit_description, $opts);
     if ($get != "") {
         $this->events_html = $dpProEventCalendar_class->getFormattedEventData($get);
         return;
     }
     if ($type != "") {
         $dpProEventCalendar_class->switchCalendarTo($type, $limit, $limit_description, $category, $author, $event_id);
     }
     array_walk($dpProEventCalendar, 'dpProEventCalendar_reslash_multi');
     $rand_num = rand();
     //if(!$calendar->active) { return ''; }
     $events_script = $dpProEventCalendar_class->addScripts();
     self::$js_declaration[] = $events_script;
     self::$js_flag = true;
     if (!empty($event)) {
         $events_html = $dpProEventCalendar_class->outputEvent($event);
     } else {
         $events_html = $dpProEventCalendar_class->output();
     }
     $this->events_html = $events_html;
 }