• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP EM_Events类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中EM_Events的典型用法代码示例。如果您正苦于以下问题:PHP EM_Events类的具体用法?PHP EM_Events怎么用?PHP EM_Events使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了EM_Events类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: widget

 /** @see WP_Widget::widget */
 function widget($args, $instance)
 {
     $instance = array_merge($this->defaults, $instance);
     $instance = $this->fix_scope($instance);
     // depcreciate
     echo $args['before_widget'];
     echo $args['before_title'];
     echo $instance['title'];
     echo $args['after_title'];
     if (is_numeric($instance['time_limit']) && $instance['time_limit'] > 0) {
         $instance['scope'] = date('Y-m-d') . "," . date('Y-m-t', strtotime('+' . ($instance['time_limit'] - 1) . ' month'));
     }
     $instance['owner'] = false;
     $events = EM_Events::get($instance);
     echo "<ul>";
     $li_wrap = !preg_match('/^<li>/i', trim($instance['format']));
     if (count($events) > 0) {
         foreach ($events as $event) {
             if ($li_wrap) {
                 echo '<li>' . $event->output($instance['format']) . '</li>';
             } else {
                 echo $event->output($instance['format']);
             }
         }
     } else {
         echo '<li>' . __('No events', 'dbem') . '</li>';
     }
     if (!empty($instance['all_events'])) {
         $events_link = !empty($instance['all_events_text']) ? em_get_link($instance['all_events_text']) : em_get_link(__('all events', 'dbem'));
         echo '<li>' . $events_link . '</li>';
     }
     echo "</ul>";
     echo $args['after_widget'];
 }
开发者ID:hypenotic,项目名称:slowfood,代码行数:35,代码来源:em-events.php


示例2: bp_em_events_content

function bp_em_events_content()
{
    global $bp, $EM_Notices;
    echo $EM_Notices;
    ?>
		<h4><?php 
    _e('My Events', 'dbem');
    ?>
</h4>
		<?php 
    $events = EM_Events::get(array('owner' => $bp->displayed_user->id));
    if (count($events) > 0) {
        $args = array('format_header' => get_option('dbem_bp_events_list_format_header'), 'format' => get_option('dbem_bp_events_list_format'), 'format_footer' => get_option('dbem_bp_events_list_format_footer'), 'owner' => $bp->displayed_user->id);
        echo EM_Events::output($events, $args);
    } else {
        ?>
			<p><?php 
        _e('No Events', 'dbem');
        ?>
</p>
			<?php 
    }
    ?>
		<h4><?php 
    _e("Events I'm Attending", 'dbem');
    ?>
</h4>
		<?php 
    bp_em_attending_content();
}
开发者ID:hypenotic,项目名称:slowfood,代码行数:30,代码来源:profile.php


示例3: mob_shortcode_countdown

function mob_shortcode_countdown($atts)
{
    $defaults = array('id' => 'countdown_' . uniqid(), 'day' => 0, 'month' => 0, 'year' => 0, 'hour' => 0, 'minutes' => 0, 'seconds' => 0, 'nextevent' => false, 'labels' => "['Years', 'Months', 'Weeks', 'Days', 'Hours', 'Minutes', 'Seconds']", 'labels1' => "['Year', 'Month', 'Week', 'Day', 'Hour', 'Minute', 'Second']", 'compactLabels' => "['y', 'm', 'w', 'd']", 'whichLabels' => null, 'digits' => "['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']", 'timeSeparator' => ':', 'isRTL' => false, 'since' => null, 'timezone' => null, 'serverSync' => null, 'format' => 'dHMS', 'layout' => '', 'compact' => false, 'padZeroes' => false, 'significant' => 0, 'description' => '', 'expiryUrl' => null, 'alwaysExpire' => false, 'onExpiry' => null, 'onTick' => null, 'tickInterval' => 1);
    $a = shortcode_atts($defaults, $atts);
    if ($a['nextevent'] && class_exists('EM_Events')) {
        if ($events = EM_Events::get(array('limit' => 1))) {
            $datetime = strtotime($events[0]->event_start_date . ' ' . $events[0]->event_start_time);
            $a['day'] = date('j', $datetime);
            $a['month'] = date('n', $datetime);
            $a['year'] = date('Y', $datetime);
            $a['hour'] = date('G', $datetime);
            $a['minutes'] = intval(date('i', $datetime));
            $a['seconds'] = intval(date('s', $datetime));
        }
    }
    $return = '<div id="' . $a['id'] . '"></div><script type="text/javascript">jQuery(document).ready(function(){
		jQuery(\'#' . $a['id'] . '\').countdown({';
    foreach (array_diff_key($a, array('id' => '', 'day' => '', 'month' => '', 'year' => '', 'hour' => '', 'minutes' => '', 'seconds' => '')) as $k => $v) {
        if ($v != $defaults[$k] && $v != null && $v != false && !empty($v)) {
            $return .= $k . ':' . (substr($defaults[$k], 0, 1) == '[' || $defaults[$k] == null || is_numeric($defaults[$k]) || is_bool($defaults[$k]) ? $v : '"' . $v . '"') . ',';
        }
    }
    $return .= '
			until: new Date(' . intval($a['year']) . ',' . intval($a['month'] - 1) . ',' . intval($a['day']) . ',' . intval($a['hour']) . ',' . intval($a['minutes']) . ',' . intval($a['seconds']) . '),
		});
	});</script>';
    if (isset($events[0]->event_slug)) {
        $return = '<a href="' . $events[0]->event_slug . '">' . $return . '</a>';
    }
    return $return;
}
开发者ID:markoliverbrawn,项目名称:moby-wordpress-template,代码行数:31,代码来源:countdown.php


