Server :
Apache
System :
Linux webd003.cluster126.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User :
atwiofrxug (73666)
PHP Version :
8.4.10
Disable Functions :
_dyuweyrj4,_dyuweyrj4r,dl
Current Directory :
/home/atwiofrxug/mylittletelaviv/wp-content/plugins/dpProEventCalendar/includes/
Directory Status:
Writeable | Document Root:
Writeable
Upload File
Viewing: /home/atwiofrxug/mylittletelaviv/wp-content/plugins/dpProEventCalendar/includes/export_bookings.php
<?php
//Include Configuration
require_once (dirname (__FILE__) . '/../../../../wp-load.php');
global $dpProEventCalendar, $wpdb, $table_prefix;
if(!is_user_logged_in()) {
die();
}
if(!current_user_can('edit_others_posts') || !is_numeric($_GET['event_id']) || $_GET['event_id'] < 0) {
die();
}
$event_id = $_GET['event_id'];
header("Content-type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=bookings_".$event_id.".xls");
?>
<table class="widefat" cellpadding="0" cellspacing="0" id="sort-table">
<thead>
<tr style="cursor:default !important;">
<th><?php _e('Name','dpProEventCalendar'); ?></th>
<th><?php _e('Email','dpProEventCalendar'); ?></th>
<th><?php _e('Booking Date','dpProEventCalendar'); ?></th>
<th><?php _e('Event Date','dpProEventCalendar'); ?></th>
<?php if($event_id == 0) {?>
<th><?php _e('Event Name','dpProEventCalendar'); ?></th>
<?php }?>
<th><?php _e('Quantity','dpProEventCalendar'); ?></th>
<th><?php _e('Phone','dpProEventCalendar'); ?></th>
<th><?php _e('Comment','dpProEventCalendar'); ?></th>
<th><?php _e('Extra Fields','dpProEventCalendar'); ?></th>
<th><?php _e('Status','dpProEventCalendar'); ?></th>
</tr>
</thead>
<tbody>
<?php
$id_list = $event_id;
if(function_exists('icl_object_id') && $event_id > 0) {
global $sitepress;
if(is_object($sitepress)) {
$id_list_arr = array();
$trid = $sitepress->get_element_trid($event_id, 'post_pec-events');
$translation = $sitepress->get_element_translations($trid, 'post_pec-events');
foreach($translation as $key) {
$id_list_arr[] = $key->element_id;
}
if(!empty($id_list_arr)) {
$id_list = implode(",", $id_list_arr);
}
}
}
$booking_count = 0;
$querystr = "
SELECT *
FROM $table_name_booking";
if($event_id > 0) {
$querystr .= "
WHERE id_event IN(".$id_list.")";
}
$querystr .= "
ORDER BY booking_date ASC
";
$bookings_obj = $wpdb->get_results($querystr, OBJECT);
foreach($bookings_obj as $booking) {
if(is_numeric($booking->id_user) && $booking->id_user > 0) {
$userdata = get_userdata($booking->id_user);
$userdata->display_name = $userdata->display_name . "(".$userdata->user_login." - ".$userdata->user_url.")";
} else {
$userdata = new stdClass();
$userdata->display_name = $booking->name;
$userdata->user_email = $booking->email;
}
$status = "";
switch($booking->status) {
case '':
$status = __( 'Completed', 'dpProEventCalendar' );
break;
case 'pending':
$status = __( 'Pending', 'dpProEventCalendar' );
break;
case 'canceled_by_user':
$status = __( 'Canceled By User', 'dpProEventCalendar' );
break;
case 'canceled':
$status = __( 'Canceled', 'dpProEventCalendar' );
break;
}
?>
<tr>
<td><?php echo $userdata->display_name?></td>
<td><?php echo $userdata->user_email?></td>
<td><?php echo date_i18n(get_option('date_format') . ' '. get_option('time_format'), strtotime($booking->booking_date))?></td>
<td><?php echo date_i18n(get_option('date_format'), strtotime($booking->event_date))?></td>
<?php if($event_id == 0) {?>
<th><?php echo get_the_title($booking->id_event); ?></th>
<?php }?>
<td><?php echo $booking->quantity?></td>
<td><?php echo $booking->phone?></td>
<td><?php echo nl2br($booking->comment)?></td>
<td>
<?php
$extra_fields = unserialize($booking->extra_fields);
if(!is_array($extra_fields))
$extra_fields = array();
$html = '';
foreach($extra_fields as $key=>$value) {
$field_index = array_keys($dpProEventCalendar['booking_custom_fields']['id'], str_replace('pec_custom_', '', $key));
if(is_array($field_index)) {
$field_index = $field_index[0];
} else {
$field_index = '';
}
if($value != "" && is_numeric($field_index)) {
if($dpProEventCalendar['booking_custom_fields']['type'][$field_index] == 'checkbox') {
$value = __('Yes', 'dpProEventCalendar');
}
$html .= '<div class="pec_event_page_custom_fields">
<strong>'.$dpProEventCalendar['booking_custom_fields']['name'][$field_index].': </strong>'.$value;
$html .= '</div>';
}
}
echo $html;
?>
</td>
<td><?php echo $status?></td>
</tr>
<?php
$booking_count++;
}
if($booking_count == 0) {
echo '<tr><td colspan="5"><p>'.__( 'No Booking Found.', 'dpProEventCalendar' ).'</p></td></tr>';
}?>
</tbody>
<tfoot>
<tr style="cursor:default !important;">
<th><?php _e('Name','dpProEventCalendar'); ?></th>
<th><?php _e('Email','dpProEventCalendar'); ?></th>
<th><?php _e('Booking Date','dpProEventCalendar'); ?></th>
<th><?php _e('Event Date','dpProEventCalendar'); ?></th>
<?php if($event_id == 0) {?>
<th><?php _e('Event Name','dpProEventCalendar'); ?></th>
<?php }?>
<th><?php _e('Quantity','dpProEventCalendar'); ?></th>
<th><?php _e('Phone','dpProEventCalendar'); ?></th>
<th><?php _e('Comment','dpProEventCalendar'); ?></th>
<th><?php _e('Extra Fields','dpProEventCalendar'); ?></th>
<th><?php _e('Status','dpProEventCalendar'); ?></th>
</tr>
</tfoot>
</table>
Cyb3r Drag0nz Team • Google Edition