本文整理汇总了PHP中event_espresso_get_is_active函数的典型用法代码示例。如果您正苦于以下问题:PHP event_espresso_get_is_active函数的具体用法?PHP event_espresso_get_is_active怎么用?PHP event_espresso_get_is_active使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了event_espresso_get_is_active函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: espresso_event_status
function espresso_event_status($event_id)
{
$event_status = event_espresso_get_is_active($event_id);
//These messages can be uesd to display the status of the an event.
switch ($event_status['status']) {
case 'EXPIRED':
$event_status_text = __('This event is expired.', 'event_espresso');
break;
case 'ACTIVE':
$event_status_text = __('This event is active.', 'event_espresso');
break;
case 'NOT_ACTIVE':
$event_status_text = __('This event is not active.', 'event_espresso');
break;
case 'ONGOING':
$event_status_text = __('This is an ongoing event.', 'event_espresso');
break;
case 'SECONDARY':
$event_status_text = __('This is a secondary/waiting list event.', 'event_espresso');
break;
}
return $event_status_text;
}
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:23,代码来源:custom_functions.php
示例2: event_espresso_get_status
function event_espresso_get_status($event_id, $event_meta = '')
{
$event_status = event_espresso_get_is_active($event_id, $event_meta);
switch ($event_status['status']) {
case 'EXPIRED':
case 'NOT_ACTIVE':
case 'DELETED':
case 'REGISTRATION_CLOSED':
case 'DENIED':
//case 'REGISTRATION_NOT_OPEN':
return 'NOT_ACTIVE';
break;
case 'PENDING':
case 'DRAFT':
return 'PENDING';
break;
case 'ACTIVE':
case 'ONGOING':
case 'SECONDARY':
case 'REGISTRATION_OPEN':
return 'ACTIVE';
break;
default:
break;
}
}
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:26,代码来源:main.php
示例3: espresso_event_export
//.........这里部分代码省略.........
}
if (isset($_REQUEST['today']) && $_REQUEST['today'] == 'true') {
$sql .= " AND start_date = '" . $curdate . "' ";
}
if (isset($_REQUEST['this_month']) && $_REQUEST['this_month'] == 'true') {
$sql .= " AND start_date BETWEEN '" . date('Y-m-d', strtotime($this_year_r . '-' . $this_month_r . '-01')) . "' AND '" . date('Y-m-d', strtotime($this_year_r . '-' . $this_month_r . '-' . $days_this_month)) . "' ";
}
if (function_exists('espresso_member_data') && (espresso_member_data('role') == 'espresso_event_manager' || espresso_member_data('role') == 'espresso_group_admin')) {
$sql .= " AND wp_user = '" . espresso_member_data('id') . "' ";
}
$sql .= ") ORDER BY start_date = '0000-00-00' ASC, start_date ASC, event_name ASC";
ob_start();
//echo $sql;
$today = date("Y-m-d-Hi", time());
$filename = $_REQUEST['all_events'] == "true" ? __('all-events', 'event_espresso') : sanitize_title_with_dashes($event_name);
$filename = $filename . "-" . $today;
switch ($_REQUEST['type']) {
case "csv":
$st = "";
$et = ",";
$s = $et . $st;
header("Content-type: application/x-msdownload");
header("Content-Disposition: attachment; filename=" . $filename . ".csv");
header("Pragma: no-cache");
header("Expires: 0");
echo implode($s, $htables) . "\r\n";
break;
default:
$st = "";
$et = "\t";
$s = $et . $st;
header("Content-Disposition: attachment; filename=" . $filename . ".xls");
header("Content-Type: application/vnd.ms-excel");
header("Pragma: no-cache");
header("Expires: 0");
echo implode($s, $htables) . $et . "\r\n";
break;
}
$events = $wpdb->get_results($sql);
foreach ($events as $event) {
$event_id = $event->event_id;
$event_name = stripslashes_deep($event->event_name);
$event_identifier = stripslashes_deep($event->event_identifier);
$reg_limit = $event->reg_limit;
$registration_start = $event->registration_start;
$start_date = event_date_display($event->start_date, 'Y-m-d');
$end_date = event_date_display($event->end_date, 'Y-m-d');
$is_active = $event->is_active;
$status = array();
$status = event_espresso_get_is_active($event_id);
$recurrence_id = $event->recurrence_id;
$registration_startT = $event->registration_startT;
//Venue variables
if (isset($org_options['use_venue_manager']) && $org_options['use_venue_manager'] == 'Y') {
//$data = new stdClass;
//$data->event->venue_meta = unserialize($event->venue_meta);
//Debug
//echo "<pre>".print_r($data->event->venue_meta,true)."</pre>";
$venue_title = $event->venue_name;
/*$data->event->venue_url = $data->event->venue_meta['website'];
$data->event->venue_phone = $data->event->venue_meta['phone'];
$data->event->venue_image = '<img src="'.$data->event->venue_meta['image'].'" />';
$data->event->address = $data->event->venue_address;
$data->event->address2 = $data->event->venue_address2;
$data->event->city = $data->event->venue_city;
$data->event->state = $data->event->venue_state;
$data->event->zip = $data->event->venue_zip;
$data->event->country = $data->event->venue_country;*/
} else {
$venue_title = $event->venue_title;
/*$event_address = $event->address;
$event_address2 = $event->address2;
$event_city = $event->city;
$event_state = $event->state;
$event_zip = $event->zip;
$event_country = $event->country;
$event_phone = $event->phone;*/
}
$wp_user = $event->wp_user;
//$location = ($event_address != '' ? $event_address :'') . ($event_address2 != '' ? '<br />' . $event_address2 :'') . ($event_city != '' ? '<br />' . $event_city :'') . ($event_state != '' ? ', ' . $event_state :'') . ($event_zip != '' ? '<br />' . $event_zip :'') . ($event_country != '' ? '<br />' . $event_country :'');
$dow = date("D", strtotime($start_date));
echo $event_id . $s . $event_name . $s . $venue_title . $s . $start_date . $s . event_espresso_get_time($event_id, 'start_time') . $s . $dow . $s . str_replace(',', ' ', event_date_display($registration_start, get_option('date_format')));
// ticket 570
if (function_exists('espresso_is_admin') && espresso_is_admin() == true && (isset($espresso_premium) && $espresso_premium == true)) {
$user_company = espresso_user_meta($wp_user, 'company') != '' ? espresso_user_meta($wp_user, 'company') : '';
$user_organization = espresso_user_meta($wp_user, 'organization') != '' ? espresso_user_meta($wp_user, 'organization') : '';
$user_co_org = $user_company != '' ? $user_company : $user_organization;
echo $s . (espresso_user_meta($wp_user, 'user_firstname') != '' ? espresso_user_meta($wp_user, 'user_firstname') . ' ' . espresso_user_meta($wp_user, 'user_lastname') : espresso_user_meta($wp_user, 'display_name'));
}
echo $s . strip_tags($status['display']) . $s . str_replace('/', ' of ', get_number_of_attendees_reg_limit($event_id, 'num_attendees_slash_reg_limit'));
switch ($_REQUEST['type']) {
case "csv":
echo "\r\n";
break;
default:
echo $et . "\r\n";
break;
}
}
}
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:101,代码来源:export.php
示例4: register_attendees
//.........这里部分代码省略.........
$timezone_string = $data->event->timezone_string;
} else {
$timezone_string = get_option('timezone_string');
if (!isset($timezone_string) || $timezone_string == '') {
$timezone_string = 'America/New_York';
}
}
$t = time();
$today = date_at_timezone("Y-m-d H:i A", $timezone_string, $t);
//echo event_date_display($today, get_option('date_format'). ' ' .get_option('time_format')) . ' ' . $timezone_string;
//echo espresso_ddtimezone_simple();
$reg_limit = $data->event->reg_limit;
$additional_limit = $data->event->additional_limit;
//If the coupon code system is intalled then use it
$use_coupon_code = $data->event->use_coupon_code;
//If the groupon code addon is installed, then use it
$use_groupon_code = $data->event->use_groupon_code;
//Set a default value for additional limit
if ($additional_limit == '') {
$additional_limit = '5';
}
$num_attendees = get_number_of_attendees_reg_limit($event_id, 'num_attendees');
//Get the number of attendees
$available_spaces = get_number_of_attendees_reg_limit($event_id, 'available_spaces');
//Gets a count of the available spaces
$number_available_spaces = get_number_of_attendees_reg_limit($event_id, 'number_available_spaces');
//Gets the number of available spaces
//echo $number_available_spaces;
global $all_meta;
$all_meta = array('event_id' => $event_id, 'event_name' => stripslashes_deep($event_name), 'event_desc' => stripslashes_deep($event_desc), 'event_address' => $event_address, 'event_address2' => $event_address2, 'event_city' => $event_city, 'event_state' => $event_state, 'event_zip' => $event_zip, 'event_country' => $event_country, 'venue_title' => $venue_title, 'venue_address' => $venue_address, 'venue_address2' => $venue_address2, 'venue_city' => $venue_city, 'venue_state' => $venue_state, 'venue_country' => $venue_country, 'location' => $location, 'is_active' => $data->event->is_active, 'event_status' => $data->event->event_status, 'contact_email' => empty($data->event->alt_email) ? $org_options['contact_email'] : $data->event->alt_email, 'start_time' => empty($data->event->start_time) ? '' : $data->event->start_time, 'end_time' => empty($data->event->end_time) ? '' : $data->event->end_time, 'registration_startT' => $data->event->registration_startT, 'registration_start' => $data->event->registration_start, 'registration_endT' => $data->event->registration_endT, 'registration_end' => $data->event->registration_end, 'start_date' => event_espresso_no_format_date($start_date, get_option('date_format')), 'end_date' => event_date_display($end_date, get_option('date_format')), 'google_map_link' => $google_map_link);
//print_r($all_meta);
//This function gets the status of the event.
$is_active = array();
$is_active = event_espresso_get_is_active(0, $all_meta);
//echo '<p>'.print_r(event_espresso_get_is_active($event_id, $all_meta)).'</p>';;
if ($org_options['use_captcha'] == 'Y' && empty($_REQUEST['edit_details'])) {
?>
<script type="text/javascript">
var RecaptchaOptions = {
theme : '<?php
echo $org_options['recaptcha_theme'] == '' ? 'red' : $org_options['recaptcha_theme'];
?>
',
lang : '<?php
echo $org_options['recaptcha_language'] == '' ? 'en' : $org_options['recaptcha_language'];
?>
'
};
</script>
<?php
}
//This is the start of the registration form. This is where you can start editing your display.
//(Shows the regsitration form if enough spaces exist)
if ($num_attendees >= $reg_limit) {
?>
<div class="espresso_event_full event-display-boxes" id="espresso_event_full-<?php
echo $event_id;
?>
">
<h3 class="event_title"><?php
echo stripslashes_deep($event_name);
?>
</h3>
<div class="event-messages">
<p class="event_full"><strong><?php
_e('We are sorry but this event has reached the maximum number of attendees!', 'event_espresso');
开发者ID:sriram911,项目名称:pls,代码行数:67,代码来源:registration_page.php
示例5: event_espresso_get_is_active
* [EVENT_LIST limit=1]
* [EVENT_LIST css_class=my-custom-class]
* [EVENT_LIST show_expired=true]
* [EVENT_LIST show_deleted=true]
* [EVENT_LIST show_secondary=false]
* [EVENT_LIST show_recurrence=true]
* [EVENT_LIST category_identifier=your_category_identifier]
*
* Example:
* [EVENT_LIST limit=5 show_recurrence=true category_identifier=your_category_identifier]
*
*/
//Print out the array of event status options
//print_r (event_espresso_get_is_active($event_id));
//Here we can create messages based on the event status. These variables can be echoed anywhere on the page to display your status message.
$status = event_espresso_get_is_active(0, $event_meta);
$status_display = ' - ' . $status['display_custom'];
$status_display_ongoing = $status['status'] == 'ONGOING' ? ' - ' . $status['display_custom'] : '';
$status_display_deleted = $status['status'] == 'DELETED' ? ' - ' . $status['display_custom'] : '';
$status_display_secondary = $status['status'] == 'SECONDARY' ? ' - ' . $status['display_custom'] : '';
//Waitlist event
$status_display_draft = $status['status'] == 'DRAFT' ? ' - ' . $status['display_custom'] : '';
$status_display_pending = $status['status'] == 'PENDING' ? ' - ' . $status['display_custom'] : '';
$status_display_denied = $status['status'] == 'DENIED' ? ' - ' . $status['display_custom'] : '';
$status_display_expired = $status['status'] == 'EXPIRED' ? ' - ' . $status['display_custom'] : '';
$status_display_reg_closed = $status['status'] == 'REGISTRATION_CLOSED' ? ' - ' . $status['display_custom'] : '';
$status_display_not_open = $status['status'] == 'REGISTRATION_NOT_OPEN' ? ' - ' . $status['display_custom'] : '';
$status_display_open = $status['status'] == 'REGISTRATION_OPEN' ? ' - ' . $status['display_custom'] : '';
//You can also display a custom message. For example, this is a custom registration not open message:
$status_display_custom_closed = $status['status'] == 'REGISTRATION_CLOSED' ? ' - <span class="espresso_closed">' . __('Regsitration is Closed', 'event_espresso') . '</span>' : '';
global $this_event_id;
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:31,代码来源:event_list_display.php
示例6: event_espresso_edit_list
//.........这里部分代码省略.........
foreach ($events as $event) {
//printr( $event, '$event <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' );
$event_id = $event->event_id;
$event_name = stripslashes_deep($event->event_name);
$event_identifier = stripslashes_deep($event->event_identifier);
$reg_limit = isset($event->reg_limit) ? $event->reg_limit : '';
$start_date = isset($event->start_date) ? $event->start_date : '';
$start_time = isset($start_times[$event_id]) ? $start_times[$event_id]->start_time : '';
$end_date = isset($event->end_date) ? $event->end_date : '';
$is_active = isset($event->is_active) ? $event->is_active : '';
$status = array();
$recurrence_id = isset($event->recurrence_id) ? $event->recurrence_id : '';
$registration_start = isset($event->registration_start) ? $event->registration_start : '';
$registration_startT = isset($event->registration_startT) ? $event->registration_startT : '';
$event_address = isset($event->address) ? $event->address : '';
$event_address2 = isset($event->address2) ? $event->address2 : '';
$event_city = isset($event->city) ? $event->city : '';
$event_state = isset($event->state) ? $event->state : '';
$event_zip = isset($event->zip) ? $event->zip : '';
$event_country = isset($event->country) ? $event->country : '';
//added new
$venue_title = isset($event->venue_title) ? stripslashes_deep($event->venue_title) : '';
$venue_locale = isset($event->locale_name) ? $event->locale_name : '';
$wp_user = isset($event->wp_user) ? $event->wp_user : '';
$event_meta = array();
$event_meta['is_active'] = $is_active;
$event_meta['event_status'] = $event->event_status;
$event_meta['start_time'] = $start_time;
$event_meta['start_date'] = $start_date;
$event_meta['registration_start'] = $registration_start;
$event_meta['registration_startT'] = $registration_startT;
$registration_end = $event_meta['registration_end'] = $event->registration_end;
$registration_endT = $event_meta['registration_endT'] = $event->registration_endT;
$status = event_espresso_get_is_active($event_id, $event_meta);
//Get number of attendees
$num_attendees = isset($attendees[$event_id]) ? $attendees[$event_id]->quantity : 0;
$location = (!empty($event_address) ? $event_address : '') . (!empty($event_address2) ? '<br />' . $event_address2 : '') . (!empty($event_city) ? '<br />' . $event_city : '') . (!empty($event_state) ? ', ' . $event_state : '') . (!empty($event_zip) ? '<br />' . $event_zip : '') . (!empty($event_country) ? '<br />' . $event_country : '');
$dow = date("D", strtotime($start_date));
ob_start();
?>
<tr>
<td class="check-column" style="padding:7px 0 22px 7px; vertical-align:top;"><!--Delete Events-->
<?php
echo '<input name="checkbox[' . $event_id . ']" type="checkbox" title="Delete Event ' . $event_name . '" />';
?>
</td>
<td class="column-comments" style="padding-top:3px;"><?php
echo $event_id;
?>
</td>
<td class="post-title page-title">
<strong><a class="row-title" href="admin.php?page=events&action=edit&event_id=<?php
echo $event_id;
?>
"><?php
echo $event_name;
?>
</a> <?php
echo $recurrence_id > 0 ? $recurrence_icon : '';
?>
</strong>
<div class="row-actions"><span><a href="<?php
echo espresso_reg_url($event_id);
?>
开发者ID:HandsomeDogStudio,项目名称:peanutbutterplan,代码行数:67,代码来源:event_list.php
示例7: event_espresso_edit_list_widget
function event_espresso_edit_list_widget()
{
global $wpdb, $org_options;
if ($_POST['delete_event']) {
if (is_array($_POST['checkbox'])) {
while (list($key, $value) = each($_POST['checkbox'])) {
$del_id = $key;
event_espresso_delete_event($del_id);
}
}
?>
<div id="message" class="updated fade">
<p><strong>
<?php
_e('Event(s) have been permanently deleted.', 'event_espresso');
?>
</strong></p>
</div>
<?php
}
?>
<form id="form1" name="form1" method="post" action="<?php
echo $_SERVER["REQUEST_URI"];
?>
">
<table id="table" class="widefat fixed" width="100%">
<thead>
<tr>
<th class="manage-column column-title" id="title" scope="col" title="Click to Sort" style="width: 30%;"><?php
_e('Name', 'event_espresso');
?>
</th>
<th class="manage-column column-date" id="start" scope="col" title="Click to Sort" style="width: 30%;"><?php
_e('Date', 'event_espresso');
?>
</th>
<th class="manage-column column-date" id="status" scope="col" title="Click to Sort" style="width: 20%;"><?php
_e('Status', 'event_espresso');
?>
</th>
<th class="manage-column column-date" id="attendees" scope="col" title="Click to Sort" style="width: 15%;"><?php
_e('Attendees', 'event_espresso');
?>
</th>
</tr>
</thead>
<tbody>
<?php
/* Events */
//Get number of total events
$wpdb->query("SELECT id FROM " . EVENTS_DETAIL_TABLE . " WHERE event_status != 'D'");
$total_events = $wpdb->num_rows;
//Get total events today
$wpdb->query("SELECT id FROM " . EVENTS_DETAIL_TABLE . " WHERE event_status != 'D' AND start_date = '" . $curdate . "' ");
$total_events_today = $wpdb->num_rows;
if ($total_events > 0) {
$curdate = date("Y-m-d");
/*$pieces = explode('-',$curdate, 3);
$this_year_r = $pieces[0];
$this_month_r = $pieces[1];
//echo $this_year_r;
$days_this_month = date('t', strtotime($curdate));*/
$days_in_dasboard = $org_options['events_in_dasboard'] == '' ? '30' : stripslashes_deep($org_options['events_in_dasboard']);
$sql = "SELECT e.id event_id, e.event_name, e.event_identifier, e.reg_limit, e.registration_start, ";
$sql .= " e.start_date, e.is_active, e.recurrence_id, e.registration_startT FROM " . EVENTS_DETAIL_TABLE . " e ";
$sql .= " WHERE event_status != 'D' ";
if ($total_events_today > 0) {
$sql .= " AND start_date = '" . $curdate . "' ";
global $how_many_events;
$how_many_events = __('todays\' events', 'event_espresso');
} else {
$sql .= " AND ADDDATE('" . date('Y-m-d') . "', INTERVAL " . $days_in_dasboard . " DAY) >= start_date AND start_date >= '" . date('Y-m-d', strtotime($curdate)) . "' ";
global $how_many_events;
$how_many_events = __("the next {$days_in_dasboard} days of events", 'event_espresso');
}
//$sql .= " WHERE event_status != 'D' AND start_date BETWEEN '".date('Y-m-d', strtotime($this_year_r. '-' .$this_month_r . '-01'))."' AND '".date('Y-m-d', strtotime($this_year_r . '-' .$this_month_r. '-' . $days_this_month))."' ";
$sql .= " ORDER BY e.start_date ASC ";
//echo $sql;
$results = $wpdb->get_results($sql);
foreach ($results as $result) {
$event_id = $result->event_id;
$event_name = stripslashes_deep($result->event_name);
$event_identifier = stripslashes_deep($result->event_identifier);
$reg_limit = $result->reg_limit;
$registration_start = $result->registration_start;
$start_date = $result->start_date;
$end_date = $result->end_date;
$is_active = $result->is_active;
$status = array();
$status = event_espresso_get_is_active($event_id);
$recurrence_id = $result->recurrence_id;
$registration_startT = $result->registration_startT;
?>
<tr>
<td class="post-title page-title column-title"><strong><a class="row-title" href="admin.php?page=events&action=edit&event_id=<?php
echo $event_id;
?>
//.........这里部分代码省略.........
开发者ID:hhgr,项目名称:uksoccer,代码行数:101,代码来源:dashboard_widget.php
示例8: event_espresso_edit_list
//.........这里部分代码省略.........
<?php
}
?>
<th class="manage-column column-date" id="attendees" scope="col" title="Click to Sort" style="width:9%;">
<span><?php
_e('Attendees', 'event_espresso');
?>
</span>
<span class="sorting-indicator"></span>
</th>
<th class="manage-column column-author" id="actions" scope="col" style="width:25%;">
<?php
_e('Actions', 'event_espresso');
?>
</th>
</tr>
</thead>
<tbody>
<?php
if ($total_events > 0) {
foreach ($events as $event) {
//print_r ($event);
$event_id = $event->event_id;
$event_name = stripslashes_deep($event->event_name);
$event_identifier = stripslashes_deep($event->event_identifier);
$reg_limit = isset($event->reg_limit) ? $event->reg_limit : '';
$registration_start = isset($event->registration_start) ? $event->registration_start : '';
$start_date = isset($event->start_date) ? $event->start_date : '';
$end_date = isset($event->end_date) ? $event->end_date : '';
$is_active = isset($event->is_active) ? $event->is_active : '';
$status = array();
$status = event_espresso_get_is_active($event_id);
$recurrence_id = isset($event->recurrence_id) ? $event->recurrence_id : '';
$registration_startT = isset($event->registration_startT) ? $event->registration_startT : '';
$event_address = isset($event->address) ? $event->address : '';
$event_address2 = isset($event->address2) ? $event->address2 : '';
$event_city = isset($event->city) ? $event->city : '';
$event_state = isset($event->state) ? $event->state : '';
$event_zip = isset($event->zip) ? $event->zip : '';
$event_country = isset($event->country) ? $event->country : '';
//added new
$venue_title = isset($event->venue_title) ? $event->venue_title : '';
$venue_locale = isset($event->locale_name) ? $event->locale_name : '';
$wp_user = isset($event->wp_user) ? $event->wp_user : '';
$location = (!empty($event_address) ? $event_address : '') . (!empty($event_address2) ? '<br />' . $event_address2 : '') . (!empty($event_city) ? '<br />' . $event_city : '') . (!empty($event_state) ? ', ' . $event_state : '') . (!empty($event_zip) ? '<br />' . $event_zip : '') . (!empty($event_country) ? '<br />' . $event_country : '');
$dow = date("D", strtotime($start_date));
ob_start();
?>
<tr>
<td class="check-column" style="padding:7px 0 22px 7px; vertical-align:top;"><!--Delete Events-->
<?php
echo '<input name="checkbox[' . $event_id . ']" type="checkbox" title="Delete Event ' . $event_name . '" />';
?>
</td>
<td class="column-comments" style="padding-top:3px;"><?php
echo $event_id;
?>
</td>
<td class="post-title page-title"><strong><a class="row-title" href="admin.php?page=events&action=edit&event_id=<?php
echo $event_id;
?>
"><?php
开发者ID:sriram911,项目名称:pls,代码行数:67,代码来源:event_list.php
示例9: event_espresso_get_status
function event_espresso_get_status($event_id, $event_meta = '')
{
//printr( $event_meta, '$event_meta <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' );
$event_status = event_espresso_get_is_active($event_id, $event_meta);
switch ($event_status['status']) {
case 'EXPIRED':
case 'NOT_ACTIVE':
case 'DELETED':
case 'REGISTRATION_CLOSED':
case 'DENIED':
case 'INVALID':
//case 'REGISTRATION_NOT_OPEN':
return 'NOT_ACTIVE';
break;
case 'PENDING':
case 'DRAFT':
return 'PENDING';
break;
case 'ACTIVE':
case 'ONGOING':
case 'SECONDARY':
case 'REGISTRATION_OPEN':
return 'ACTIVE';
break;
default:
break;
}
}
开发者ID:HandsomeDogStudio,项目名称:peanutbutterplan,代码行数:28,代码来源:main.php
示例10: add_new_attendee
function add_new_attendee($event_id)
{
if (isset($_REQUEST['regevent_action_admin']) && $_REQUEST['regevent_action_admin'] == 'post_attendee') {
require_once EVENT_ESPRESSO_PLUGINFULLPATH . "includes/functions/attendee_functions.php";
require_once EVENT_ESPRESSO_PLUGINFULLPATH . "includes/process-registration/add_attendees_to_db.php";
$attendee_id = event_espresso_add_attendees_to_db();
if ($attendee_id) {
// SEND CONFIRMATION EMAIL MESSAGES
event_espresso_email_confirmations(array('attendee_id' => $attendee_id, 'send_admin_email' => 'true', 'send_attendee_email' => 'true'));
//echo $attendee_id;
?>
<div id="message" class="updated fade">
<p><strong>
<?php
_e('Added Attendee to Database', 'event_espresso');
?>
</strong></p>
</div>
<?php
} else {
global $notifications;
$error_msg = implode($notifications['error'], '<br />');
?>
<div id="message" class="error">
<p>
<strong><?php
echo $error_msg;
?>
</strong>
</p>
</div>
<?php
}
}
wp_register_script('reCopy', EVENT_ESPRESSO_PLUGINFULLURL . "scripts/reCopy.js", false, '1.1.0');
wp_print_scripts('reCopy');
global $wpdb;
$sql = "SELECT * FROM " . EVENTS_DETAIL_TABLE . " WHERE is_active='Y' AND event_status != 'D' AND id = '" . $event_id . "' LIMIT 0,1";
//Build the registration page
if ($wpdb->get_results($sql)) {
$events = $wpdb->get_results($sql);
//These are the variables that can be used throughout the regsitration page
foreach ($events as $event) {
$event_id = $event->id;
$event_name = stripslashes($event->event_name);
$event_desc = stripslashes($event->event_desc);
$display_desc = $event->display_desc;
$event_address = $event->address;
$event_city = $event->city;
$event_state = $event->state;
$event_zip = $event->zip;
$event_description = stripslashes($event->event_desc);
$event_identifier = $event->event_identifier;
$event_cost = isset($event->event_cost) ? $event->event_cost : '';
$member_only = isset($event->member_only) ? $event->member_only : '';
$reg_limit = isset($event->reg_limit) ? $event->reg_limit : '';
$allow_multiple = $event->allow_multiple;
$start_date = $event->start_date;
$end_date = $event->end_date;
$reg_limit = $event->reg_limit;
$additional_limit = $event->additional_limit;
$is_active = array();
$question_groups = unserialize($event->question_groups);
//This function gets the status of the event.
$is_active = event_espresso_get_is_active($event_id);
//If the coupon code system is intalled then use it
if (function_exists('event_espresso_coupon_registration_page')) {
$use_coupon_code = $event->use_coupon_code;
}
//If the groupon code addon is installed, then use it
if (function_exists('event_espresso_groupon_payment_page')) {
$use_groupon_code = $event->use_groupon_code;
}
//Set a default value for additional limit
if ($additional_limit == '') {
$additional_limit = '5';
}
}
//End foreach ($events as $event)
//This is the start of the registration form. This is where you can start editing your display.
$num_attendees = get_number_of_attendees_reg_limit($event_id, 'num_attendees');
//Get the number of attendees
$available_spaces = get_number_of_attendees_reg_limit($event_id, 'available_spaces');
//Gets a count of the available spaces
$number_available_spaces = get_number_of_attendees_reg_limit($event_id, 'number_available_spaces');
//Gets the number of available spaces
?>
<script>$jaer = jQuery.noConflict();
jQuery(document).ready(function($jaer) {
jQuery(function(){
//Registration form validation
jQuery('#espresso-admin-add-new-attendee-frm').validate();
});
});
</script>
<div class="metabox-holder">
<div class="postbox">
<div id="espresso-admin-add-new-attendee-dv">
//.........这里部分代码省略.........
开发者ID:HandsomeDogStudio,项目名称:peanutbutterplan,代码行数:101,代码来源:add_new_attendee.php
示例11: event_espresso_get_event_details
function event_espresso_get_event_details($sql, $css_class = NULL, $allow_override = 0)
{
global $wpdb, $org_options;
//echo 'This page is located in ' . get_option( 'upload_path' );
$event_page_id = $org_options['event_page_id'];
$currency_symbol = isset($org_options['currency_symbol']) ? $org_options['currency_symbol'] : '';
$events = $wpdb->get_results($sql);
$category_id = isset($wpdb->last_result[0]->id) ? $wpdb->last_result[0]->id : '';
$category_name = isset($wpdb->last_result[0]->category_name) ? $wpdb->last_result[0]->category_name : '';
$category_identifier = isset($wpdb->last_result[0]->category_identifier) ? $wpdb->last_result[0]->category_identifier : '';
$category_desc = isset($wpdb->last_result[0]->category_desc) ? html_entity_decode(wpautop($wpdb->last_result[0]->category_desc)) : '';
$display_desc = isset($wpdb->last_result[0]->display_desc) ? $wpdb->last_result[0]->display_desc : '';
/* group recuring events */
$events_type_index = -1;
$events_of_same_type = array();
$last_recurrence_id = null;
/* end group recuring events */
if ($display_desc == 'Y') {
echo '<p id="events_category_name-' . $category_id . '" class="events_category_name">' . stripslashes_deep($category_name) . '</p>';
echo wpautop($category_desc);
}
foreach ($events as $event) {
$event_id = $event->id;
$event_name = $event->event_name;
$event_desc = $event->event_desc;
$event_identifier = $event->event_identifier;
$active = $event->is_active;
$registration_start = $event->registration_start;
$registration_end = $event->registration_end;
$start_date = $event->start_date;
$end_date = $event->end_date;
$reg_limit = $event->reg_limit;
$event_address = $event->address;
$event_address2 = $event->address2;
$event_city = $event->city;
$event_state = $event->state;
$event_zip = $event->zip;
$event_country = $event->country;
$member_only = $event->member_only;
$externalURL = $event->externalURL;
$recurrence_id = $event->recurrence_id;
$allow_overflow = $event->allow_overflow;
$overflow_event_id = $event->overflow_event_id;
//Address formatting
$location = ($event_address != '' ? $event_address : '') . ($event_address2 != '' ? '<br />' . $event_address2 : '') . ($event_city != '' ? '<br />' . $event_city : '') . ($event_state != '' ? ', ' . $event_state : '') . ($event_zip != '' ? '<br />' . $event_zip : '') . ($event_country != '' ? '<br />' . $event_country : '');
//Google map link creation
$google_map_link = espresso_google_map_link(array('address' => $event_address, 'city' => $event_city, 'state' => $event_state, 'zip' => $event_zip, 'country' => $event_country, 'text' => 'Map and Directions', 'type' => 'text'));
//These variables can be used with other the espresso_countdown, espresso_countup, and espresso_duration functions and/or any javascript based functions.
$start_timestamp = espresso_event_time($event_id, 'start_timestamp');
$end_timestamp = espresso_event_time($event_id, 'end_timestamp');
//This can be used in place of the registration link if you are usign the external URL feature
$registration_url = $externalURL != '' ? $externalURL : get_option('siteurl') . '/?page_id=' . $event_page_id . '®event_action=register&event_id=' . $event_id . '&name_of_event=' . stripslashes_deep($event_name);
if (!is_user_logged_in() && get_option('events_members_active') == 'true' && $member_only == 'Y') {
//Display a message if the user is not logged in.
//_e('Member Only Event. Please ','event_espresso') . event_espresso_user_login_link() . '.';
} else {
//Serve up the event list
//As of version 3.0.17 the event lsit details have been moved to event_list_display.php
switch (event_espresso_get_status($event_id)) {
case 'NOT_ACTIVE':
//Don't show the event if any of the above are true
break;
default:
/* skip secondary (waitlist) events */
$event_status = event_espresso_get_is_active($event_id);
if ($event_status['status'] == 'SECONDARY') {
break;
}
/* group recuring events */
$is_new_event_type = $last_recurrence_id == 0 || $last_recurrence_id != $recurrence_id;
if ($is_new_event_type) {
$events_type_index++;
$events_of_same_type[$events_type_index] = array();
}
$event_data = array('event_id' => $event_id, 'event_page_id' => $event_page_id, 'event_name' => $event_name, 'event_desc' => $event_desc, 'start_date' => $start_date, 'end_date' => $end_date, 'reg_limit' => $reg_limit, 'registration_url' => $registration_url, 'overflow_event_id' => $overflow_event_id);
array_push($events_of_same_type[$events_type_index], $event_data);
$last_recurrence_id = $recurrence_id;
// include('event_list_display.php');
break;
}
}
}
/* group recuring events */
foreach ($events_of_same_type as $events_group) {
include 'event_list_display.php';
}
/* end group recuring events */
//Check to see how many database queries were performed
//echo '<p>Database Queries: ' . get_num_queries() .'</p>';
}
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:90,代码来源:event_list.php
示例12: get_number_of_attendees_reg_limit
$additional_limit = '5';
}
$num_attendees = get_number_of_attendees_reg_limit($event_id, 'num_attendees');
//Get the number of attendees
$available_spaces = get_number_of_attendees_reg_limit($event_id, 'available_spaces');
//Gets a count of the available spaces
$number_available_spaces = get_number_of_attendees_reg_limit($event_id, 'number_available_spaces');
//Gets the number of available spaces
//echo $number_available_spaces;
global $all_meta;
$all_meta = array('event_name' => '<p class="section-title">' . stripslashes_deep($event_name) . '</span>', 'event_desc' => stripslashes_deep($event_desc), 'event_address' => $event_address, 'event_address2' => $event_address2, 'event_city' => $event_city, 'event_state' => $event_state, 'event_zip' => $event_zip, 'event_country' => $event_country, 'venue_title' => '<span class="section-title">' . $venue_title . '</span>', 'venue_address' => $venue_address, 'venue_address2' => $venue_address2, 'venue_city' => $venue_city, 'venue_state' => $venue_state, 'venue_country' => $venue_country, 'is_active' => $data->event->is_active, 'event_status' => $data->event->event_status, 'start_time' => $data->event->start_time, 'start_time' => empty($data->event->start_time) ? '' : $data->event->start_time, 'registration_startT' => $data->event->registration_startT, 'registration_start' => $data->event->registration_start, 'registration_endT' => $data->event->registration_endT, 'registration_end' => $data->event->registration_end, 'event_address' => empty($data->event->event_address) ? '' : $data->event->event_address, 'start_date' => '<span class="section-title">' . event_espresso_no_format_date($start_date, get_option('date_format')) . '</span>', 'end_date' => '<span class="section-title">' . event_date_display($end_date, get_option('date_format')) . '</span>', 'google_map_link' => $google_map_link);
$registration_url = $externalURL != '' ? $externalURL : espresso_reg_url($event_id);
//print_r($all_meta);
//This function gets the status of the event.
$is_active = array();
$is_active = event_espresso_get_is_active(0, $all_meta);
}
/**
* this is the original database stuff
*/
/*
$sql = "SELECT * FROM " .EVENTS_DETAIL_TABLE. " WHERE event_status != 'D' AND id = " . $event_id;
if ($wpdb->get_results($sql)){
$events = $wpdb->get_results($sql);
foreach ($events as $event){ //These are the variables that can be used throughout the regsitration page
$event_id = $event->id;
$event_name = stripslashes_deep($event->event_name);
$event_desc = stripslashes_deep($event->event_desc);
$display_desc = $event->display_desc;
$event_address = $event->address;
开发者ID:HandsomeDogStudio,项目名称:peanutbutterplan,代码行数:31,代码来源:event_post.php
示例13: event_espresso_get_event_details
//.........这里部分代码省略.........
$event_address = $event->address;
$event_address2 = $event->address2;
$event_city = $event->city;
$event_state = $event->state;
$event_zip = $event->zip;
$event_country = $event->country;
$member_only = $event->member_only;
$externalURL = $event->externalURL;
$recurrence_id = $event->recurrence_id;
$display_reg_form = $event->display_reg_form;
$allow_overflow = $event->allow_overflow;
$overflow_event_id = $event->overflow_event_id;
$event_desc = array_shift(explode('<!--more-->', $event_desc));
global $event_meta;
$event_meta = unserialize($event->event_meta);
$event_meta['is_active'] = $event->is_active;
$event_meta['event_status'] = $event->event_status;
$event_meta['start_time'] = empty($event->start_time) ? '' : $event->start_time;
$event_meta['start_date'] = $event->start_date;
$event_meta['registration_start'] = $event->registration_start;
$event_meta['registration_startT'] = $event->registration_startT;
$event_meta['registration_end'] = $event->registration_end;
$event_meta['registration_endT'] = $event->registration_endT;
//Venue information
if ($org_options['use_venue_manager'] == 'Y') {
$event_address = empty($event->venue_address) ? '' : $event->venue_address;
$event_address2 = empty($event->venue_address2) ? '' : $event->venue_address2;
$event_city = empty($event->venue_city) ? '' : $event->venue_city;
$event_state = empty($event->venue_state) ? '' : $event->venue_state;
$event_zip = empty($event->venue_zip) ? '' : $event->venue_zip;
$event_country = empty($event->venue_country) ? '' : $event->venue_country;
//Leaving these variables intact, just in case people want to use them
$venue_title = empty($event->venue_name) ? '' : $event->venue_name;
$venue_address = $event_address;
$venue_address2 = $event_address2;
$venue_city = $event_cit
|
请发表评论