示例4: em_rss

function em_rss()
{
    global $post, $wp_query;
    if (!empty($_REQUEST['dbem_rss']) || is_object($post) && $post->ID == get_option('dbem_events_page') && $wp_query->get('rss')) {
        header("Content-type: text/xml");
        ob_start();
        echo "<?xml version='1.0'?>\n";
        ?>
<rss version="2.0">
	<channel>
		<title><?php 
        echo get_option('dbem_rss_main_title');
        ?>
</title>
		<link><?php 
        echo get_permalink(get_option('dbem_events_page'));
        ?>
</link>
		<description><?php 
        echo get_option('dbem_rss_main_description');
        ?>
</description>
		<docs>http://blogs.law.harvard.edu/tech/rss</docs>
		<generator>Weblog Editor 2.0</generator>
				
		<?php 
        $description_format = str_replace(">", "&gt;", str_replace("<", "&lt;", get_option('dbem_rss_description_format')));
        $events = EM_Events::get(array('limit' => 5, 'owner' => false));
        foreach ($events as $event) {
            $description = $event->output(get_option('dbem_rss_description_format'), "rss");
            $description = ent2ncr(convert_chars(strip_tags($description)));
            //Some RSS filtering
            ?>
			<item>
				<title><?php 
            echo $event->output(get_option('dbem_rss_title_format'), "rss");
            ?>
</title>
				<link><?php 
            echo $event->output('#_EVENTURL');
            ?>
</link>
				<description><?php 
            echo $description;
            ?>
</description>
			</item>
			<?php 
        }
        ?>
		
	</channel>
</rss>
		<?php 
        echo apply_filters('em_rss', ob_get_clean());
        die;
    }
}
开发者ID:pyropictures,项目名称:wordpress-plugins,代码行数:58,代码来源:em-rss.php


示例5: queue_emails

 /**
  * Run on cron and prep emails to go out
  */
 public static function queue_emails()
 {
     global $EM_Event, $wpdb;
     //save old event in case already set
     $old_EM_Event = !empty($EM_Event) ? clone $EM_Event : null;
     //disable the current events are past rule
     add_filter('option_pre_dbem_events_current_are_past', 'em_emails_return_false', create_function('$a', 'return false;'));
     //For each event x days on
     $days = get_option('dbem_emp_emails_reminder_days', 1);
     $scope = $days > 0 ? date('Y-m-d', current_time('timestamp') + 86400 * $days) : date('Y-m-d', current_time('timestamp') + 86400);
     //make sure we don't get past events, only events starting that specific date
     $events_are_past = get_option('dbem_events_current_are_past');
     update_option('dbem_events_current_are_past', true);
     $output_type = get_option('dbem_smtp_html') ? 'html' : 'email';
     foreach (EM_Events::get(array('scope' => $scope, 'private' => 1, 'blog' => get_current_blog_id())) as $EM_Event) {
         /* @var $EM_Event EM_Event */
         $emails = array();
         //get ppl attending
         foreach ($EM_Event->get_bookings()->get_bookings()->bookings as $EM_Booking) {
             //get confirmed bookings
             /* @var $EM_Booking EM_Booking */
             if (is_email($EM_Booking->get_person()->user_email)) {
                 $subject = $EM_Booking->output(get_option('dbem_emp_emails_reminder_subject'), 'raw');
                 $message = $EM_Booking->output(get_option('dbem_emp_emails_reminder_body'), $output_type);
                 $emails[] = array($EM_Booking->get_person()->user_email, $subject, $message, $EM_Booking->booking_id);
             }
         }
         if (count($emails) > 0) {
             $attachments = serialize(array());
             if (get_option('dbem_emp_emails_reminder_ical')) {
                 //create invite ical
                 $upload_dir = wp_upload_dir();
                 if (file_exists(trailingslashit($upload_dir['basedir']) . "em-cache") || mkdir(trailingslashit($upload_dir['basedir']) . "em-cache")) {
                     $icalfilename = trailingslashit($upload_dir['basedir']) . "em-cache/invite_" . $EM_Event->event_id . ".ics";
                     $icalfile = fopen($icalfilename, 'w+');
                     if ($icalfile) {
                         ob_start();
                         em_locate_template('templates/ical.php', true, array('args' => array('event' => $EM_Event->event_id)));
                         $icalcontent = preg_replace("/([^\r])\n/", "\$1\r\n", ob_get_clean());
                         fwrite($icalfile, $icalcontent);
                         fclose($icalfile);
                         $ical_file_array = array('name' => 'invite.ics', 'type' => 'text/calendar', 'path' => $icalfilename);
                         $attachments = serialize(array($ical_file_array));
                     }
                 }
             }
             foreach ($emails as $email) {
                 $wpdb->insert(EM_EMAIL_QUEUE_TABLE, array('email' => $email[0], 'subject' => $email[1], 'body' => $email[2], 'attachment' => $attachments, 'event_id' => $EM_Event->event_id, 'booking_id' => $email[3]));
             }
         }
     }
     //cleanup
     update_option('dbem_events_current_are_past', $events_are_past);
     //reset previous current events are past setting
     $EM_Event = $old_EM_Event;
     //reset global
     remove_filter('option_pre_dbem_events_current_are_past', 'em_emails_return_false');
 }
开发者ID:shieldsdesignstudio,项目名称:trilogic,代码行数:61,代码来源:emails.php


示例6: getPastEvents

 /**
  * Get past events
  * @return string HTML
  */
 public static function getPastEvents()
 {
     return \EM_Events::output(array('format_header' => '<ul>', 'format' => '<li>
                 <div>#_{j M Y}</div>
                 <h3>#_EVENTNAME</h3>
                 <div>#_EVENTNOTES</div>
                 <a href="#_EVENTURL">En savoir plus</a>
             </li>', 'format_footer' => '</ul>', 'scope' => 'past', 'order' => 'DESC', 'limit' => 3, 'pagination' => true));
 }
开发者ID:Rudloff,项目名称:quai10-template,代码行数:13,代码来源:Event.php


示例7: getPastEvents

 /**
  * Get past events.
  *
  * @return string HTML
  */
 public static function getPastEvents()
 {
     return \EM_Events::output(['format_header' => '<ul class="eventList grid-3-medium-2-small-2-tiny-1">', 'format' => '<li class="eventItem">
                 <div class="eventDate">#_{j M Y}</div>
                 <div class="eventImg"><a href="#_EVENTURL">#_EVENTIMAGE{372,372}</a></div>
                 <h3 class="eventTitle"><a href="#_EVENTURL">#_EVENTNAME</a></h3>
                 <div class="eventDesc">#_EVENTNOTES</div>
             </li>', 'format_footer' => '</ul>', 'scope' => 'past', 'order' => 'DESC', 'limit' => 3, 'pagination' => true]);
 }
开发者ID:quai10,项目名称:quai10-template,代码行数:14,代码来源:Event.php


示例8: em_get_events_list_shortcode

/**
 * Shows a list of events according to given specifications. Accepts any event query attribute.
 * @param array $atts
 * @return string
 */
function em_get_events_list_shortcode($atts, $format = '')
{
    $atts = (array) $atts;
    $atts['format'] = $format != '' || empty($atts['format']) ? $format : $atts['format'];
    $atts['format'] = html_entity_decode($atts['format']);
    //shorcode doesn't accept html
    $atts['page'] = !empty($atts['page']) && is_numeric($atts['page']) ? $atts['page'] : 1;
    $atts['page'] = !empty($_GET['pno']) && is_numeric($_GET['pno']) ? $_GET['pno'] : $atts['page'];
    return EM_Events::output($atts);
}
开发者ID:adisonc,项目名称:MaineLearning,代码行数:15,代码来源:em-shortcode.php


示例9: find

 public function find($params)
 {
     $events = EM_Events::get(array('limit' => 0, 'offset' => 100));
     $events = self::filter_events($events, $params);
     $events = array_slice($events, $params['offset']);
     $remaped_events = array();
     foreach ($events as $event) {
         $remaped_events[] = $this->convert_to_se_event($event);
     }
     return $paged_posts = $this->add_paging_info($remaped_events, $params);
 }
开发者ID:gopinathshiva,项目名称:wordpress-vip-plugins,代码行数:11,代码来源:class-shoutem-events-manager-dao.php


示例10: widget

    /** @see WP_Widget::widget */
    function widget($args, $instance) {
    	$instance = array_merge($this->defaults, $instance);
    	$instance = $this->fix_scope($instance); // depcreciate	

    	echo $args['before_widget'];
    	if( !empty($instance['title']) ){
		    echo $args['before_title'];
		    echo apply_filters('widget_title',$instance['title'], $instance, $this->id_base);
		    echo $args['after_title'];
    	}
    	//remove owner searches
		$instance['owner'] = false;
		
		//legacy stuff
		//add li tags to old widgets that have no forced li wrappers
		if ( !preg_match('/^<li/i', trim($instance['format'])) ) $instance['format'] = '<li>'. $instance['format'] .'</li>';
		if (!preg_match('/^<li/i', trim($instance['no_events_text'])) ) $instance['no_events_text'] = '<li>'.$instance['no_events_text'].'</li>';
		//orderby fix for previous versions with old orderby values
		if( !array_key_exists($instance['orderby'], $this->em_orderby_options) ){
			//replace old values
			$old_vals = array(
				'name' => 'event_name',
				'end_date' => 'event_end_date',
				'start_date' => 'event_start_date',
				'end_time' => 'event_end_time',
				'start_time' => 'event_start_time'
			);
			foreach($old_vals as $old_val => $new_val){
				$instance['orderby'] = str_replace($old_val, $new_val, $instance['orderby']);
			}
		}
		
		//get events
		$events = EM_Events::get(apply_filters('em_widget_events_get_args',$instance));
		
		//output events
		echo "<ul>";
		if ( count($events) > 0 ){
			foreach($events as $event){				
				echo $event->output( $instance['format'] );
			}
		}else{
		    echo $instance['no_events_text'];
		}
		if ( !empty($instance['all_events']) ){
			$events_link = (!empty($instance['all_events_text'])) ? em_get_link($instance['all_events_text']) : em_get_link(__('all events','charity'));
			echo '<li class="all-events-link">'.$events_link.'</li>';
		}
		echo "</ul>";
		
	    echo $args['after_widget'];
    }
开发者ID:kautzar,项目名称:drpp4,代码行数:53,代码来源:event-widget.php


示例11: EM_Events

 function EM_Events($args = array())
 {
     if (is_array($args)) {
         if (is_object(current($args)) && get_class(current($args)) == 'EM_Event') {
             $this->events = $args;
         } else {
             $this->events = EM_Events::get($args);
         }
     } else {
         $this->events = EM_Events::get();
     }
     do_action('em_events', $this);
 }
开发者ID:adisonc,项目名称:MaineLearning,代码行数:13,代码来源:em-events.php


示例12: tag_taxonomy_workaround

 /**
  * Hooks in after EM_Tag_Taxonomy::template() and makes sure WPML doesn't reset $wp_query and wipe the work EM just did.  
  */
 public static function tag_taxonomy_workaround()
 {
     global $EM_Tag;
     if (defined('EM_WPML_TAXONOMIES_TWEAKED') && EM_WPML_TAXONOMIES_TWEAKED) {
         return;
     }
     //prevent endless loop
     if (EM_Events::count(array('tag' => $EM_Tag->term_id)) == 0) {
         self::preset_query($EM_Tag->output(get_option('dbem_tag_page_title_format')));
     }
     define('EM_WPML_TAXONOMIES_TWEAKED', true);
     wp_reset_query();
     add_filter('the_post', 'EM_Tag_Taxonomy::template', 1);
 }
开发者ID:sajjadalisiddiqui,项目名称:cms,代码行数:17,代码来源:em-wpml-taxonomies.php


示例13: dbem_get_events_list

/**
 * TOTALLY DEPRECIATED (NOT ALTERNATIVE TAG) - Just use EM_Events::output, see below
 * @param unknown_type $limit
 * @param unknown_type $scope
 * @param unknown_type $order
 * @param unknown_type $format
 * @param unknown_type $echo
 * @param unknown_type $category
 * @return unknown_type
 */
function dbem_get_events_list($limit = "10", $scope = "future", $order = "ASC", $format = '', $echo = 1, $category = '')
{
    if (strpos($limit, "=")) {
        // allows the use of arguments without breaking the legacy code
        $defaults = EM_Events::get_default_search();
        $r = wp_parse_args($limit, $defaults);
        extract($r, EXTR_OVERWRITE);
    }
    $return = EM_Events::output(array('limit' => $limit, 'scope' => $scope, 'order' => $order, 'format' => $format, 'category' => $category));
    if ($echo) {
        echo $return;
    }
    return $return;
}
开发者ID:hypenotic,项目名称:slowfood,代码行数:24,代码来源:em-template-tags-depreciated.php


示例14: export

 /**
  * export the data in selected format
  */
 public function export()
 {
     $EM_Events = EM_Events::get();
     $format = isset($_POST['exp_format']) ? wp_unslash($_POST['exp_format']) : '';
     switch ($format) {
         case 'xCal':
             $this->exportXCal($EM_Events);
             break;
         case 'iCal':
             $this->exportICal($EM_Events);
             break;
         case 'Event Espresso':
             $this->exportEventEspresso($EM_Events);
             break;
     }
 }
开发者ID:webaware,项目名称:events-manager-import-export,代码行数:19,代码来源:class.EM_ImpExpExport.php


示例15: widget

 /** @see WP_Widget::widget */
 function widget($args, $instance)
 {
     $instance = array_merge($this->defaults, $instance);
     $instance = $this->fix_scope($instance);
     // depcreciate
     echo $args['before_widget'];
     if (!empty($instance['title'])) {
         echo $args['before_title'];
         echo apply_filters('widget_title', $instance['title'], $instance, $this->id_base);
         echo $args['after_title'];
     }
     $instance['owner'] = false;
     //orderby fix for previous versions with old orderby values
     if (!array_key_exists($instance['orderby'], $this->em_orderby_options)) {
         //replace old values
         $old_vals = array('name' => 'event_name', 'end_date' => 'event_end_date', 'start_date' => 'event_start_date', 'end_time' => 'event_end_time', 'start_time' => 'event_start_time');
         foreach ($old_vals as $old_val => $new_val) {
             $instance['orderby'] = str_replace($old_val, $new_val, $instance['orderby']);
         }
     }
     $events = EM_Events::get(apply_filters('em_widget_events_get_args', $instance));
     echo "<div id='events'>";
     $li_wrap = !preg_match('/^<div class="item">/i', trim($instance['format']));
     if (count($events) > 0) {
         foreach ($events as $event) {
             if ($li_wrap) {
                 echo '<div class="item">' . $event->output($instance['format']) . '</div>';
             } else {
                 echo $event->output($instance['format']);
             }
         }
     } else {
         echo '<div class="item"><h4>' . $instance['no_events_text'] . '</h4></div>';
     }
     if (!empty($instance['all_events'])) {
         $events_link = !empty($instance['all_events_text']) ? em_get_link($instance['all_events_text']) : em_get_link(__('all events', 'dbem'));
         echo '<div class="all-events-link">&raquo; ' . $events_link . '</div>';
     }
     echo "</div>";
     echo $args['after_widget'];
 }
开发者ID:sezj,项目名称:ufl-template-responsive,代码行数:42,代码来源:widget-em-events.php


示例16: em_get_events_list_shortcode_all

function em_get_events_list_shortcode_all($atts, $format = '')
{
    $atts = (array) $atts;
    $atts['format'] = $format != '' || empty($atts['format']) ? $format : $atts['format'];
    $atts['format'] = html_entity_decode($atts['format']);
    //shorcode doesn't accept html
    $atts['page'] = !empty($atts['page']) && is_numeric($atts['page']) ? $atts['page'] : 1;
    $atts['page'] = !empty($_GET['page']) && is_numeric($_GET['page']) ? $_GET['page'] : $atts['page'];
    // get recurrence events
    $atts['recurring'] = 1;
    $evts_recurring = EM_Events::get($atts);
    // get non-recurrence events
    $atts['recurring'] = 0;
    $evts = EM_Events::get($atts);
    // filter out the events that are instances of recurring events
    $non_recurrence_evts = array_filter($evts, 'is_no_recurrence');
    // merge recurrence and non-recurring events
    $evts_all = array_merge($non_recurrence_evts, $evts_recurring);
    // sort them by start==start date+time
    usort($evts_all, 'evt_start_sort');
    //
    return EM_Events::output($evts_all, $atts);
}
开发者ID:juanpablogdl,项目名称:Intranet_GDL,代码行数:23,代码来源:functions.php


示例17: esc_html

echo esc_html(get_option('dbem_rss_main_description'));
?>
</description>
		<docs>http://blogs.law.harvard.edu/tech/rss</docs>
		<pubDate><?php 
echo get_option('em_rss_pubdate', date('D, d M Y H:i:s T'));
?>
</pubDate>
		<atom:link href="<?php 
echo esc_attr(EM_RSS_URI);
?>
" rel="self" type="application/rss+xml" />
		<?php 
$description_format = str_replace(">", "&gt;", str_replace("<", "&lt;", get_option('dbem_rss_description_format')));
//$EM_Events = new EM_Events( array('limit'=>5, 'owner'=>false) );
$EM_Events = EM_Events::get(array('scope' => 'future', 'owner' => false));
foreach ($EM_Events as $EM_Event) {
    /* @var $EM_Event EM_Event */
    $description = $EM_Event->output(get_option('dbem_rss_description_format'), "rss");
    $description = ent2ncr(convert_chars($description));
    //Some RSS filtering
    $event_url = $EM_Event->output('#_EVENTURL');
    ?>
			<item>
				<title><?php 
    echo $EM_Event->output(get_option('dbem_rss_title_format'), "rss");
    ?>
</title>
				<link><?php 
    echo $event_url;
    ?>
开发者ID:adisonc,项目名称:MaineLearning,代码行数:31,代码来源:rss.php


示例18: em_bookings_person_table

/**
 * Generates a "widget" table of confirmed bookings for a specific event.
 * 
 * @param int $event_id
 */
function em_bookings_person_table()
{
    global $wpdb, $current_user, $EM_Person;
    if (!is_object($EM_Person)) {
        return false;
    }
    $action_scope = !empty($_REQUEST['em_obj']) && $_REQUEST['em_obj'] == 'em_bookings_confirmed_table';
    $action = $action_scope && !empty($_GET['action']) ? $_GET['action'] : '';
    $order = $action_scope && !empty($_GET['order']) ? $_GET['order'] : 'ASC';
    $limit = $action_scope && !empty($_GET['limit']) ? $_GET['limit'] : 20;
    //Default limit
    $page = $action_scope && !empty($_GET['pno']) ? $_GET['pno'] : 1;
    $offset = $action_scope && $page > 1 ? ($page - 1) * $limit : 0;
    $bookings = $EM_Person->get_bookings();
    $bookings_count = count($bookings);
    if ($bookings_count > 0) {
        //Get events here in one query to speed things up
        foreach ($bookings as $EM_Booking) {
            $event_ids[] = $EM_Booking->event_id;
        }
        $events = EM_Events::get($event_ids);
    }
    ?>
		<div class='wrap em_bookings_pending_table em_obj'>
			<form id='bookings-filter' method='get' action='<?php 
    bloginfo('wpurl');
    ?>
/wp-admin/edit.php'>
				<input type="hidden" name="em_obj" value="em_bookings_pending_table" />
				<!--
				<ul class="subsubsub">
					<li>
						<a href='edit.php?post_type=post' class="current">All <span class="count">(1)</span></a> |
					</li>
				</ul>
				<p class="search-box">
					<label class="screen-reader-text" for="post-search-input"><?php 
    _e('Search');
    ?>
:</label>
					<input type="text" id="post-search-input" name="em_search" value="<?php 
    echo !empty($_GET['em_search']) ? $_GET['em_search'] : '';
    ?>
" />
					<input type="submit" value="<?php 
    _e('Search');
    ?>
" class="button" />
				</p>
				-->
				<?php 
    if ($bookings_count >= $limit) {
        ?>
				<div class='tablenav'>
					<!--
					<div class="alignleft actions">
						<select name="action">
							<option value="-1" selected="selected">
								<?php 
        _e('Bulk Actions');
        ?>
							</option>
							<option value="approve">
								<?php 
        _e('Approve', 'dbem');
        ?>
							</option>
							<option value="decline">
								<?php 
        _e('Decline', 'dbem');
        ?>
							</option>
						</select> 
						<input type="submit" id="post-query-submit" value="Filter" class="button-secondary" />
					</div>
					-->
					<!--
					<div class="view-switch">
						<a href="/wp-admin/edit.php?mode=list"><img class="current" id="view-switch-list" src="http://wordpress.lan/wp-includes/images/blank.gif" width="20" height="20" title="List View" alt="List View" name="view-switch-list" /></a> <a href="/wp-admin/edit.php?mode=excerpt"><img id="view-switch-excerpt" src="http://wordpress.lan/wp-includes/images/blank.gif" width="20" height="20" title="Excerpt View" alt="Excerpt View" name="view-switch-excerpt" /></a>
					</div>
					-->
					<?php 
        if ($bookings_count >= $limit) {
            $bookings_nav = em_admin_paginate($bookings_count, $limit, $page, array('em_ajax' => 0, 'em_obj' => 'em_bookings_confirmed_table'));
            echo $bookings_nav;
        }
        ?>
					<div class="clear"></div>
				</div>
				<?php 
    }
    ?>
				<div class="clear"></div>
				<?php 
    if ($bookings_count > 0) {
//.........这里部分代码省略.........
开发者ID:hypenotic,项目名称:slowfood,代码行数:101,代码来源:em-person.php


示例19: date

">
					<?php 
    if (!empty($cell_data['events']) && count($cell_data['events']) > 0) {
        ?>
					<a href="<?php 
        echo $cell_data['link'];
        ?>
" title="<?php 
        echo $cell_data['link_title'];
        ?>
"><?php 
        echo date('j', $cell_data['date']);
        ?>
</a>
					<ul><?php 
        echo EM_Events::output($cell_data['events'], array('format' => get_option('dbem_full_calendar_event_format')));
        ?>
</ul>
					<?php 
    } else {
        ?>
					<?php 
        echo date('j', $cell_data['date']);
        ?>
					<?php 
    }
    ?>
				</td>
				<?php 
    //create a new row once we reach the end of a table collumn
    $col_count = $col_count == $col_max ? 1 : $col_count + 1;
开发者ID:hypenotic,项目名称:slowfood,代码行数:31,代码来源:calendar-full.php


示例20: do_action

<?php

do_action('em_template_my_bookings_header');
global $wpdb, $current_user, $EM_Notices, $EM_Person;
if (is_user_logged_in()) {
    $EM_Person = new EM_Person(get_current_user_id());
    $EM_Bookings = $EM_Person->get_bookings();
    $bookings_count = count($EM_Bookings->bookings);
    if ($bookings_count > 0) {
        //Get events here in one query to speed things up
        $event_ids = array();
        foreach ($EM_Bookings as $EM_Booking) {
            $event_ids[] = $EM_Booking->event_id;
        }
        $EM_Events = EM_Events::get($event_ids);
    }
    $limit = !empty($_GET['limit']) ? $_GET['limit'] : 20;
    //Default limit
    $page = !empty($_GET['pno']) ? $_GET['pno'] : 1;
    $offset = $page > 1 ? ($page - 1) * $limit : 0;
    echo $EM_Notices;
    ?>
		<div class='em-my-bookings'>
				<!--
				<ul class="subsubsub">
					<li>
						<a href='edit.php?post_type=post' class="current">All <span class="count">(1)</span></a> |
					</li>
				</ul>
				-->
				<?php 
开发者ID:hypenotic,项目名称:slowfood,代码行数:31,代码来源:my-bookings.php



注:本文中的EM_Events类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP EM_Locations类代码示例发布时间:2022-05-23
下一篇:
PHP EM_Event类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap