コード例 #1
0
function espresso_calendar_config_mnu()
{
    global $espresso_calendar, $notices;
    /* Calendar */
    function espresso_calendar_updated()
    {
    }
    if (isset($_POST['update_calendar']) && check_admin_referer('espresso_form_check', 'update_calendar')) {
        $espresso_calendar['espresso_page_post'] = $_POST['espresso_page_post'];
        $espresso_calendar['espresso_calendar_header'] = $_POST['espresso_calendar_header'];
        $espresso_calendar['espresso_calendar_buttonText'] = $_POST['espresso_calendar_buttonText'];
        $espresso_calendar['espresso_calendar_firstday'] = $_POST['espresso_calendar_firstday'];
        $espresso_calendar['espresso_calendar_weekends'] = $_POST['espresso_calendar_weekends'];
        $espresso_calendar['espresso_calendar_height'] = $_POST['espresso_calendar_height'];
        $espresso_calendar['enable_calendar_thumbs'] = $_POST['enable_calendar_thumbs'];
        $espresso_calendar['show_tooltips'] = $_POST['show_tooltips'];
        $espresso_calendar['show_time'] = $_POST['show_time'];
        $espresso_calendar['time_format'] = $_POST['time_format_custom'];
        $espresso_calendar['espresso_use_pickers'] = $_POST['espresso_use_pickers'];
        $espresso_calendar['ee_event_background'] = !empty($_POST['ee_event_background']) ? $_POST['ee_event_background'] : $espresso_calendar['ee_event_background'];
        $espresso_calendar['ee_event_text_color'] = !empty($_POST['ee_event_text_color']) ? $_POST['ee_event_text_color'] : $espresso_calendar['ee_event_text_color'];
        $espresso_calendar['enable_cat_classes'] = $_POST['enable_cat_classes'];
        //$espresso_calendar['use_themeroller'] = $_POST['use_themeroller'];
        $espresso_calendar['espresso_calendar_titleFormat'] = $_POST['espresso_calendar_titleFormat'];
        $espresso_calendar['espresso_calendar_columnFormat'] = $_POST['espresso_calendar_columnFormat'];
        $espresso_calendar['espresso_calendar_monthNames'] = $_POST['espresso_calendar_monthNames'];
        $espresso_calendar['espresso_calendar_monthNamesShort'] = $_POST['espresso_calendar_monthNamesShort'];
        $espresso_calendar['espresso_calendar_dayNames'] = $_POST['espresso_calendar_dayNames'];
        $espresso_calendar['espresso_calendar_dayNamesShort'] = $_POST['espresso_calendar_dayNamesShort'];
        $espresso_calendar['calendar_pages'] = $_POST['calendar_pages'] == '' ? 0 : $_POST['calendar_pages'];
        update_option('espresso_calendar_settings', $espresso_calendar);
        add_action('admin_notices', 'espresso_calendar_updated');
        $notices['updates'][] = __('The calendar settings were saved ', 'event_espresso');
    }
    if (!empty($_REQUEST['reset_calendar']) && check_admin_referer('espresso_form_check', 'reset_calendar_nonce')) {
        delete_option("espresso_calendar_settings");
        espresso_calendar_install();
        $notices['updates'][] = __('The calendar settings were reset ', 'event_espresso');
    }
    $espresso_calendar = get_option('espresso_calendar_settings');
    $values = array(array('id' => false, 'text' => __('No', 'event_espresso')), array('id' => true, 'text' => __('Yes', 'event_espresso')));
    ################## Begin admin settings screen ###########################
    ?>
	<div id="ee-calendar-settings" class="wrap meta-box-sortables ui-sortable">
		<div id="icon-options-event" class="icon32"> </div>
		<h2>
		<?php 
    _e('Event Espresso - Calendar Settings', 'event_espresso');
    ?>
		</h2>
	<?php 
    ob_start();
    ?>
		<form class="espresso_form" method="post" action="<?php 
    echo $_SERVER['REQUEST_URI'];
    ?>
">
			<div class="metabox-holder">
				<div class="postbox">
					<div title="Click to toggle" class="handlediv"><br />
					</div>
					<h3 class="hndle">
	<?php 
    _e('Calendar Usage', 'event_espresso');
    ?>
					</h3>
					<div class="inside">
						<div class="padding">
							<ul>
								<li> <strong>
									<?php 
    _e('Directions:', 'event_espresso');
    ?>
									</strong><br />
	<?php 
    _e(' Add [ESPRESSO_CALENDAR] to any page or post to display a calendar of Event Espresso events. Use [ESPRESSO_CALENDAR event_category_id="your_category_identifier"] to show events of a certain category (also creates a CSS using the category_identifier as the class name.) Use [ESPRESSO_CALENDAR show_expired="true"] to show expired events, can also be used inconjunction with the category ID.', 'event_espresso');
    ?>
								</li>
								<li><strong>
	<?php 
    _e('Examples Shortcodes:', 'event_espresso');
    ?>
									</strong><br />
									[ESPRESSO_CALENDAR]<br />
									[ESPRESSO_CALENDAR show_expired="true"]<br />
									[ESPRESSO_CALENDAR event_category_id="your_category_identifier"]<br />
									[ESPRESSO_CALENDAR event_category_id="your_category_identifier" show_expired="true"]<br />
									[ESPRESSO_CALENDAR cal_view="month"] (Available parameters: month, basicWeek, basicDay, agendaWeek, agendaDay) </li>
								<li><strong>
									<?php 
    _e('Styles/Colors:', 'event_espresso');
    ?>
									</strong><br />
	<?php 
    _e('To edit the calendar styles, copy the CSS file located in the plugin folder to your "wp-content/uploads/espresso/" directory. Then edit as needed. Refer to <a href="http://arshaw.com/fullcalendar/docs/event_rendering/Colors/" target="_blank">this page</a> for an example of styling the calendar and colors.', 'event_espresso');
    ?>
								</li>
								<li><strong>
									<?php 
    _e('Category Colors:', 'event_espresso');
    ?>
									</strong><br />
	<?php 
    _e('Event Categories can have their own colors on the calendar. To use this feature, simply create a class in theme CSS file with the names of your event categories. For more inforamtion <a href="http://eventespresso.com/forums/?p=650" target="_blank">please visit the tutorial</a> for this topic.', 'event_espresso');
    ?>
								</li>
							</ul>
						</div>
						<!-- / .padding -->
					</div>
					<!-- / .inside -->
				</div>
				<!-- / .postbox -->
			</div>
			<!-- / .metabox-holder -->

			<!-- Calendar basic settings metabox -->
			<div class="metabox-holder">
				<div class="postbox">
					<div title="Click to toggle" class="handlediv"><br />
					</div>
					<h3 class="hndle">
	<?php 
    _e('Basic Settings', 'event_espresso');
    ?>
					</h3>
					<div class="inside">
						<div class="padding">
							<h4>
	<?php 
    _e('Time/Date Settings', 'event_espresso');
    ?>
							</h4>
							<table class="form-table">
								<tbody>
									<tr>
										<th> <label for="show_time">
	<?php 
    _e('Show Event Time in Calendar', 'event_espresso');
    ?>
											</label>
										</th>
										<td><?php 
    echo select_input('show_time', $values, $espresso_calendar['show_time'], 'id="show_time"');
    ?>
</td>
									</tr>
									<tr>
										<th><label for="time_format"><?php 
    _e('Time Format');
    ?>
</label></th>
										<td><?php 
    $espresso_calendar['time_format'] = empty($espresso_calendar['time_format']) ? get_option('time_format') : $espresso_calendar['time_format'];
    $time_formats = apply_filters('time_formats', array(__('g:i a'), 'ga', 'g:i A', 'gA', 'H:i'));
    $custom = true;
    foreach ($time_formats as $format) {
        echo "\t<label title='" . esc_attr($format) . "'><input type='radio' name='time_format' value='" . esc_attr($format) . "'";
        if ($espresso_calendar['time_format'] === $format) {
            // checked() uses "==" rather than "==="
            echo " checked='checked'";
            $custom = false;
        }
        echo ' /> <span>' . date_i18n($format) . "</span></label><br />\n";
    }
    echo '	<label><input type="radio" name="time_format" id="time_format_custom_radio" value="\\c\\u\\s\\t\\o\\m"';
    checked($custom);
    echo '/> ' . __('Custom:') . ' </label> <input type="text" name="time_format_custom" value="' . esc_attr($espresso_calendar['time_format']) . '" class="small-text" /> ';
    echo '<span class="example"> ' . date_i18n($espresso_calendar['time_format']) . "</span> <img class='ajax-loading' src='" . esc_url(admin_url('images/wpspin_light.gif')) . "' alt='' />";
    ?>
											<br />
											<span class="description"><a href="http://codex.wordpress.org/Formatting_Date_and_Time">
	<?php 
    _e('Documentation on date and time formatting', 'event_espresso');
    ?>
												</a></span></td>
									</tr>
									<tr>
										<th> <label for="espresso_calendar_firstday">
	<?php 
    _e('First Day of the Week', 'event_espresso');
    ?>
											</label>
										</th>
										<td><input id="espresso_calendar_firstday" type="text" name="espresso_calendar_firstday" size="10" maxlength="1" value="<?php 
    echo $espresso_calendar['espresso_calendar_firstday'];
    ?>
" />
											<br />
											<span class="description">
	<?php 
    _e('(Sunday=0, Monday=1, Tuesday=2, etc.)', 'event_espresso');
    ?>
											</span></td>
									</tr>
									<tr>
										<th> <label for="espresso_calendar_weekends">
	<?php 
    _e('Show Weekends', 'event_espresso');
    ?>
											</label>
										</th>
										<td><?php 
    echo select_input('espresso_calendar_weekends', $values, $espresso_calendar['espresso_calendar_weekends'], 'id="espresso_calendar_weekends"');
    ?>
</td>
									</tr>
								</tbody>
							</table>
							<h4>
	<?php 
    _e('Page Settings', 'event_espresso');
    ?>
							</h4>
							<table class="form-table">
								<tbody>
									<tr>
										<th> <label for="espresso_calendar_height">
	<?php 
    _e('Height', 'event_espresso');
    ?>
											</label>
										</th>
										<td><input id="espresso_calendar_height" type="text" name="espresso_calendar_height" size="100" maxlength="100" value="<?php 
    echo $espresso_calendar['espresso_calendar_height'];
    ?>
" />
											<br />
											<span class="description">
	<?php 
    _e('Will make the entire calendar (including header) a pixel height.', 'event_espresso');
    ?>
											</span></td>
									</tr>
									<tr>
										<th> <label for="calendar_pages">
	<?php 
    _e('Page(s) Displaying the Calendar', 'event_espresso');
    ?>
											</label>
										</th>
										<td><input id="calendar_pages" type="text" name="calendar_pages" size="100" maxlength="100" value="<?php 
    echo $espresso_calendar['calendar_pages'] == '' ? 0 : $espresso_calendar['calendar_pages'];
    ?>
" />
											<br />
											<span class="description">
	<?php 
    _e('This tells the plugin to load the calendar CSS file on specific pages. This should be a comma seperated list of page ids.', 'event_espresso');
    ?>
											</span></td>
									</tr>
									<tr>
										<th> <label for="calendar_page_post">
	<?php 
    _e('Link to Post or Registration Page', 'event_espresso');
    ?>
											</label>
										</th>
										<td><?php 
    echo select_input('espresso_page_post', array(array('id' => 'R', 'text' => __('Registration Page', 'event_espresso')), array('id' => 'P', 'text' => __('Post', 'event_espresso'))), $espresso_calendar['espresso_page_post'], 'id="calendar_page_post"');
    ?>
 <br />
											<span class="description">
	<?php 
    _e('If you are using the "Create a Post" feature. Use this option to link to the posts that are created by Event Espresso.', 'event_espresso');
    ?>
											</span></td>
									</tr>
									<tr>
										<th> <label for="enable-calendar-thumbs">
	<?php 
    _e('Enable Images in Calendar', 'event_espresso');
    ?>
											</label>
										</th>
										<td><?php 
    echo select_input('enable_calendar_thumbs', $values, $espresso_calendar['enable_calendar_thumbs'], 'id="enable-calendar-thumbs"');
    ?>
											</li></td>
									</tr>
								</tbody>
							</table>
							<h4>
	<?php 
    _e('Theme Settings', 'event_espresso');
    ?>
							</h4>

							<table class="form-table">
								<tbody>
									<tr>
										<th> <label for="espresso_use_pickers">
	<?php 
    _e('Use Color Pickers', 'event_espresso');
    ?>
											</label>
										</th>
										<td><?php 
    echo select_input('espresso_use_pickers', $values, $espresso_calendar['espresso_use_pickers'], 'id="espresso_use_pickers"');
    ?>
</td>
									</tr>
									<tr class="color-picker-selections">
										<th class="color-picker-style"> <label for="background-color">
	<?php 
    _e('Event Background Color', 'event_espresso');
    ?>
											</label>
										</th>
										<td><input id="background-color"type="text" name="ee_event_background" <?php 
    echo isset($espresso_calendar['ee_event_background']) && !empty($espresso_calendar['ee_event_background']) ? 'value="' . $espresso_calendar['ee_event_background'] . '"' : 'value="#486D96"';
    ?>
 /><div id="colorpicker-1"></div></td>
									</tr>
									<tr class="color-picker-selections">
										<th class="color-picker-style"> <label for="text-color">
	<?php 
    _e('Event Text Color', 'event_espresso');
    ?>
											</label>
										</th>
										<td><input id="text-color" type="text" name="ee_event_text_color" <?php 
    echo isset($espresso_calendar['ee_event_text_color']) && !empty($espresso_calendar['ee_event_text_color']) ? 'value="' . $espresso_calendar['ee_event_text_color'] . '"' : 'value="#ebe6e8"';
    ?>
 /><div id="colorpicker-2"></div></td>
									</tr>


									<tr>
										<th>
											<label for="show_tooltips">
	<?php 
    _e('Show Tooltips', 'event_espresso');
    ?>
											</label>
										</th>
										<td>
	<?php 
    echo select_input('show_tooltips', $values, $espresso_calendar['show_tooltips'], 'id="show_tooltips"');
    ?>
										</td>
									</tr>

									<tr>
										<th> <label for="enable-cat-classes">
	<?php 
    _e('Enable CSS for Categories', 'event_espresso');
    ?>
											</label>
										</th>
										<td><?php 
    echo select_input('enable_cat_classes', $values, $espresso_calendar['enable_cat_classes'], 'id="enable-cat-classes"');
    ?>
</td>
									</tr>
								</tbody>
							</table>
							<p>
								<input class="button-primary" type="submit" name="save_calendar_settings" value="<?php 
    _e('Save Calendar Options', 'event_espresso');
    ?>
" id="save_calendar_settings2" />
	<?php 
    wp_nonce_field('espresso_form_check', 'update_calendar');
    ?>
							</p>
						</div>
						<!-- / .padding -->
					</div>
					<!-- / .inside -->
				</div>
				<!-- / .postbox -->
			</div>
			<!-- / .metabox-holder -->

			<!-- Advanced settings metabox -->
			<div class="metabox-holder">
				<div class="postbox">
					<h3 class="hndle">
	<?php 
    _e('Advanced Settings', 'event_espresso');
    ?>
					</h3>
					<div class="inside">
						<div class="padding">
							<table class="form-table">
								<tbody>
									<tr>
										<th><?php 
    _e('Header Style', 'event_espresso');
    ?>
</th>
										<td><textarea name="espresso_calendar_header" id="espresso_calendar_header" cols="30" rows="5"><?php 
    echo htmlentities(stripslashes_deep($espresso_calendar['espresso_calendar_header']));
    ?>
</textarea>
											<br />
											<span class="description">
	<?php 
    _e('Defines the buttons and title at the top of the calendar.', 'event_espresso');
    ?>
											</span></td>
									</tr>
									<tr>
										<th><?php 
    _e('Button Text', 'event_espresso');
    ?>
</th>
										<td><textarea name="espresso_calendar_buttonText" id="espresso_calendar_buttonText" cols="30" rows="5"><?php 
    echo htmlentities(stripslashes_deep($espresso_calendar['espresso_calendar_buttonText']));
    ?>
</textarea>
											<br />
											<span class="description">
	<?php 
    _e('Text that will be displayed on buttons of the header.', 'event_espresso');
    ?>
											</span></td>
									</tr>
									<tr>
										<th><?php 
    _e('Title Format', 'event_espresso');
    ?>
</th>
										<td><textarea name="espresso_calendar_titleFormat" id="espresso_calendar_titleFormat" cols="30" rows="5"><?php 
    echo htmlentities(stripslashes_deep($espresso_calendar['espresso_calendar_titleFormat']));
    ?>
</textarea>
											<br />
											<span class="description">
	<?php 
    _e('Determines the text that will be displayed in the header\'s title.', 'event_espresso');
    ?>
											</span></td>
									</tr>
									<tr>
										<th><?php 
    _e('Column Format', 'event_espresso');
    ?>
</th>
										</th>
										<td><textarea name="espresso_calendar_columnFormat" id="espresso_calendar_columnFormat" cols="30" rows="5"><?php 
    echo htmlentities(stripslashes_deep($espresso_calendar['espresso_calendar_columnFormat']));
    ?>
</textarea>
											<br />
											<span class="description">
	<?php 
    _e('Determines the text that will be displayed on the calendar\'s column headings.', 'event_espresso');
    ?>
											</span></td>
									</tr>
									<tr>
										<th><?php 
    _e('Month Names', 'event_espresso');
    ?>
</th>
										<td><textarea name="espresso_calendar_monthNames" id="espresso_calendar_monthNames" cols="30" rows="5"><?php 
    echo stripslashes_deep($espresso_calendar['espresso_calendar_monthNames']);
    ?>
</textarea>
											<br />
											<span class="description">
	<?php 
    _e('Full names of months.', 'event_espresso');
    ?>
											</span></td>
									</tr>
									<tr>
										<th><?php 
    _e('Month Names Short', 'event_espresso');
    ?>
</th>
										<td><textarea name="espresso_calendar_monthNamesShort" id="espresso_calendar_monthNamesShort" cols="30" rows="5"><?php 
    echo stripslashes_deep($espresso_calendar['espresso_calendar_monthNamesShort']);
    ?>
</textarea>
											<br />
											<span class="description">
	<?php 
    _e('Abbreviated names of months.', 'event_espresso');
    ?>
											</span></td>
									</tr>
									<tr>
										<th><?php 
    _e('Day Names', 'event_espresso');
    ?>
</th>
										<td><textarea name="espresso_calendar_dayNames" id="espresso_calendar_dayNames" cols="30" rows="5"><?php 
    echo stripslashes_deep($espresso_calendar['espresso_calendar_dayNames']);
    ?>
</textarea>
											<br />
											<span class="description">
	<?php 
    _e('Full names of days-of-week.', 'event_espresso');
    ?>
											</span></td>
									</tr>
									<tr>
										<th><?php 
    _e('Day Names Short', 'event_espresso');
    ?>
</th>
										<td><textarea name="espresso_calendar_dayNamesShort" id="espresso_calendar_dayNamesShort" cols="30" rows="5"><?php 
    echo stripslashes_deep($espresso_calendar['espresso_calendar_dayNamesShort']);
    ?>
</textarea>
											<br />
											<span class="description">
	<?php 
    _e('Abbreviated names of days-of-week.', 'event_espresso');
    ?>
											</span></td>
									</tr>
								</tbody>
							</table>
							<input type="hidden" name="update_calendar" value="update" />
							<p>
								<input class="button-primary" type="submit" name="Submit" value="<?php 
    _e('Save Calendar Options', 'event_espresso');
    ?>
" id="save_calendar_settings_1" />
	<?php 
    wp_nonce_field('espresso_form_check', 'update_calendar');
    ?>
							</p>
							<p>
								<?php 
    _e('Reset Calendar Settings?', 'event_espresso');
    ?>
								<input name="reset_calendar" type="checkbox" />
	<?php 
    wp_nonce_field('espresso_form_check', 'reset_calendar_nonce');
    ?>
							</p>
						</div>
						<!-- / .padding -->
					</div>
					<!-- / .inside -->
				</div>
				<!-- / .postbox -->
			</div>
			<!-- / .metabox-holder -->
			<!--</li>
	</ul>-->
		</form>
		<?php 
    $main_post_content = ob_get_clean();
    espresso_choose_layout($main_post_content, event_espresso_display_right_column());
    include_once 'calendar_help.php';
    ?>

	</div>
	<!-- / #wrap -->
	<script type="text/javascript">
		//<![CDATA[
		jQuery(document).ready(function($){
			$("input[name='time_format']").click(function(){
				if ( "time_format_custom_radio" != $(this).attr("id") )
					$("input[name='time_format_custom']").val( $(this).val() ).siblings('.example').text( $(this).siblings('span').text() );
			});
			$("input[name='time_format_custom']").focus(function(){
				$("#time_format_custom_radio").attr("checked", "checked");
			});

			// disable color picker & thumb sizes inputs & fade if not use controls true
			window.scp = $('select#espresso_use_pickers option:selected').val();
			window.ect = $('select#enable-calendar-thumbs option:selected').val();

			if(window.scp == ''){
				$('input#event-background, input#event-text').attr('disabled', true);
				$('.color-picker-style').attr('style', "opacity: .3");
				$('tr.color-picker-selections th, tr.color-picker-selections td').attr('style', "opacity: .3");
			}
			if(window.ect == 'false'){
				$('tr#thumbnail-sizes td input').attr('disabled', true);
				$('tr#thumbnail-sizes').attr('style', "opacity: .3");
			}
			$('select#enable-calendar-thumbs').change(function(){
				window.ect = $('select#enable-calendar-thumbs option:selected').val();
				if(window.ect == 'false'){
					$('tr#thumbnail-sizes td input').attr('disabled', true);
					$('tr#thumbnail-sizes').attr('style', "opacity: .3");
				}else{
					$('tr#thumbnail-sizes td input').removeAttr('disabled', true);
					$('tr#thumbnail-sizes').removeAttr('style', "opacity: .3");
				}
			});
			$('select#espresso_use_pickers').change(function(){
				window.scp = $('select#espresso_use_pickers option:selected').val();
				if(window.scp == ''){
					$('input#event-background, input#event-text').attr('disabled', true);
					$('tr.color-picker-selections th, tr.color-picker-selections td').attr('style', "opacity: .3");
				}else {
					$('input#event-background, input#event-text').removeAttr('disabled', true);
					$('tr.color-picker-selections th, tr.color-picker-selections td').removeAttr('style');
				}
			});

			// color picker initialization
			$('#colorpicker-1').hide();
			$('#colorpicker-2').hide();
			$('#colorpicker-1').farbtastic("#background-color");
			$('#colorpicker-2').farbtastic("#text-color");
			$("#background-color").click(function(){$('#colorpicker-1').slideToggle()});
			$("#text-color").click(function(){$('#colorpicker-2').slideToggle()});

			// WP toggle function
			postboxes.add_postbox_toggles('espresso_calendar');

		});

		//]]>
	</script>
	<?php 
}
コード例 #2
0
function event_espresso_gateways_options()
{
    global $active_gateways;
    $active_gateways = get_option('event_espresso_active_gateways', array());
    ?>
	<div id="event_reg_theme" class="wrap">
		<div id="icon-options-event" class="icon32"></div>
		<h2><?php 
    _e('Manage Payment Gateways', 'event_espresso');
    ?>
</h2>
		<?php 
    ob_start();
    ?>
		<div id="payment_settings" class="meta-box-sortables ui-sortables">
			<?php 
    $gateways_glob = glob(EVENT_ESPRESSO_PLUGINFULLPATH . "gateways/*/settings.php");
    $upload_gateways_glob = glob(EVENT_ESPRESSO_GATEWAY_DIR . '*/settings.php');
    if (!is_array($upload_gateways_glob)) {
        $upload_gateways_glob = array();
    }
    foreach ($upload_gateways_glob as $upload_gateway) {
        $pos = strpos($upload_gateway, 'gateways');
        $sub = substr($upload_gateway, $pos);
        foreach ($gateways_glob as &$gateway) {
            $pos2 = strpos($gateway, 'gateways');
            $sub2 = substr($gateway, $pos2);
            if ($sub == $sub2) {
                $gateway = $upload_gateway;
            }
        }
        unset($gateway);
    }
    $gateways = array_merge($upload_gateways_glob, $gateways_glob);
    $gateways = array_unique($gateways);
    foreach ($gateways as $gateway) {
        require_once $gateway;
    }
    do_action('action_hook_espresso_display_gateway_settings');
    if (file_exists(EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/gateway_developer.php')) {
        require_once EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/gateway_developer.php';
    }
    global $espresso_premium;
    if ($espresso_premium != true) {
        ?>
				<h2><?php 
        _e('Need more payment options?', 'event_espresso');
        ?>
<a href="http://eventespresso.com/features/payment-options/" target="_blank"><?php 
        _e('Upgrade Now!', 'event_espresso');
        ?>
</a></h2>
			<?php 
    }
    ?>
		</div><!-- / .meta-box-sortables -->
		<?php 
    $post_content = ob_get_clean();
    espresso_choose_layout('', event_espresso_display_right_column(), $post_content);
    ?>
	</div><!-- / #wrap -->
	<div id="button_image" style="display:none">
		<h2><?php 
    _e('Button Image URL', 'event_espresso');
    ?>
</h2>
		<p><?php 
    _e('A default payment button is provided. A custom payment button may be used, choose your image or upload a new one, and just copy the "file url" here (optional.)', 'event_espresso');
    ?>
</p>
	</div>
	<div id="bypass_confirmation" style="display:none">
		<h2><?php 
    _e('Bypassing the Confirmation Page', 'event_espresso');
    ?>
</h2>
		<p><?php 
    _e('This will allow you to send your customers directly to the payment gateway of your choice.', 'event_espresso');
    ?>
</p>
	</div>
	<div id="force_ssl_return" style="display:none">
		<h2><?php 
    _e('Force HTTPS on Return URL', 'event_espresso');
    ?>
</h2>
		<p><?php 
    _e('Forces the gateway provider to send the customer back to the return page -- or pull the return page from the site -- using HTTPS.  This is required in some instances to prevent a warning that the page the user is going to is not secure.', 'event_espresso');
    ?>
</p>
	</div>
	<div id="display_header" style="display:none">
		<h2><?php 
    _e('Display a Form Header', 'event_espresso');
    ?>
</h2>
		<p><?php 
    _e('Select if you would like to display a header above the payment form.', 'event_espresso');
    ?>
</p>
	</div>
	<script type="text/javascript" charset="utf-8">
		//<![CDATA[
		jQuery(document).ready(function() {
			postboxes.add_postbox_toggles("payment_gateways");
		});
		//]]>
	</script>
	<script type='text/javascript'>
		// Uploading files
		var file_frame;

		jQuery('.upload_image_button').live('click', function( event ){

			var button = this;
			event.preventDefault();

			// Create the media frame.
			file_frame = wp.media.frames.file_frame = wp.media({
				title: jQuery( this ).data( 'uploader_title' ),
				button: {
					text: jQuery( this ).data( 'uploader_button_text' ),
				},
				multiple: false  // Set to true to allow multiple files to be selected
			});

			// When an image is selected, run a callback.
			file_frame.on( 'select', function() {
				// We set multiple to false so only get one image from the uploader
				attachment = file_frame.state().get('selection').first().toJSON();

				// Do something with attachment.id and/or attachment.url here
				jQuery( button ).siblings( '.upload_url_input').val(attachment.url);
				jQuery( button ).parent().next().children('img').prop('src', attachment.url);
			});

			// Finally, open the modal
			file_frame.open();
		});
	</script>
	<?php 
}
コード例 #3
0
ファイル: organization_config.php プロジェクト: sriram911/pls
function organization_config_mnu()
{
    global $org_options, $espresso_premium, $espresso_check_for_updates;
    if (isset($_POST['update_org'])) {
        $org_options['organization'] = isset($_POST['org_name']) && !empty($_POST['org_name']) ? stripslashes_deep($_POST['org_name']) : '';
        $org_options['organization_street1'] = isset($_POST['org_street1']) && !empty($_POST['org_street1']) ? $_POST['org_street1'] : '';
        $org_options['organization_street2'] = isset($_POST['org_street2']) && !empty($_POST['org_street2']) ? $_POST['org_street2'] : '';
        $org_options['organization_city'] = isset($_POST['org_city']) && !empty($_POST['org_city']) ? $_POST['org_city'] : '';
        $org_options['organization_state'] = isset($_POST['org_state']) && !empty($_POST['org_state']) ? $_POST['org_state'] : '';
        $org_options['organization_zip'] = isset($_POST['org_zip']) && !empty($_POST['org_zip']) ? $_POST['org_zip'] : '';
        $org_options['organization_country'] = isset($_POST['org_country']) && !empty($_POST['org_country']) ? $_POST['org_country'] : '';
        $org_options['contact_email'] = isset($_POST['email']) && !empty($_POST['email']) ? $_POST['email'] : '';
        $org_options['expire_on_registration_end'] = isset($_POST['expire_on_registration_end']) && !empty($_POST['expire_on_registration_end']) ? $_POST['expire_on_registration_end'] : '';
        $org_options['event_page_id'] = isset($_POST['event_page_id']) && !empty($_POST['event_page_id']) ? $_POST['event_page_id'] : '';
        $org_options['return_url'] = isset($_POST['return_url']) && !empty($_POST['return_url']) ? $_POST['return_url'] : '';
        $org_options['cancel_return'] = isset($_POST['cancel_return']) && !empty($_POST['cancel_return']) ? $_POST['cancel_return'] : '';
        $org_options['notify_url'] = isset($_POST['notify_url']) && !empty($_POST['notify_url']) ? $_POST['notify_url'] : '';
        $org_options['events_in_dasboard'] = isset($_POST['events_in_dasboard']) && !empty($_POST['events_in_dasboard']) ? $_POST['events_in_dasboard'] : '';
        $org_options['default_mail'] = isset($_POST['default_mail']) && !empty($_POST['default_mail']) ? $_POST['default_mail'] : '';
        $org_options['payment_subject'] = isset($_POST['payment_subject']) && !empty($_POST['payment_subject']) ? $_POST['payment_subject'] : '';
        $org_options['payment_message'] = isset($_POST['payment_message']) && !empty($_POST['payment_message']) ? esc_html($_POST['payment_message']) : '';
        $org_options['message'] = isset($_POST['success_message']) && !empty($_POST['success_message']) ? esc_html($_POST['success_message']) : '';
        $org_options['email_before_payment'] = isset($_POST['email_before_payment']) && !empty($_POST['email_before_payment']) ? $_POST['email_before_payment'] : '';
        $org_options['email_fancy_headers'] = isset($_POST['email_fancy_headers']) && !empty($_POST['email_fancy_headers']) ? $_POST['email_fancy_headers'] : '';
        $org_options['use_captcha'] = isset($_POST['use_captcha']) && !empty($_POST['use_captcha']) ? $_POST['use_captcha'] : '';
        $org_options['recaptcha_publickey'] = isset($_POST['recaptcha_publickey']) && !empty($_POST['recaptcha_publickey']) ? $_POST['recaptcha_publickey'] : '';
        $org_options['recaptcha_privatekey'] = isset($_POST['recaptcha_privatekey']) && !empty($_POST['recaptcha_privatekey']) ? $_POST['recaptcha_privatekey'] : '';
        $org_options['recaptcha_theme'] = isset($_POST['recaptcha_theme']) && !empty($_POST['recaptcha_theme']) ? $_POST['recaptcha_theme'] : '';
        $org_options['recaptcha_width'] = isset($_POST['recaptcha_width']) && !empty($_POST['recaptcha_width']) ? $_POST['recaptcha_width'] : '';
        $org_options['recaptcha_language'] = isset($_POST['recaptcha_language']) && !empty($_POST['recaptcha_language']) ? $_POST['recaptcha_language'] : '';
        $org_options['espresso_dashboard_widget'] = isset($_POST['espresso_dashboard_widget']) && !empty($_POST['espresso_dashboard_widget']) ? $_POST['espresso_dashboard_widget'] : '';
        $org_options['time_reg_limit'] = isset($_POST['time_reg_limit']) && !empty($_POST['time_reg_limit']) ? $_POST['time_reg_limit'] : '';
        $org_options['skip_confirmation_page'] = isset($_POST['skip_confirmation_page']) ? $_POST['skip_confirmation_page'] : 'N';
        $org_options['allow_mer_discounts'] = isset($_POST['allow_mer_discounts']) ? $_POST['allow_mer_discounts'] : 'N';
        $org_options['allow_mer_vouchers'] = isset($_POST['allow_mer_vouchers']) ? $_POST['allow_mer_vouchers'] : 'N';
        $org_options['use_attendee_pre_approval'] = isset($_POST['use_attendee_pre_approval']) && !empty($_POST['use_attendee_pre_approval']) ? $_POST['use_attendee_pre_approval'] : '';
        if (!empty($_POST['event_ssl_active'])) {
            $org_options['event_ssl_active'] = isset($_POST['event_ssl_active']) && !empty($_POST['event_ssl_active']) ? $_POST['event_ssl_active'] : '';
        }
        $org_options['show_pending_payment_options'] = isset($_POST['show_pending_payment_options']) && !empty($_POST['show_pending_payment_options']) ? $_POST['show_pending_payment_options'] : '';
        $org_options['use_venue_manager'] = isset($_POST['use_venue_manager']) && !empty($_POST['use_venue_manager']) ? $_POST['use_venue_manager'] : '';
        $org_options['use_personnel_manager'] = isset($_POST['use_personnel_manager']) && !empty($_POST['use_personnel_manager']) ? $_POST['use_personnel_manager'] : '';
        $org_options['use_event_timezones'] = isset($_POST['use_event_timezones']) && !empty($_POST['use_event_timezones']) ? $_POST['use_event_timezones'] : '';
        $org_options['full_logging'] = isset($_POST['full_logging']) && !empty($_POST['full_logging']) ? $_POST['full_logging'] : '';
        $org_options['surcharge'] = isset($_POST['surcharge']) && !empty($_POST['surcharge']) ? $_POST['surcharge'] : '';
        $org_options['surcharge_type'] = isset($_POST['surcharge_type']) && !empty($_POST['surcharge_type']) ? $_POST['surcharge_type'] : '';
        $org_options['surcharge_text'] = isset($_POST['surcharge_text']) && !empty($_POST['surcharge_text']) ? $_POST['surcharge_text'] : '';
        $org_options['show_reg_footer'] = isset($_POST['show_reg_footer']) && !empty($_POST['show_reg_footer']) ? $_POST['show_reg_footer'] : '';
        $org_options['affiliate_id'] = isset($_POST['affiliate_id']) && !empty($_POST['affiliate_id']) ? $_POST['affiliate_id'] : '';
        $org_options['site_license_key'] = isset($_POST['site_license_key']) && !empty($_POST['site_license_key']) ? $_POST['site_license_key'] : '';
        $org_options['default_payment_status'] = isset($_POST['default_payment_status']) && !empty($_POST['default_payment_status']) ? $_POST['default_payment_status'] : '';
        $org_options['default_logo_url'] = isset($_REQUEST['upload_image']) && !empty($_REQUEST['upload_image']) ? $_REQUEST['upload_image'] : '';
        $currency_format = getCountryFullData($org_options['organization_country']);
        switch ($currency_format['iso_code_3']) {
            case 'USA':
                $org_options['currency_symbol'] = '$';
                // US Dollar
                break;
            case 'CHE':
                $org_options['currency_symbol'] = 'Fr.';
                // Swiss Franc
                break;
            case 'AUS':
                $org_options['currency_symbol'] = 'A$';
                // Australian Dollar
                break;
            case 'GBR':
                $org_options['currency_symbol'] = '&pound;';
                // British Pound
                break;
            case 'NOR':
                $org_options['currency_symbol'] = 'kr';
                // Norwegian Krone
                break;
            case 'BRA':
                $org_options['currency_symbol'] = 'R$';
                // Brazillian Real
                break;
            case 'CAN':
                $org_options['currency_symbol'] = 'C$';
                // Canadian Dollar
                break;
            case 'JPN':
                $org_options['currency_symbol'] = '&yen;';
                // Japanese Yen
                break;
            case 'SWE':
                $org_options['currency_symbol'] = 'kr';
                // Swedish Krona
                break;
            case 'DNK':
                $org_options['currency_symbol'] = 'kr';
                // Danish Krone
                break;
            case 'ZAF':
                $org_options['currency_symbol'] = 'R';
                // South African Rand
                break;
            case 'IND':
                $org_options['currency_symbol'] = 'Rs';
                // Indian Rupee
                break;
            case 'TUR':
                $org_options['currency_symbol'] = 'TL';
                // Turkish Lira
                break;
            case 'NZL':
                $org_options['currency_symbol'] = 'NZ$';
                // New Zealand Dollar
                break;
            case 'HKG':
                $org_options['currency_symbol'] = 'HK$';
                // Hong Kong Dollar
                break;
            case 'SGP':
                $org_options['currency_symbol'] = 'S$';
                // Singapore Dollar
                break;
            case 'POL':
                $org_options['currency_symbol'] = 'zl';
                // Polish Zloty (hex code: z&#x0142;)
                break;
            case 'HUN':
                $org_options['currency_symbol'] = 'Ft';
                // Hungarian Forint
                break;
            case 'CZE':
                $org_options['currency_symbol'] = 'Kc';
                // Czech Koruna (hex code: K&#x10D;)
                break;
            case 'ISR':
                $org_options['currency_symbol'] = 'ILS';
                // Israeli Shekel (hex code: &#8362;)
                break;
            case 'MEX':
                $org_options['currency_symbol'] = 'Mex$';
                // Mexican Peso
                break;
            case 'MYS':
                $org_options['currency_symbol'] = 'RM';
                // Malaysian Ringgit
                break;
            case 'PHL':
                $org_options['currency_symbol'] = 'PhP';
                // Phillipine Peso (hex code: &#x20b1;)
                break;
            case 'TWN':
                $org_options['currency_symbol'] = 'NT$';
                // New Taiwan Dollar
                break;
            case 'THA':
                $org_options['currency_symbol'] = 'THB';
                // Thai Baht (hex code: &#xe3f;)
                break;
            case 'AUT' || 'BEL' || 'CYP' || 'EST' || 'FIN' || 'FRA' || 'DEU' || 'GRC' || 'IRL' || 'ITA' || 'LUX' || 'MLT' || 'NLD' || 'PRT' || 'SVK' || 'SVN' || 'ESP' || 'AND' || 'MCO' || 'SMR' || 'VAT' | 'MYT' || 'MNE' || 'XKV' || 'SPM':
                $org_options['currency_symbol'] = 'EUR';
                // use the Euro for all eurozone countries
                break;
            default:
                $org_options['currency_symbol'] = '$';
                break;
        }
        /* if (getCountryZoneId($org_options['organization_country']) == '2') {
        	  $org_options['currency_symbol'] = 'Euro: '; //Creates the symbol for the Euro
        	  } */
        update_option('events_organization_settings', $org_options);
        echo '<div id="message" class="updated fade"><p><strong>' . __('Organization details saved.', 'event_espresso') . '</strong></p></div>';
    }
    $org_options = get_option('events_organization_settings');
    $values = array(array('id' => 'Y', 'text' => __('Yes', 'event_espresso')), array('id' => 'N', 'text' => __('No', 'event_espresso')));
    ?>
	<div class="wrap columns-2">
		<div id="icon-options-event" class="icon32"> </div>
		<h2>
			<?php 
    _e('General Settings', 'event_espresso');
    ?>
		</h2>
		<?php 
    ob_start();
    ?>
		<div class="meta-box-sortables ui-sortable">
			<form class="espresso_form" method="post" action="<?php 
    echo $_SERVER['REQUEST_URI'];
    ?>
">
				<ul id="event_espresso-sortables">
					<li>
						<div class="metabox-holder">
							<div class="postbox">
								<div title="Click to toggle" class="handlediv"><br />
								</div>
								<h3 class="hndle">
									<?php 
    _e('Organization Settings', 'event_espresso');
    ?>
								</h3>
								<div class="inside">
									<div class="padding">
									<h4>
											<?php 
    _e('Company Logo', 'event_espresso');
    ?>
										</h4>
											<ul>
												<li><label for="upload_image">
															<?php 
    _e('Add a Default Logo', 'event_espresso');
    ?>
															<a class="thickbox" href="#TB_inline?height=300&width=400&inlineId=espresso_default_logo_info"><img src="<?php 
    echo EVENT_ESPRESSO_PLUGINFULLURL;
    ?>
/images/question-frame.png" width="16" height="16" /></a></label>
															<div id="default-logo-image">
															<?php 
    $org_options['default_logo_url'] = isset($org_options['default_logo_url']) ? $org_options['default_logo_url'] : '';
    ?>
															<input id="upload_image" type="hidden" size="36" name="upload_image" value="<?php 
    echo $org_options['default_logo_url'];
    ?>
" />
															<input id="upload_image_button" type="button" value="Upload Image" />
															<?php 
    if ($org_options['default_logo_url'] != '') {
        ?>
																<p class="default-logo-thumb"><img src="<?php 
        echo $org_options['default_logo_url'];
        ?>
" alt="" /><br />
																<a id="remove-image" href="#" title="Remove this image" onclick="return false;"><?php 
        _e('Remove Image', 'event_espresso');
        ?>
</a></p>
															<?php 
    }
    ?>
														</div>
														<div id="espresso_default_logo_info" class="pop-help" style="display:none">
															<h2>
																<?php 
    _e('Default Logo', 'event_espresso');
    ?>
															</h2>
															<p><?php 
    echo __('The default logo will be used in your custom invoice, ticketing, certificates, and payment templates.', 'event_espresso');
    ?>
</p>
														</div>
														</li>
														<li><h4><?php 
    _e('Contact Information', 'event_espresso');
    ?>
</h4></li>									
											<li>
												<label for="org_name">
													<?php 
    _e('Organization Name:', 'event_espresso');
    ?>
												</label>
												<input type="text" name="org_name" size="45" value="<?php 
    echo stripslashes_deep($org_options['organization']);
    ?>
" />
											</li>
											<li>
												<label for="org_street1">
													<?php 
    _e('Organization Street 1:', 'event_espresso');
    ?>
												</label>
												<input type="text" name="org_street1" size="45" value="<?php 
    echo $org_options['organization_street1'];
    ?>
" />
											</li>
											<li>
												<label for="org_street2">
													<?php 
    _e('Organization Street 2:', 'event_espresso');
    ?>
												</label>
												<input type="text" name="org_street2" size="45" value="<?php 
    echo $org_options['organization_street2'];
    ?>
" />
											</li>
											<li>
												<label for="org_city">
													<?php 
    _e('Organization City:', 'event_espresso');
    ?>
												</label>
												<input type="text" name="org_city" size="45" value="<?php 
    echo $org_options['organization_city'];
    ?>
" />
											</li>
											<li>
												<label for="org_state">
													<?php 
    _e('Organization State:', 'event_espresso');
    ?>
												</label>
												<input type="text" name="org_state" size="45" value="<?php 
    echo $org_options['organization_state'];
    ?>
" />
											</li>
											<li>
												<label for="org_zip">
													<?php 
    _e('Organization Zip/Postal Code:', 'event_espresso');
    ?>
												</label>
												<input type="text" name="org_zip" size="10" value="<?php 
    echo $org_options['organization_zip'];
    ?>
" />
											</li>
											<li>
												<label for="org_country">
													<?php 
    _e('Organization Country:', 'event_espresso');
    ?>
												</label>
												<?php 
    printCountriesSelector("org_country", $org_options['organization_country']);
    ?>
 (<?php 
    echo $org_options['currency_symbol'];
    ?>
)</li>
											<li>
												<label for="email">
													<?php 
    _e('Primary contact email:', 'event_espresso');
    ?>
												</label>
												<input type="text" name="email" size="45" value="<?php 
    echo $org_options['contact_email'];
    ?>
" />
											</li>
											<li>
												<h4>
													<?php 
    _e('Time and Date Settings', 'event_espresso');
    ?>
												</h4>
											</li >
											<li class="time-date">
												<p> <span class="run-in">
														<?php 
    _e('Current Time: ', 'event_espresso');
    ?>
													</span><span class="current-date"> <?php 
    echo date(get_option('date_format') . ' ' . get_option('time_format'));
    ?>
 </span><a class="change-date-time" href="options-general.php" target="_blank">
														<?php 
    _e('Change timezone and date format settings?', 'event_espresso');
    ?>
													</a> </p>
												<p> <span class="important">
														<?php 
    _e('Note:', 'event_espresso');
    ?>
													</span>
													<?php 
    _e('You must set the time zone for your city, or the city closest to you. UTC time will not work.', 'event_espresso');
    ?>
													<a href="http://ee-updates.s3.amazonaws.com/images/time-zone-settings-example.jpg" class="thickbox">View an example?</a> </p>
											</li>
											
										</ul>
										
										<p>
											<input class="button-primary" type="submit" name="Submit" value="<?php 
    _e('Save Options', 'event_espresso');
    ?>
" id="save_organization_saetting_1" />
										</p>
									</div>
								</div>
							</div>
						</div>
					</li>
					<li>
						<div class="metabox-holder">
							<div class="postbox">
								<div title="Click to toggle" class="handlediv"><br />
								</div>
								<h3 class="hndle">
									<?php 
    _e('Page Settings', 'event_espresso');
    ?>
								</h3>
								<div class="inside">
									<div class="padding"> <a name="page_settings" id="page_settings"></a>
										<?php 
    if (empty($org_options['event_page_id']) || empty($org_options['return_url']) || empty($org_options['notify_url']) || empty($org_options['cancel_return'])) {
        espresso_create_default_pages();
    }
    //Check to see if we are using the deprecated SSL option. If we are, recommend updating to WordPress HTTPS (SSL).
    if (!empty($org_options['event_ssl_active']) && $espresso_premium == true && $org_options['event_ssl_active'] == 'Y') {
        echo '<div id="ssl-reg" style="background-color: #ffffe0; border: #e6db55 1px solid; padding:4px;">';
        echo '<p><strong>' . __('Attention!', 'event_espresso') . '</strong><br />' . __('The Secure Payment System has been removed.', 'event_espresso') . '</p>';
        echo '<p>' . __('If your site uses SSL to handle secure transactions. Please install the <a href="http://ee-updates.s3.amazonaws.com/espresso-https.1.0.zip" title="Download Now">Event Espresso SSL/HTTPS</a> plugin now.', 'event_espresso') . ' ' . __('<a href="http://eventespresso.com/forums/2011/09/use-wordpress-https-for-ssl-encryption-on-your-event-espresso-site/" target="_blank">More information here</a>.', 'event_espresso') . '</p>';
        $ssl_values = array(array('id' => 'N', 'text' => __('Yes', 'event_espresso')), array('id' => 'Y', 'text' => __('No', 'event_espresso')));
        ?>
											<label for="event_ssl_active">
												<?php 
        _e('Turn off this message?', 'event_espresso');
        ?>
											</label>
											<br />
											<?php 
        echo select_input('event_ssl_active', $ssl_values, $org_options['event_ssl_active']);
        echo '</div>';
    }
    ?>
										<p>
											<?php 
    _e('The following shortcodes and page settings are required for Event Espresso to function properly. These shortcodes should not be replaced with any other shortcodes. Please view <a href="admin.php?page=support#shortcodes">this page</a> for a list of optional shortcodes.', 'event_espresso');
    ?>
										</p>
										<p>
											<label for="event_page_id">
												<?php 
    _e('Main registration page:', 'event_espresso');
    ?>
											</label>
											<select name="event_page_id">
												<option value="0">
													<?php 
    _e('Main page', 'event_espresso');
    ?>
												</option>
												<?php 
    parent_dropdown($default = $org_options['event_page_id']);
    ?>
											</select>
											<a class="thickbox" href="#TB_inline?height=300&width=400&inlineId=registration_page_info"><img src="<?php 
    echo EVENT_ESPRESSO_PLUGINFULLURL;
    ?>
/images/question-frame.png" width="16" height="16" /></a><br />
											<span class="messages"><?php 
    echo sprintf(__("This page should contain the %s shortcode. <br />This page can be hidden from navigation if desired, <br />but should always contain the %s shortcode.", 'event_espresso'), '<span class="highlight">[ESPRESSO_EVENTS]</span>', '[ESPRESSO_EVENTS]');
    ?>
)</span></p>
										<?php 
    ###### Popup help box #######
    ?>
										<div id="registration_page_info" class="pop-help" style="display:none">
											<h2>
												<?php 
    _e('Main Events Page', 'event_espresso');
    ?>
											</h2>
											<p><?php 
    echo sprintf(__('This is the page that displays your events and doubles as your registration page. It is very important that this page always contains the %s shortcode.', 'event_espresso'), '<strong>[ESPRESSO_EVENTS]</strong>');
    ?>
</p>
											<p><?php 
    echo sprintf(__("This page should ALWAYS contain the %s shortcode.", 'event_espresso'), '<strong>[ESPRESSO_EVENTS]</strong>');
    ?>
</p>
										</div>
										<?php 
    ###### close popup help box ######
    ?>
										<p>
											<label for="return_url">
												<?php 
    _e('Auto Return URL (Thank You and Return Payment page):', 'event_espresso');
    ?>
											</label>
											<select name="return_url">
												<option value="0">
													<?php 
    _e('Main page', 'event_espresso');
    ?>
												</option>
												<?php 
    parent_dropdown($default = $org_options['return_url']);
    ?>
											</select>
											<a class="thickbox" href="#TB_inline?height=300&width=400&inlineId=return_url_info" target="_blank"><img src="<?php 
    echo EVENT_ESPRESSO_PLUGINFULLURL;
    ?>
/images/question-frame.png" width="16" height="16" /></a><br />
											<span class="messages">(<?php 
    echo sprintf(__("This page should contain the %s shortcode.<br />This page should hidden from your navigation,<br />but still viewable to the public (not password protected.)", 'event_espresso'), '<span class="highlight">[ESPRESSO_PAYMENTS]</span>');
    ?>
 </span></p>
										<?php 
    ##### Popup help box #####
    ?>
										<div id="return_url_info" class="pop-help" style="display:none">
											<h2>
												<?php 
    _e('Auto Return URL', 'event_espresso');
    ?>
											</h2>
											<p>
												<?php 
    _e('The URL to which the payer\'s browser is redirected after completing the payment; for example, a URL on your site that displays a "Thank you for your payment" page.', 'event_espresso');
    ?>
											</p>
											<p><?php 
    echo sprintf(__("This page should contain the %s shortcode.", 'event_espresso'), '<strong>[ESPRESSO_PAYMENTS]</strong>');
    ?>
</p>
											<p><em class="important"><b>
														<?php 
    _e('ATTENTION:', 'event_espresso');
    ?>
													</b><br />
													<?php 
    _e('This page should be hidden from from your navigation menu. Exclude pages by using the "Exclude Pages" plugin from http://wordpress.org/extend/plugins/exclude-pages/ or using the "exclude" parameter in your "wp_list_pages" template tag. Please refer to http://codex.wordpress.org/Template_Tags/wp_list_pages for more inforamation about excluding pages.', 'event_espresso');
    ?>
												</em> </p>
										</div>
										<?php 
    ##### close popup help #####
    ?>
										<p>
											<label for="cancel_return">
												<?php 
    _e('Cancel Return URL (used for cancelled payments):', 'event_espresso');
    ?>
											</label>
											<select name="cancel_return">
												<option value="0">
													<?php 
    _e('Main page', 'event_espresso');
    ?>
												</option>
												<?php 
    parent_dropdown($default = $org_options['cancel_return']);
    ?>
											</select>
											<a class="thickbox" href="#TB_inline?height=300&width=400&inlineId=cancel_return_info"><img src="<?php 
    echo EVENT_ESPRESSO_PLUGINFULLURL;
    ?>
/images/question-frame.png" width="16" height="16" /></a><br />
											<span class="messages">(
												<?php 
    echo sprintf(__("This should be a page on your website that contains a cancelled message %s and the %s shortcode. This page should hidden %s from your navigation, but still viewable to the public (not password protected.)", 'event_espresso'), '<br />', '<span class="highlight">[ESPRESSO_CANCELLED]</span>', '<br />');
    ?>
												)</span></p>
										<?php 
    ##### popup help box #####
    ?>
										<div id="cancel_return_info" class="pop-help" style="display:none">
											<h2>
												<?php 
    _e('Cancel Return URL', 'event_espresso');
    ?>
											</h2>
											<p>
												<?php 
    _e('A URL to which the payer\'s browser is redirected if payment is cancelled; for example, a URL on your website that displays a "Payment Canceled" page.', 'event_espresso');
    ?>
											</p>
											<p>
												<?php 
    echo sprintf(__("This should be a page on your website that contains a cancelled message and the %s shortcode.", 'event_espresso'), '<strong>[ESPRESSO_CANCELLED]</strong>');
    ?>
											</p>
											<p><em class="important"><b>
														<?php 
    _e('ATTENTION:', 'event_espresso');
    ?>
													</b><br />
													<?php 
    _e('This page should be hidden from from your navigation menu. Exclude pages by using the "Exclude Pages" plugin from http://wordpress.org/extend/plugins/exclude-pages/ or using the "exclude" parameter in your "wp_list_pages" template tag. Please refer to http://codex.wordpress.org/Template_Tags/wp_list_pages for more inforamation about excluding pages.', 'event_espresso');
    ?>
												</em></p>
										</div>
										<?php 
    ##### close popup help box #####
    ?>
										<p>
											<label for="notify_url">
												<?php 
    _e('Notify URL (used to process payments):', 'event_espresso');
    ?>
											</label>
											<select name="notify_url">
												<option value="0">
													<?php 
    _e('Main page', 'event_espresso');
    ?>
												</option>
												<?php 
    parent_dropdown($default = $org_options['notify_url']);
    ?>
											</select>
											<a class="thickbox" href="#TB_inline?height=300&width=400&inlineId=notify_url_info"><img src="<?php 
    echo EVENT_ESPRESSO_PLUGINFULLURL;
    ?>
/images/question-frame.png" width="16" height="16" /></a><br />
											<span class="messages">(<?php 
    echo sprintf(__("This page should contain the %s shortcode.<br />This page should hidden from your navigation, <br />but still viewable to the public (not password protected.)", 'event_espresso'), '<span class="highlight">[ESPRESSO_TXN_PAGE]</span>');
    ?>
</span></p>
										<?php 
    ##### popup help box #####
    ?>
										<div id="notify_url_info" class="pop-help" style="display:none">
											<h2>
												<?php 
    _e('Notify URL', 'event_espresso');
    ?>
											</h2>
											<p>
												<?php 
    _e('The URL to which PayPal posts information about the transaction, in the form of Instant Payment Notification messages.', 'event_espresso');
    ?>
											</p>
											<p> <?php 
    echo sprintf(__('This page should contain the %s shortcode.', 'event_espresso'), '<strong>[ESPRESSO_TXN_PAGE]</strong>');
    ?>
 </p>
											<p><em class="important"><b>
														<?php 
    _e('ATTENTION:', 'event_espresso');
    ?>
													</b><br />
													<?php 
    _e('This page should be hidden from from your navigation menu. Exclude pages by using the "Exclude Pages" plugin from http://wordpress.org/extend/plugins/exclude-pages/ or using the "exclude" parameter in your "wp_list_pages" template tag. Please refer to http://codex.wordpress.org/Template_Tags/wp_list_pages for more inforamation about excluding pages.', 'event_espresso');
    ?>
												</em> </p>
										</div>
										<p>
											<input class="button-primary" type="submit" name="Submit" value="<?php 
    _e('Save Options', 'event_espresso');
    ?>
" id="save_organization_saetting_2" />
										</p>
									</div>
								</div>
							</div>
						</div>
					</li>
					<li>
						<div class="metabox-holder">
							<div class="postbox">
								<div title="Click to toggle" class="handlediv"><br />
								</div>
								<h3 class="hndle">
									<?php 
    _e('Email Settings', 'event_espresso');
    ?>
								</h3>
								<div class="inside">
									<div class="padding"><a name="email-settings" id="email-settings"></a>
										<?php 
    $values = array(array('id' => 'Y', 'text' => __('Yes', 'event_espresso')), array('id' => 'N', 'text' => __('No', 'event_espresso')));
    ?>
										<p>
											<?php 
    _e('Send payment confirmation emails?', 'event_espresso');
    echo select_input('default_mail', $values, $org_options['default_mail']);
    ?>
										</p>
										<p>
											<?php 
    _e('Send registration confirmation emails before payment is received?', 'event_espresso');
    echo select_input('email_before_payment', $values, $org_options['email_before_payment']);
    ?>
										</p>
										<p>
	<?php 
    _e('Use fancy email headers?', 'event_espresso');
    echo select_input('email_fancy_headers', $values, $org_options['email_fancy_headers']);
    ?>
											<a class="thickbox" href="#TB_inline?height=300&width=400&inlineId=fancyemailheaders"><img src="<?php 
    echo EVENT_ESPRESSO_PLUGINFULLURL;
    ?>
/images/question-frame.png" width="16" height="16" /></a>
										</p>
												<?php 
    ###### Popup help box #######
    ?>
										<div id="fancyemailheaders" class="pop-help" style="display:none">
											<h2>
	<?php 
    _e('Fancy Email Headers', 'event_espresso');
    ?>
											</h2>
											<p><?php 
    echo sprintf(__("This option enables the use of the email header format %s From: name %s %s Reply-to: name %s %s.", 'event_espresso'), '<br />', '&lt;email@address.com&gt;', '<br />', '&lt;email@address.com&gt;', '<br />');
    ?>
</p>
											<p><?php 
    _e("You should only use this if you know it will not cause email delivery problems. Some servers will not send emails that use this format.", 'event_espresso');
    ?>
</p>
										</div>
										<h4>
												<?php 
    _e('Payment Confirmation Email:', 'event_espresso');
    ?>
										</h4>
										<p>
											<label for="payment_subject">
	<?php 
    _e('Email Subject:', 'event_espresso');
    ?>
											</label>
											<input id="payment_subject" name="payment_subject" size="50" type="text" value="<?php 
    echo stripslashes_deep($org_options['payment_subject']);
    ?>
" />
										</p>

										<div id="payment-conf-email" class="postbox">
											<?php 
    if (function_exists('wp_editor')) {
        $args = array("textarea_rows" => 5, "textarea_name" => "payment_message", "editor_class" => "my_editor_custom");
        wp_editor(espresso_admin_format_content($org_options['payment_message']), "payment_message", $args);
    } else {
        echo '<textarea class="theEditor std-textarea" id="payment_message" name="payment_message">' . espresso_admin_format_content($org_options['payment_message']) . '</textarea>';
    }
    ?>
	<?php 
    /* ?><textarea class="theEditor std-textarea" id="payment_message" name="payment_message"><?php echo espresso_admin_format_content($org_options['payment_message']); ?></textarea><?php */
    ?>
											<table id="payment-confirmation-form" cellspacing="0">
												<tbody>
													<tr>
														<td class="aer-word-count"></td>
														<td class="autosave-info"><span><a class="thickbox" href="#TB_inline?height=300&width=400&inlineId=custom_email_info">
	<?php 
    _e('View Custom Email Tags', 'event_espresso');
    ?>
																</a></span></td>
													</tr>
												</tbody>
											</table>
										</div>
										<h4>
											<?php 
    _e('Default Registration Confirmation Email:', 'event_espresso');
    ?>
										</h4>

										<div id="reg-conf-email" class="postbox">
											<?php 
    if (function_exists('wp_editor')) {
        $args = array("textarea_rows" => 5, "textarea_name" => "success_message", "editor_class" => "my_editor_custom");
        wp_editor(espresso_admin_format_content($org_options['message']), "success_message", $args);
    } else {
        echo '<textarea class="theEditor std-textarea" id="success_message" name="success_message">' . espresso_admin_format_content($org_options['message']) . '</textarea>';
    }
    ?>
	<?php 
    /* ?><textarea class="theEditor std-textarea"  id="reg-conf-email-mce" name="success_message"><?php echo espresso_admin_format_content($org_options['message']); ?></textarea><?php */
    ?>
											<table id="email-confirmation-form" cellspacing="0">
												<tbody>
													<tr>
														<td class="aer-word-count"></td>
														<td class="autosave-info"><span><a class="thickbox" href="#TB_inline?height=300&width=400&inlineId=custom_email_info">
	<?php 
    _e('View Custom Email Tags', 'event_espresso');
    ?>
																</a> | <a class="thickbox" href="#TB_inline?height=300&width=400&inlineId=custom_email_example">
	<?php 
    _e('Example', 'event_espresso');
    ?>
																</a></span></td>
													</tr>
												</tbody>
											</table>
										</div>
										<p>
											<input class="button-primary" type="submit" name="Submit" value="<?php 
    _e('Save Options', 'event_espresso');
    ?>
" id="save_organization_saetting_5" />
										</p>
									</div>
								</div>
							</div>
						</div>
						<div style="clear:both;"></div>
					</li>
					<li>
						<h2>
					<?php 
    _e('Advanced Features', 'event_espresso');
    ?>
						</h2>
						<hr />
					</li>
					<?php 
    if (file_exists(EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/recaptcha_form.php') || file_exists(EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/optional_event_settings.php')) {
        if (file_exists(EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/optional_event_settings.php')) {
            echo '<li>';
            require_once EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/optional_event_settings.php';
            echo '</li>';
        }
        if (file_exists(EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/recaptcha_form.php')) {
            echo '<li>';
            require_once EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/recaptcha_form.php';
            echo '</li>';
        }
    } else {
        ?>
						<li>
							<div class="metabox-holder">
								<div class="postbox">
									<div title="Click to toggle" class="handlediv"><br />
									</div>
									<h3 class="hndle">
		<?php 
        _e('Optional Event Settings', 'event_espresso');
        ?>
									</h3>
									<div class="inside">
										<div class="padding">
											<p><?php 
        echo __('Please purchase a', 'event_espresso');
        ?>
 <a href="http://eventespresso.com/download/" target="_blank"><?php 
        echo __('support license', 'event_espresso');
        ?>
</a> <?php 
        echo __('to gain access to these features.', 'event_espresso');
        ?>
</p>
											<p>
													<?php 
        _e('Additional features include:', 'event_espresso');
        ?>
											</p>
											<ol>
												<li>
													<?php 
        _e('Upcoming events widget in the admin dashboard', 'event_espresso');
        ?>
												</li>
												<li>
													<?php 
        _e('Registration limits on time slots', 'event_espresso');
        ?>
												</li>
												<li>
													<?php 
        _e('Ability to display short descriptions in the event listings', 'event_espresso');
        ?>
												</li>
												<li>
													<?php 
        _e('Custom post types for events', 'event_espresso');
        ?>
												</li>
												<li>
													<?php 
        _e('Attendee pre-approval feature', 'event_espresso');
        ?>
												</li>
												<li>
													<?php 
        _e('Event Venue/Staff Manager', 'event_espresso');
        ?>
												</li>
												<li>
		<?php 
        _e('Graphical Reports', 'event_espresso');
        ?>
												</li>
											</ol>
										</div>
									</div>
								</div>
							</div>
						</li>
						<li>
							<div class="metabox-holder">
								<div class="postbox">
									<div title="Click to toggle" class="handlediv"><br />
									</div>
									<h3 class="hndle">
		<?php 
        _e('reCAPTCHA Settings', 'event_espresso');
        ?>
									</h3>
									<div class="inside">
										<div class="padding">
											<p><?php 
        echo __('Please purchase a', 'event_espresso');
        ?>
 <a href="http://eventespresso.com/download/" target="_blank"><?php 
        echo __('support license', 'event_espresso');
        ?>
</a> <?php 
        echo __('to gain access to this feature.', 'event_espresso');
        ?>
</p>
											<p> <?php 
        echo sprintf(__('reCAPTCHA helps prevent automated abuse of your site (such as comment spam or bogus registrations) by using a %s to ensure that only humans perform certain actions.', 'event_espresso'), '<a href="http://recaptcha.net/captcha.html">CAPTCHA</a>');
        ?>
 </p>
										</div>
									</div>
								</div>
							</div>
						</li>
						<?php 
    }
    if ($espresso_check_for_updates == true && $espresso_premium == true) {
        ?>

						<li><a name="license_key" id="license_key"></a>
							<div class="metabox-holder">
								<div class="postbox">
									<div title="Click to toggle" class="handlediv"><br />
									</div>
									<h3 class="hndle">
		<?php 
        _e('Support License', 'event_espresso');
        ?>
									</h3>
									<div class="inside">
										<div class="padding">
											<ul>
												<li>
													<label for="site_license_key">
		<?php 
        _e('Site License Key:', 'event_espresso');
        ?>
													</label>
													<input type="text" name="site_license_key" size="45" value="<?php 
        echo isset($org_options['site_license_key']) ? stripslashes_deep($org_options['site_license_key']) : '';
        ?>
" />
												</li>

											</ul>
											<p>
												<input class="button-primary" type="submit" name="Submit" value="<?php 
        _e('Save Options', 'event_espresso');
        ?>
" id="save_organization_saetting_5" />
											</p>
										</div>
									</div>
								</div>
							</div>
						</li>
	<?php 
    }
    ?>
				</ul>
				<input type="hidden" name="update_org" value="update" />
			</form>
		</div>
		<?php 
    $post_content = ob_get_clean();
    espresso_choose_layout($post_content, event_espresso_display_right_column());
    ?>
	</div>
	<script type="text/javascript" charset="utf-8">
		//<![CDATA[
		jQuery(document).ready(function() {
			postboxes.add_postbox_toggles('event_espresso');

			//Logo uploader
			var header_clicked = false;
			jQuery('#upload_image_button').click(function() {
				formfield = jQuery('#upload_image').attr('name');
				tb_show('', 'media-upload.php?type=image&amp;TB_iframe=1');
				jQuery('p.default-logo-thumb').addClass('old');
				header_clicked = true;
				return false;
			});
			window.original_send_to_editor = window.send_to_editor;

			window.send_to_editor = function(html) {
				if(header_clicked) {
					//Remove old image
					jQuery("#upload_image").val('');
					jQuery("p.default-logo-thumb").remove();
					jQuery("p#image-display").remove();
					jQuery('#remove-image').remove();
					
					//Add new image
					imgurl = jQuery('img',html).attr('src');
					jQuery('#' + formfield).val(imgurl);
					jQuery('#default-logo-image').append("<p id='image-display'><img src='"+imgurl+"' alt='' /></p>");
					header_clicked = false;
					tb_remove();
				} else {
					window.original_send_to_editor(html);
				}
			}
			
			// process the remove link in the metabox
			jQuery('#remove-image').click(function(){
				var answer = confirm('<?php 
    _e('Do you really want to delete this image? Please remember to save your settings to complete the removal.', 'event_espresso');
    ?>
');
				if (answer){
					jQuery("#upload_image").val('');
					jQuery("p.default-logo-thumb").remove();
					jQuery("p#image-display").remove();
					jQuery('#remove-image').remove();
				}
				return false;
			});

		});
		//]]>
	</script>
	<?php 
    echo event_espresso_custom_email_info();
    if (!function_exists('wp_editor')) {
        espresso_tiny_mce();
    }
}
コード例 #4
0
    /**
     * Displays the common "footer" elements of the MailChimp Integration configuration view.
     */
    function foot()
    {
        ?>
				       </div><!-- / .inside -->
    		   </div><!-- /.postbox -->
    	   </div><!-- / .metabox-holder -->
    

			
			<script type="text/javascript" charset="utf-8">
			//<![CDATA[
				jQuery(document).ready(function() {
					postboxes.add_postbox_toggles('template_conf');
      }); 
			//]]>
			</script>
			  
				 </div><!-- / .meta-box-sortables .ui-sortables -->
			<?php 
        $main_post_content = ob_get_clean();
        espresso_choose_layout($main_post_content, event_espresso_display_right_column());
        ?>
		
		 </div><!-- / #wrap -->
    <?php 
    }
コード例 #5
0
function event_espresso_member_config_mnu()
{
    if (!empty($_POST['update_member_settings']) && $_POST['update_member_settings'] == 'update') {
        $member_options = get_option('events_member_settings');
        $member_options['login_page'] = isset($_POST['login_page']) && !empty($_POST['login_page']) ? $_POST['login_page'] : '';
        $member_options['register_page'] = isset($_POST['register_page']) && !empty($_POST['register_page']) ? $_POST['register_page'] : '';
        $member_options['member_only_all'] = isset($_POST['member_only_all']) && !empty($_POST['member_only_all']) ? $_POST['member_only_all'] : '';
        $member_options['autofilled_editable'] = isset($_POST['autofilled_editable']) && !empty($_POST['autofilled_editable']) ? $_POST['autofilled_editable'] : '';
        update_option('events_member_settings', $member_options);
        echo '<div id="message" class="updated fade"><p><strong>' . __('Member settings saved.', 'event_espresso') . '</strong></p></div>';
    }
    $member_options = get_option('events_member_settings');
    $login_page = empty($member_options['login_page']) ? '' : $member_options['login_page'];
    $register_page = empty($member_options['register_page']) ? '' : $member_options['register_page'];
    $member_only_all = empty($member_options['member_only_all']) ? 'N' : $member_options['member_only_all'];
    $autofilled_editable = empty($member_options['autofilled_editable']) ? 'N' : $member_options['autofilled_editable'];
    ?>
	<div id="event_reg_theme" class="wrap">
		<div id="icon-options-event" class="icon32"></div>
		<h2><?php 
    echo _e('Manage Member Settings', 'event_espresso');
    ?>
</h2>
		<?php 
    ob_start();
    ?>
		<div class="metabox-holder">
			<div class="postbox">
				<h3><?php 
    _e('Member Settings', 'event_espresso');
    ?>
</h3>
				<div class="inside">
					<form method="post" action="<?php 
    echo $_SERVER['REQUEST_URI'];
    ?>
">
						<ul>
							<li>
								<label><?php 
    _e('Login page (if different from default Wordpress login page): ', 'event_espresso');
    ?>
</label> <input type="text" name="login_page" size="25" <?php 
    echo isset($login_page) ? 'value="' . $login_page . '"' : "";
    ?>
></li>

							<?php 
    if (!get_option('users_can_register')) {
        echo '<li class="updated" style="width:65%">' . __('New user registration is currently closed. If you would like to set a custom user regsistration page, you must enable "Anyone can register" in your Wordpress "<a href="options-general.php">General Settings</a>" page.', 'event_espresso') . '</li>';
    } else {
        ?>
			<li><label><?php 
        _e('Member registration page (if different from default Wordpress register page): ', 'event_espresso');
        ?>
</label> <input name="register_page" size="25" <?php 
        echo isset($register_page) ? 'value="' . $register_page . '"' : "";
        ?>
></li>
							<?php 
    }
    ?>
							<li>
								<label><?php 
    _e('Require login for all events? ', 'event_espresso');
    ?>
</label>
								<?php 
    $values = array(array('id' => 'N', 'text' => __('No', 'event_espresso')), array('id' => 'Y', 'text' => __('Yes', 'event_espresso')));
    echo select_input('member_only_all', $values, $member_only_all);
    ?>
							</li>
							<li>
								<label><?php 
    _e('Make autofilled fields editable? ', 'event_espresso');
    ?>
</label>
								<?php 
    $values = array(array('id' => 'N', 'text' => __('No', 'event_espresso')), array('id' => 'Y', 'text' => __('Yes', 'event_espresso')));
    echo select_input('autofilled_editable', $values, $autofilled_editable);
    ?>
							</li>
							<li>
								<input type="hidden" name="update_member_settings" value="update">
								<p>
									<input class="button-primary" type="submit" name="Submit" value="<?php 
    _e('Save Settings', 'event_espresso');
    ?>
" id="save_member_settings" />
								</p>
							</li>
						</ul>

					</form>

				</div>
			</div>
		</div>
		<?php 
    $main_post_content = ob_get_clean();
    espresso_choose_layout($main_post_content, event_espresso_display_right_column());
    ?>
	</div>
	<?php 
    //============= End Event Registration Members Subpage - Settings  =============== //
}
コード例 #6
0
function event_espresso_gateways_options()
{
    global $active_gateways;
    $active_gateways = get_option('event_espresso_active_gateways', array());
    ?>
	<div id="event_reg_theme" class="wrap">
		<div id="icon-options-event" class="icon32"></div>
		<h2><?php 
    _e('Manage Payment Gateways', 'event_espresso');
    ?>
</h2>
		<?php 
    ob_start();
    ?>
		<div id="payment_settings" class="meta-box-sortables ui-sortables">
			<?php 
    $gateways_glob = glob(EVENT_ESPRESSO_PLUGINFULLPATH . "gateways/*/settings.php");
    $upload_gateways_glob = glob(EVENT_ESPRESSO_GATEWAY_DIR . '*/settings.php');
    if (!is_array($upload_gateways_glob)) {
        $upload_gateways_glob = array();
    }
    foreach ($upload_gateways_glob as $upload_gateway) {
        $pos = strpos($upload_gateway, 'gateways');
        $sub = substr($upload_gateway, $pos);
        foreach ($gateways_glob as &$gateway) {
            $pos2 = strpos($gateway, 'gateways');
            $sub2 = substr($gateway, $pos2);
            if ($sub == $sub2) {
                $gateway = $upload_gateway;
            }
        }
        unset($gateway);
    }
    $gateways = array_merge($upload_gateways_glob, $gateways_glob);
    $gateways = array_unique($gateways);
    foreach ($gateways as $gateway) {
        require_once $gateway;
    }
    do_action('action_hook_espresso_display_gateway_settings');
    if (file_exists(EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/gateway_developer.php')) {
        require_once EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/gateway_developer.php';
    }
    global $espresso_premium;
    if ($espresso_premium != true) {
        ?>
				<h2><?php 
        _e('Need more payment options?', 'event_espresso');
        ?>
<a href="http://eventespresso.com/download/" target="_blank"><?php 
        _e('Upgrade Now!', 'event_espresso');
        ?>
</a></h2>
			<?php 
    }
    ?>
		</div><!-- / .meta-box-sortables -->
		<?php 
    $post_content = ob_get_clean();
    espresso_choose_layout('', event_espresso_display_right_column(), $post_content);
    ?>
	</div><!-- / #wrap -->
	<div id="button_image" style="display:none">
		<h2><?php 
    _e('Button Image URL', 'event_espresso');
    ?>
</h2>
		<p><?php 
    _e('A default payment button is provided. A custom payment button may be used, choose your image or upload a new one, and just copy the "file url" here (optional.)', 'event_espresso');
    ?>
</p>
	</div>
	<div id="bypass_confirmation" style="display:none">
		<h2><?php 
    _e('Bypassing the Confirmation Page', 'event_espresso');
    ?>
</h2>
		<p><?php 
    _e('This will allow you to send your customers directly to the payment gateway of your choice.', 'event_espresso');
    ?>
</p>
	</div>
	<div id="force_ssl_return" style="display:none">
		<h2><?php 
    _e('Force HTTPS on Return URL', 'event_espresso');
    ?>
</h2>
		<p><?php 
    _e('Forces the gateway provider to send the customer back to the return page -- or pull the return page from the site -- using HTTPS.  This is required in some instances to prevent a warning that the page the user is going to is not secure.', 'event_espresso');
    ?>
</p>
	</div>
	<div id="display_header" style="display:none">
		<h2><?php 
    _e('Display a Form Header', 'event_espresso');
    ?>
</h2>
		<p><?php 
    _e('Select if you would like to display a header above the payment form.', 'event_espresso');
    ?>
</p>
	</div>
	<script type="text/javascript" charset="utf-8">
		//<![CDATA[
		jQuery(document).ready(function() {
			postboxes.add_postbox_toggles("payment_gateways");
		});
		//]]>
	</script>
	<?php 
}
コード例 #7
0
ファイル: index.php プロジェクト: sriram911/pls
function event_espresso_discount_config_mnu()
{
    global $wpdb;
    ?>
	<div class="wrap">
		<div id="icon-options-event" class="icon32"> </div>
		<h2><?php 
    echo _e('Manage Event Promotional Codes', 'event_espresso');
    ?>
			<?php 
    if (!isset($_REQUEST['action']) || $_REQUEST['action'] != 'edit' && $_REQUEST['action'] != 'new') {
        echo '<a href="admin.php?page=discounts&amp;action=new" class="button add-new-h2" style="margin-left: 20px;">' . __('Add New Code', 'event_espresso') . '</a>';
    }
    ?>
		</h2>

		<?php 
    ob_start();
    if (isset($_REQUEST['action'])) {
        switch ($_REQUEST['action']) {
            case 'add':
                require_once "add_discount.php";
                add_discount_to_db();
                //Add the discount to the DB
                break;
            case 'new':
                require_once "new_discount.php";
                add_new_event_discount();
                //Add new discount form
                break;
            case 'edit':
                require_once "edit_discount.php";
                edit_event_discount();
                //Edit discount form
                break;
            case 'update':
                require_once "update_discount.php";
                update_event_discount();
                //Update discount in DB
                break;
            case 'delete_discount':
                require_once "delete_discount.php";
                delete_event_discount();
                //Delete discount in DB
                break;
        }
    }
    if (!empty($_REQUEST['delete_discount'])) {
        //This is for the delete checkboxes
        require_once "delete_discount.php";
        delete_event_discount();
    }
    ?>

		<form id="form1" name="form1" method="post" action="<?php 
    echo $_SERVER["REQUEST_URI"];
    ?>
">
			<table id="table" class="widefat manage-discounts">
				<thead>
					<tr>
						<th class="manage-column column-cb check-column" id="cb" scope="col" style="width:2.5%;"><input type="checkbox"></th>
						<th class="manage-column column-comments num" id="id" style="padding-top:7px; width:2.5%;" scope="col" title="Click to Sort"><?php 
    _e('ID', 'event_espresso');
    ?>
</th>
						<th class="manage-column column-title" id="name" scope="col" title="Click to Sort" style="width:20%;"><?php 
    _e('Name', 'event_espresso');
    ?>
</th>
						<?php 
    if (function_exists('espresso_is_admin') && espresso_is_admin() == true) {
        ?>
							<th class="manage-column column-creator" id="creator" scope="col" title="Click to Sort" style="width:10%;"><?php 
        _e('Creator', 'event_espresso');
        ?>
</th>
	<?php 
    }
    ?>
						<th class="manage-column column-author" id="start" scope="col" title="Click to Sort" style="width:20%;"><?php 
    _e('Amount', 'event_espresso');
    ?>
</th>
						<th class="manage-column column-date" id="begins" scope="col" title="Click to Sort" style="width:20%;"><?php 
    _e('Percentage', 'event_espresso');
    ?>
</th>
					</tr>
				</thead>
				<tbody>
					<?php 
    $sql = "SELECT * FROM " . EVENTS_DISCOUNT_CODES_TABLE;
    if (function_exists('espresso_member_data') && (espresso_member_data('role') == 'espresso_event_manager' || espresso_member_data('role') == 'espresso_group_admin')) {
        $sql .= " WHERE wp_user = '******'id') . "' ";
    }
    $event_discounts = $wpdb->get_results($sql);
    if ($wpdb->num_rows > 0) {
        foreach ($event_discounts as $event_discount) {
            $discount_id = $event_discount->id;
            $coupon_code = $event_discount->coupon_code;
            $coupon_code_price = $event_discount->coupon_code_price;
            $coupon_code_description = $event_discount->coupon_code_description;
            $use_percentage = $event_discount->use_percentage;
            $wp_user = $event_discount->wp_user;
            ?>
							<tr>
								<td class="check-column" style="padding:7px 0 22px 5px; vertical-align:top;"><input name="checkbox[<?php 
            echo $discount_id;
            ?>
]" type="checkbox"  title="Delete <?php 
            echo $coupon_code;
            ?>
"></td>
								<td class="column-comments" style="padding-top:3px;"><?php 
            echo $discount_id;
            ?>
</td>
								<td class="post-title page-title column-title"><strong><a href="admin.php?page=discounts&amp;action=edit&amp;discount_id=<?php 
            echo $discount_id;
            ?>
"><?php 
            echo $coupon_code;
            ?>
</a></strong>
									<div class="row-actions"><span class="edit"><a href="admin.php?page=discounts&action=edit&discount_id=<?php 
            echo $discount_id;
            ?>
"><?php 
            _e('Edit', 'event_espresso');
            ?>
</a> | </span><span class="delete"><a onclick="return confirmDelete();" class="delete submitdelete" href="admin.php?page=discounts&action=delete_discount&discount_id=<?php 
            echo $discount_id;
            ?>
"><?php 
            _e('Delete', 'event_espresso');
            ?>
</a></span></div></td>
								<?php 
            if (function_exists('espresso_is_admin') && espresso_is_admin() == true) {
                ?>
									<td><?php 
                echo 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');
                ?>
</td>
			<?php 
            }
            ?>
								<td class="author column-author"><?php 
            echo $coupon_code_price;
            ?>
</td>
								<td class="author column-author"><?php 
            echo $use_percentage;
            ?>
</td>
							</tr>
						<?php 
        }
    }
    ?>
				</tbody>
			</table>
			<div style="clear:both">
				<p><input type="checkbox" name="sAll" onclick="selectAll(this)" />
					<strong>
	<?php 
    _e('Check All', 'event_espresso');
    ?>
					</strong>
					<input name="delete_discount" type="submit" class="button-secondary" id="delete_discount" value="<?php 
    _e('Delete Promotional Code', 'event_espresso');
    ?>
" style="margin:10 0 0 10px;" onclick="return confirmDelete();">

					<a  style="margin-left:5px"class="button-primary" href="admin.php?page=discounts&amp;action=new"><?php 
    _e('Add New Promotional Code', 'event_espresso');
    ?>
</a></p>
			</div>
		</form>
		<?php 
    $main_post_content = ob_get_clean();
    espresso_choose_layout($main_post_content, event_espresso_display_right_column());
    ?>
	</div>

	<script type="text/javascript">
		jQuery(document).ready(function($) {

			/* show the table data */
			var mytable = $('#table').dataTable( {
				"bStateSave": true,
				"sPaginationType": "full_numbers",

				"oLanguage": {	"sSearch": "<strong><?php 
    _e('Live Search Filter', 'event_espresso');
    ?>
:</strong>",
					"sZeroRecords": "<?php 
    _e('No Records Found!', 'event_espresso');
    ?>
" },
				"aoColumns": [
					{ "bSortable": false },
					null,
					null,
					null,
	<?php 
    echo function_exists('espresso_is_admin') && espresso_is_admin() == true ? 'null,' : '';
    ?>
							null

						]

					} );

				} );
				// Add new promo code form validation
				jQuery(function(){
					jQuery("#new-promo-code").validate( {
						rules: {
							coupon_code: "required"
						},
						messages: {
							coupon_code: "Please add your promotional code"
						}
					});
		
				});
	</script>
	<?php 
}
コード例 #8
0
ファイル: index.php プロジェクト: antares-ff/ANTARES-Test
function event_espresso_questions_config_mnu()
{
    global $wpdb;
    //Update the questions when re-ordering
    if (!empty($_REQUEST['update_sequence'])) {
        $rows = explode(",", $_POST['row_ids']);
        for ($i = 0; $i < count($rows); $i++) {
            $wpdb->query("UPDATE " . EVENTS_QUESTION_TABLE . " SET sequence=" . $i . " WHERE id='" . $rows[$i] . "'");
        }
        die;
    }
    // get counts
    $total_questions = count(espresso_get_user_questions(null, null, false));
    $total_self_questions = count(espresso_get_user_questions(get_current_user_id(), null, true, true));
    ?>
	<div class="wrap">
		<div id="icon-options-event" class="icon32"> </div>
		<h2><?php 
    echo _e('Manage Questions', 'event_espresso');
    ?>
			<?php 
    if (!isset($_REQUEST['action']) || $_REQUEST['action'] != 'edit_question' && $_REQUEST['action'] != 'new_question') {
        echo '<a href="admin.php?page=form_builder&action=new_question" class="button add-new-h2" style="margin-left: 20px;">' . __('Add New Question', 'event_espresso') . '</a>';
    }
    ?>
		</h2>
		<?php 
    ob_start();
    if (function_exists('espresso_is_admin') && espresso_is_admin() == true) {
        ?>
			<div style="margin-bottom: 10px;">
				<ul class="subsubsub" style="margin-bottom: 0;clear:both;">
					<li><strong><?php 
        _e('Questions', 'event_espresso');
        ?>
: </strong> </li>
					<li><a <?php 
        echo !isset($_REQUEST['self']) && !isset($_REQUEST['all']) || isset($_REQUEST['self']) && $_REQUEST['self'] == 'true' ? ' class="current" ' : '';
        ?>
 href="admin.php?page=form_builder&self=true"><?php 
        _e('My Questions', 'event_espresso');
        ?>
 <span class="count">(<?php 
        echo $total_self_questions;
        ?>
)</span> </a> | </li>
					<li><a <?php 
        echo isset($_REQUEST['all']) && $_REQUEST['all'] == 'true' ? ' class="current" ' : '';
        ?>
 href="admin.php?page=form_builder&all=true"><?php 
        _e('All Questions', 'event_espresso');
        ?>
 <span class="count">(<?php 
        echo $total_questions;
        ?>
)</span> </a></li>
				</ul>
				<div class="clear"></div>
			</div>
		<?php 
    }
    ?>

		<div class="meta-box-sortables ui-sortables">
			<?php 
    //Update the question
    if (isset($_REQUEST['edit_action']) && $_REQUEST['edit_action'] == 'update') {
        require_once "questions/update_question.php";
        event_espresso_form_builder_update();
    }
    $button_style = 'button-primary';
    //Figure out which view to display
    if (isset($_REQUEST['action'])) {
        switch ($_REQUEST['action']) {
            case 'insert':
                if (file_exists(EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/form-builder/questions/insert_question.php')) {
                    require_once EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/form-builder/questions/insert_question.php';
                    event_espresso_form_builder_insert();
                } else {
                    require_once EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/pricing_table.php';
                }
                break;
            case 'new_question':
                if (file_exists(EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/form-builder/questions/new_question.php')) {
                    require_once EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/form-builder/questions/new_question.php';
                    event_espresso_form_builder_new();
                } else {
                    require_once EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/pricing_table.php';
                }
                $button_style = 'button-secondary';
                break;
            case 'edit_question':
                require_once "questions/edit_question.php";
                event_espresso_form_builder_edit();
                $button_style = 'button-secondary';
                break;
            case 'delete_question':
                if (file_exists(EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/form-builder/questions/delete_question.php')) {
                    require_once EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/form-builder/questions/delete_question.php';
                    event_espresso_form_builder_delete();
                } else {
                    ?>
							<div id="message" class="updated fade">
								<p><strong>
										<?php 
                    _e('This function is not available in the free version of Event Espresso.', 'event_espresso');
                    ?>
									</strong></p>
							</div>
							<?php 
                }
                break;
        }
    }
    ?>
		</div>

		<form id="form1" name="form1" method="post" action="<?php 
    echo $_SERVER["REQUEST_URI"];
    ?>
">
			<table id="table" class="widefat manage-questions">

				<thead>
					<tr>
						<th class="manage-column" id="cb" scope="col" ><input type="checkbox"></th>

						<th class="manage-column column-title" id="values" scope="col" title="Click to Sort" style="width:25%;">
							<?php 
    _e('Question', 'event_espresso');
    ?>
						</th>
						<th class="manage-column column-title" id="values" scope="col" title="Click to Sort" style="width:15%;">
							<?php 
    _e('Values', 'event_espresso');
    ?>
						</th>
						<?php 
    if (function_exists('espresso_is_admin') && espresso_is_admin() == true) {
        ?>
							<th class="manage-column column-creator" id="creator" scope="col" title="Click to Sort" style="width:15%;">
								<?php 
        _e('Creator', 'event_espresso');
        ?>
							</th>
						<?php 
    }
    ?>

						<th class="manage-column column-title" id="values" scope="col" title="Click to Sort"  style="width:10%;">
							<?php 
    _e('Type', 'event_espresso');
    ?>
						</th>
						<th class="manage-column column-title" id="values" scope="col" title="Click to Sort" style="width:10%;">
							<?php 
    _e('Required', 'event_espresso');
    ?>
						</th>
						<th class="manage-column column-title" id="values" scope="col" title="Click to Sort" style="width:10%;">
							<?php 
    _e('Admin Only', 'event_espresso');
    ?>
						</th>

					</tr>
				</thead>
				<tbody>
					<?php 
    $questions = espresso_get_user_questions(get_current_user_id());
    if (count($questions) > 0) {
        foreach ($questions as $question) {
            $question_id = $question->id;
            $question_name = stripslashes($question->question);
            $values = stripslashes($question->response);
            $question_type = stripslashes($question->question_type);
            $required = stripslashes($question->required);
            $system_name = $question->system_name;
            $sequence = $question->sequence;
            $admin_only = $question->admin_only;
            $wp_user = $question->wp_user == 0 ? 1 : $question->wp_user;
            ?>
							<tr style="cursor: move" id="<?php 
            echo $question_id;
            ?>
">
								<td class="checkboxcol"><input name="row_id" type="hidden" value="<?php 
            echo $question_id;
            ?>
" />
									<?php 
            if ($system_name == '') {
                ?>
										<input  style="margin:7px 0 22px 8px; vertical-align:top;" name="checkbox[<?php 
                echo $question_id;
                ?>
]" type="checkbox"  title="Delete <?php 
                echo wp_strip_all_tags($question_name);
                ?>
">
									<?php 
            } else {
                ?>
										<span><?php 
                echo '<img style="margin:7px 0 22px 8px; vertical-align:top;" src="' . EVENT_ESPRESSO_PLUGINFULLURL . 'images/icons/lock.png" alt="System Questions" title="System Questions" />';
                ?>
</span>
									<?php 
            }
            ?>
								</td>

								<td class="post-title page-title column-title"><strong><a href="admin.php?page=form_builder&amp;action=edit_question&amp;question_id=<?php 
            echo $question_id;
            ?>
"><?php 
            echo wp_strip_all_tags($question_name);
            ?>
</a></strong>
									<div class="row-actions">
										<span class="edit"><a href="admin.php?page=form_builder&amp;action=edit_question&amp;question_id=<?php 
            echo $question_id;
            ?>
"><?php 
            _e('Edit', 'event_espresso');
            ?>
</a> | </span>
										<?php 
            if ($system_name == '') {
                ?>
<span class="delete"><a onclick="return confirmDelete();" class="submitdelete"  href="admin.php?page=form_builder&amp;action=delete_question&amp;question_id=<?php 
                echo $question_id;
                ?>
"><?php 
                _e('Delete', 'event_espresso');
                ?>
</a></span><?php 
            }
            ?>
									</div>
								</td>
								<td class="author column-author"><?php 
            echo $values;
            ?>
</td>
								<?php 
            if (function_exists('espresso_is_admin') && espresso_is_admin() == true) {
                ?>
									<td><?php 
                echo espresso_user_meta($wp_user, 'user_firstname') != '' ? espresso_user_meta($wp_user, 'user_firstname') . ' ' . espresso_user_meta($wp_user, 'user_lastname') . ' (<a href="user-edit.php?user_id=' . $wp_user . '">' . espresso_user_meta($wp_user, 'user_nicename') . '</a>)' : espresso_user_meta($wp_user, 'display_name') . ' (<a href="user-edit.php?user_id=' . $wp_user . '">' . espresso_user_meta($wp_user, 'user_nicename') . '</a>)';
                ?>
</td>
								<?php 
            }
            ?>
								<td class="author column-author"><?php 
            echo $question_type;
            ?>
</td>
								<td class="author column-author"><?php 
            echo $required;
            ?>
</td>
								<td class="author column-author"><?php 
            echo $admin_only;
            ?>
</td>
							</tr>
							<?php 
        }
    }
    ?>
				</tbody>
			</table>

			<div>
				<p><input type="checkbox" name="sAll" onclick="selectAll(this)" />
					<strong>
						<?php 
    _e('Check All', 'event_espresso');
    ?>
					</strong>
					<input type="hidden" name="action" value="delete_question" />
					<input name="delete_question" type="submit" class="button-secondary" id="delete_question" value="<?php 
    _e('Delete Question', 'event_espresso');
    ?>
" style="margin-left:10px 0 0 10px;" onclick="return confirmDelete();">
					<a  style="margin-left:5px"class="button-secondary" href="admin.php?page=form_groups"><?php 
    _e('Question Groups', 'event_espresso');
    ?>
</a>
					<a style="margin-left:5px"class="button-secondary thickbox" href="#TB_inline?height=400&width=500&inlineId=question_info">Help</a>
					<a  style="margin-left:5px"class="<?php 
    echo $button_style;
    ?>
" href="admin.php?page=form_builder&amp;action=new_question"><?php 
    _e('Add New Question', 'event_espresso');
    ?>
</a>
				</p>
			</div>
		</form>
		<?php 
    $main_post_content = ob_get_clean();
    espresso_choose_layout($main_post_content, event_espresso_display_right_column());
    ?>
							

	</div>
	<div id="question_info" class="pop-help" style="display:none">
		<div class="TB-ee-frame">
			<h2><?php 
    _e('Manage Questions Overview', 'event_espresso');
    ?>
</h2>
			<p><?php 
    _e('The <code>Questions</code> page shows your list of available questions to add to your registration forms for events', 'event_espresso');
    ?>
</p>
			<p><?php 
    _e('Use the add new question button at the top of the page to create a new question to add to the list ', 'event_espresso');
    ?>
<a href="admin.php?page=form_builder&amp;action=new_question"><?php 
    _e('Add New Question', 'event_espresso');
    ?>
</a></p>
			<p><?php 
    _e('Once you have a built a list of questions you may further organize your questions into <code>Groups.</code> These', 'event_espresso');
    ?>
 <a href="admin.php?page=form_groups"><?php 
    _e('Question Groups ', 'event_espresso');
    ?>
</a><?php 
    _e('allow you to easily and conveniently add a group to a registration that will have a pre populated set of questions, this is especially handy when creating many registration forms, saving time, by being able to re-use specific groups of questions repetedly.', 'event_espresso');
    ?>
</p>
		</div>
	</div>



	<script type="text/javascript">
		jQuery(document).ready(function($) {

			/* show the table data */
			var mytable = $('#table').dataTable( {
				"bStateSave": true,
				"sPaginationType": "full_numbers",

				"oLanguage": {	"sSearch": "<strong><?php 
    _e('Live Search Filter', 'event_espresso');
    ?>
:</strong>",
					"sZeroRecords": "<?php 
    _e('No Records Found!', 'event_espresso');
    ?>
" },
				"aoColumns": [
					{ "bSortable": true },
					null,
					null,
					null,
					null,
	<?php 
    echo function_exists('espresso_is_admin') && espresso_is_admin() == true ? 'null,' : '';
    ?>
					null

				]

			} );

			var startPosition;
			var endPosition;
			$("#table tbody").sortable({
				cursor: "move",
				start:function(event, ui){
					startPosition = ui.item.prevAll().length + 1;
				},
				update: function(event, ui) {
					endPosition = ui.item.prevAll().length + 1;
					//alert('Start Position: ' + startPosition + ' End Position: ' + endPosition);
					var row_ids="";
					$('#table tbody input[name="row_id"]').each(function(i){
						row_ids= row_ids + ',' + $(this).val();
					});
					$.post(EEGlobals.ajaxurl, { action: "update_sequence", row_ids: row_ids, update_sequence: "true"} );
				}
			});
			postboxes.add_postbox_toggles('form_builder');
		} );
						
		// Remove li parent for input 'values' from page if 'text' box or 'textarea' are selected
		var selectValue = jQuery('#question_type option:selected').val();
		//alert(selectValue + ' - this is initial value');
		// hide values field on initial page view
		if( selectValue == 'SINGLE' || selectValue == 'DROPDOWN' || selectValue == 'MULTIPLE' ) {
			jQuery('#question-values').attr("name","values") 
		} else {
			jQuery('#add-question-values').hide();
			jQuery('#add-price-modifier').hide();
			jQuery('#set-price-mod-qty').hide();
			jQuery('#set-price-mod-available').hide();
			// we don't want the values field trying to validate if not displayed, remove its name
			jQuery('#question-values').attr("name","question_values") 
		}
			
					
		jQuery('#question_type').on('change', function() {
			var selectValue = jQuery('#question_type option:selected').val();
				  
			if ( selectValue == 'SINGLE' || selectValue == 'DROPDOWN' || selectValue == 'MULTIPLE' ) {
				jQuery('#add-price-modifier').fadeIn('fast');
				jQuery('#set-price-mod-qty').fadeIn('fast');
				jQuery('#set-price-mod-available').fadeIn('fast');
				jQuery('#add-question-values').fadeIn('fast');
				jQuery('#question-values').attr("name","values");
			} else {
				jQuery('#add-question-values').fadeOut('fast');
				jQuery('#add-price-modifier').fadeOut('fast');
				jQuery('#set-price-mod-qty').fadeOut('fast');
				jQuery('#set-price-mod-available').fadeOut('fast');
				jQuery('#question-values').attr("name","question_values");
			}
		});


		// Add new question or question group form validation
		jQuery(function(){
			jQuery('#new-question-form').validate({
				rules: {
					question: "required",
					values: "required"
				},
				messages: {
					question: "Please add a title for your question",
					values: "Please add a list of answer options for your question"
				}
			});
						
		});				
	</script>

	<?php 
}
コード例 #9
0
ファイル: index.php プロジェクト: sriram911/pls
function event_espresso_venue_config_mnu()
{
    global $wpdb, $current_user, $espresso_premium;
    $_REQUEST['action'] = isset($_REQUEST['action']) ? $_REQUEST['action'] : NULL;
    ?>

<div class="wrap">
	<div id="icon-options-event" class="icon32"> </div>
	<h2>
		<?php 
    _e('Manage Venues', 'event_espresso');
    ?>
		<?php 
    if ($_REQUEST['action'] != 'edit' && $_REQUEST['action'] != 'add_new_venue') {
        echo '<a href="admin.php?page=event_venues&amp;action=add_new_venue" class="button add-new-h2" style="margin-left: 20px;">' . __('Add New Venue', 'event_espresso') . '</a>';
    }
    ?>
	</h2>
	<?php 
    ob_start();
    if (isset($_POST['delete_venue']) || isset($_REQUEST['action']) && 'delete_venue' == $_REQUEST['action']) {
        $venue_deleted = 0;
        if (isset($_POST['checkbox']) && is_array($_POST['checkbox'])) {
            while (list($key, $value) = each($_POST['checkbox'])) {
                $del_id = $key;
                $flag = true;
                if (function_exists('espresso_user_has_venue_permission')) {
                    $flag = espresso_user_has_venue_permission($del_id);
                }
                if ($flag) {
                    //Delete venue data
                    $sql = "DELETE FROM " . EVENTS_VENUE_TABLE . " WHERE id='{$del_id}'";
                    $wpdb->query($sql);
                    if ($wpdb->rows_affected > 0) {
                        $venue_deleted++;
                    }
                    $sql = "DELETE FROM " . EVENTS_VENUE_REL_TABLE . " WHERE venue_id='{$del_id}'";
                    $wpdb->query($sql);
                    $sql = "DELETE FROM " . EVENTS_LOCALE_REL_TABLE . " WHERE venue_id='{$del_id}'";
                    $wpdb->query($sql);
                }
            }
        }
        if (isset($_REQUEST['id']) && 'delete_venue' == $_REQUEST['action']) {
            $flag = true;
            $del_id = $_REQUEST['id'];
            if (function_exists('espresso_user_has_venue_permission')) {
                $flag = espresso_user_has_venue_permission($del_id);
            }
            if ($flag) {
                //Delete discount data
                $sql = "DELETE FROM " . EVENTS_VENUE_TABLE . " WHERE id='" . $del_id . "'";
                $wpdb->query($sql);
                if ($wpdb->rows_affected > 0) {
                    $venue_deleted++;
                }
                $sql = "DELETE FROM " . EVENTS_VENUE_REL_TABLE . " WHERE venue_id='" . $del_id . "'";
                $wpdb->query($sql);
                $sql = "DELETE FROM " . EVENTS_LOCALE_REL_TABLE . " WHERE venue_id='" . $del_id . "'";
                $wpdb->query($sql);
            }
        }
        if ($venue_deleted > 0) {
            ?>
            <div id="message" class="updated fade">
                <p><strong>
                    <?php 
            _e('Venues have been successfully deleted from the event.', 'event_espresso');
            ?>
                    </strong></p>
            </div>
<?php 
        }
    }
    if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'update') {
        require_once "update_venue.php";
        update_event_venue();
    }
    if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'add') {
        require_once "add_venue_to_db.php";
        add_venue_to_db();
    }
    if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'add_new_venue') {
        require_once "add_new_venue.php";
        add_new_event_venue();
    }
    if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'edit') {
        require_once "edit_venue.php";
        edit_event_venue();
    }
    ?>
				<form id="form1" name="form1" method="post" action="<?php 
    echo $_SERVER["REQUEST_URI"];
    ?>
">
					<table id="table" class="widefat manage-discounts">
						<thead>
							<tr>
								<th class="manage-column column-cb check-column" id="cb" scope="col" style="width:2.5%;"><input type="checkbox"></th>
								<th class="manage-column column-comments num" id="id" style="padding-top:7px; width:2.5%;" scope="col" title="Click to Sort"><?php 
    _e('ID', 'event_espresso');
    ?>
</th>
								<th class="manage-column column-title" id="name" scope="col" title="Click to Sort" style="width:20%;"><?php 
    _e('Name', 'event_espresso');
    ?>
</th>
								<?php 
    if (function_exists('espresso_is_admin') && espresso_is_admin() == true && $espresso_premium == true) {
        ?>
								<th class="manage-column column-creator" id="creator" scope="col" title="Click to Sort" style="width:20%;"><?php 
        _e('Locale', 'event_espresso');
        ?>
</th>
								<?php 
    }
    ?>
								<?php 
    if (function_exists('espresso_is_admin') && espresso_is_admin() == true && $espresso_premium == true) {
        ?>
								<th class="manage-column column-creator" id="creator" scope="col" title="Click to Sort" style="width:20%;"><?php 
        _e('Creator', 'event_espresso');
        ?>
</th>
								<?php 
    }
    ?>
								<th class="manage-column column-author" id="start" scope="col" title="Click to Sort" style="width:20%;"><?php 
    _e('Shortcode', 'event_espresso');
    ?>
</th>
							</tr>
						</thead>
						<tbody>
							<?php 
    global $espresso_manager;
    // If user is an event manager, then show only their venues
    $sql = "( SELECT v.* FROM " . EVENTS_VENUE_TABLE . " v ";
    if (function_exists('espresso_member_data') && espresso_member_data('role') == 'espresso_group_admin') {
        if ($espresso_manager['event_manager_venue'] == "Y") {
            //	show only venues inside their assigned locales.
            $group = get_user_meta(espresso_member_data('id'), "espresso_group", true);
            $sql .= " LEFT JOIN " . EVENTS_LOCALE_REL_TABLE . " l ON  l.venue_id = v.id ";
            $sql .= " WHERE l.locale_id IN (" . implode(",", $group) . ")";
            $sql .= ") UNION ( ";
            $sql .= "SELECT v.* FROM " . EVENTS_VENUE_TABLE . " v ";
        }
    }
    if (function_exists('espresso_member_data') && (espresso_member_data('role') == 'espresso_event_manager' || espresso_member_data('role') == 'espresso_group_admin')) {
        $sql .= "  WHERE v.wp_user = "******")";
    #echo $sql;
    #exit("TEST");
    $wpdb->query($sql);
    if ($wpdb->num_rows > 0) {
        $results = $wpdb->get_results($sql . " ORDER BY id ASC");
        foreach ($results as $result) {
            $venue_id = $result->id;
            $name = isset($result->name) ? stripslashes_deep($result->name) : '';
            $venue_desc = isset($result->venue_desc) ? stripslashes_deep($result->venue_desc) : '';
            $wp_user = isset($result->wp_user) ? $result->wp_user : '';
            ?>
							<tr>
								<td class="check-column" style="padding:7px 0 22px 5px; vertical-align:top;"><input name="checkbox[<?php 
            echo $venue_id;
            ?>
]" type="checkbox"  title="Delete <?php 
            echo stripslashes($name);
            ?>
"></td>
								<td class="column-comments" style="padding-top:3px;"><?php 
            echo $venue_id;
            ?>
</td>
								<td class="post-title page-title column-title"><strong><a href="admin.php?page=event_venues&action=edit&id=<?php 
            echo $venue_id;
            ?>
"><?php 
            echo $name;
            ?>
</a></strong>
									<div class="row-actions"> <span class="edit"><a href="admin.php?page=event_venues&action=edit&id=<?php 
            echo $venue_id;
            ?>
">
										<?php 
            _e('Edit', 'event_espresso');
            ?>
										</a> | </span> <span class="delete"><a onclick="return confirmDelete();" class="submitdelete" href="admin.php?page=event_venues&action=delete_venue&id=<?php 
            echo $venue_id;
            ?>
">
										<?php 
            _e('Delete', 'event_espresso');
            ?>
										</a></span> </div></td>
								<?php 
            if (function_exists('espresso_is_admin') && espresso_is_admin() == true && $espresso_premium == true) {
                ?>
								<td><?php 
                $last_locale_id = $wpdb->get_var("SELECT locale_id FROM " . EVENTS_LOCALE_REL_TABLE . " WHERE venue_id='" . $venue_id . "'");
                $locales = $wpdb->get_results("SELECT * FROM " . EVENTS_LOCALE_TABLE . " WHERE id = '" . $last_locale_id . "'");
                if (count($locales) > 0) {
                    foreach ($locales as $locale) {
                        $locale_id = $locale->id;
                        $name = stripslashes($locale->name);
                        echo $name;
                    }
                }
                ?>
</td>
								<?php 
            }
            ?>
								<?php 
            if (function_exists('espresso_is_admin') && espresso_is_admin() == true && $espresso_premium == true) {
                ?>
								<td><?php 
                echo 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');
                ?>
</td>
								<?php 
            }
            ?>
								<td>[ESPRESSO_VENUE id="<?php 
            echo $venue_id;
            ?>
"]</td>
							</tr>
							<?php 
        }
    }
    ?>
						</tbody>
					</table>
					<div style="clear:both">
						<p>
							<input type="checkbox" name="sAll" onclick="selectAll(this)" />
							<strong>
							<?php 
    _e('Check All', 'event_espresso');
    ?>
							</strong>
							<input name="delete_venue" type="submit" class="button-secondary" id="delete_venue" value="<?php 
    _e('Delete Venue', 'event_espresso');
    ?>
" style="margin-left:10px 0 0 10px;" onclick="return confirmDelete();">
							<a  style="margin-left:5px"class="button-primary" href="admin.php?page=event_venues&amp;action=add_new_venue">
							<?php 
    _e('Add New Venue', 'event_espresso');
    ?>
							</a> </p>
					</div>
				</form>
            <?php 
    $main_post_content = ob_get_clean();
    espresso_choose_layout($main_post_content, event_espresso_display_right_column());
    ?>
</div>
<?php 
    #### help dialogue box ####
    ?>
<div id="venue_locale" style="display:none">
	<div class="TB-ee-frame">
		<h2>
			<?php 
    _e('Venue Locale/Region', 'event_espresso');
    ?>
		</h2>
		<p>
			<?php 
    _e('This can be used to group venues together by locales/regions.', 'event_espresso');
    ?>
		</p>
		<p>
			<?php 
    _e('Once you have created a locale in the <a href="admin.php?page=event_locales"> Manage Locales/Regions</a> page it will be available to select on the \'Add a Venue\' page', 'event_espresso');
    ?>
		</p>
	</div>
</div>
<?php 
    #### end help ####
    ?>
<script>
jQuery(document).ready(function($) {						
	
	/* show the table data */
	var mytable = $('#table').dataTable( {
			"bStateSave": true,
			"sPaginationType": "full_numbers",

			"oLanguage": {	"sSearch": "<strong><?php 
    _e('Live Search Filter', 'event_espresso');
    ?>
:</strong>",
						 	"sZeroRecords": "<?php 
    _e('No Records Found!', 'event_espresso');
    ?>
" },
			"aoColumns": [
							{ "bSortable": false },
							 null,
							 <?php 
    echo function_exists('espresso_is_admin') && espresso_is_admin() == true ? 'null,' : '';
    ?>
							 null,
							 <?php 
    echo function_exists('espresso_is_admin') && espresso_is_admin() == true ? 'null,' : '';
    ?>
							 { "bSortable": false }
							
						]

	} );
	
} );		
// Add new venue form validation
	jQuery(function(){
		jQuery('#venues-form').validate({
		rules: {
		  name: "required"
		 },
		 messages: {
		  name: "please add a name for your venue"
			}
		
		});
		});
</script>
<?php 
}
コード例 #10
0
function espresso_social_config_mnu()
{
    global $espresso_twitter, $espresso_facebook, $espresso_google;
    /* Facebok */
    function espresso_facebook_updated()
    {
        echo '<div class="updated fade"><p>' . __('Facebook details saved.', 'event_espresso') . '</p></div>';
    }
    if (isset($_POST['update_facebook'])) {
        $espresso_facebook['espresso_facebook_layout'] = $_POST['espresso_facebook_layout'];
        $espresso_facebook['espresso_facebook_faces'] = $_POST['espresso_facebook_faces'];
        $espresso_facebook['espresso_facebook_action'] = $_POST['espresso_facebook_action'];
        $espresso_facebook['espresso_facebook_font'] = $_POST['espresso_facebook_font'];
        $espresso_facebook['espresso_facebook_colorscheme'] = $_POST['espresso_facebook_colorscheme'];
        $espresso_facebook['espresso_facebook_height'] = $_POST['espresso_facebook_height'];
        $espresso_facebook['espresso_facebook_width'] = $_POST['espresso_facebook_width'];
        update_option('espresso_facebook_settings', $espresso_facebook);
        add_action('admin_notices', 'espresso_facebook_updated');
    }
    $espresso_facebook = get_option('espresso_facebook_settings');
    /* Twitter */
    function espresso_twitter_updated()
    {
        echo '<div class="updated fade"><p>' . __('Twitter details saved.', 'event_espresso') . '</p></div>';
    }
    if (isset($_POST['update_twitter'])) {
        $espresso_twitter['espresso_twitter_text'] = stripslashes_deep($_POST['espresso_twitter_text']);
        $espresso_twitter['espresso_twitter_username'] = $_POST['espresso_twitter_username'];
        $espresso_twitter['espresso_twitter_count_box'] = $_POST['espresso_twitter_count_box'];
        $espresso_twitter['espresso_twitter_lang'] = $_POST['espresso_twitter_lang'];
        update_option('espresso_twitter_settings', $espresso_twitter);
        add_action('admin_notices', 'espresso_twitter_updated');
    }
    $espresso_twitter = get_option('espresso_twitter_settings');
    /* Google */
    function espresso_google_updated()
    {
        echo '<div class="updated fade"><p>' . __('Google details saved.', 'event_espresso') . '</p></div>';
    }
    if (isset($_POST['update_google'])) {
        $espresso_google['espresso_google_button_size'] = $_POST['espresso_google_button_size'];
        $espresso_google['espresso_google_url'] = $_POST['espresso_google_url'];
        $espresso_google['espresso_google_annotation'] = $_POST['espresso_google_annotation'];
        update_option('espresso_google_settings', $espresso_google);
        add_action('admin_notices', 'espresso_google_updated');
    }
    $espresso_google = get_option('espresso_google_settings');
    ?>

	<div id="configure_organization_form" class="wrap meta-box-sortables ui-sortable clearfix">

		<div id="icon-options-event" class="icon32"> </div>
		<h2>
			<?php 
    _e('Event Espresso - Social Media Settings', 'event_espresso');
    ?>
		</h2>
		<?php 
    ob_start();
    ?>
		<div class="metabox-holder">
			<div class="postbox">
				<div title="Click to toggle" class="handlediv"><br />
				</div>
				<h3 class="hndle">
					<?php 
    _e('Facebook Settings', 'event_espresso');
    ?>
				</h3>
				<div class="inside">
					<div class="padding">
						<form class="espresso_form" method="post" action="<?php 
    echo $_SERVER['REQUEST_URI'];
    ?>
">
							<table id="event_espresso-facebook" class="form-table">
								<tbody>
									<tr>
										<th>
											<label for="espresso_facebook_layout">
												<?php 
    _e('Layout Style:', 'event_espresso');
    ?>
											</label>
										</th>
										<td>
											<?php 
    $values = array(array('id' => 'button_count', 'text' => __('Horizontal Button Count', 'event_espresso')), array('id' => 'standard', 'text' => __('Horizontal Standard', 'event_espresso')), array('id' => 'box_count', 'text' => __('Vertical', 'event_espresso')));
    echo select_input('espresso_facebook_layout', $values, $espresso_facebook['espresso_facebook_layout'], 'id="espresso_facebook_layout"');
    ?>
										</td>
									</tr>
									<tr>
										<th>
											<label for="espresso_facebook_faces">
												<?php 
    _e('Show Faces:', 'event_espresso');
    ?>
											</label>
										</th>
										<td>
											<?php 
    $values = array(array('id' => 'true', 'text' => __('Yes', 'event_espresso')), array('id' => 'false', 'text' => __('No', 'event_espresso')));
    echo select_input('espresso_facebook_faces', $values, $espresso_facebook['espresso_facebook_faces'], 'id="espresso_facebook_faces"');
    ?>
										</td>
									</tr>
									<tr>
										<th>
											<label for="espresso_facebook_font">
												<?php 
    _e('Font:', 'event_espresso');
    ?>
											</label>
										</th>
										<td>
											<?php 
    $values = array(array('id' => 'arial', 'text' => __('arial', 'event_espresso')), array('id' => 'lucida grande', 'text' => __('lucida grande', 'event_espresso')), array('id' => 'segoe ui', 'text' => __('segoe ui', 'event_espresso')), array('id' => 'tahoma', 'text' => __('tahoma', 'event_espresso')), array('id' => 'trebuchet ms', 'text' => __('trebuchet ms', 'event_espresso')), array('id' => 'verdana', 'text' => __('verdana', 'event_espresso')));
    echo select_input('espresso_facebook_font', $values, $espresso_facebook['espresso_facebook_font'], 'id="espresso_facebook_font"');
    ?>
										</td>
									</tr>
									<tr>
										<th>
											<label for="espresso_facebook_colorscheme">
												<?php 
    _e('Color Scheme:', 'event_espresso');
    ?>
											</label>
										</th>
										<td>
											<?php 
    $values = array(array('id' => 'light', 'text' => __('Light', 'event_espresso')), array('id' => 'dark', 'text' => __('Dark', 'event_espresso')));
    echo select_input('espresso_facebook_colorscheme', $values, $espresso_facebook['espresso_facebook_colorscheme'], 'id="espresso_facebook_colorscheme"');
    ?>
										</td>
									</tr>
								</tbody>
							</table>
							<p>
								<input type="hidden" name="update_facebook" value="update" />
								<input class="button-primary" type="submit" name="Submit" value="<?php 
    _e('Save Facebook Options', 'event_espresso');
    ?>
" id="save_facebook_settings" />
							</p>
						</form>

					</div><!-- / .padding -->
				</div>
				<!-- / .inside -->
			</div>
			<!-- / .postbox -->
		</div>
		<!-- / .metabox-holder -->
		<div class="metabox-holder">
			<div class="postbox">
				<div title="Click to toggle" class="handlediv"><br />
				</div>
				<h3 class="hndle">
					<?php 
    _e('Twitter Settings', 'event_espresso');
    ?>
				</h3>
				<div class="inside">
					<div class="padding">
						<form class="espresso_form" method="post" action="<?php 
    echo $_SERVER['REQUEST_URI'];
    ?>
">
							<table id="event_espresso-facebook" class="form-table">
								<tbody>
									<tr>
										<th>
											<label for="espresso_twitter_username">
												<?php 
    _e('Twitter Username:'******'event_espresso');
    ?>
											</label>
										</th>
										<td>
											<input id="espresso_twitter_username" type="text" name="espresso_twitter_username" size="30" maxlength="20" value="<?php 
    echo $espresso_twitter['espresso_twitter_username'];
    ?>
" />
										</td>
									</tr>
									<tr>
										<th>
											<label for="espresso_twitter_count_box">
												<?php 
    _e('Count Box Position:', 'event_espresso');
    ?>
											</label>
										</th>
										<td>
											<?php 
    $values = array(array('id' => 'none', 'text' => __('None', 'event_espresso')), array('id' => 'horizontal', 'text' => __('Horizontal', 'event_espresso')), array('id' => 'vertical', 'text' => __('Vertical', 'event_espresso')));
    echo select_input('espresso_twitter_count_box', $values, $espresso_twitter['espresso_twitter_count_box'], 'id="espresso_twitter_count_box"');
    ?>
										</td>
									</tr>
									<tr>
										<th>
											<label for="espresso_twitter_lang">
												<?php 
    _e('The language for the Tweet Button:', 'event_espresso');
    ?>
											</label>
										</th>
										<td>
											<?php 
    $values = array(array('id' => 'en', 'text' => __('English', 'event_espresso')), array('id' => 'da', 'text' => __('Danish', 'event_espresso')), array('id' => 'dl', 'text' => __('Dutch', 'event_espresso')), array('id' => 'fr', 'text' => __('French', 'event_espresso')), array('id' => 'de', 'text' => __('German', 'event_espresso')), array('id' => 'es', 'text' => __('Spanish', 'event_espresso')));
    echo select_input('espresso_twitter_lang', $values, $espresso_twitter['espresso_twitter_lang'], 'id="espresso_twitter_lang"');
    ?>
										</td>
									</tr>
								</tbody>
							</table>
							<p>
								<input type="hidden" name="update_twitter" value="update" />
								<input class="button-primary" type="submit" name="Submit" value="<?php 
    _e('Save Twitter Options', 'event_espresso');
    ?>
" id="save_twitter_settings" />
							</p>
						</form>
					</div><!-- / .padding -->
				</div>
				<!-- / .inside -->
			</div>
			<!-- / .postbox -->
		</div>
		<!-- / .metabox-holder -->
		<div class="metabox-holder">
			<div class="postbox">
				<div title="Click to toggle" class="handlediv"><br />
				</div>
				<h3 class="hndle">
					<?php 
    _e('Google+1  Settings', 'event_espresso');
    ?>
				</h3>
				<div class="inside">
					<div class="padding">
						<form class="espresso_form" method="post" action="<?php 
    echo $_SERVER['REQUEST_URI'];
    ?>
">
							<table id="event_espresso-facebook" class="form-table">
								<tbody>
									<tr>
										<th>
											<label for="espresso_google_button_size">
												<?php 
    _e('Google Button size:', 'event_espresso');
    ?>
											</label>
										</th>
										<td>
											<?php 
    $values = array(array('id' => 'medium', 'text' => __('Horizontal', 'event_espresso')), array('id' => 'tall', 'text' => __('Vertical', 'event_espresso')));
    echo select_input('espresso_google_button_size', $values, $espresso_google['espresso_google_button_size'], 'id="espresso_google_button_size"');
    ?>
										</td>
									</tr>
									<tr>
										<th>
											<label for="espresso_google_annotation">
												<?php 
    _e('Google text display:', 'event_espresso');
    ?>
											</label>
										</th>
										<td>
											<?php 
    $values = array(array('id' => 'none', 'text' => __('No Text', 'event_espresso')), array('id' => 'inline', 'text' => __('Inline Text', 'event_espresso')), array('id' => 'bubble', 'text' => __('In Speech Bubble', 'event_espresso')));
    echo select_input('espresso_google_annotation', $values, $espresso_google['espresso_google_annotation'], 'id="espresso_google_annotation"');
    ?>
										</td>
									</tr>
								</tbody>
							</table>
							<p>
								<input type="hidden" name="update_google" value="update" />
								<input class="button-primary" type="submit" name="Submit" value="<?php 
    _e('Save Google Options', 'event_espresso');
    ?>
" id="save_google_settings" />
							</p>
						</form>
					</div><!-- / .padding -->
				</div>
				<!-- / .inside -->
			</div>
			<!-- / .postbox -->
		</div>
		<!-- / .metabox-holder -->
		<?php 
    $main_post_content = ob_get_clean();
    espresso_choose_layout($main_post_content, event_espresso_display_right_column());
    ?>
	</div>
	<script type="text/javascript">
		//<![CDATA[
		jQuery(document).ready(function($){
			// WP toggle function
			postboxes.add_postbox_toggles('espresso_calendar');
		});
		//]]>
	</script>
	<?php 
}
コード例 #11
0
function event_espresso_categories_config_mnu()
{
    global $wpdb, $current_user;
    ?>

	<div class="wrap">
		<div id="icon-options-event" class="icon32"> </div>
		<h2>
			<?php 
    _e('Manage Event Categories', 'event_espresso');
    ?>
			<?php 
    if (!isset($_REQUEST['action']) || $_REQUEST['action'] != 'edit' && $_REQUEST['action'] != 'add_new_category') {
        echo '<a href="admin.php?page=event_categories&amp;action=add_new_category" class="button add-new-h2" style="margin-left: 20px;">' . __('Add New Category', 'event_espresso') . '</a>';
    }
    ?>
		</h2>
		<?php 
    ob_start();
    if (!empty($_POST['delete_category']) || isset($_REQUEST['action']) && $_REQUEST['action'] == 'delete_category') {
        if (is_array($_POST['checkbox'])) {
            while (list($key, $value) = each($_POST['checkbox'])) {
                $del_id = $key;
                //Delete category data
                $sql = "DELETE FROM " . EVENTS_CATEGORY_TABLE . " WHERE id='{$del_id}'";
                $wpdb->query($sql);
                $sql = "DELETE FROM " . EVENTS_CATEGORY_REL_TABLE . " WHERE cat_id='{$del_id}'";
                $wpdb->query($sql);
            }
        }
        if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'delete_category') {
            //Delete discount data
            $sql = "DELETE FROM " . EVENTS_CATEGORY_TABLE . " WHERE id='" . $_REQUEST['id'] . "'";
            $wpdb->query($sql);
            $sql = "DELETE FROM " . EVENTS_CATEGORY_REL_TABLE . " WHERE cat_id='" . $_REQUEST['id'] . "'";
            $wpdb->query($sql);
        }
        ?>
			<div id="message" class="updated fade">
				<p><strong>
		<?php 
        _e('Categories have been successfully deleted from the event.', 'event_espresso');
        ?>
					</strong></p>
			</div>
			<?php 
    }
    $button_style = 'button-primary';
    if (isset($_REQUEST['action'])) {
        switch ($_REQUEST['action']) {
            case 'update':
                require_once "update_event_category.php";
                update_event_category();
                break;
            case 'add':
                require_once "add_cat_to_db.php";
                add_cat_to_db();
                break;
            case 'add_new_category':
                require_once "add_new_category.php";
                add_new_event_category();
                $button_style = 'button-secondary';
                break;
            case 'edit':
                require_once "edit_event_category.php";
                edit_event_category();
                $button_style = 'button-secondary';
                break;
        }
    }
    ?>
		<form id="form1" name="form1" method="post" action="<?php 
    echo $_SERVER["REQUEST_URI"];
    ?>
">
			<table id="table" class="widefat manage-categories">
				<thead>
					<tr>
						<th class="manage-column column-cb check-column" id="cb" scope="col" style="width:2.5%;"><input type="checkbox"></th>
						<th class="manage-column column-comments num" id="id" style="padding-top:7px; width:2.5%;" scope="col" title="Click to Sort"><?php 
    _e('ID', 'event_espresso');
    ?>
</th>
						<th class="manage-column column-title" id="name" scope="col" title="Click to Sort" style="width:20%;"><?php 
    _e('Name', 'event_espresso');
    ?>
</th>
						<?php 
    if (function_exists('espresso_is_admin') && espresso_is_admin() == true) {
        ?>
							<th class="manage-column column-creator" id="creator" scope="col" title="Click to Sort" style="width:10%;"><?php 
        _e('Creator', 'event_espresso');
        ?>
</th>
	<?php 
    }
    ?>
						<th class="manage-column column-author" id="start" scope="col" title="Click to Sort" style="width:20%;"><?php 
    _e('Shortcode', 'event_espresso');
    ?>
</th>
					</tr>
				</thead>
				<tbody>
					<?php 
    $sql = "SELECT * FROM " . EVENTS_CATEGORY_TABLE . " c";
    if (function_exists('espresso_member_data') && (espresso_member_data('role') == 'espresso_event_manager' || espresso_member_data('role') == 'espresso_group_admin')) {
        $sql .= " JOIN {$wpdb->users} u on u.ID = c.wp_user WHERE c.wp_user = "******" ORDER BY c.id ASC");
        foreach ($results as $result) {
            $category_id = $result->id;
            $category_name = stripslashes($result->category_name);
            $category_identifier = stripslashes($result->category_identifier);
            $wp_user = $result->wp_user;
            ?>
							<tr>
								<td class="check-column" style="padding:7px 0 22px 5px; vertical-align:top;"><input name="checkbox[<?php 
            echo $category_id;
            ?>
]" type="checkbox"  title="Delete <?php 
            echo stripslashes($category_name);
            ?>
"></td>
								<td class="column-comments" style="padding-top:3px;"><?php 
            echo $category_id;
            ?>
</td>
								<td class="post-title page-title column-title"><strong><a href="admin.php?page=event_categories&action=edit&id=<?php 
            echo $category_id;
            ?>
"><?php 
            echo $category_name;
            ?>
</a></strong>
									<div class="row-actions"> <span class="edit"><a href="admin.php?page=event_categories&action=edit&id=<?php 
            echo $category_id;
            ?>
">
												<?php 
            _e('Edit', 'event_espresso');
            ?>
											</a> | </span> <span class="delete"><a onclick="return confirmDelete();" class="submitdelete" href="admin.php?page=event_categories&action=delete_category&id=<?php 
            echo $category_id;
            ?>
">
								<?php 
            _e('Delete', 'event_espresso');
            ?>
											</a></span></div></td>
								<?php 
            if (function_exists('espresso_is_admin') && espresso_is_admin() == true) {
                ?>
									<td><?php 
                echo 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');
                ?>
</td>
			<?php 
            }
            ?>
								<td>[EVENT_ESPRESSO_CATEGORY event_category_id="<?php 
            echo $category_identifier;
            ?>
"]</td>
							</tr>
						<?php 
        }
    }
    ?>
				</tbody>
			</table>
			<div style="clear:both">
				<p>
					<input type="checkbox" name="sAll" onclick="selectAll(this)" />
					<strong>
	<?php 
    _e('Check All', 'event_espresso');
    ?>
					</strong>
					<input name="delete_category" type="submit" class="button-secondary" id="delete_category" value="<?php 
    _e('Delete Category', 'event_espresso');
    ?>
" style="margin-left:10px 0 0 10px;" onclick="return confirmDelete();">
					<a  style="margin-left:5px"class="<?php 
    echo $button_style;
    ?>
" href="admin.php?page=event_categories&amp;action=add_new_category">
	<?php 
    _e('Add New Category', 'event_espresso');
    ?>
					</a> </p>
			</div>
		</form>
		<?php 
    $main_post_content = ob_get_clean();
    espresso_choose_layout($main_post_content, event_espresso_display_right_column());
    ?>
	</div>
	<div id="unique_id_info" style="display:none">
		<h2>
			<?php 
    _e('Unique Category Identifier', 'event_espresso');
    ?>
		</h2>
		<p>
			<?php 
    _e('This should be a unique identifier for the category. Example: "category1" (without quotes.)', 'event_espresso');
    ?>
		</p>
		<p>The
			<?php 
    _e(' unique ID can also be used in individual pages using the', 'event_espresso');
    ?>
			[EVENT_ESPRESSO_CATEGORY event_category_id="category_identifier"]
	<?php 
    _e('shortcode', 'event_espresso');
    ?>
			.</p>
	</div>
	<script>
		jQuery(document).ready(function($) {
		
				
				
			/* show the table data */
			var mytable = $('#table').dataTable( {
				"bStateSave": true,
				"sPaginationType": "full_numbers",

				"oLanguage": {	"sSearch": "<strong><?php 
    _e('Live Search Filter', 'event_espresso');
    ?>
:</strong>",
					"sZeroRecords": "<?php 
    _e('No Records Found!', 'event_espresso');
    ?>
" },
				"aoColumns": [
					{ "bSortable": false },
					null,
					null,
	<?php 
    echo function_exists('espresso_is_admin') && espresso_is_admin() == true ? 'null,' : '';
    ?>
							{ "bSortable": false }

						]

					});
		
					// disable color picker inputs & fade if not use controls true
					window.scp = $('select#espresso_use_pickers option:selected').val();
				
					if(window.scp == 'N'){
						$('input#event-background, input#event-text').attr('disabled', true);
						$('.color-picker-style').attr('style', "opacity: .3");
						$('tr.color-picker-selections th, tr.color-picker-selections td').attr('style', "opacity: .3");
					}
				
					$('select#espresso_use_pickers').change(function(){
						window.scp = $('select#espresso_use_pickers option:selected').val();
						if(window.scp == 'N'){
							$('input#event-background, input#event-text').attr('disabled', true);
							$('tr.color-picker-selections th, tr.color-picker-selections td').attr('style', "opacity: .3");
						}else {
							$('input#event-background, input#event-text').removeAttr('disabled', true);
							$('tr.color-picker-selections th, tr.color-picker-selections td').removeAttr('style');
						}
					});

					// color picker initialization
					$('#colorpicker-1').hide();
					$('#colorpicker-2').hide();
					$('#colorpicker-1').farbtastic("#background-color");
					$('#colorpicker-2').farbtastic("#text-color");
					$("#background-color").click(function(){$('#colorpicker-1').slideToggle()});
					$("#text-color").click(function(){$('#colorpicker-2').slideToggle()});

				});

				// Add category form validation
				jQuery(function(){
					jQuery("#add-new-cat").validate({
						rules: {
							category_name: "required"
						},
						messages: {
							category_name: "please add a category name"
						}
					});		
				});
	</script>
	<?php 
}
コード例 #12
0
function event_espresso_addons_mnu()
{
    global $wpdb;
    ?>

	<div id="event_reg_theme" class="wrap">
	  <div id="icon-options-event" class="icon32"></div>
	  <h2><?php 
    echo _e('Manage Addons', 'event_espresso');
    ?>
</h2>
	<?php 
    ob_start();
    ?>
	  <div class="metabox-holder">
	    <div class="postbox">
	      <h3>
	<?php 
    _e('Recurring Events Manager', 'event_espresso');
    ?>
	      </h3>
	      <div class="inside">
					<ul>
						<li>The <a href="http://eventespresso.com/download/plugins-and-addons/recurring-events-manager/" target="_blank">Recurring Events Manager</a> for Event Espresso adds an even more power to this amazing event registration and management system for WordPress. It can automatically create repeating events and classes that practically manage themselves. Just install this addon in conjunction with Event Espresso and start creating classes, meetings, and conferences for months (and even years) to come.</li>
						<?php 
    if (function_exists('recurring_days')) {
        echo '<li>';
        echo '<strong style="padding:5px;" class="green_alert">' . __('Installed', 'event_espresso') . '</strong>';
        echo '</li>';
    } else {
        echo '<li><a href="https://www.e-junkie.com/ecom/gb.php?c=cart&i=ESPRESSO-REM&cl=113214&ejc=2" target="ej_ejc" class="ec_ejc_thkbx" onClick="javascript:return EJEJC_lc(this);"><img src="' . EVENT_ESPRESSO_PLUGINFULLURL . '/images/add-to-cart.gif" border="0" alt="Add to Cart"/></a> <a href="https://www.e-junkie.com/ecom/gb.php?c=cart&cl=113214&ejc=2" target="ej_ejc" class="ec_ejc_thkbx" onClick="javascript:return EJEJC_lc(this);"><img src="' . EVENT_ESPRESSO_PLUGINFULLURL . '/images/checkout-button.gif" border="0" alt="View Cart"/></a></li>';
    }
    ?>
					</ul>
	      </div>
	    </div>
	  </div>
	  <div class="metabox-holder">
	    <div class="postbox">
	      <h3>
	<?php 
    _e('Groupon Integration Module', 'event_espresso');
    ?>
	      </h3>
	      <div class="inside">
					<ul>
						<li>Did your site get featured on <a href="http://www.groupon.com/" target="_blank">Groupon.com</a>? Now you can easily accept Groupon codes to your events! Once installed, just upload all of your Groupon codes to the database and your ready to go. How easy is that?</li>
						<li><strong><?php 
    _e('About Groupon', 'event_espresso');
    ?>
</strong><a href="http://www.groupon.com/" target="_blank"><img style="padding:0 10px;" align="right" src="<?php 
    echo EVENT_ESPRESSO_PLUGINFULLURL;
    ?>
images/groupon_logo.png" width="149" height="70" alt="GROUPON" /></a></li>
						<li><a href="http://www.groupon.com/" target="_blank">Groupon</a> is a deal-of-the-day website that is localized to major markets in the United States. The first market for Groupon was Chicago, followed soon thereafter by Boston and New York City. As of January 2010, Groupon serves more than 40 markets. Groupon debuted in November 2008 as part of The Point, a platform for collective action.</li>

						<?php 
    if (function_exists('event_espresso_groupon_config_mnu')) {
        echo '<li>';
        echo '<strong style="padding:5px;" class="green_alert">' . __('Installed', 'event_espresso') . '</strong>';
        echo '</li>';
    } else {
        echo '<li><a href="https://www.e-junkie.com/ecom/gb.php?c=cart&i=ESPRESSO-GROUPON&cl=113214&ejc=2" target="ej_ejc" class="ec_ejc_thkbx" onClick="javascript:return EJEJC_lc(this);"><img src="' . EVENT_ESPRESSO_PLUGINFULLURL . '/images/add-to-cart.gif" border="0" alt="Add to Cart"/></a> <a href="https://www.e-junkie.com/ecom/gb.php?c=cart&cl=113214&ejc=2" target="ej_ejc" class="ec_ejc_thkbx" onClick="javascript:return EJEJC_lc(this);"><img src="' . EVENT_ESPRESSO_PLUGINFULLURL . '/images/checkout-button.gif" border="0" alt="View Cart"/></a></li>';
    }
    ?>
					</ul>
	      </div>
	    </div>
	  </div>
	  <div class="metabox-holder">
	    <div class="postbox">

	      <h3>
	<?php 
    _e('Members Integration Module', 'event_espresso');
    ?>
	      </h3><div class="inside">
					<ul>
						<?php 
    echo '<li>The "Member Integration Module" allows you to take full advantage of the WordPress user system. </li>';
    echo '<li><p><strong>Member Pricing</strong><br />Allows you to override event prices when your members are logged in. <a class="ev_reg_event_info" href="' . EVENT_ESPRESSO_PLUGINFULLURL . '/images/member-setup-screen.jpg">Sample Screen</a></p></li>';
    echo '<li><p><strong>Member Profiles</strong><br />Members can store personal information into the WordPress databse allowing your members to quickly register for events by auto-filling in the personal information on the event registration form. Your users can also view past events, pay for events, and cancel registrations to current events.  <a class="ev_reg_event_info" href="' . EVENT_ESPRESSO_PLUGINFULLURL . '/images/member-event-management-scr.jpg">My Events Screen</a> | <a class="ev_reg_event_info" href="' . EVENT_ESPRESSO_PLUGINFULLURL . '/images/events-profile-screen.jpg">Profile Screen</a></p></li>';
    echo '<li><p><strong>Roles and Capabilites</strong><br />If you are already using the "<a href="http://wordpress.org/extend/plugins/members/" target="_blank">Members</a>" plugin by <a href="Justin Tadlock" target="_blank">Justin Tadlock</a>. Your custom roles will be stored as well. With a little customization, you will be able to display events by user role, membership level, etc.</p></li>';
    if (function_exists('event_espresso_member_only_pricing')) {
        echo '<li>';
        echo '<strong style="padding:5px;" class="green_alert">' . __('Installed', 'event_espresso') . '</strong>';
        echo '</li>';
    } else {
        echo '<li><a href="https://www.e-junkie.com/ecom/gb.php?c=cart&i=ESPRESSO-MEM-ADDON&cl=113214&ejc=2" target="ej_ejc" class="ec_ejc_thkbx" onClick="javascript:return EJEJC_lc(this);"><img src="' . EVENT_ESPRESSO_PLUGINFULLURL . '/images/add-to-cart.gif" border="0" alt="Add to Cart"/></a> <a href="https://www.e-junkie.com/ecom/gb.php?c=cart&cl=113214&ejc=2" target="ej_ejc" class="ec_ejc_thkbx" onClick="javascript:return EJEJC_lc(this);"><img src="' . EVENT_ESPRESSO_PLUGINFULLURL . '/images/checkout-button.gif" border="0" alt="View Cart"/></a></li>';
    }
    ?>
					</ul>
	      </div>
	    </div>
	  </div>

	  <div class="metabox-holder">
	    <div class="postbox">
	      <h3>
	<?php 
    _e('Custom Files', 'event_espresso');
    ?>
	      </h3>
	      <div class="inside">
					<ul>
						<li><?php 
    _e('These files offer support for custom templates, functions, and shortcodes. Virtually allowing you to customize the plugin to your needs and making your custom changes future proof.', 'event_espresso');
    ?>
</li>
						<?php 
    if (file_exists(EVENT_ESPRESSO_UPLOAD_DIR . "custom_includes.php") || file_exists(EVENT_ESPRESSO_UPLOAD_DIR . "custom_functions.php") || file_exists(EVENT_ESPRESSO_UPLOAD_DIR . "custom_shortcodes.php")) {
        ?>
							<?php 
        if (file_exists(EVENT_ESPRESSO_UPLOAD_DIR . "custom_includes.php")) {
            ?>
<li><strong style="color:#090">custom_includes.php <?php 
            _e(' - Installed', 'event_espresso');
            ?>
</strong></li><?php 
        } else {
            ?>
<li><strong style="color:#F00">custom_includes.php <?php 
            _e(' - Not Installed', 'event_espresso');
            ?>
</strong></li><?php 
        }
        ?>
							<?php 
        if (file_exists(EVENT_ESPRESSO_UPLOAD_DIR . "custom_functions.php")) {
            ?>
<li><strong style="color:#090">custom_functions.php <?php 
            _e(' - Installed', 'event_espresso');
            ?>
</strong></li><?php 
        } else {
            ?>
<li><strong style="color:#F00">custom_functions.php <?php 
            _e(' - Not Installed', 'event_espresso');
            ?>
</strong></li><?php 
        }
        ?>
							<?php 
        if (file_exists(EVENT_ESPRESSO_UPLOAD_DIR . "custom_shortcodes.php")) {
            ?>
<li><strong style="color:#090">custom_shortcodes.php <?php 
            _e(' - Installed', 'event_espresso');
            ?>
</strong></li><?php 
        } else {
            ?>
<li><strong style="color:#F00">custom_shortcodes.php <?php 
            _e(' - Not Installed', 'event_espresso');
            ?>
</strong></li><?php 
        }
        ?>
						<?php 
    } else {
        echo '<li><a href="https://www.e-junkie.com/ecom/gb.php?c=cart&i=AERPRO-CF-ADDON&cl=113214&ejc=2" target="ej_ejc" class="ec_ejc_thkbx" onClick="javascript:return EJEJC_lc(this);"><img src="' . EVENT_ESPRESSO_PLUGINFULLURL . '/images/add-to-cart.gif" border="0" alt="Add to Cart"/></a> <a href="https://www.e-junkie.com/ecom/gb.php?c=cart&cl=113214&ejc=2" target="ej_ejc" class="ec_ejc_thkbx" onClick="javascript:return EJEJC_lc(this);"><img src="' . EVENT_ESPRESSO_PLUGINFULLURL . '/images/checkout-button.gif" border="0" alt="View Cart"/></a></li>';
    }
    ?>
					</ul>
	      </div>
	    </div>
	  </div>
		<?php 
    $main_post_content = ob_get_clean();
    espresso_choose_layout($main_post_content, event_espresso_display_right_column());
    ?>
	</div>

	<script language="javascript" type="text/javascript">
		<!--
		function EJEJC_lc(th) { return false; }
		// -->
	</script>
	<script src='http://www.e-junkie.com/ecom/box.js' type='text/javascript'></script>
	<?php 
}
コード例 #13
0
ファイル: index.php プロジェクト: sriram911/pls
function event_espresso_staff_config_mnu()
{
    global $wpdb, $current_user, $espresso_premium;
    $_REQUEST['action'] = isset($_REQUEST['action']) ? $_REQUEST['action'] : NULL;
    ?>
    <div class="wrap">
        <div id="icon-options-event" class="icon32"> </div>
        <h2><?php 
    _e('Manage Staff Members', 'event_espresso');
    ?>
            <?php 
    if ($_REQUEST['action'] != 'edit' && $_REQUEST['action'] != 'add_new_staff') {
        echo '<a href="admin.php?page=event_staff&amp;action=add_new_staff" class="button add-new-h2" style="margin-left: 20px;">' . __('Add New Staff Member', 'event_espresso') . '</a>';
    }
    ?>
        </h2>
        <?php 
    ob_start();
    if (isset($_POST['delete_staff']) || $_REQUEST['action'] == 'delete_staff') {
        if (is_array($_POST['checkbox'])) {
            while (list($key, $value) = each($_POST['checkbox'])) {
                $del_id = $key;
                //Delete staff data
                $sql = "DELETE FROM " . EVENTS_PERSONNEL_TABLE . " WHERE id='{$del_id}'";
                $wpdb->query($sql);
                $sql = "DELETE FROM " . EVENTS_PERSONNEL_REL_TABLE . " WHERE person_id='{$del_id}'";
                $wpdb->query($sql);
            }
        }
        if ($_REQUEST['action'] == 'delete_staff') {
            //Delete discount data
            $sql = "DELETE FROM " . EVENTS_PERSONNEL_TABLE . " WHERE id='" . $_REQUEST['id'] . "'";
            $wpdb->query($sql);
            $sql = "DELETE FROM " . EVENTS_PERSONNEL_REL_TABLE . " WHERE person_id='" . $_REQUEST['id'] . "'";
            $wpdb->query($sql);
        }
        ?>
            <div id="message" class="updated fade">
                <p><strong>
            <?php 
        _e('Staff member(s) have been successfully deleted from the event.', 'event_espresso');
        ?>
                    </strong></p>
            </div>
        <?php 
    }
    if ($_REQUEST['action'] == 'update') {
        require_once "update_staff.php";
        update_event_staff();
    }
    if ($_REQUEST['action'] == 'add') {
        require_once "add_staff_to_db.php";
        add_staff_to_db();
    }
    if ($_REQUEST['action'] == 'add_new_staff') {
        require_once "add_new_staff.php";
        add_new_event_staff();
    }
    if ($_REQUEST['action'] == 'edit') {
        require_once "edit_staff.php";
        edit_event_staff();
    }
    ?>
        <form id="form1" name="form1" method="post" action="<?php 
    echo $_SERVER["REQUEST_URI"];
    ?>
">

            <table id="table" class="widefat manage-discounts"> 
                <thead>
                    <tr>
                        <th class="manage-column column-cb check-column" id="cb" scope="col" style="width:2.5%;"><input type="checkbox"></th>
                        <th class="manage-column column-comments num" id="id" style="padding-top:7px; width:2.5%;" scope="col" title="Click to Sort"><?php 
    _e('ID', 'event_espresso');
    ?>
</th>
                        <th class="manage-column column-title" id="name" scope="col" title="Click to Sort" style="width:20%;"><?php 
    _e('Name', 'event_espresso');
    ?>
</th>
                    <?php 
    if (function_exists('espresso_is_admin') && espresso_is_admin() == true) {
        ?>
                            <th class="manage-column column-creator" id="creator" scope="col" title="Click to Sort" style="width:10%;"><?php 
        _e('Creator', 'event_espresso');
        ?>
</th>
                    <?php 
    }
    ?>

                        <th class="manage-column column-author" id="start" scope="col" title="Click to Sort" style="width:20%;"><?php 
    _e('Shortcode', 'event_espresso');
    ?>
</th>             
                    </tr>
                </thead>
                <tbody>
                    <?php 
    $limitstaff = false;
    global $espresso_manager;
    if (function_exists('espresso_member_data')) {
        if (function_exists('espresso_member_data') && espresso_member_data('role') == 'espresso_group_admin') {
            if ($espresso_manager['event_manager_staff'] == "Y") {
                $limitstaff = true;
            }
        } else {
            if (function_exists('espresso_member_data') && espresso_member_data('role') == 'espresso_event_manager') {
                $limitstaff = true;
            }
        }
    }
    $sql = "SELECT * FROM " . EVENTS_PERSONNEL_TABLE . " p";
    if ($limitstaff) {
        $sql .= " JOIN {$wpdb->users} u on u.ID = p.wp_user WHERE p.wp_user = "******" ORDER BY p.id ASC");
        foreach ($results as $result) {
            $staff_id = $result->id;
            $name = isset($result->name) ? stripslashes_deep($result->name) : '';
            $staff_desc = isset($result->staff_desc) ? stripslashes_deep($result->staff_desc) : '';
            $wp_user = isset($result->wp_user) ? $result->wp_user : '';
            ?>
                            <tr>
                                <td class="check-column" style="padding:7px 0 22px 5px; vertical-align:top;"><input name="checkbox[<?php 
            echo $staff_id;
            ?>
]" type="checkbox"  title="Delete <?php 
            echo stripslashes($name);
            ?>
"></td>
                                <td class="column-comments" style="padding-top:3px;"><?php 
            echo $staff_id;
            ?>
</td>
                                <td class="post-title page-title column-title"><strong><a href="admin.php?page=event_staff&action=edit&id=<?php 
            echo $staff_id;
            ?>
"><?php 
            echo $name;
            ?>
</a></strong>
                                    <div class="row-actions">
                                        <span class="edit"><a href="admin.php?page=event_staff&action=edit&id=<?php 
            echo $staff_id;
            ?>
"><?php 
            _e('Edit', 'event_espresso');
            ?>
</a> | </span>
                                        <span class="delete">
                                            <a  onclick="return confirmDelete();" class="submitdelete" href="admin.php?page=event_staff&action=delete_staff&id=<?php 
            echo $staff_id;
            ?>
"><?php 
            _e('Delete', 'event_espresso');
            ?>
</a>
                                        </span>
                                    </div>
                                </td>
            <?php 
            if (function_exists('espresso_is_admin') && espresso_is_admin() == true) {
                ?>
                                    <td><?php 
                echo 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');
                ?>
</td>
            <?php 
            }
            ?>
                                <td>[ESPRESSO_STAFF id="<?php 
            echo $staff_id;
            ?>
"]</td>

                            </tr>
            <?php 
        }
    }
    ?>
                </tbody>
            </table>
            <div style="clear:both">
                <p>
                    <input type="checkbox" name="sAll" onclick="selectAll(this)" />
                    <strong>
    <?php 
    _e('Check All', 'event_espresso');
    ?>
                    </strong>
                    <input name="delete_staff" type="submit" class="button-secondary" id="delete_staff" value="<?php 
    _e('Delete Staff Member(s)', 'event_espresso');
    ?>
" style="margin-left:10px 0 0 10px;" onclick="return confirmDelete();" />
                    <a  style="margin-left:5px"class="button-primary" href="admin.php?page=event_staff&amp;action=add_new_staff"><?php 
    _e('Add New Staff Member', 'event_espresso');
    ?>
</a>
                </p>
            </div>
        </form>
    <?php 
    $main_post_content = ob_get_clean();
    espresso_choose_layout($main_post_content, event_espresso_display_right_column());
    ?>
    </div>

    <script>
        jQuery(document).ready(function($) {						
    	
            /* show the table data */
            var mytable = $('#table').dataTable( {
                "bStateSave": true,
                "sPaginationType": "full_numbers",

                "oLanguage": {	"sSearch": "<strong><?php 
    _e('Live Search Filter', 'event_espresso');
    ?>
:</strong>",
                    "sZeroRecords": "<?php 
    _e('No Records Found!', 'event_espresso');
    ?>
" },
                "aoColumns": [
                    { "bSortable": false },
                    null,
                    null,
    <?php 
    echo function_exists('espresso_is_admin') && espresso_is_admin() == true ? 'null,' : '';
    ?>
                                                                             { "bSortable": false }
    							
                                                                         ]

                                                                     } );
    	
                                                                 } );
                                                                 // Add new staff form validation
                                                                 jQuery(function(){
                                                                     jQuery('#add-staff').validate({
                                                                         rules: {
                                                                             name: "required"
                                                                         },
                                                                         messages: {
                                                                             name: "Please add a name for your new staff member"
                                                                         }
                                                                     });
                                                                 });
    </script>

    <?php 
}
コード例 #14
0
function add_new_event()
{
    global $wpdb, $org_options, $espresso_premium;
    ob_start();
    if (empty($event_name)) {
        $event_name = '';
    }
    ?>
<!--New event display-->
		<div id="submitdiv" class="postbox">
			<div class="handlediv" title="Click to toggle"><br />
			</div>
			<h3 class="hndle"> <span>
				<?php 
    _e('New Event', 'event_espresso');
    ?>
				</span> </h3>
			<div class="inside">
				<div class="submitbox" id="submitpost"><!-- /minor-publishing -->
					<div id="major-publishing-actions" class="clearfix">
						<div id="delete-action"> <a class="submitdelete deletion" href="admin.php?page=events" onclick="return confirm('<?php 
    _e('Are you sure you want to cancel ' . $event_name . '?', 'event_espresso');
    ?>
')">
							<?php 
    _e('Cancel', 'event_espresso');
    ?>
							</a> </div>
						<div id="publishing-action">
							<input class="button-primary" type="submit" name="Submit" value="<?php 
    _e('Submit New Event', 'event_espresso');
    ?>
" id="add_new_event" />
						</div>
						<!-- /publishing-action --> 
					</div>
					<!-- /major-publishing-actions --> 
				</div>
				<!-- /submitpost --> 
			</div>
			<!-- /inside --> 
		</div>
		<!-- /submitdiv -->
		
<?php 
    if ($espresso_premium == true) {
        do_action('action_hook_espresso_new_event_right_column_top');
    }
    $values = array(array('id' => 'Y', 'text' => __('Yes', 'event_espresso')), array('id' => 'N', 'text' => __('No', 'event_espresso')));
    $event_meta = isset($event_meta) ? $event_meta : array();
    $advanced_options = '';
    if (file_exists(EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/event-management/advanced_settings.php')) {
        require_once EVENT_ESPRESSO_PLUGINFULLPATH . "includes/admin-files/event-management/advanced_settings.php";
    } else {
        //Display Lite version options
        $status = array(array('id' => 'A', 'text' => __('Active', 'event_espresso')), array('id' => 'D', 'text' => __('Deleted', 'event_espresso')));
        $advanced_options = '<p><strong>' . __('Advanced Options:', 'event_espresso') . '</strong></p>' . '<p>' . __('Is this an active event? ', 'event_espresso') . __(select_input('is_active', $values, $is_active)) . '</p>' . '<p>' . __('Display  description? ', 'event_espresso') . select_input('display_desc', $values, $display_desc) . '</p>' . '<p>' . __('Display  registration form? ', 'event_espresso') . select_input('display_reg_form', $values, $display_reg_form) . '</p>';
    }
    //Display Lite version options - End
    $reg_limit = isset($reg_limit) ? $reg_limit : '';
    $additional_limit = isset($additional_limit) ? $additional_limit : '';
    espresso_postbox('event-status', 'Event Options', '<p>' . __('Attendee Limit', 'event_espresso') . ': <input name="reg_limit" size="10" type="text" value="' . $reg_limit . '"><br />' . '(' . __('leave blank for unlimited', 'event_espresso') . ')</p>' . '<p>' . __('Allow group registrations?', 'event_espresso') . ' ' . select_input('allow_multiple', $values, 'N') . '<p>' . __('Max Group Registrants', 'event_espresso') . ': <input type="text" name="additional_limit" value="' . $additional_limit . '" size="4">' . $advanced_options);
    if (function_exists('espresso_ticket_dd') && $espresso_premium == true) {
        ?>
		<div id="event-category" class="postbox">
			<div class="handlediv" title="Click to toggle"><br>
			</div>
			<h3 class="hndle"> <span>
				<?php 
        _e('Custom Tickets', 'event_espresso');
        ?>
				</span> </h3>
			<div class="inside"> <?php 
        echo espresso_ticket_dd(0);
        ?>
 </div>
		</div>
	<?php 
    }
    //Custom ticket selector
    if ($espresso_premium == true) {
        ?>
		<div id="featured-image-options" class="postbox">
				<div class="handlediv" title="Click to toggle"><br />
				</div>
				<h3 class="hndle"> <span>
					<?php 
        _e('Featured Image', 'event_espresso');
        ?>
					</span> </h3>
		<div class="inside">
			<div id="featured-image">
				<?php 
        if (!empty($event_meta['event_thumbnail_url'])) {
            $event_thumb = $event_meta['event_thumbnail_url'];
        } else {
            $event_thumb = '';
        }
        ?>
				<label for="upload_image">
					<?php 
        _e('Add Featured Image', 'event_espresso');
        ?>
				</label>
				<input id="upload_image" type="hidden" size="36" name="upload_image" value="<?php 
        echo $event_thumb;
        ?>
" />
				<input id="upload_image_button" type="button" value="Upload Image" />
				<?php 
        if ($event_thumb) {
            ?>
					<p class="event-featured-thumb"><img  src="<?php 
            echo $event_thumb;
            ?>
" alt="" /></p>
					<a id='remove-image' href='#' title='Remove this image' onclick='return false;'><?php 
            _e('Remove Image', 'event_espresso');
            ?>
</a>
				<?php 
        }
        ?>
			</div>
		</div>
		</div>
	<?php 
    }
    /*
     * Added for seating chart addon
     */
    if (defined('ESPRESSO_SEATING_CHART')) {
        ?>
		<div style="display: block;" id="seating_chart-options" class="postbox">
			<div class="handlediv" title="Click to toggle"><br />
			</div>
			<h3 class="hndle"><span>
				<?php 
        _e('Seating chart', 'event_espresso');
        ?>
				</span></h3>
			<div class="inside">
				<p>
					<select name="seating_chart_id" id="seating_chart_id" style="float:none;">
						<option value="0" ><?php 
        _e('None', 'event_espresso');
        ?>
</option>
						<?php 
        $seating_charts = $wpdb->get_results("select * from " . EVENTS_SEATING_CHART_TABLE . " order by name");
        foreach ($seating_charts as $seating_chart) {
            ?>
						<option value="<?php 
            echo $seating_chart->id;
            ?>
"><?php 
            echo $seating_chart->name;
            ?>
</option>
						<?php 
        }
        ?>
					</select>
				</p>
			</div>
		</div>
		<?php 
    }
    /*
     * End
     */
    ###### Modification by wp-developers to introduce attendee pre-approval requirement ##########
    if (isset($org_options['use_attendee_pre_approval']) && $org_options['use_attendee_pre_approval'] == 'Y' && $espresso_premium == true) {
        ?>
		<div id="attendee-pre-approval-options" class="postbox">
			<div class="handlediv" title="Click to toggle"><br />
			</div>
			<h3 class="hndle"> <span>
				<?php 
        _e('Attendee pre-approval required?', 'event_espresso');
        ?>
				</span> </h3>
			<div class="inside">
				<p class="pre-approve">
					<?php 
        $pre_approval_values = array(array('id' => '1', 'text' => __('Yes', 'event_espresso')), array('id' => '0', 'text' => __('No', 'event_espresso')));
        echo select_input("require_pre_approval", $pre_approval_values, "0");
        ?>
				</p>
			</div>
		</div>
		<?php 
    }
    ########## END #################################
    if (defined('EVENTS_MEMBER_REL_TABLE') && $espresso_premium == true) {
        ?>
		<div id="member-options" class="postbox">
			<div class="handlediv" title="Click to toggle"><br />
			</div>
			<h3 class="hndle"> <span>
				<?php 
        _e('Member Options', 'event_espresso');
        ?>
				</span> </h3>
			<div class="inside">
				<p><?php 
        echo event_espresso_member_only('N');
        ?>
</p>
			</div>
		</div>
		<!-- /event-category -->
		<?php 
    }
    if (defined('EVENTS_MAILCHIMP_ATTENDEE_REL_TABLE') && $espresso_premium == true) {
        MailChimpView::event_list_selection();
    }
    ?>
		
		<div  id="event-categories" class="postbox">
			<div class="handlediv" title="Click to toggle"><br />
			</div>
			<h3 class="hndle"> <span>
				<?php 
    _e('Event Category', 'event_espresso');
    ?>
				</span> </h3>
			<div class="inside"> <?php 
    echo event_espresso_get_categories();
    ?>
 </div>
		</div>
		<!-- /event-category -->
		
		<?php 
    if (file_exists(EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/event-management/promotions_box.php')) {
        require_once EVENT_ESPRESSO_PLUGINFULLPATH . "includes/admin-files/event-management/promotions_box.php";
    }
    ?>
		<?php 
    echo espresso_event_question_groups(empty($question_groups) ? array() : $question_groups);
    ?>
 
		<!-- /event-questions -->
		
		<?php 
    do_action('action_hook_espresso_staff_cb');
    if (defined('EVENTS_GROUPON_CODES_TABLE') && $espresso_premium == true) {
        ?>
		<div id="groupon-options" class="postbox">
			<div class="handlediv" title="Click to toggle"><br />
			</div>
			<h3 class="hndle"> <span>
				<?php 
        _e('Groupon Options', 'event_espresso');
        ?>
				</span> </h3>
			<div class="inside">
				<p><?php 
        echo event_espresso_add_new_event_groupon();
        ?>
</p>
			</div>
		</div>
		<!-- /groupon-options -->
	<?php 
    }
    if ($espresso_premium == true) {
        do_action('action_hook_espresso_new_event_right_column_bottom');
    }
    $sidebar_content = ob_get_clean();
    ob_start();
    ?>
<!-- Left Column-->
		<div id="titlediv"> <strong>
			<?php 
    _e('Event Title', 'event_espresso');
    ?>
			</strong>
			<div id="titlewrap">
				<label class="screen-reader-text" for="title">
					<?php 
    _e('Event Title', 'event_espresso');
    ?>
				</label>
				<input type="text" name="event" size="30" tabindex="1" value="<?php 
    echo isset($event_name) ? $event_name : '';
    ?>
" id="title" autocomplete="off" />
			</div>
			<!-- /titlewrap -->
			<div class="inside">
				<div id="edit-slug-box"> <strong>
					<?php 
    _e('Unique Event Identifier:', 'event_espresso');
    ?>
					</strong>
					<input type="text" size="30" tabindex="2" name="event_identifier" id="event_identifier" value ="<?php 
    echo isset($event_identifier) ? $event_identifier : '';
    ?>
" />
					<?php 
    echo '<a href="#" class="button" onclick="prompt(&#39;Event Shortcode:&#39;, \'[SINGLEEVENT single_event_id=&#34;\' + jQuery(\'#event_identifier\').val() + \'&#34;]\'); return false;">' . __('Get Shortcode') . '</a>';
    ?>
					<?php 
    $org_options['event_page_id'] = isset($org_options['event_page_id']) ? $org_options['event_page_id'] : '';
    $event_id = isset($event_id) ? $event_id : '';
    echo '<a href="#" class="button" onclick="prompt(&#39;Event URL:&#39;, \'' . espresso_reg_url($event_id) . '\'); return false;">' . __('Get URL') . '</a>';
    ?>
				</div>
			</div>
			<!-- /edit-slug-box --> 
		</div>
		<!-- /titlediv -->
		<div id="descriptiondivrich" class="postarea"> <strong>
			<?php 
    _e('Event Description', 'event_espresso');
    ?>
			</strong>
			<?php 
    /*
    This is the editor used by WordPress. It is very very hard to find documentation for this thing, so I pasted everything I could find below.
    param: string $content Textarea content.
    param: string $id Optional, default is 'content'. HTML ID attribute value.
    param: string $prev_id Optional, default is 'title'. HTML ID name for switching back and forth between visual editors.
    param: bool $media_buttons Optional, default is true. Whether to display media buttons.
    param: int $tab_index Optional, default is 2. Tabindex for textarea element.
    */
    //the_editor($content, $id = 'content', $prev_id = 'title', $media_buttons = true, $tab_index = 2)
    //
    if (function_exists('wp_editor')) {
        $args = array("textarea_rows" => 5, "textarea_name" => "event_desc", "editor_class" => "my_editor_custom");
        wp_editor("", "event_desc", $args);
    } else {
        the_editor('', $id = 'event_desc', $prev_id = 'title', $media_buttons = true, $tab_index = 3);
    }
    ?>
			<table id="post-status-info" cellspacing="0">
				<tbody>
					<tr>
						<td id="wp-word-count"></td>
						<td class="autosave-info"><span id="autosave">&nbsp;</span></td>
					</tr>
				</tbody>
			</table>
		</div>
		<!-- /postdivrich -->
		<?php 
    $main_post_content = ob_get_clean();
    ob_start();
    ?>
		<div id="normal-sortables" class="meta-box-sortables ui-sortable">
			<div  id="event-date-time" class="postbox">
				<div class="handlediv" title="Click to toggle"><br />
				</div>
				<h3 class="hndle"> <span>
					<?php 
    _e('Event Date/Times', 'event_espresso');
    ?>
					</span> </h3>
				<div class="inside">
					<table width="100%" border="0" cellpadding="5">
						<tr valign="top">
							<td class="a"><fieldset id="add-reg-dates">
									<legend>
									<?php 
    _e('Registration Dates', 'event_espresso');
    ?>
									</legend>
									<p>
										<label for="registration_start"><?php 
    echo __('Registration Start:', 'event_espresso');
    ?>
 </label>
										<input type="text" size="10" id="registration_start" class="datepicker" name="registration_start" value="" />
									</p>
									<p>
										<label for="registration_end"> <?php 
    echo __('Registration End:', 'event_espresso');
    ?>
</label>
										<input type="text" size="10" id="registration_end" class="datepicker" name="registration_end" value="" />
									</p>
									<p><span class="description">
									<?php 
    _e('All events <strong>require</strong> registration start/end dates and start/end times in order to display properly on your pages.', 'event_espresso');
    ?>
									</span></p>
								</fieldset>
								<fieldset id="add-event-dates">
									<legend>
									<?php 
    _e('Event Dates', 'event_espresso');
    ?>
									</legend>
									<p>
										<label for="start_date">
											<?php 
    _e('Event Start Date:', 'event_espresso');
    ?>
										</label>
										<input type="text" size="10" id="start_date" class="datepicker" name="start_date" value="" />
									</p>
									<p>
										<label for="end_date">
											<?php 
    _e('Event End Date:', 'event_espresso');
    ?>
										</label>
										<input type="text" size="10" id="end_date" class="datepicker" name="end_date" value="" />
									</p>
									
								</fieldset><p><span class="description">
									<?php 
    _e('All events <strong>require</strong> a start and end date in order to display properly on your pages.', 'event_espresso');
    ?>
									</span></p>
								<?php 
    if (isset($org_options['use_event_timezones']) && $org_options['use_event_timezones'] == 'Y' && $espresso_premium == true) {
        ?>
								<fieldset id="event-timezone">
									<p>
										<label>
											<?php 
        _e('Event Timezone:', 'event_espresso');
        ?>
											</label>
										<?php 
        echo eventespresso_ddtimezone($event_id);
        ?>
</p>
								</fieldset>
								<?php 
    }
    ?>
								<?php 
    /* ?> <p>
       <br /> <?php echo __('Event Visible On:','event_espresso') . ' <input type="text" size="15" id="visible_on" class="datepicker" name="visible_on" value="" />'; ?> <br />
                         </p><?php */
    ?>
								<?php 
    echo defined('EVENT_ESPRESSO_RECURRENCE_TABLE') ? '' : '<p class="recurring-available"><a class="inform" href="http://eventespresso.com/product/espresso-recurring/?utm_source=ee_plugin_admin&utm_medium=link&utm_content=Recurring+Event+Manager+Now+Available+ee_version_' . EVENT_ESPRESSO_VERSION . '&utm_campaign=add_new_event_tab" target="_blank" title="Visit eventespresso.com for full details">' . __('Recurring Event Manager Now Available!', 'event_espresso') . '</a></p>';
    ?>
</td>
							<?php 
    // ADDED TIME REGISTRATION LIMITS
    ?>
							<td class="b"><fieldset id="add-register-times">
									<legend>
									<?php 
    _e('Registration Times', 'event_espresso');
    ?>
									</legend>
									<?php 
    echo event_espresso_timereg_editor();
    ?>
								</fieldset>
								<fieldset id="add-event-times">
									<legend>
									<?php 
    _e('Event Times', 'event_espresso');
    ?>
									</legend>
									<?php 
    echo event_espresso_time_editor();
    ?>
								</fieldset>
								<?php 
    if ((isset($org_options['use_event_timezones']) || ($org_options['use_event_timezones'] = 'Y')) && $espresso_premium == true) {
        ?>
								<p><span class="run-in">
									<?php 
        _e('Current Time:', 'event_espresso');
        ?>
									</span> <span class="current-date"> <?php 
        echo date(get_option('date_format')) . ' ' . date(get_option('time_format'));
        ?>
</span> <a class="change-date-time" href="options-general.php" target="_blank">
									<?php 
        _e('Change timezone and date format settings?', 'event_espresso');
        ?>
									</a> </p>
								<?php 
    }
    ?>
</td>
						</tr>
					</table>
				</div>
			</div>
			<?php 
    /**
     * Load the recurring events form if the add-on has been installed and activated.
     */
    if (defined('EVENT_ESPRESSO_RECURRENCE_TABLE') && $espresso_premium == true) {
        require_once EVENT_ESPRESSO_RECURRENCE_FULL_PATH . "functions/re_view_functions.php";
        event_espresso_re_form();
    }
    ?>
			<div id="event-pricing" class="postbox">
				<?php 
    defined('EVENTS_MEMBER_REL_TABLE') ? $members_active = 'class="members-active"' : ($members_active = '');
    ?>
				<div class="handlediv" title="Click to toggle"><br />
				</div>
				<h3 class="hndle"> <span>
					<?php 
    _e('Event Pricing', 'event_espresso');
    ?>
					</span> </h3>
				<div class="inside">
					<table <?php 
    echo $members_active;
    ?>
width="100%" border="0" cellpadding="5">
						<tr valign="top">
							<td id="standard-pricing" class="a"><?php 
    event_espresso_multi_price_update($event_id);
    //Standard pricing
    ?>
</td>
							<?php 
    //If the members addon is installed, define member only event settings
    if (defined('EVENTS_MEMBER_REL_TABLE') && $espresso_premium == true) {
        ?>
							<td id="member-pricing" class="b"><?php 
        echo event_espresso_member_only_pricing();
        //Show the the member only pricing options.
        ?>
</td>
<?php 
    }
    ?>
						</tr>
					</table>
				</div>
			</div>
			<h2>
				<?php 
    _e('Advanced Options', 'event_espresso');
    ?>
			</h2>
			<?php 
    if ($espresso_premium == true) {
        do_action('action_hook_espresso_new_event_left_column_advanced_options_top');
    }
    ?>
			<div id="event-location" class="postbox">
				<div class="handlediv" title="Click to toggle"><br />
				</div>
				<h3 class="hndle"> <span>
					<?php 
    _e('Additional Event/Venue Information', 'event_espresso');
    ?>
					</span> </h3>
				<div class="inside">
					<table width="100%" border="0" cellpadding="5">
							<tr>
						
						<?php 
    if (function_exists('espresso_venue_dd') && isset($org_options['use_venue_manager']) && $org_options['use_venue_manager'] == 'Y' && $espresso_premium == true) {
        $ven_type = 'class="use-ven-manager"';
        ?>
						<td <?php 
        echo $ven_type;
        ?>
><fieldset id="venue-manager">
								<legend><?php 
        echo __('Venue Information', 'event_espresso');
        ?>
</legend>
								<?php 
        if (!espresso_venue_dd()) {
            ?>
								<p class="info"><b>
									<?php 
            _e('You have not created any venues yet.', 'event_espresso');
            ?>
									<input id="phys-addr" type="hidden"  value="" name="address" />
									<input id="phys-addr-2" type="hidden"  value="" name="address2" />
									<input id="phys-city" type="hidden"  value="" name="city" />
									<input id="phys-state" type="hidden"  value="" name="state" />
									<input id="zip-postal" type="hidden"  value="" name="zip" />
									<input id="phys-country" type="hidden"  value="" name="country" />
									<input id="ven-title"  type="hidden"  value="" name="venue_title" />
									<input id="ven-website" type="hidden"  value="" name="venue_url" />
									<input id="ven-phone" type="hidden"  value="" name="venue_phone" />
									<input id="ven-image" type="hidden"  value="" name="venue_image" />
									</b></p>
								<p><a href="admin.php?page=event_venues"><?php 
            echo __('Add venues to the Venue Manager', 'event_espresso');
            ?>
</a></p>
								<?php 
        } else {
            ?>
								<?php 
            echo espresso_venue_dd();
            ?>
								<?php 
        }
        ?>
							</fieldset></td>
						<?php 
    } else {
        $ven_type = 'class="manual-venue"';
        ?>
						<td <?php 
        echo $ven_type;
        ?>
><fieldset id="phys-location">
								<legend>
								<?php 
        _e('Physical Location', 'event_espresso');
        ?>
								</legend>
								<p>
									<label for="phys-addr">
										<?php 
        _e('Address:', 'event_espresso');
        ?>
									</label>
									<input id="phys-addr" size="20" tabindex="101"  type="text"  value="" name="address" />
								</p>
								<p>
									<label for="phys-addr-2">
										<?php 
        _e('Address 2:', 'event_espresso');
        ?>
									</label>
									<input id="phys-addr-2" size="20" tabindex="102"  type="text"  value="" name="address2" />
								</p>
								<p>
									<label for="phys-city">
										<?php 
        _e('City:', 'event_espresso');
        ?>
									</label>
									<input id="phys-city" size="20" tabindex="103"  type="text"  value="" name="city" />
								</p>
								<p>
									<label for="phys-state">
										<?php 
        _e('State:', 'event_espresso');
        ?>
									</label>
									<input id="phys-state" size="20" tabindex="104"  type="text"  value="" name="state" />
								</p>
								<p>
									<label for="zip-postal">
										<?php 
        _e('Zip/Postal Code:', 'event_espresso');
        ?>
									</label>
									<input size="20" id="zip-postal" tabindex="105"  type="text"  value="" name="zip" />
								</p>
								<p>
									<label for="phys-country">
										<?php 
        _e('Country:', 'event_espresso');
        ?>
									</label>
									<input id="phys-country" size="20" tabindex="106"  type="text"  value="" name="country" />
								</p>
							</fieldset></td>
							<td <?php 
        echo $ven_type;
        ?>
>
						
							<fieldset id="venue-info">
						
						<legend>
						<?php 
        _e('Venue Information', 'event_espresso');
        ?>
						</legend>
						<p>
							<label for="ven-title">
								<?php 
        _e('Title:', 'event_espresso');
        ?>
							</label>
							<input id="ven-title" size="20" tabindex="106"  type="text"  value="<?php 
        echo isset($venue_title) ? $venue_title : '';
        ?>
" name="venue_title" />
						</p>
						<p>
							<label for="ven-website">
								<?php 
        _e('Website:', 'event_espresso');
        ?>
							</label>
							<input id="ven-website" size="20" tabindex="107"  type="text"  value="<?php 
        echo isset($venue_url) ? $venue_url : '';
        ?>
" name="venue_url" />
						</p>
						<p>
							<label for="ven-phone">
								<?php 
        _e('Phone:', 'event_espresso');
        ?>
							</label>
							<input id="ven-phone"  size="20" tabindex="108"  type="text"  value="<?php 
        echo isset($venue_phone) ? $venue_phone : '';
        ?>
" name="venue_phone" />
						</p>
						<p>
							<label for="ven-image">
								<?php 
        _e('Image:', 'event_espresso');
        ?>
							</label>
							<input id="ven-image" size="20" tabindex="110"  type="text"  value="<?php 
        echo isset($venue_image) ? $venue_image : '';
        ?>
" name="venue_image" />
						</p>
							</td>
						
						<?php 
    }
    ?>
						<td <?php 
    echo $ven_type;
    ?>
><fieldset id="virt-location">
								<legend>
								<?php 
    _e('Virtual Location', 'event_espresso');
    ?>
								</legend>
								<p>
									<label for="virt-phone">
										<?php 
    _e('Phone:', 'event_espresso');
    ?>
									</label>
									<input id="virt-phone" size="20"  type="text" tabindex="107" value="" name="phone" />
								</p>
								<p>
									<label for="url-event">
										<?php 
    _e('URL of Event:', 'event_espresso');
    ?>
									</label>
									<textarea id="url-event" cols="30" rows="4" tabindex="108"  name="virtual_url"></textarea>
								</p>
								<p>
									<label for="call-in-num">
										<?php 
    _e('Call in Number:', 'event_espresso');
    ?>
									</label>
									<input id="call-in-num" size="20" tabindex="109"  type="text"  value="" name="virtual_phone" />
							</fieldset></td>
							</tr>
						
					</table>
				</div>
			</div>
			
			<!-- /event-location-->
			<?php 
    if ($espresso_premium == true) {
        ?>
			<div  id="event-meta" class="postbox">
				<div class="handlediv" title="Click to toggle"><br>
				</div>
				<h3 class="hndle"> <span>
					<?php 
        _e('Event Meta', 'event_espresso');
        ?>
					</span> </h3>
				<div class="inside">
					<?php 
        event_espresso_meta_edit(empty($event_meta) ? '' : $event_meta);
        ?>
				</div>
			</div>
			<?php 
    }
    ?>
			<!-- /event-meta-->
			<div id="confirmation-email" class="postbox">
				<div class="handlediv" title="Click to toggle"><br />
				</div>
				<h3 class="hndle"> <span>
					<?php 
    _e('Email Confirmation:', 'event_espresso');
    ?>
					</span> </h3>
				<div class="inside">
					<div id="emaildescriptiondivrich" class="postarea">
						<div class="email-conf-opts">
							<p><?php 
    echo __('Send custom confirmation emails for this event?', 'event_espresso') . ' ' . select_input('send_mail', $values, 'N');
    ?>
 <?php 
    echo '<a class="thickbox" href="#TB_inline?height=300&width=400&inlineId=custom_email_info"><img src="' . EVENT_ESPRESSO_PLUGINFULLURL . '/images/question-frame.png" width="16" height="16" /></a>';
    ?>
</p>
							<?php 
    if ($espresso_premium == true) {
        ?>
							<p>
								<?php 
        $email_id = isset($email_id) ? $email_id : '';
        _e('Use a', 'event_espresso');
        ?>
								<a href="admin.php?page=event_emails" target="_blank">
								<?php 
        _e('pre-existing email', 'event_espresso');
        ?>
								</a>? <?php 
        echo espresso_db_dropdown('id', 'email_name', EVENTS_EMAIL_TABLE, 'email_name', $email_id, 'desc') . ' <a class="thickbox" href="#TB_inline?height=300&width=400&inlineId=email_manager_info"><img src="' . EVENT_ESPRESSO_PLUGINFULLURL . '/images/question-frame.png" width="16" height="16" /></a>';
        ?>
 </p>
							<br />
							<em>OR</em>
							<?php 
    }
    ?>
							<p class="section-heading">
								<?php 
    _e('Create a custom email:', 'event_espresso');
    ?>
								<?php 
    echo '<a class="thickbox" href="#TB_inline?height=300&width=400&inlineId=event_custom_emails"><img src="' . EVENT_ESPRESSO_PLUGINFULLURL . '/images/question-frame.png" width="16" height="16" /></a>';
    ?>
 </p>
						</div>
						<div class="postbox">
							<?php 
    //echo '<p>version_compare ='.(version_compare($wp_version, $wp_min_version) >= 0).'</p>';
    if (function_exists('wp_editor')) {
        $args = array("textarea_rows" => 5, "textarea_name" => "conf_mail", "editor_class" => "my_editor_custom");
        wp_editor("", "conf_mail", $args);
    } else {
        echo '<textarea name="conf_mail" class="theEditor" id="conf_mail"></textarea>';
        espresso_tiny_mce();
    }
    ?>
							<table id="email-confirmation-form" cellspacing="0">
								<tbody>
									<tr>
										<td class="aer-word-count"></td>
										<td class="autosave-info"><span><a class="thickbox" href="#TB_inline?height=300&width=400&inlineId=custom_email_info">
											<?php 
    _e('View Custom Email Tags', 'event_espresso');
    ?>
											</a> | <a class="thickbox" href="#TB_inline?height=300&width=400&inlineId=custom_email_example">
											<?php 
    _e('Email Example', 'event_espresso');
    ?>
											</a></span></td>
									</tr>
								</tbody>
							</table>
						</div>
					</div>
				</div>
			</div>
			<!-- /confirmation-email-->
			<?php 
    if (file_exists(EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/event-management/new_event_post.php')) {
        require_once EVENT_ESPRESSO_PLUGINFULLPATH . "includes/admin-files/event-management/new_event_post.php";
    }
    ?>
		</div>
		<!-- /normal-sortables--> 
	<?php 
    $center_metabox_content = ob_get_clean();
    espresso_choose_layout($main_post_content, $sidebar_content, $center_metabox_content);
    include_once 'create_events_help.php';
    ?>
<input type="hidden" name="action" value="add" />
<?php 
    wp_nonce_field('espresso_verify_insert_event_nonce', 'nonce_verify_insert_event');
    //Security check using nonce
    //wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false );
    //wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false );
    ?>
<script type="text/javascript" charset="utf-8">
	//<![CDATA[
 jQuery(document).ready(function() {

			postboxes.add_postbox_toggles('events');

			jQuery(".datepicker" ).datepicker({
				changeMonth: true,
				changeYear: true,
				dateFormat: "yy-mm-dd",
				showButtonPanel: true
			});
			jQuery("#start_date").change(function(){
				jQuery("#end_date").val(jQuery(this).val());
			});
	var header_clicked = false;
			jQuery('#upload_image_button').click(function() {
				formfield = jQuery('#upload_image').attr('name');
				tb_show('', 'media-upload.php?type=image&amp;TB_iframe=1');
				jQuery('p.event-featured-thumb').addClass('old');
				header_clicked = true;
				return false;
			});		
			window.original_send_to_editor = window.send_to_editor;

	window.send_to_editor = function(html) {
	if(header_clicked) {
	imgurl = jQuery('img',html).attr('src');
	jQuery('#' + formfield).val(imgurl);
	jQuery('#featured-image').append("<p id='image-display'><img class='show-selected-image' src='"+imgurl+"' alt='' /></p>");
	header_clicked = false;
	tb_remove();

	} else {
	window.original_send_to_editor(html);
	}
	}

	// process the remove link in the metabox
	jQuery('#remove-image').click(function(){
	confirm('Do you really want to delete this image? Please remember to update your event to complete the removal.');
	jQuery("#upload_image").val('');
	jQuery("p.event-featured-thumb").remove();
	jQuery("p#image-display").remove();
	jQuery('#remove-image').remove();
	jQuery("#show_thumb_in_lists, #show_on_calendar, #show_thumb_in_regpage").val(false);
	});

 });

	//]]>
</script>
<?php 
}
コード例 #15
0
function event_espresso_email_config_mnu()
{
    global $wpdb, $current_user, $espresso_premium;
    ?>


	<div class="wrap">
		<div id="icon-options-event" class="icon32"> </div>
		<h2><?php 
    echo _e('Manage Event Emails', 'event_espresso');
    ?>
			<?php 
    if (!isset($_REQUEST['action']) || $_REQUEST['action'] != 'edit' && $_REQUEST['action'] != 'add_new_email') {
        echo '<a href="admin.php?page=event_emails&amp;action=add_new_email" class="button add-new-h2" style="margin-left: 20px;">' . __('Add New Email', 'event_espresso') . '</a>';
    }
    ?>
		</h2>
		<?php 
    ob_start();
    if (!empty($_POST['delete_email'])) {
        if (is_array($_POST['checkbox'])) {
            while (list($key, $value) = each($_POST['checkbox'])) {
                $del_id = $key;
                //Delete email data
                $sql = "DELETE FROM " . EVENTS_EMAIL_TABLE . " WHERE id='{$del_id}'";
                $wpdb->query($sql);
            }
        }
        ?>
			<div id="message" class="updated fade">
				<p><strong>
		<?php 
        _e('Emails have been successfully deleted.', 'event_espresso');
        ?>
					</strong></p>
			</div>
		<?php 
    }
    ?>
		<?php 
    $button_style = 'button-primary';
    if (isset($_REQUEST['action'])) {
        switch ($_REQUEST['action']) {
            case 'update':
                require_once "update_email.php";
                update_event_email();
                break;
            case 'add':
                require_once "add_email_to_db.php";
                add_email_to_db();
                break;
            case 'add_new_email':
                require_once "add_new_email.php";
                add_new_event_email();
                $button_style = 'button-secondary';
                break;
            case 'edit':
                require_once "edit_email.php";
                edit_event_email();
                $button_style = 'button-secondary';
                break;
        }
    }
    ?>

		<p><?php 
    _e('Create customized emails for use in multiple events.', 'event_espresso');
    ?>
</p>
		<form id="form1" name="form1" method="post" action="<?php 
    echo $_SERVER["REQUEST_URI"];
    ?>
">
			<table id="table1" class="widefat manage-emails">
				<thead>
					<tr>
						<th class="manage-column column-cb check-column" id="cb" scope="col" style="width:3.5%;"><input type="checkbox"></th>
						<th class="manage-column column-comments num" id="id" style="padding-top:7px; width:3.5%;" scope="col" title="Click to Sort"><?php 
    _e('ID', 'event_espresso');
    ?>
</th>
						<th class="manage-column column-title" id="name" scope="col" title="Click to Sort" style="width:60%;"><?php 
    _e('Name', 'event_espresso');
    ?>
</th>
						<?php 
    if (function_exists('espresso_is_admin') && espresso_is_admin() == true) {
        ?>
							<th class="manage-column column-creator" id="creator" scope="col" title="Click to Sort" style="width:10%;"><?php 
        _e('Creator', 'event_espresso');
        ?>
</th>
	<?php 
    }
    ?>
						<th class="manage-column column-title" id="action" scope="col" title="Click to Sort" style="width:30%;"><?php 
    _e('Action', 'event_espresso');
    ?>
</th>
					</tr>
				</thead>
				<tbody>
					<?php 
    $sql = "SELECT * FROM " . EVENTS_EMAIL_TABLE . " e";
    if (function_exists('espresso_member_data') && (espresso_member_data('role') == 'espresso_event_manager' || espresso_member_data('role') == 'espresso_group_admin')) {
        $sql .= " JOIN {$wpdb->users} u on u.ID = e.wp_user WHERE e.wp_user = "******" ORDER BY e.id ASC");
        foreach ($results as $result) {
            $email_id = $result->id;
            $email_name = stripslashes($result->email_name);
            $email_text = stripslashes($result->email_text);
            $wp_user = $result->wp_user;
            ?>
							<tr>
								<td><input name="checkbox[<?php 
            echo $email_id;
            ?>
]" type="checkbox"  title="Delete <?php 
            echo stripslashes($email_name);
            ?>
"></td>
								<td><?php 
            echo $email_id;
            ?>
</td>
								<td class="post-title page-title column-title"><strong><a href="admin.php?page=event_emails&action=edit&id=<?php 
            echo $email_id;
            ?>
"><?php 
            echo $email_name;
            ?>
</a></strong>
									<div class="row-actions"><span class="edit"><a href="admin.php?page=event_emails&action=edit&id=<?php 
            echo $email_id;
            ?>
"><?php 
            _e('Edit', 'event_espresso');
            ?>
</a> | </span><span class="delete"><a onclick="return confirmDelete();" class="delete submitdelete" href="admin.php?page=event_emails&action=delete_email&id=<?php 
            echo $email_id;
            ?>
"><?php 
            _e('Delete', 'event_espresso');
            ?>
</a></span></div>
								</td>
								<?php 
            if (function_exists('espresso_user_meta') && espresso_is_admin() == true) {
                ?>
									<td><?php 
                echo 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');
                ?>
</td>
										<?php 
            }
            ?>
								<td><a href="admin.php?page=event_emails&action=edit&id=<?php 
            echo $email_id;
            ?>
">
			<?php 
            _e('Edit Email', 'event_espresso');
            ?>
									</a></td>
							</tr>
						<?php 
        }
    }
    ?>
				</tbody>
			</table>
			<p>

				<input type="checkbox" name="sAll" onclick="selectAll(this)" />
				<strong>
	<?php 
    _e('Check All', 'event_espresso');
    ?>
				</strong>
				<input name="delete_email" type="submit" class="button-secondary" id="delete_email" value="<?php 
    _e('Delete Email', 'event_espresso');
    ?>
" style="margin-left:100px;" onclick="return confirmDelete();"> <?php 
    echo '<a href="admin.php?page=event_emails&amp;action=add_new_email" style="margin-left:5px"class="' . $button_style . '">' . __('Add New Email', 'event_espresso') . '</a>';
    ?>
			</p>
		</form>
		<?php 
    $main_post_content = ob_get_clean();
    espresso_choose_layout($main_post_content, event_espresso_display_right_column());
    ?>
	</div>

	<script>
		jQuery(document).ready(function($) {

			/* show the table data */
			var mytable = $('#table1').dataTable( {
				"bStateSave": true,
				"sPaginationType": "full_numbers",

				"oLanguage": {	"sSearch": "<strong><?php 
    _e('Live Search Filter', 'event_espresso');
    ?>
:</strong>",
					"sZeroRecords": "<?php 
    _e('No Records Found!', 'event_espresso');
    ?>
" },
				"aoColumns": [
					{ "bSortable": false },
					null,
					null,
	<?php 
    echo function_exists('espresso_is_admin') && espresso_is_admin() == true ? 'null,' : '';
    ?>
					null,

				]

			} );

		} );
	</script>

	<?php 
    echo event_espresso_custom_email_info();
}
コード例 #16
0
function event_espresso_manage_templates()
{
    global $wpdb, $org_options, $espresso_premium;
    //print_r($org_options);
    if (isset($_POST['update_org'])) {
        $org_options['display_description_on_multi_reg_page'] = !empty($_POST['display_description_on_multi_reg_page']) ? $_POST['display_description_on_multi_reg_page'] : 'N';
        $org_options['display_short_description_in_event_list'] = !empty($_POST['display_short_description_in_event_list']) ? $_POST['display_short_description_in_event_list'] : 'N';
        $org_options['display_address_in_event_list'] = !empty($_POST['display_address_in_event_list']) ? $_POST['display_address_in_event_list'] : 'N';
        $org_options['display_address_in_regform'] = !empty($_POST['display_address_in_regform']) ? $_POST['display_address_in_regform'] : 'N';
        $org_options['use_custom_post_types'] = !empty($_POST['use_custom_post_types']) ? $_POST['use_custom_post_types'] : 'N';
        $org_options['display_ical_download'] = !empty($_POST['display_ical_download']) ? $_POST['display_ical_download'] : 'Y';
        $org_options['display_featured_image'] = !empty($_POST['display_featured_image']) ? $_POST['display_featured_image'] : 'N';
        $org_options['enable_default_style'] = !empty($_POST['enable_default_style']) ? $_POST['enable_default_style'] : 'N';
        $org_options['selected_style'] = !empty($_POST['selected_style']) ? $_POST['selected_style'] : '';
        $org_options['style_color'] = !empty($_POST['style_color']) ? $_POST['style_color'] : '';
        $org_options['style_settings']['enable_default_style'] = !empty($_POST['enable_themeroller_style']) ? $_POST['enable_themeroller_style'] : 'N';
        $org_options['style_settings']['use_grid_layout'] = !empty($_POST['use_grid_layout']) ? $_POST['use_grid_layout'] : 'N';
        $org_options['themeroller']['themeroller_style'] = empty($_POST['themeroller_style']) ? 'N' : $_POST['themeroller_style'];
        //FEM Settings
        $org_options['fem_settings']['enable_fem_category_select'] = empty($_POST['enable_fem_category_select']) ? 'N' : $_POST['enable_fem_category_select'];
        $org_options['fem_settings']['enable_fem_pricing_section'] = empty($_POST['enable_fem_pricing_section']) ? 'N' : $_POST['enable_fem_pricing_section'];
        $org_options['fem_settings']['enable_fem_venue_section'] = empty($_POST['enable_fem_venue_section']) ? 'N' : $_POST['enable_fem_venue_section'];
        //Legacy styles
        $org_options['style_settings']['disable_legacy_styles'] = !empty($_POST['disable_legacy_styles']) ? $_POST['disable_legacy_styles'] : 'Y';
        if (isset($_POST['remove_css']) && $_POST['remove_css'] == 'true') {
            $org_options['style_settings']['css_name'] = '';
        }
        if (isset($_FILES['css']) && is_uploaded_file($_FILES['css']['tmp_name'])) {
            if (copy($_FILES['css']['tmp_name'], EVENT_ESPRESSO_UPLOAD_DIR . 'css/' . $_FILES['css']['name'])) {
                $org_options['style_settings']['css_name'] = $_FILES['css']['name'];
            }
        }
        update_option('events_organization_settings', $org_options);
        echo '<div id="message" class="updated fade"><p><strong>' . __('Template details saved.', 'event_espresso') . '</strong></p></div>';
    }
    $org_options = get_option('events_organization_settings');
    $values = array(array('id' => 'Y', 'text' => __('Yes', 'event_espresso')), array('id' => 'N', 'text' => __('No', 'event_espresso')));
    function espresso_themeroller_style_is_selected($name)
    {
        global $org_options;
        do_action('action_hook_espresso_log', __FILE__, __FUNCTION__, '');
        $input_item = $name;
        $option_selections = isset($org_options['themeroller']) && !empty($org_options['themeroller']) ? array($org_options['themeroller']['themeroller_style']) : array();
        if (!in_array($input_item, $option_selections)) {
            return false;
        } else {
            echo 'selected="selected"';
            return;
        }
    }
    //Stylesheet functions
    // read our style dir and build an array of files
    // themeroller style directory
    if (file_exists(EVENT_ESPRESSO_UPLOAD_DIR . "/themeroller/index.php")) {
        $dhandle = opendir(EVENT_ESPRESSO_UPLOAD_DIR . '/themeroller/');
    } else {
        $dhandle = opendir(EVENT_ESPRESSO_PLUGINFULLPATH . 'templates/css/themeroller/');
    }
    $files_themeroller = array();
    $exclude = array('.', '..', 'index.htm', 'index.html', 'index.php', '.svn', 'themeroller-.css', '.DS_Store', basename($_SERVER['PHP_SELF']));
    if ($dhandle) {
        //if we managed to open the directory
        // loop through all of the files
        while (false !== ($fname_themeroller = readdir($dhandle))) {
            if (!in_array($fname_themeroller, $exclude) && !is_dir($fname_themeroller)) {
                // store the filename
                $files_themeroller[] = $fname_themeroller;
            }
        }
        // close the directory
        closedir($dhandle);
    }
    ?>

	<div class="wrap">
		<div id="icon-options-event" class="icon32"> </div>
		<h2>
			<?php 
    _e('Event Template Settings', 'event_espresso');
    ?>
		</h2>
		<?php 
    ob_start();
    ?>
		
			<div class="meta-box-sortables ui-sortables">
			<form class="espresso_form" method="post" action="<?php 
    echo $_SERVER['REQUEST_URI'];
    ?>
">
				<?php 
    #### metaboxes ####
    ?>
				<div class="metabox-holder">
					<div class="postbox">
						<div title="Click to toggle" class="handlediv"><br />
						</div>
						<h3 class="hndle">
							<?php 
    _e('Template Options', 'event_espresso');
    ?>
						</h3>
						<div class="inside">
							<div class="padding">
								<table class="form-table">
									<tbody>
										<tr>
											<th> <label for="display_short_description_in_event_list">
													<?php 
    _e('Display short descriptions in the event listings?', 'event_espresso');
    ?>
												</label>
											</th>
											<td><?php 
    echo select_input('display_short_description_in_event_list', $values, isset($org_options['display_short_description_in_event_list']) ? $org_options['display_short_description_in_event_list'] : 'N');
    ?>
<br />
												<span class="description"><?php 
    _e('Be sure to use the "More..." tag in your event description', 'event_espresso');
    ?>
</span></td>
										</tr>
										<?php 
    if (function_exists('event_espresso_multi_reg_init') && $espresso_premium == true) {
        ?>
											<tr>
												<th><label for="display_description_on_multi_reg_page">
														<?php 
        _e('Display event descriptions in the multiple event registration pages?', 'event_espresso');
        ?>
													</label></th>
												<td><?php 
        echo select_input('display_description_on_multi_reg_page', $values, isset($org_options['display_description_on_multi_reg_page']) ? $org_options['display_description_on_multi_reg_page'] : 'N');
        ?>
</td>
											</tr>
										<?php 
    }
    ?>
										<tr>
											<th><label for="display_address_in_event_list">
													<?php 
    _e('Display addresses in the event listings?', 'event_espresso');
    ?>
												</label></th>
											<td><?php 
    echo select_input('display_address_in_event_list', $values, isset($org_options['display_address_in_event_list']) ? $org_options['display_address_in_event_list'] : 'N');
    ?>
</td>
										</tr>
										<tr>
											<th><label for="display_address_in_regform">
													<?php 
    _e('Display the address in the registration form? ', 'event_espresso');
    ?>
												</label></th>
											<td><?php 
    echo select_input('display_address_in_regform', $values, isset($org_options['display_address_in_regform']) ? $org_options['display_address_in_regform'] : 'Y');
    ?>
<br />
												<span class="description"><?php 
    _e('Disable the address if you are using the venue manager shortcodes in your event description.', 'event_espresso');
    ?>
</span></td>
										</tr>
										<?php 
    if ($espresso_premium == true) {
        ?>
										<tr>
											<th><label for="use_custom_post_types">
													<?php 
        _e('Use the custom post types feature?', 'event_espresso');
        ?>
												</label></th>
											<td><?php 
        echo select_input('use_custom_post_types', $values, isset($org_options['use_custom_post_types']) ? $org_options['use_custom_post_types'] : 'N');
        ?>
</td>
										</tr>
										<tr>
											<th><label for="display_ical_download">
													<?php 
        _e('Display an "Add to my Calendar" icon/link in the event templates?', 'event_espresso');
        ?>
												</label></th>
											<td><?php 
        echo select_input('display_ical_download', $values, isset($org_options['display_ical_download']) ? $org_options['display_ical_download'] : 'Y');
        ?>
<br />
												<span class="description"><?php 
        _e('This is an ics/ical downloadable file. Can also be modified in the event template files.', 'event_espresso');
        ?>
</span></td>
										</tr>
<tr>
											<th><label for="display_featured_image">
													<?php 
        _e('Display featured images in the event list and registration pages?', 'event_espresso');
        ?>
												</label></th>
											<td><?php 
        echo select_input('display_featured_image', $values, isset($org_options['display_featured_image']) ? $org_options['display_featured_image'] : 'N');
        ?>
<br />
												<span class="description"><?php 
        _e('This setting offers an simple solution to display featured images in your event templates. Height and width attributes are set within the featured image upload tool. Some customization may be required to produce the desired results within your WordPress theme.', 'event_espresso');
        ?>
</span></td>
										</tr>
										<?php 
    }
    ?>
									</tbody>
								</table>

								<p>
									<input class="button-primary" type="submit" name="Submit" value="<?php 
    _e('Save Options', 'event_espresso');
    ?>
" id="save_organization_setting_1" />
								</p>
							</div>
							<!-- / .padding --> 
						</div>
						<!-- / .inside --> 
					</div>
					<!-- / .postbox --> 
				</div>
				<!-- / .metabox-holder -->

				<div class="metabox-holder">
					<div class="postbox">
						<div title="Click to toggle" class="handlediv"><br />
						</div>
						<h3 class="hndle">
							<?php 
    _e('Stylesheet Options', 'event_espresso');
    ?>
						</h3>
						<div class="inside">
							<div class="padding">
								<?php 
    if (isset($org_options['enable_default_style']) && $espresso_premium == true) {
        include 'style_settings.php';
    }
    ?>
								<h2>
									<?php 
    _e('Themeroller Styles', 'event_espresso');
    ?>
								</h2>
								<!-- Themeroller Style Settings -->
								<table class="form-table">
									<tbody>
										<tr>
											<th> <label>
													<?php 
    _e('Use Themeroller Style Sheets', 'event_espresso');
    ?>
													<?php 
    //echo apply_filters('filter_hook_espresso_help', 'enable_styles_info');
    ?>
												</label>
											</th>
											<td><?php 
    echo select_input('enable_themeroller_style', $values, $org_options['style_settings']['enable_default_style'], 'id="use_built_in_style_sheets"');
    ?>
 <a class="thickbox"  href="#TB_inline?height=400&width=500&inlineId=enable_themeroller_styles_info" target="_blank"><img src="<?php 
    echo EVENT_ESPRESSO_PLUGINFULLURL;
    ?>
images/question-frame.png" width="16" height="16" /></a><br />
												<span class="description">
													<?php 
    _e('This option enables the style settings below.', 'event_espresso');
    ?>
												</span></td>
										</tr>
										<tr>
											<th> <label>
													<?php 
    _e('ThemeRoller Style ', 'event_espresso');
    ?>
												</label>
												<?php 
    //echo apply_filters('filter_hook_espresso_help', 'themeroller_info');
    ?>
											</th>
											<td><select id="style-themeroller" class="wide" name="themeroller_style">
													<option <?php 
    espresso_themeroller_style_is_selected($fname_themeroller);
    ?>
 value="smoothness"> -
														<?php 
    _e('Default', 'event_espresso');
    ?>
													</option>
													<?php 
    foreach ($files_themeroller as $fname_themeroller) {
        ?>
														<option <?php 
        espresso_themeroller_style_is_selected($fname_themeroller);
        ?>
 value="<?php 
        echo $fname_themeroller;
        ?>
"><?php 
        echo $fname_themeroller;
        ?>
</option>
													<?php 
    }
    ?>
												</select>
												<a class="thickbox"  href="#TB_inline?height=400&width=500&inlineId=themeroller_info" target="_blank"><img src="<?php 
    echo EVENT_ESPRESSO_PLUGINFULLURL;
    ?>
images/question-frame.png" width="16" height="16" /></a> <br />
												<span class="description">
													<?php 
    _e('Default style sheet is Smoothness.', 'event_espresso');
    ?>
												</span></td>
										</tr>
										<?php 
    if (!empty($org_options['style_settings']['css_name'])) {
        ?>
											<tr>
												<th> <label>
														<?php 
        _e('Current Custom Style Sheet', 'event_espresso');
        ?>
													</label>
												</th>
												<td><a href="<?php 
        echo EVENT_ESPRESSO_UPLOAD_URL . 'css/' . $org_options['style_settings']['css_name'];
        ?>
" target="_blank"><?php 
        echo $org_options['style_settings']['css_name'];
        ?>
</a>
													<input style="width:20px; margin-left:20px" name="remove_css" type="checkbox" value="true" />
													<?php 
        _e('Remove style sheet?', 'event_espresso');
        ?>
</td>
											</tr>
										<?php 
    }
    ?>
										<?php 
    if ($espresso_premium == true) {
        ?>
										<tr>
											<th> <label>
													<?php 
        _e('Add a custom style sheet?', 'event_espresso');
        ?>
												</label>
											</th>
											<td><input type="file" name="css" id="css" /></td>
										</tr>
										<?php 
    }
    ?>
									</tbody>
								</table>
								<p>
									<input class="button-primary" type="submit" name="Submit" value="<?php 
    _e('Save Options', 'event_espresso');
    ?>
" id="save_organization_setting_2" />
								</p>
							</div>
							<!-- / .padding --> 
						</div>
						<!-- / .inside --> 
					</div>
					<!-- / .postbox --> 
				</div>
				<!-- / .metabox-holder -->
				
				<?php 
    echo do_action('action_hook_espresso_fem_template_settings');
    //FEM Form
    ?>
				
				<input type="hidden" name="update_org" value="update" />
		</form>
		<?php 
    if ($espresso_premium == true) {
        ?>
		<h2>
					<?php 
        _e('Developers Only', 'event_espresso');
        ?>
				</h2>
				<hr />
				<div class="metabox-holder">
					<div class="postbox">
						<div title="Click to toggle" class="handlediv"><br />
						</div>
						<h3 class="hndle">
							<?php 
        _e('Developer templates', 'event_espresso');
        ?>
						</h3>
						<div class="inside">
							<div class="padding">
								<?php 
        require_once 'template_files.php';
        ?>
							</div>
							<!-- / .padding --> 
						</div>
						<!-- / .inside --> 
					</div>
					<!-- / .postbox --> 
				</div>
				<?php 
    }
    ?>
				<!-- / .metabox-holder -->
				<?php 
    #### finish metaboxes ####
    ?>
				
				
			</div>
			<!-- / .meta-box-sortables -->

			
		<?php 
    include_once 'templates_help.php';
    $main_post_content = ob_get_clean();
    espresso_choose_layout($main_post_content, event_espresso_display_right_column());
    ?>

	</div>
	<!-- / #wrap --> 
	<script type="text/javascript" charset="utf-8">
		//<![CDATA[
		jQuery(document).ready(function() {
			postboxes.add_postbox_toggles('template_conf');
		
		}); 
		//]]>
	</script>
	<?php 
    return;
}
コード例 #17
0
ファイル: calendar_admin.php プロジェクト: hhgr/uksoccer
    public function calendar_admin()
    {
        global $espresso_calendar, $notices, $espresso_premium;
        if (isset($_POST['update_calendar']) && check_admin_referer('espresso_form_check', 'update_calendar')) {
            $espresso_calendar['espresso_page_post'] = isset($_POST['espresso_page_post']) ? $_POST['espresso_page_post'] : 'R';
            $espresso_calendar['header_left'] = $_POST['espresso_calendar_header_left'];
            $espresso_calendar['header_center'] = $_POST['espresso_calendar_header_center'];
            $espresso_calendar['header_right'] = $_POST['espresso_calendar_header_right'];
            $espresso_calendar['buttonText_prev'] = $_POST['buttonText_prev'];
            $espresso_calendar['buttonText_next'] = $_POST['buttonText_next'];
            $espresso_calendar['buttonText_prevYear'] = $_POST['buttonText_prevYear'];
            $espresso_calendar['buttonText_nextYear'] = $_POST['buttonText_nextYear'];
            $espresso_calendar['buttonText_today'] = $_POST['buttonText_today'];
            $espresso_calendar['buttonText_month'] = $_POST['buttonText_month'];
            $espresso_calendar['buttonText_week'] = $_POST['buttonText_week'];
            $espresso_calendar['buttonText_day'] = $_POST['buttonText_day'];
            $espresso_calendar['firstDay'] = absint($_POST['firstDay']);
            $espresso_calendar['weekends'] = absint($_POST['weekends']);
            $espresso_calendar['weekMode'] = sanitize_text_field($_POST['weekMode']);
            $espresso_calendar['espresso_calendar_height'] = $_POST['espresso_calendar_height'];
            $espresso_calendar['enable_calendar_thumbs'] = $_POST['enable_calendar_thumbs'];
            $espresso_calendar['enable_calendar_filters'] = isset($_POST['enable_calendar_filters']) ? $_POST['enable_calendar_filters'] : false;
            $espresso_calendar['show_tooltips'] = $_POST['show_tooltips'];
            $espresso_calendar['tooltips_pos_my_1'] = isset($_POST['tooltips_pos_my_1']) ? $_POST['tooltips_pos_my_1'] : 'bottom';
            $espresso_calendar['tooltips_pos_my_2'] = isset($_POST['tooltips_pos_my_2']) ? $_POST['tooltips_pos_my_2'] : 'center';
            $espresso_calendar['tooltips_pos_at_1'] = isset($_POST['tooltips_pos_at_1']) ? $_POST['tooltips_pos_at_1'] : 'center';
            $espresso_calendar['tooltips_pos_at_2'] = isset($_POST['tooltips_pos_at_2']) ? $_POST['tooltips_pos_at_2'] : 'center';
            $espresso_calendar['tooltip_style'] = $_POST['tooltip_style'];
            $espresso_calendar['show_time'] = $_POST['show_time'];
            $espresso_calendar['disable_categories'] = $_POST['disable_categories'];
            $espresso_calendar['show_attendee_limit'] = $_POST['show_attendee_limit'];
            $espresso_calendar['time_format'] = $_POST['time_format_custom'];
            $espresso_calendar['espresso_use_pickers'] = !empty($_POST['espresso_use_pickers']) ? $_POST['espresso_use_pickers'] : false;
            $espresso_calendar['ee_event_background'] = !empty($_POST['ee_event_background']) ? $_POST['ee_event_background'] : '007BAE';
            $espresso_calendar['ee_event_text_color'] = !empty($_POST['ee_event_text_color']) ? $_POST['ee_event_text_color'] : 'FFFFFF';
            $espresso_calendar['enable_cat_classes'] = $_POST['enable_cat_classes'];
            $espresso_calendar['enable_category_legend'] = $_POST['enable_category_legend'];
            $espresso_calendar['titleFormat_month'] = $_POST['titleFormat_month'];
            $espresso_calendar['titleFormat_week'] = $_POST['titleFormat_week'];
            $espresso_calendar['titleFormat_day'] = $_POST['titleFormat_day'];
            $espresso_calendar['columnFormat_month'] = $_POST['columnFormat_month'];
            $espresso_calendar['columnFormat_week'] = $_POST['columnFormat_week'];
            $espresso_calendar['columnFormat_day'] = $_POST['columnFormat_day'];
            $existing_settings = get_option('espresso_calendar_options', array());
            $differences = array_diff_assoc($espresso_calendar, $existing_settings);
            if (!empty($differences)) {
                if (update_option('espresso_calendar_options', $espresso_calendar)) {
                    $notices['updates'][] = __('The calendar settings were successfully saved ', 'event_espresso');
                } else {
                    $notices['errors'][] = __('An error occured. The calendar settings were not saved ', 'event_espresso');
                }
                add_action('admin_notices', 'espresso_calendar_updated');
            } else {
                $notices['updates'][] = __('The calendar settings were not edited and therefore not updated.', 'event_espresso');
            }
        }
        if (!empty($_REQUEST['reset_calendar']) && check_admin_referer('espresso_form_check', 'reset_calendar_nonce')) {
            delete_option('espresso_calendar_options');
            EE_Calendar_Admin::activation();
            $notices['updates'] = array();
            $notices['updates'][] = __('The calendar settings were successfully reset ', 'event_espresso');
        }
        $espresso_calendar = get_option('espresso_calendar_options', array());
        $values = array(array('id' => false, 'text' => __('No', 'event_espresso')), array('id' => true, 'text' => __('Yes', 'event_espresso')));
        ################## Begin admin settings screen ###########################
        EE_Calendar_Admin::display_updated_notices();
        ?>
	<div id="ee-calendar-settings" class="wrap meta-box-sortables ui-sortable">
		<div id="icon-options-event" class="icon32">
		</div>
		<h2>
			<?php 
        _e('Event Espresso - Calendar Settings', 'event_espresso');
        ?>
		</h2>
		<?php 
        ob_start();
        ?>
		<form class="espresso_form" method="post" action="<?php 
        echo $_SERVER['REQUEST_URI'];
        ?>
">
			<div class="metabox-holder">
				<div class="postbox">
					<div title="Click to toggle" class="handlediv">
						<br />
					</div>
					<h3 class="hndle">
						<?php 
        _e('Calendar Usage', 'event_espresso');
        ?>
					</h3>
					<div class="inside">
						<div class="padding">
							<ul>
								<li>
									<strong>
										<?php 
        _e('Directions:', 'event_espresso');
        ?>
									</strong><br />
									<?php 
        _e(' Add [ESPRESSO_CALENDAR] to any page or post to display a calendar of Event Espresso events. Use [ESPRESSO_CALENDAR event_category_id="your_category_identifier"] to show events of a certain category (also creates a CSS using the category_identifier as the class name.) Use [ESPRESSO_CALENDAR show_expired="true"] to show expired events, can also be used inconjunction with the category ID.', 'event_espresso');
        ?>
								</li>
								<li>
									<strong>
										<?php 
        _e('Examples Shortcodes:', 'event_espresso');
        ?>
									</strong><br />
									[ESPRESSO_CALENDAR]<br />
									[ESPRESSO_CALENDAR show_expired="true"]<br />
									[ESPRESSO_CALENDAR event_category_id="your_category_identifier"]<br />
									[ESPRESSO_CALENDAR event_category_id="your_category_identifier" show_expired="true"]<br />
									[ESPRESSO_CALENDAR cal_view="month"] (Available parameters: month, basicWeek, basicDay, agendaWeek, agendaDay)
								</li>
								<li>
									<strong>
										<?php 
        _e('Styles/Colors (premium version only):', 'event_espresso');
        ?>
									</strong><br />
									<?php 
        _e('To edit the calendar styles, copy the CSS file located in the plugin folder to your "wp-content/uploads/espresso/" directory. Then edit as needed. Refer to <a href="http://arshaw.com/fullcalendar/docs/event_rendering/Colors/" target="_blank">this page</a> for an example of styling the calendar and colors.', 'event_espresso');
        ?>
								</li>
								<li>
									<strong>
										<?php 
        _e('Category Colors (premium version only):', 'event_espresso');
        ?>
									</strong><br />
									<?php 
        _e('Event Categories can have their own colors on the calendar. To use this feature, simply create a class in theme CSS file with the names of your event categories. For more inforamtion <a href="http://eventespresso.com/forums/?p=650" target="_blank">please visit the tutorial</a> for this topic.', 'event_espresso');
        ?>
								</li>
							</ul>
						</div>
						<!-- / .padding -->
					</div>
					<!-- / .inside -->
				</div>
				<!-- / .postbox -->
			</div>
			<!-- / .metabox-holder -->

			<!-- Calendar basic settings metabox -->
			<div class="metabox-holder">
				<div class="postbox">
					<div title="Click to toggle" class="handlediv">
						<br />
					</div>
					<h3 class="hndle">
						<?php 
        _e('Basic Settings', 'event_espresso');
        ?>
					</h3>
					<div class="inside">
						<div class="padding">
							<h4>
								<?php 
        _e('Time/Date Settings', 'event_espresso');
        ?>
							</h4>
							<table class="form-table">
								<tbody>
									<tr>
										<th>
											<label for="show_time">
												<?php 
        _e('Show Event Time in Calendar', 'event_espresso');
        ?>
											</label>
										</th>
										<td>
											<?php 
        echo select_input('show_time', $values, $espresso_calendar['show_time'], 'id="show_time"');
        ?>
										</td>
									</tr>
									<tr>
										<th>
											<label for="time_format">
												<?php 
        _e('Time Format');
        ?>
											</label>
										</th>
										<td>
											<?php 
        $espresso_calendar['time_format'] = empty($espresso_calendar['time_format']) ? get_option('time_format') : $espresso_calendar['time_format'];
        $time_formats = apply_filters('time_formats', array(__('g:i a'), 'ga', 'g:i A', 'gA', 'H:i'));
        $custom = true;
        foreach ($time_formats as $format) {
            echo "\t<label title='" . esc_attr($format) . "' style=\"display:inline-block; width:150px; margin-bottom:1em;\" >&nbsp;<input type='radio' name='time_format' value='" . esc_attr($format) . "'";
            if ($espresso_calendar['time_format'] === $format) {
                // checked() uses " == " rather than " === "
                echo " checked='checked'";
                $custom = false;
            }
            echo ' />&nbsp;<span>' . date_i18n($format) . "</span></label> \n";
        }
        echo '<div style="display:inline-block; width:230px;"><label style="display:inline-block;">&nbsp;<input type="radio" name="time_format" id="time_format_custom_radio" value="\\c\\u\\s\\t\\o\\m"';
        checked($custom);
        echo '/>&nbsp;' . __('Custom:') . '</label>&nbsp;<input type="text" name="time_format_custom" value="' . esc_attr($espresso_calendar['time_format']) . '" class="small-text" /> ';
        echo '<span class="example"> ' . date_i18n($espresso_calendar['time_format']) . "</span></div>";
        ?>
											<p><span class="description">
												<a href="http://codex.wordpress.org/Formatting_Date_and_Time">
													<?php 
        _e('Documentation on date and time formatting', 'event_espresso');
        ?>
												</a>
											</span></p>
											<img class="ajax-loading" src="<?php 
        echo esc_url(admin_url('images/wpspin_light.gif'));
        ?>
" alt="" />
										</td>
									</tr>

									<?php 
        $days_of_the_week = array(array('id' => 0, 'text' => __('Sunday', 'event_espresso')), array('id' => 1, 'text' => __('Monday', 'event_espresso')), array('id' => 2, 'text' => __('Tuesday', 'event_espresso')), array('id' => 3, 'text' => __('Wednesday', 'event_espresso')), array('id' => 4, 'text' => __('Thursday', 'event_espresso')), array('id' => 5, 'text' => __('Friday', 'event_espresso')), array('id' => 6, 'text' => __('Saturday', 'event_espresso')));
        ?>
									<tr>
										<th>
											<label for="firstDay">
												<?php 
        _e('First Day of the Week', 'event_espresso');
        ?>
											</label>
										</th>
										<td>
											<?php 
        echo select_input('firstDay', $days_of_the_week, $espresso_calendar['firstDay'], 'id="firstDay"');
        ?>
<br />
											<span class="description">
												<?php 
        _e('Determines which day will be in the first column of the calendar', 'event_espresso');
        ?>
											</span>
										</td>
									</tr>
									
									<tr>
										<th>
											<label for="weekends">
												<?php 
        _e('Show Weekends', 'event_espresso');
        ?>
											</label>
										</th>
										<td>
											<?php 
        echo select_input('weekends', $values, $espresso_calendar['weekends'], 'id="weekends"');
        ?>
<br />
											<span class="description">
												<?php 
        _e('This setting allows you to remove the weekends from your calendar views. This may be useful if you don\'t have events on weekends.', 'event_espresso');
        ?>
											</span>
										</td>
									</tr>
									
								</tbody>
							</table>
							<h4>
								<?php 
        _e('Layout Settings', 'event_espresso');
        ?>
							</h4>
							<table class="form-table">
								<tbody>
									<?php 
        $week_modes = array(array('id' => 'fixed', 'text' => __('fixed: displays 6 weeks, fixed height', 'event_espresso')), array('id' => 'liquid', 'text' => __('liquid: displays 4-6 weeks, fixed height', 'event_espresso')), array('id' => 'variable', 'text' => __('variable: displays 4-6 weeks, variable height', 'event_espresso')));
        $espresso_calendar['weekMode'] = isset($espresso_calendar['weekMode']) ? $espresso_calendar['weekMode'] : 'liquid';
        ?>
									<tr>
										<th>
											<label for="weekMode">
												<?php 
        _e('Week Mode', 'event_espresso');
        // 'fixed', 'liquid', 'variable'
        ?>
											</label>
										</th>
										<td>
											<?php 
        echo select_input('weekMode', $week_modes, $espresso_calendar['weekMode'], 'id="weekMode"');
        ?>
<br />
											<span class="description">
												<?php 
        _e('Determines the number of weeks displayed in a month view. Also determines each week\'s height.<br/>"fixed" - The calendar will always be 6 weeks tall. The height will always be the same, as determined by the calendar height setting or the aspect ratio.<br/>"liquid" - The calendar will have either 4, 5, or 6 weeks, depending on the month. The height of the weeks will stretch to fill the available height, as determined by the calendar height setting or the aspect ratio.<br/>"variable" - The calendar will have either 4, 5, or 6 weeks, depending on the month. Each week will have the same constant height, meaning the calendar\'s height will change month-to-month.', 'event_espresso');
        ?>
											</span>
										</td>
									</tr>
									
									<tr>
										<th>
											<label for="espresso_calendar_height">
												<?php 
        _e('Height', 'event_espresso');
        ?>
											</label>
										</th>
										<td>
											<input id="espresso_calendar_height" type="text" name="espresso_calendar_height" size="100" maxlength="100" value="<?php 
        echo $espresso_calendar['espresso_calendar_height'];
        ?>
" />
											<br />
											<span class="description">
												<?php 
        _e('Will make the entire calendar (including header) a pixel height. Leave blank for an automagical height.', 'event_espresso');
        ?>
											</span>
										</td>
									</tr>
									<!--								<tr>
									<th> <label for="calendar_pages">
									<?php 
        _e('Page(s) Displaying the Calendar', 'event_espresso');
        ?>
									</label>
									</th>
									<td><input id="calendar_pages" type="text" name="calendar_pages" size="100" maxlength="100" value="<?php 
        echo isset($espresso_calendar['calendar_pages']) && !empty($espresso_calendar['calendar_pages']) ? $espresso_calendar['calendar_pages'] : 0;
        ?>
" />
									<br />
									<span class="description">
									<?php 
        _e('This tells the plugin to load the calendar CSS file on specific pages. This should be a comma separated list of page id\'s. If left to the default of 0, the calendar stylesheet will load on every page of the site. You can find Page ID\'s by going to the WordPress menu Pages > All Pages, and hovering your mouse over the Page title, at the bottom of your browser a small box will appear with some code in it. Where it says post= then a number (post=4), that number is the Page ID. You can improve site performance and reduce conflicts by specifying which page/s have calendars on them.', 'event_espresso');
        ?>
									</span></td>
									</tr>-->
<?php 
        if ($espresso_premium == true) {
            ?>
									<tr>
										<th>
											<label for="calendar_page_post">
												<?php 
            _e('Link to Post or Registration Page', 'event_espresso');
            ?>
											</label>
										</th>
										<td>
											<?php 
            echo select_input('espresso_page_post', array(array('id' => 'R', 'text' => __('Registration Page', 'event_espresso')), array('id' => 'P', 'text' => __('Post', 'event_espresso'))), $espresso_calendar['espresso_page_post'], 'id="calendar_page_post"');
            ?>
 <br />
											<span class="description">
												<?php 
            _e('If you are using the "Create a Post" feature. Use this option to link to the posts that are created by Event Espresso, or select the link to go to the standard registration page.', 'event_espresso');
            ?>
											</span>
										</td>
									</tr>
									
<?php 
        }
        ?>
								</tbody>
							</table>
<?php 
        if ($espresso_premium == true) {
            ?>
							<h4>
								<?php 
            _e('Display Settings', 'event_espresso');
            ?>
							</h4>

							<table class="form-table">
								<tbody>
									<tr>
										<th>
											<label for="enable-calendar-thumbs">
												<?php 
            _e('Enable Images in Calendar', 'event_espresso');
            ?>
											</label>
										</th>
										<td>
											<?php 
            echo select_input('enable_calendar_thumbs', $values, isset($espresso_calendar['enable_calendar_thumbs']) && !empty($espresso_calendar['enable_calendar_thumbs']) ? $espresso_calendar['enable_calendar_thumbs'] : 0, 'id="enable-calendar-thumbs"');
            ?>
											<br />
											<span class="description">
												<?php 
            _e('The "Featured Image" box in the event editor handles the thumbnail image URLs for each event. After setting the "Enable Calendar images" option to "Yes" in the calendar settings, upload an event image in the built-in WordPress media uploader, then click the Insert into post button on the media uploader.', 'event_espresso');
            ?>
											</span>
										</td>
									</tr>
									<tr>
										<th>
											<label for="enable-calendar-filters">
												<?php 
            _e('Enable Filters in Calendar', 'event_espresso');
            ?>
											</label>
										</th>
										<td>
											<?php 
            echo select_input('enable_calendar_filters', $values, isset($espresso_calendar['enable_calendar_filters']) && !empty($espresso_calendar['enable_calendar_filters']) ? $espresso_calendar['enable_calendar_filters'] : 0, 'id="enable-calendar-filters"');
            ?>
											<br />
											<span class="description">
												<?php 
            _e('Filters allow users to filter events based on category and/or venue.', 'event_espresso');
            ?>
											</span>
										</td>
									</tr>
									<tr>
										<th>
											<label for="enable-cat-classes">
												<?php 
            _e('Enable CSS for Categories', 'event_espresso');
            ?>
											</label>
										</th>
										<td>
											<?php 
            echo select_input('enable_cat_classes', $values, $espresso_calendar['enable_cat_classes'], 'id="enable-cat-classes"');
            ?>
<br />
											<span class="description">
												<?php 
            _e('This setting allows you to set each category to display a different color. Set each category color in Event Espresso > Categories.', 'event_espresso');
            ?>
											</span>
										</td>
									</tr>
									<tr>
										<th>
											<label for="show-cat-legend">
												<?php 
            _e('Show Category Legend', 'event_espresso');
            ?>
											</label>
										</th>
										<td>
											<?php 
            echo select_input('enable_category_legend', $values, $espresso_calendar['enable_category_legend'], 'id="show-cat-legend"');
            ?>
<br />
											<span class="description">
												<?php 
            _e('This setting allows you display a category legend above the calendar.', 'event_espresso');
            ?>
											</span>
										</td>
									</tr>
									<tr>
										<th>
											<label for="espresso_use_pickers">
												<?php 
            _e('Use Color Pickers', 'event_espresso');
            ?>
											</label>
										</th>
										<td>
											<?php 
            echo select_input('espresso_use_pickers', $values, $espresso_calendar['espresso_use_pickers'], 'id="espresso_use_pickers"');
            ?>
<br />
											<span class="description">
												<?php 
            _e('This allows you to customize the event background color and text color.', 'event_espresso');
            ?>
											</span>
										</td>
									</tr>
									<tr class="color-picker-selections">
										<th class="color-picker-style">
											<label for="background-color">
												<?php 
            _e('Event Background Color', 'event_espresso');
            ?>
											</label>
										</th>
										<td>
											<input id="background-color"type="text" name="ee_event_background" <?php 
            echo isset($espresso_calendar['ee_event_background']) && !empty($espresso_calendar['ee_event_background']) ? 'value="' . $espresso_calendar['ee_event_background'] . '"' : 'value="#007BAE"';
            ?>
 />
											<div id="colorpicker-1">
											</div>
										</td>
									</tr>
									<tr class="color-picker-selections">
										<th class="color-picker-style">
											<label for="text-color">
												<?php 
            _e('Event Text Color', 'event_espresso');
            ?>
											</label>
										</th>
										<td>
											<input id="text-color" type="text" name="ee_event_text_color" <?php 
            echo isset($espresso_calendar['ee_event_text_color']) && !empty($espresso_calendar['ee_event_text_color']) ? 'value="' . $espresso_calendar['ee_event_text_color'] . '"' : 'value="#FFFFFF"';
            ?>
 />
											<div id="colorpicker-2">
											</div>
										</td>
									</tr>



									<tr>
										<th>
											<label for="show_tooltips">
												<?php 
            _e('Show Tooltips', 'event_espresso');
            ?>
											</label>
										</th>
										<td>
											<?php 
            echo select_input('show_tooltips', $values, $espresso_calendar['show_tooltips'], 'id="show_tooltips"');
            ?>
<br />
											<span class="description">
												<?php 
            _e('This allows you to display a short description of the event on hover. Be sure to use the <code>&lt;!--more--&gt;</code> tag to separate the short description from the entire event description.', 'event_espresso');
            ?>
											</span>
										</td>
									</tr>
									<?php 
            $values_1 = array(array('id' => 'top', 'text' => __('Top', 'event_espresso')), array('id' => 'center', 'text' => __('Center', 'event_espresso')), array('id' => 'bottom', 'text' => __('Bottom', 'event_espresso')));
            $values_2 = array(array('id' => 'left', 'text' => __('Left', 'event_espresso')), array('id' => 'center', 'text' => __('Center', 'event_espresso')), array('id' => 'right', 'text' => __('Right', 'event_espresso')));
            ?>
									<tr class="tooltip-position-selections tooltip_settings">
										<th class="tooltip-positions">
											<label for="tooltips_pos_my_1">
												<?php 
            _e('Tooltip Position', 'event_espresso');
            ?>
											</label>
										</th>
										<td>
											<?php 
            _e('Place Tooltip ', 'event_espresso');
            ?>
											<?php 
            echo select_input('tooltips_pos_my_1', $values_1, !empty($espresso_calendar['tooltips_pos_my_1']) ? $espresso_calendar['tooltips_pos_my_1'] : 'bottom', 'id="tooltips_pos_my_1"');
            ?>
											<?php 
            echo select_input('tooltips_pos_my_2', $values_2, !empty($espresso_calendar['tooltips_pos_my_2']) ? $espresso_calendar['tooltips_pos_my_2'] : 'center', 'id="tooltips_pos_my_2"');
            ?>
											<?php 
            _e('at the Event\'s  ', 'event_espresso');
            ?>
											<?php 
            echo select_input('tooltips_pos_at_1', $values_1, !empty($espresso_calendar['tooltips_pos_at_1']) ? $espresso_calendar['tooltips_pos_at_1'] : 'center', 'id="tooltips_pos_at_1"');
            ?>
											<?php 
            echo select_input('tooltips_pos_at_2', $values_2, !empty($espresso_calendar['tooltips_pos_at_2']) ? $espresso_calendar['tooltips_pos_at_2'] : 'center', 'id="tooltips_pos_at_2"');
            ?>
<br />
											<span class="description">
												<?php 
            _e('Default: "Bottom Center" and "Center Center"', 'event_espresso');
            ?>
											</span>
										</td>
									</tr>

									<?php 
            $tooltip_style = array(array('id' => 'qtip-plain', 'text' => __('plain', 'event_espresso')), array('id' => 'qtip-light', 'text' => __('light', 'event_espresso')), array('id' => 'qtip-dark', 'text' => __('dark', 'event_espresso')), array('id' => 'qtip-red', 'text' => __('red', 'event_espresso')), array('id' => 'qtip-green', 'text' => __('green', 'event_espresso')), array('id' => 'qtip-blue', 'text' => __('blue', 'event_espresso')), array('id' => 'qtip-bootstrap', 'text' => __('Twitter Bootstrap', 'event_espresso')), array('id' => 'qtip-tipsy', 'text' => __('Tipsy', 'event_espresso')), array('id' => 'qtip-youtube', 'text' => __('YouTube', 'event_espresso')), array('id' => 'qtip-jtools', 'text' => __('jTools', 'event_espresso')), array('id' => 'qtip-cluetip', 'text' => __('clueTip', 'event_espresso')), array('id' => 'qtip-tipped', 'text' => __('Tipped', 'event_espresso')));
            ?>

									<tr class="tooltip_style-selections tooltip_settings">
										<th class="tooltip_style">
											<label for="tooltip_style">
												<?php 
            _e('Tooltip Style', 'event_espresso');
            ?>
											</label>
										</th>
										<td>
											<?php 
            echo select_input('tooltip_style', $tooltip_style, !empty($espresso_calendar['tooltip_style']) ? $espresso_calendar['tooltip_style'] : 'qtip-light', 'id="tooltip_style"');
            ?>
<br/>
											<span class="description">
												<?php 
            printf(__('Adds styling to tooltips, if you are NOT using Themeroller, in the %sTemplate Settings%s.', 'event_espresso'), '<a href="admin.php?page=template_confg#style-themeroller">', '</a>');
            ?>
											</span>
										</td>
									</tr>

								</tbody>
							</table>
<?php 
        }
        ?>
							<p>
								<input class="button-primary" type="submit" name="save_calendar_settings" value="<?php 
        _e('Save Calendar Options', 'event_espresso');
        ?>
" id="save_calendar_settings2" />
								<?php 
        wp_nonce_field('espresso_form_check', 'update_calendar');
        ?>
							</p>
						</div>
						<!-- / .padding -->
					</div>
					<!-- / .inside -->
				</div>
				<!-- / .postbox -->
			</div>
			<!-- / .metabox-holder -->
<?php 
        if ($espresso_premium == true) {
            ?>
			<!-- Advanced settings metabox -->
			<div class="metabox-holder">
				<div class="postbox">
					<h3 class="hndle">
						<?php 
            _e('Advanced Settings', 'event_espresso');
            ?>
					</h3>
					<div class="inside">
						<div class="padding">
						
							<h4>
								<?php 
            _e('Formatting', 'event_espresso');
            ?>
							</h4>
						
							<table class="form-table">
								<tbody>

									<tr>
										<th>
											<label>
												<?php 
            _e('Header Style Left', 'event_espresso');
            ?>
											</label>
										</th>
										<td>
											<?php 
            _e('Left', 'event_espresso');
            ?>
:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
											<input type="text" name="espresso_calendar_header_left" id="espresso_calendar_header_left" class="medium-text" value="<?php 
            echo htmlentities(stripslashes($espresso_calendar['header_left']));
            ?>
"><br />
											<?php 
            _e('Center', 'event_espresso');
            ?>
:&nbsp;
											<input type="text" name="espresso_calendar_header_center" id="espresso_calendar_header_center" class="medium-text" value="<?php 
            echo htmlentities(stripslashes($espresso_calendar['header_center']));
            ?>
"><br />
											<?php 
            _e('Right', 'event_espresso');
            ?>
:&nbsp;&nbsp;&nbsp;&nbsp;
											<input type="text" class="medium-text" name="espresso_calendar_header_right" id="espresso_calendar_header_right" value="<?php 
            echo htmlentities(stripslashes($espresso_calendar['header_right']));
            ?>
"><br />
											<span class="description">
												<?php 
            _e('Defines the buttons and title at the top of the calendar.', 'event_espresso');
            ?>
											</span>
										</td>
									</tr>

									<tr>
										<th>
											<label>
												<?php 
            _e('Button Text', 'event_espresso');
            ?>
											</label>
										</th>
										<td>

											<?php 
            _e('Previous', 'event_espresso');
            ?>
:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
											<input type="text" class="medium-text" name="buttonText_prev" id="buttonText_prev" value="<?php 
            echo htmlentities(stripslashes($espresso_calendar['buttonText_prev']));
            ?>
"><br />

											<?php 
            _e('Next', 'event_espresso');
            ?>
:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
											<input type="text" class="medium-text" name="buttonText_next" id="buttonText_next" value="<?php 
            echo htmlentities(stripslashes($espresso_calendar['buttonText_next']));
            ?>
"><br />

											<?php 
            _e('Previous Year', 'event_espresso');
            ?>
:&nbsp;
											<input type="text" class="medium-text" name="buttonText_prevYear" id="buttonText_prevYear" value="<?php 
            echo htmlentities(stripslashes($espresso_calendar['buttonText_prevYear']));
            ?>
"><br />

											<?php 
            _e('Next Year', 'event_espresso');
            ?>
:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
											<input type="text" class="medium-text" name="buttonText_nextYear" id="buttonText_nextYear" value="<?php 
            echo htmlentities(stripslashes($espresso_calendar['buttonText_nextYear']));
            ?>
"><br />

											<?php 
            _e('Today', 'event_espresso');
            ?>
:&nbsp;&nbsp;&nbsp;&nbsp;
											<input type="text" class="medium-text" name="buttonText_today" id="buttonText_today" value="<?php 
            echo htmlentities(stripslashes($espresso_calendar['buttonText_today']));
            ?>
"><br />

											<?php 
            _e('Month', 'event_espresso');
            ?>
:&nbsp;&nbsp;&nbsp;&nbsp;
											<input type="text" class="medium-text" name="buttonText_month" id="buttonText_month" value="<?php 
            echo htmlentities(stripslashes($espresso_calendar['buttonText_month']));
            ?>
"><br />

											<?php 
            _e('Week', 'event_espresso');
            ?>
:&nbsp;&nbsp;&nbsp;&nbsp;
											<input type="text" class="medium-text" name="buttonText_week" id="buttonText_week" value="<?php 
            echo htmlentities(stripslashes($espresso_calendar['buttonText_week']));
            ?>
"><br />

											<?php 
            _e('Day', 'event_espresso');
            ?>
:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
											<input type="text" class="medium-text" name="buttonText_day" id="buttonText_day" value="<?php 
            echo htmlentities(stripslashes($espresso_calendar['buttonText_day']));
            ?>
"><br />

											<span class="description">
												<?php 
            _e('Text that will be displayed on the buttons in the header.', 'event_espresso');
            ?>
											</span>
										</td>
									</tr>

									<tr>
										<th>
											<label>
												<?php 
            _e('Title Format', 'event_espresso');
            ?>
											</label>
										</th>
										<td>
											<?php 
            _e('Month', 'event_espresso');
            ?>
:&nbsp;
											<input type="text" class="medium-text" name="titleFormat_month" id="titleFormat_month" value="<?php 
            echo htmlentities(stripslashes($espresso_calendar['titleFormat_month']));
            ?>
"><br />
											<?php 
            _e('Week', 'event_espresso');
            ?>
:&nbsp;
											<input type="text" class="medium-text" name="titleFormat_week" id="titleFormat_week" value="<?php 
            echo htmlentities(stripslashes($espresso_calendar['titleFormat_week']));
            ?>
"><br />
											<?php 
            _e('Day', 'event_espresso');
            ?>
:&nbsp;&nbsp;&nbsp;&nbsp;
											<input type="text" class="medium-text" name="titleFormat_day" id="titleFormat_day" value="<?php 
            echo htmlentities(stripslashes($espresso_calendar['titleFormat_day']));
            ?>
"><br />
											<span class="description">
												<?php 
            _e('Determines the text that will be displayed in the header\'s title.', 'event_espresso');
            ?>
											</span>
										</td>
									</tr>

									<tr>
										<th>
											<label>
												<?php 
            _e('Column Format', 'event_espresso');
            ?>
											</label>
										</th>
										<td>
											<?php 
            _e('Month', 'event_espresso');
            ?>
:&nbsp;
											<input type="text" class="medium-text" name="columnFormat_month" id="columnFormat_month" value="<?php 
            echo htmlentities(stripslashes($espresso_calendar['columnFormat_month']));
            ?>
"><br />
											<?php 
            _e('Week', 'event_espresso');
            ?>
:&nbsp;
											<input type="text" class="medium-text" name="columnFormat_week" id="columnFormat_week" value="<?php 
            echo htmlentities(stripslashes($espresso_calendar['columnFormat_week']));
            ?>
"><br />
											<?php 
            _e('Day', 'event_espresso');
            ?>
:&nbsp;&nbsp;&nbsp;&nbsp;
											<input type="text" class="medium-text" name="columnFormat_day" id="columnFormat_day" value="<?php 
            echo htmlentities(stripslashes($espresso_calendar['columnFormat_day']));
            ?>
"><br />
											<span class="description">
												<?php 
            _e('Determines the text that will be displayed on the calendar\'s column headings.', 'event_espresso');
            ?>
											</span>
										</td>
									</tr>

								</tbody>
							</table>
							<h4>
								<?php 
            _e('Memory Management', 'event_espresso');
            ?>
							</h4>

							<table class="form-table">
								<tbody>

									<tr>
										<th>
											<label for="show_attendee_limit">
												<?php 
            _e('Display Attendee Limits', 'event_espresso');
            ?>
											</label>
										</th>
										<td>
											<?php 
            echo select_input('show_attendee_limit', $values, !empty($espresso_calendar['show_attendee_limit']) ? $espresso_calendar['show_attendee_limit'] : false, 'id="show_attendee_limit"');
            ?>
<br />
											<span class="description">
												<?php 
            _e('Enabling this setting increases the amount of database queries and may break the calendar on some servers.', 'event_espresso');
            ?>
											</span>
										</td>
									</tr>

									<tr>
										<th>
											<label for="disable_categories">
												<?php 
            _e('Disable Categories?', 'event_espresso');
            ?>
											</label>
										</th>
										<td>
											<?php 
            echo select_input('disable_categories', $values, !empty($espresso_calendar['disable_categories']) ? $espresso_calendar['disable_categories'] : false, 'id="disable_categories"');
            ?>
<br />
											<span class="description">
												<?php 
            _e('Disabling categories in the calendar may potentially speed up the calendar and allow you to load more events, but you will not be able to use the category colors and css class options.', 'event_espresso');
            ?>
											</span>
										</td>
									</tr>

								</tbody>
							</table>
							<input type="hidden" name="update_calendar" value="update" />
							<p>
								<input class="button-primary" type="submit" name="Submit" value="<?php 
            _e('Save Calendar Options', 'event_espresso');
            ?>
" id="save_calendar_settings_1" />
								<?php 
            wp_nonce_field('espresso_form_check', 'update_calendar');
            ?>
							</p>
							<p>
								<?php 
            _e('Reset Calendar Settings?', 'event_espresso');
            ?>
								<input name="reset_calendar" type="checkbox" />
								<?php 
            wp_nonce_field('espresso_form_check', 'reset_calendar_nonce');
            ?>
							</p>
						</div>
						<!-- / .padding -->
					</div>
					<!-- / .inside -->
				</div>
				<!-- / .postbox -->
			</div>
			<!-- / .metabox-holder -->
<?php 
        }
        ?>
			<!--</li>
			</ul>-->
		</form>
		<?php 
        $main_post_content = ob_get_clean();
        espresso_choose_layout($main_post_content, event_espresso_display_right_column());
        include_once 'calendar_help.php';
        ?>

	</div>
	<!-- / #wrap -->
	<script type="text/javascript">
		//<![CDATA[
		jQuery(document).ready(function($){
				$("input[name='time_format']").click(function(){
						if ( "time_format_custom_radio" != $(this).attr("id") )
						$("input[name='time_format_custom']").val( $(this).val() ).siblings('.example').text( $(this).siblings('span').text() );
					});
				$("input[name='time_format_custom']").focus(function(){
						$("#time_format_custom_radio").attr("checked", "checked");
					});
<?php 
        if ($espresso_premium == true) {
            ?>
				// disable color picker & thumb sizes inputs & fade if not use controls true
				window.scp = $('select#espresso_use_pickers option:selected').val();
				window.ect = $('select#enable-calendar-thumbs option:selected').val();
				window.ectt = $('select#show_tooltips option:selected').val();


				if(window.ect == 'false'){
					$('tr#thumbnail-sizes td input').attr('disabled', true);
					$('tr#thumbnail-sizes').attr('style', "opacity: .3");
				}
				$('select#enable-calendar-thumbs').change(function(){
						window.ect = $('select#enable-calendar-thumbs option:selected').val();
						if(window.ect == 'false'){
							$('tr#thumbnail-sizes td input').attr('disabled', true);
							$('tr#thumbnail-sizes').attr('style', "opacity: .3");
						}else{
							$('tr#thumbnail-sizes td input').removeAttr('disabled', true);
							$('tr#thumbnail-sizes').removeAttr('style', "opacity: .3");
						}
					});

				// color picker settings
				if(window.scp == ''){
					$('input#event-background, input#event-text').attr('disabled', true);
					$('.color-picker-style').attr('style', "opacity: .3");
					$('tr.color-picker-selections th, tr.color-picker-selections td').attr('style', "opacity: .3");
				}
				$('select#espresso_use_pickers').change(function(){
						window.scp = $('select#espresso_use_pickers option:selected').val();
						if(window.scp == ''){
							$('input#event-background, input#event-text').attr('disabled', true);
							$('tr.color-picker-selections th, tr.color-picker-selections td').attr('style', "opacity: .3");
						}else {
							$('input#event-background, input#event-text').removeAttr('disabled', true);
							$('tr.color-picker-selections th, tr.color-picker-selections td').removeAttr('style');
						}
					});
				$('#colorpicker-1').hide();
				$('#colorpicker-2').hide();
				$('#colorpicker-1').farbtastic("#background-color");
				$('#colorpicker-2').farbtastic("#text-color");
				$("#background-color").click(function(){$('#colorpicker-1').slideToggle()});
				$("#text-color").click(function(){$('#colorpicker-2').slideToggle()});


				// tooltip settings initialization
				if(window.ectt == ''){
					$('input#show_tooltips').attr('disabled', true);
					$('.tooltip-positions').attr('style', "opacity: .3");
					$('tr.tooltip_settings th, tr.tooltip_settings td').attr('style', "opacity: .3");
				}
				$('select#show_tooltips').change(function(){
						window.ectt = $('select#show_tooltips option:selected').val();
						if(window.ectt == ''){
							$('input#event-background, input#event-text').attr('disabled', true);
							$('tr.tooltip_settings th, tr.tooltip_settings td').attr('style', "opacity: .3");
						}else {
							$('input#tooltips_pos_my_1, input#tooltips_pos_my_2, input#tooltips_pos_at_1, input#tooltips_pos_at_2').removeAttr('disabled', true);
							$('tr.tooltip_settings th, tr.tooltip_settings td').removeAttr('style');
						}
					});
<?php 
        }
        ?>

				// WP toggle function
				postboxes.add_postbox_toggles('espresso_calendar');

			});

		//]]>
	</script>
	<?php 
    }
コード例 #18
0
function event_espresso_support()
{
    ?>

	<div class="wrap">
	  <div id="icon-options-event" class="icon32"></div>
	  <h2>
		<?php 
    _e('Help and Support', 'event_espresso');
    ?>
	  </h2>
		<?php 
    if (isset($_REQUEST['action'])) {
        switch ($_REQUEST['action']) {
            case "update_event_dates":
                update_event_data();
                break;
            case "event_espresso_update_attendee_data":
                event_espresso_update_attendee_data();
                break;
        }
    }
    ?>
	<?php 
    ob_start();
    ?>
		<div class="meta-box-sortables ui-sortable">
			<ul id="event_espresso-sortables" class="help-support">
				<li>
					<div class="metabox-holder">
						<div class="postbox">
							<div title="Click to toggle" class="handlediv"><br />
							</div>
							<h3 class="hndle">
	<?php 
    _e('Quick Links', 'event_espresso');
    ?>
							</h3>
							<div class="inside">
								<div class="padding">
									<ul id="quick-links">
										<li><a href="#install">
												<?php 
    _e('Installation', 'event_espresso');
    ?>
											</a></li>
										<li><a href="#plugins">
												<?php 
    _e('Recommended Plugins', 'event_espresso');
    ?>
											</a></li>
										<li><a href="#hire_devs">
												<?php 
    _e('Hire a Developer', 'event_espresso');
    ?>
											</a></li>
										<li><a href="#theme_devs">
												<?php 
    _e('Favorite Theme Developers', 'event_espresso');
    ?>
											</a></li>
										<li><a href="#themes">
												<?php 
    _e('Highly Recommended Themes', 'event_espresso');
    ?>
											</a></li>
										<li><a href="#resources">
												<?php 
    _e('Other Resources', 'event_espresso');
    ?>
											</a></li>
										<li><a href="#shortcodes">
												<?php 
    _e('Shortcodes', 'event_espresso');
    ?>
											</a></li>
										<li><a href="#details">
												<?php 
    _e('Important Information', 'event_espresso');
    ?>
											</a></li>
										<li><a href="#support">
												<?php 
    _e('Contact Support', 'event_espresso');
    ?>
											</a></li>
										<li><a href="#faq">
												<?php 
    _e('Frequently Asked Questions', 'event_espresso');
    ?>
											</a></li>
										<li><a href="#additonal">
	<?php 
    _e('Additional Information', 'event_espresso');
    ?>
											</a></li>
									</ul>
								</div>
							</div>
						</div>
					</div>
				</li>
				<li><a name="install" id="install"></a>
					<div class="metabox-holder">
						<div class="postbox">
							<div title="Click to toggle" class="handlediv"><br />
							</div>
							<h3 class="hndle">
	<?php 
    _e('Installation', 'event_espresso');
    ?>
							</h3>
							<div class="inside">
								<div class="padding">
									<p>
	<?php 
    _e('For the latest installation instructions please visit:', 'event_espresso');
    ?>
										<a href="http://eventespresso.com/wiki/installing-event-espresso/" target="_blank">http://eventespresso.com/wiki/installing-event-espresso/</a></p>
								</div>
							</div>
						</div>
					</div>
				</li>
				<li>
					<div class="metabox-holder">
						<div class="postbox">
							<div title="Click to toggle" class="handlediv"><br />
							</div>
							<h3 class="hndle">
	<?php 
    _e('Event Marketing Resources', 'event_espresso');
    ?>
								<a name="hire_promo" id="hire_promo"></a></h3>
							<div class="inside">
								<div class="padding">
						
									<dl id="hire_promo">
									
									<?php 
    /*?><dt> <a href="http://theadventgroup.net/?referral=eventespresso.com" target="_blank">
    	<?php _e('The Advent Group', 'event_espresso'); ?>
    										</a> </dt>
    										<dd><a href="http://theadventgroup.net/?referral=eventespresso.com" target="_blank"><img src="http://eventespresso.com/wp-content/uploads/2013/03/theadventgroup-logo-300x99.jpg" class="alignright" width="300" height="99" border="0"></a>StickerGiant is two businesses in one. We are a printing company that prints stickers and labels for thousands of customers all over the United States and Canada. We also have a fun online sticker store that has over 26,000 designs from bands to sports and everything in between. Our selection of Embroidered Patches is vast. </dd><?php */
    ?>
										
										
										<dt> <a href="http://www.stickergiant.com/?referral=eventespresso.com" target="_blank">
	<?php 
    _e('StickerGiant.com', 'event_espresso');
    ?>
										</a> </dt>
										<dd><a href="http://www.stickergiant.com/?referral=eventespresso.com" target="_blank"><img src="http://www.stickergiant.com/banners/120x60.gif" class="alignright" width="120" height="60" border="0"></a>StickerGiant is two businesses in one. We are a printing company that prints stickers and labels for thousands of customers all over the United States and Canada. We also have a fun online sticker store that has over 26,000 designs from bands to sports and everything in between. Our selection of Embroidered Patches is vast. </dd>
										<dt> <a href="http://eventespresso.com/contact/?referral=eventespresso_plugin" target="_blank">
	<?php 
    _e('Add a Merketing Resource', 'event_espresso');
    ?>
										</a> </dt>
										<dd>Have a marketing resource you would like to see listed here? Please let us know!</dd>
									</dl>
								</div>
							</div>
						</div>
					</div>
				</li>
				<li>
					<div class="metabox-holder">
						<div class="postbox">
							<div title="Click to toggle" class="handlediv"><br />
							</div>
							<h3 class="hndle">
	<?php 
    _e('Partners', 'event_espresso');
    ?>
								<a name="partners" id="partners"></a></h3>
							<div class="inside">
								<div class="padding">
								<p>The following developers have experience with Event Espresso for their clients and have requested to be listed in this directory. Event Espresso does not make any guarantees about their services. This directory is offered as a community benefit to Event Espresso users. We offer our recommendations on <a href="/support/how-to-select-a-developer/">how to select a developer</a>.</p>
									<dl id="partners">
									
									<dt><a href="http://www.ivycat.com/?referral=eventespresso.com" target="_blank">Ivy Cat</a></dt>
<dd><a href="http://www.ivycat.com/?referral=eventespresso.com"><img src="http://eventespresso.com/wp-content/uploads/2013/01/IvyCat_Logo.png" alt="" title="IvyCat_Logo" class="alignright size-thumbnail wp-image-36065" width="150"></a>We're a small, agile team of web designers, developers, and server geeks that love to help businesses strategize, create, market, and maintain strong, effective and profitable websites and web applications.</dd>
<dd>Our staff has well over a decade of experience engineering successful websites in many industries. </dd>
<dd>Check our <a href="http://www.ivycat.com/web-design/portfolio/?referral=eventespresso.com" target="_blank">web design portfolio</a> for examples of our work. </dd>
										
										<dt> <a href="http://pixeljar.net/?referral=eventespresso.com" target="_blank">Pixel Jar</a></dt>
										<dd><a href="http://pixeljar.net/?referral=eventespresso.com" target="_blank"><img src="http://eventespresso.com/wp-content/uploads/2013/01/pixel-jar-logo-150x150.png" alt="" title="pixel-jar-logo" class="alignright size-thumbnail wp-image-36059" height="150" width="150"></a>Pixel Jar creates custom themes, plugins and sites as well as provides custom coding and modifications for existing projects. The co-creators of Pixel Jar, Brandon and Jeff, met working at another web development firm in 2001. Pixel Jar started in 2004 with the goal to provide solid web solutions for small to medium businesses. In 2007 we worked on our first WordPress project and loved it so much that by 2009, our business model was solely WordPress projects. We are very active in the WordPress community, regularly attending and presenting at our local WordPress Meetup, attending regional WordCamps and hosting the annual WordCamp Orange County.</dd>
										
										
										<dt> <a href="http://bigimprint.com/espresso/" target="_blank">Big Imprint Design</a></dt>
										<dd>We create affordable websites for small businesses and non-profits.</dd>
										
										
										<dt> <a href="http://eventespresso.com/contact/?referral=eventespresso_plugin" target="_blank">
	<?php 
    _e('Become a Partner', 'event_espresso');
    ?>
										</a> </dt>
										<dd>Have experience developing websites around Event Espresso? Become a partner!</dd>
									</dl>
								</div>
							</div>
						</div>
					</div>
				</li>
				<li>
					<div class="metabox-holder">
						<div class="postbox">
							<div title="Click to toggle" class="handlediv"><br />
							</div>
							<h3 class="hndle">
	<?php 
    _e('Hire a Developer', 'event_espresso');
    ?>
								<a name="hire_devs" id="hire_devs"></a></h3>
							<div class="inside">
								<div class="padding">

									<dl id="hire_devs">
										<dt> <a href="http://jobs.eventespresso.com/?referral=eventespresso.com" target="_blank">
	<?php 
    _e('Event Espresso Job Board', 'event_espresso');
    ?>
										</a> </dt>
										<dd>A dedicated job board that lists the opportunities to work with Event Espresso or our clients.</dd>
										<dt> <a href="http://wpcandy.com/pros/?referral=eventespresso.com" target="_blank">
	<?php 
    _e('WP Candy Pros', 'event_espresso');
    ?>
										</a> </dt>
										<dd>WordPress Professionals and theme developers.</dd>
									</dl>
								</div>
							</div>
						</div>
					</div>
				</li>
				<li>
					<div class="metabox-holder">
						<div class="postbox">
							<div title="Click to toggle" class="handlediv"><br />
							</div>
							<h3 class="hndle">
	<?php 
    _e('Favorite Theme Developers', 'event_espresso');
    ?>
								<a name="developers" id="theme_devs"></a></h3>
							<div class="inside">
								<div class="padding">
									<dl id="developers">
										<dt><a href="http://www.mojo-themes.com/?referral=eventespresso.com" target="_blank">MOJO Themes</a></dt>
										<dd>It's simple really – MOJO themes is a marketplace for everyone to <strong><em>buy</em></strong> or <strong><em>sell</em></strong> themes and templates.</dd>
										<dt><a href="http://www.appthemes.com/cp/go.php?r=12413&i=l0" target="_blank">AppThemes</a></dt>
										<dd>AppThemes are built for businesses of all sizes and run on WordPress so  you don't have to worry about the headache of setting up a complex  server environment.</dd>
										<dt><a href="http://www.woothemes.com/amember/go.php?r=28039&amp;i=b16" target="_blank">WooThemes</a></dt>
										<dd>Top quality, cutting edge WordPress themes and superior customer support.</dd>
										<dt><a href="http://www.shareasale.com/r.cfm?B=258340&amp;U=471857&amp;M=27087" target="_blank">PageLines</a></dt>
										<dd>Build websites faster and better using drag and drop, layout, typography, design-control and more... </dd>
										<dt><a href="http://www.studiopress.com/" target="_blank">StudioPress</a></dt>
										<dd>When you buy a StudioPress theme, you are getting state of the art code,  smart design architecture as well as an array of beautiful frames for  your content.</dd>
										<dt><a href="http://www.elegantthemes.com/?referral=eventespresso.com" target="_blank">ElegantThemes</a></dt>
										<dd>Each premium WordPress theme comes expertly coded in valid XHTML and  CSS, and all are made compatible with the latest version of WordPress.</dd>
										<dt><a href="http://allurethemes.com/?referral=eventespresso.com" target="_blank">AllureThemes</a></dt>
										<dd>We create beautiful, top quality WordPress themes for you at amazing prices with exceptional support.</dd>
										<dt><a href="http://museumthemes.com/?referral=eventespresso.com" target="_blank">Museum Themes</a></dt>
										<dd>Fine art WordPress themes.</dd>
									</dl>
								</div>
							</div>
						</div>
					</div>
				</li>

				<li>
					<div class="metabox-holder">
						<div class="postbox">
							<div title="Click to toggle" class="handlediv"><br />
							</div>
							<h3 class="hndle">
	<?php 
    _e('Recommended Plugins', 'event_espresso');
    ?>
								<a name="plugins" id="plugins"></a></h3>
							<div class="inside">
								<div class="padding">
									<dl id="plugins">
										<dt><a href="http://wordpress.org/extend/plugins/exclude-pages/" target="_blank">Exclude Pages from Navigation</a></dt>
										<dd> Provides a checkbox on the editing page which you can check to exclude  pages from the primary navigation. IMPORTANT NOTE: This will remove the  pages from any "consumer" side page listings, which may not be limited  to your page navigation listings.</dd>
										<dt><a href="http://wordpress.org/extend/plugins/post-types-order/" target="_blank">Post Types Order</a></dt>
										<dd> Order Post Types Objects using a Drag and Drop Sortable javascript capability
											</dt>

										<dt><a href="https://www.e-junkie.com/ecom/gb.php?cl=54585&amp;c=ib&amp;aff=113214" target="_blank">Gravity Forms</a>
										</dd>
										<dd>
											Build Complex, Powerful Contact Forms in Just Minutes. No Programming Knowledge Required! Yeah, It's Really That Easy.
										</dd>
									</dl>
								</div>
							</div>
						</div>
					</div>
				</li>

				<li>
					<div class="metabox-holder">
						<div class="postbox">
							<div title="Click to toggle" class="handlediv"><br />
							</div>
							<h3 class="hndle">
	<?php 
    _e('Highly Recommended Themes', 'event_espresso');
    ?>
								<a name="themes" id="themes"></a></h3>
							<div class="inside">
								<div class="padding">
									<dl id="themes">
										<dt><a href="http://www.pagelines.com/?referral=eventespresso.com" target="_blank">PageLines Framework</a> by Pagelines</dt>
										<dt><a href="http://www.woothemes.com/?referral=eventespresso.com" target="_blank">Diarise</a> by WooThemes</dt>
									</dl>
								</div>
							</div>
						</div>
					</div>
				</li>
				<li>
					<div class="metabox-holder">
						<div class="postbox">
							<div title="Click to toggle" class="handlediv"><br />
							</div>
							<h3 class="hndle">
	<?php 
    _e('Other Resources', 'event_espresso');
    ?>
								<a name="resources" id="resources"></a></h3>
							<div class="inside">
								<div class="padding">
									<dl id="resources">
										<dt><a href="http://wordpress.stackexchange.com/" target="_blank">WordPress Answers</a></dt>
									</dl>
								</div>
							</div>
						</div>
					</div>
				</li>

				<li>
					<div class="metabox-holder">
						<div class="postbox"><a name="shortcodes" id="shortcodes"></a>
							<div title="Click to toggle" class="handlediv"><br />
							</div>
							<h3 class="hndle">
	<?php 
    _e('Shortcodes', 'event_espresso');
    ?>
							</h3>
							<div class="inside">
								<div class="padding">
									<p>
	<?php 
    _e('For more information, please visit:', 'event_espresso');
    ?>
										<br />
										<a href="http://eventespresso.com/forums/2010/10/post-type-variables-and-shortcodes/" target="_blank">http://eventespresso.com/forums/2010/10/post-type-variables-and-shortcodes/</a></p>
									<hr />
									<div class="shortcode-box">
										<h4>
											<?php 
    _e('Single Events', 'event_espresso');
    ?>
										</h4>
										<p>
	<?php 
    _e('Displays a single event on a page or post', 'event_espresso');
    ?>
										</p>
										<p ><span class="highlight">[SINGLEEVENT single_event_id="your_event_identifier"]</span></p>
									</div>
									<div class="shortcode-box">
										<h4>
											<?php 
    _e('Add Events to Cart', 'event_espresso');
    ?>
										</h4>
										<p>
	<?php 
    _e('Displays an "Add Event to Cart" link that can be added to the event details, page, or post. Requires the <a href="http://eventespresso.com/download/plugins-and-addons/multiple-event-registration/" target="_blank">Multiple Event Registration addon</a>.', 'event_espresso');
    ?>
										</p>
										<p><span class="highlight">[ESPRESSO_CART_LINK]</span></p>
										<h5>
											<?php 
    _e('Additonal Examples:', 'event_espresso');
    ?>
										</h5>
										<p><span class="highlight">[ESPRESSO_CART_LINK direct_to_cart=1 moving_to_cart="Redirecting to cart..."]</span><br />
											<?php 
    _e('(Used to redirect to the shopping cart page. Must be added to an event description.)', 'event_espresso');
    ?>
										</p>
										<p><span class="highlight">[ESPRESSO_CART_LINK event_id="add_event_id_here" direct_to_cart=1 moving_to_cart="Redirecting to cart..."]</span><br />
	<?php 
    _e('(Same as above, but uses the event_id paramter and can be added to a page or post.)', 'event_espresso');
    ?>
										</p>
									</div>
									<div class="shortcode-box">
										<h4>
											<?php 
    _e('Event List', 'event_espresso');
    ?>
										</h4>
										<p>
	<?php 
    _e('Returns a list of events', 'event_espresso');
    ?>
										</p>
										<ul>
											<li><span class="highlight">[EVENT_LIST]</span></li>
											<li><span class="highlight">[EVENT_LIST limit=1]</span></li>
											<li><span class="highlight">[EVENT_LIST show_expired=true]</span></li>
											<li><span class="highlight">[EVENT_LIST show_deleted=true]</span></li>
											<li><span class="highlight">[EVENT_LIST show_secondary=true]</span></li>
											<li><span class="highlight">[EVENT_LIST show_recurrence=true]</span></li>
											<li><span class="highlight">[EVENT_LIST category_identifier=your_category_identifier]</span></li>
											<li><span class="highlight">[EVENT_LIST staff_id=staff_id_number]</span></li>
											<li><span class="highlight">[EVENT_LIST order_by=date(start_date),id]</span></li>
										</ul>
										<h5>
											<?php 
    _e('Order by parameters:', 'event_espresso');
    ?>
										</h5>
										<p>
	<?php 
    _e('(comma separated)', 'event_espresso');
    ?>
										</p>
										<p>id<br />
											date(start_date)<br />
											date(end_date)<br />
											event_name<br />
											date(registration_start)<br />
											date(registration_end)<br />
											city<br />
											state<br />
											category_id<br />
											venue_title </p>
										<p class="yellow_alert"><strong>
											<?php 
    _e('Attention:', 'event_espresso');
    ?>
											</strong><br />
	<?php 
    _e('The [EVENT_LIST] shortcode should not be used as a replacement for the [ESPRESSO_EVENTS] shortcode. Replacing the [ESPRESSO_EVENTS] shortcode will break your registration pages.', 'event_espresso');
    ?>
										</p>
									</div>
									<div class="shortcode-box">
										<h4>
	<?php 
    _e('Attendee Listings', 'event_espresso');
    ?>
										</h4>
										<ul>
											<li><span class="highlight">[LISTATTENDEES]</span></li>
											<li><span class="highlight">[LISTATTENDEES limit="30"]</span> //Number of events to show on the page</li>
											<li><span class="highlight">[LISTATTENDEES show_expired="true"]</span> //Show expired events</li>
											<li><span class="highlight">[LISTATTENDEES show_deleted="true"]</span> //Show deleted events</li>
											<li><span class="highlight">[LISTATTENDEES show_secondary="true"]</span> //Show secondary/backup events</li>
											<li><span class="highlight">[LISTATTENDEES show_gravatar="true"]</span> //Show a Gravatar of the attendee</li>
											<li><span class="highlight">[LISTATTENDEES show_recurrence="false"]</span> //Exclude recurring events</li>
											<li><span class="highlight">[LISTATTENDEES event_identifier="your_event_identifier"]</span> //Show a single event using the event identifier</li>
											<li><span class="highlight">[LISTATTENDEES category_identifier="your_category_identifier"]</span> //Show a group of events in a category using the category identifier</li>
											<li><span class="highlight">[LISTATTENDEES staff_id="staff_id_number"]</span> //Show a list of events that are assigned to a staff member</li>
										</ul>
										<p>
	<?php 
    _e('For more information about the attendee listing shortcodes and customizations. Please view the <a href="http://eventespresso.com/wiki/shortcodes-template-variables/">Attendee Listing Shortcodes</a> page.', 'event_espresso');
    ?>
										</p>
									</div>
									<div class="shortcode-box">
										<h4>
											<?php 
    _e('Venue Shortcodes', 'event_espresso');
    ?>
										</h4>
										<h5>
	<?php 
    _e('As of Event Espresso version 3.1', 'event_espresso');
    ?>
										</h5>
										<a name="venue_shortcode" id="venue_shortcode"></a>
										<dl>
											<dt>
												<?php 
    _e('Event Description Example:', 'event_espresso');
    ?>
											</dt>
											<dd>
											<?php 
    _e('If you want to display venue details within an event, the venue id is not needed. Just add <span class="highlight">[ESPRESSO_VENUE]</span> to your event description.', 'event_espresso');
    ?>
											</dd>
											<dt>
	<?php 
    _e('Example with Optional Parameters:', 'event_espresso');
    ?>
											</dt>
											<dd><span class="highlight">[ESPRESSO_VENUE outside_wrapper="div" outside_wrapper_class="event_venue"]</span></dd>
											<dt>
												<?php 
    _e('Page/Post Example:', 'event_espresso');
    ?>
											</dt>
											<dd>
	<?php 
    _e('You can display the details of any venue to a page, post or event by adding the id of the venue to the shortcode.', 'event_espresso');
    ?>
												<br />
												<span class="highlight">[ESPRESSO_VENUE id="3"]</span></dd>
											<dt>
												<?php 
    _e('Page/Post Example #2:', 'event_espresso');
    ?>
											</dt>
											<dd>
	<?php 
    _e('If you want to display all available venues on a page, post, or event:', 'event_espresso');
    ?>
												<br />
												<span class="highlight">[ESPRESSO_VENUE]</span>
											</dd>
											<dd>
	<?php 
    _e('Add the event id to the shortcode to display all the venues for an event:', 'event_espresso');
    ?>
												<br />
												<span class="highlight">[ESPRESSO_VENUE event_id="8"]</span></dd>

										</dl>
										<h5>
	<?php 
    _e('Available parameters:', 'event_espresso');
    ?>
										</h5>
										<ul>
											<li>outside_wrapper_class = class name for the outside wrapper. Eg. event_venue</li>
											<li>outside_wrapper = outside wrapper element. Eg. div</li>
											<li>inside_wrapper_class = class name for the outside wrapper. Eg. venue_details</li>
											<li>inside_wrapper = inside wrapper element. Eg. p</li>
											<li>title_class = class name for the title Eg. venue_name</li>
											<li>title_wrapper = title wrapper element. Eg. h3</li>
											<li>show_title = show the venue name? (true|false default true)</li>
											<li>image_class = class name for the image. Eg. venue_image</li>
											<li>show_image = show the image? (true|false default true)</li>
											<li>show_description = show the description? (true|false default true)</li>
											<li>show_address = show the address of the venue? (true|false default true)</li>
											<li>show_additional_details = show the additional details? (true|false default true)</li>
											<li>show_google_map_link = show the Google map link? (true|false default true)</li>
											<li>map_link_text = text to display in the link. Eg. Map and Directions</li>
										</ul>

										<dl>
											<dt>
	<?php 
    _e('Show All Events in a Venue:', 'event_espresso');
    ?>
											</dt>
											<dd>
												<span class="highlight">[ESPRESSO_VENUE_EVENTS id="21"]</span></dd>
											<dd>
												<span class="highlight">[ESPRESSO_VENUE_EVENTS id="21" limit="5"]</span></dd>
										</dl> 

									</div>
									<div class="shortcode-box">
										<h4>
											<?php 
    _e('Staff Shortcodes', 'event_espresso');
    ?>
										</h4>
										<h5>
	<?php 
    _e('As of Event Espresso version 3.1', 'event_espresso');
    ?>
										</h5>
										<a name="staff_shortcode" id="staff_shortcode"></a>
										<dl>
											<dt>
												<?php 
    _e('Event Description Example:', 'event_espresso');
    ?>
											</dt>
											<dd>
											<?php 
    _e('If you want to display a list of staff members within an event, the staff id is not needed. Just add <span class="highlight">[ESPRESSO_STAFF]</span> to your event description.', 'event_espresso');
    ?>
											</dd>
											<dt>
	<?php 
    _e('Example with Optional Parameters:', 'event_espresso');
    ?>
											</dt>
											<dd><span class="highlight">[ESPRESSO_STAFF outside_wrapper="div" outside_wrapper_class="event_staff" inside_wrapper="p" inside_wrapper_class="event_person"]</span></dd>
											<dt>
												<?php 
    _e('Page/Post Example:', 'event_espresso');
    ?>
											</dt>
											<dd>
											<?php 
    _e('You can display the details of any staff member to a page, post or event by adding the id of the staff member to the shortcode.', 'event_espresso');
    ?>
												<span class="highlight">[ESPRESSO_STAFF id="3"]</span></dd>
											<dt>
												<?php 
    _e('Page/Post Example #2:', 'event_espresso');
    ?>
											</dt>
											<dd>
	<?php 
    _e('If you want to display a list of staff members assigned to an event, to a page, post or event add the event id to the  <span class="highlight">[ESPRESSO_STAFF]</span> shortcode.', 'event_espresso');
    ?>
												<br />
												<span class="highlight">[ESPRESSO_STAFF event_id="8"]</span></dd>
										</dl>
										<h5><?php 
    _e('Available parameters:', 'event_espresso');
    ?>
</h5>
										<ul>
											<li>outside_wrapper_class = class name for the outside wrapper. Eg. event_staff</li>
											<li>outside_wrapper = outside wrapper element. Eg. div</li>
											<li>inside_wrapper_class = class name for the outside wrapper. Eg. event_person</li>
											<li>inside_wrapper = inside wrapper element. Eg. p</li>
											<li>name_class = class name for the persons name</li>
											<li>name_wrapper = name wrapper element. Eg. strong</li>
											<li>image_class = class name for the image. Eg. venue_image</li>
											<li>show_image = show the persons image? (true|false default true)</li>
											<li>show_staff_titles = show the role/title? (true|false default true)</li>
											<li>show_staff_details = show the details? (true|false default true)</li>
											<li>show_image = show the image? (true|false default true)</li>
											<li>show_description = show the description? (true|false default true)</li>
										</ul>
									</div>
									<div class="shortcode-box">
										<h4><?php 
    _e('Calendar Shortcodes', 'event_espresso');
    ?>
</h4>
										<ul>
											<li><span class="highlight">[ESPRESSO_CALENDAR]</span></li>
											<li><span class="highlight"> [ESPRESSO_CALENDAR show_expired="true"]</span></li>
											<li><span class="highlight">[ESPRESSO_CALENDAR event_category_id="your_category_identifier"]</span></li>
											<li><span class="highlight">[ESPRESSO_CALENDAR event_category_id="your_category_identifier" show_expired="true"]</span></li>
											<li><span class="highlight">[ESPRESSO_CALENDAR cal_view="month"] (Available parameters: month, basicWeek, basicDay, agendaWeek, agendaDay)</span></li>
										</ul>
									</div>
									<div class="shortcode-box">
										<h4><?php 
    _e('Category Shortcodes', 'event_espresso');
    ?>
</h4>
										<p><span class="highlight">[EVENT_ESPRESSO_CATEGORY event_category_id="your_category_indentifier"]</span></p>
									</div>
								</div>
								<!-- / .padding --> 
							</div>
							<!-- / .inside --> 
						</div>
						<!-- / .postbox --> 
					</div>
					<!-- / .metabox-holder --> 
				</li>

				<li><a name="details" id="details"></a>
					<div class="metabox-holder">
						<div class="postbox">
							<div title="Click to toggle" class="handlediv"><br />
							</div>
							<h3 class="hndle">
	<?php 
    _e('Important Information', 'event_espresso');
    ?>
							</h3>
							<div class="inside">
								<div class="padding">
									<?php 
    global $wpdb, $wp_version;
    $wp_req_version = '3.1';
    $php_req_version = '5.2';
    $mysql_req_version = '5.0';
    $is_php_valid = version_compare(phpversion(), $php_req_version, '>');
    $is_mysql_valid = version_compare($wpdb->db_version(), $mysql_req_version, '>');
    if (!version_compare($wp_version, $wp_req_version, '>=')) {
        echo '<p class="red_alert">' . __('This version of Event Espresso requires WordPress version', 'event_espresso') . ' ' . $wp_req_version . '+. ' . __('Please upgrade to the latest version of WordPress.', 'event_espresso') . '</p>';
    }
    if (!$is_php_valid) {
        echo '<p class="red_alert">' . __('Your version of PHP is out of date, please update to the latest version of PHP. <br>Required version of PHP:', 'event_espresso') . ' ' . $php_req_version . '</p>';
    }
    if (!$is_mysql_valid) {
        echo '<p class="red_alert">' . __('Your version of MySQL is out of date, please update to the latest version of MySQL. <br>Required version of MySQL:', 'event_espresso') . ' ' . $mysql_req_version . '</p>';
    }
    if (event_espresso_verify_attendee_data() == true) {
        ?>
									  <a name="attendee_data" id="attendee_data"></a>
									  <p class="red_text"><strong>
										<?php 
        _e('Attendee information is outdated', 'event_espresso');
        ?>
										</strong></p>
									  <p>
										<?php 
        _e('Due to recent changes in the way attendee information is handled, attendee data may appear to be missing from some events. In order to reassign attendees to events, please run the attendee update script by pressing the button below.', 'event_espresso');
        ?>
									  </p>
									  <form action="<?php 
        echo $_SERVER["REQUEST_URI"];
        ?>
" method="post" name="form" id="form">
										<p>
										  <input type="hidden" name="action" value="event_espresso_update_attendee_data" />
										  <input class="button-primary" type="submit" name="event_espresso_update_attendee_data_button" value="<?php 
        _e('Run Attendee Update Script', 'event_espresso');
        ?>
" id="event_espresso_update_attendee_data_button"/>
										</p>
									  </form>
								  <?php 
    }
    ?>
									<div class="localhost-information">
										<dl>
											<dt>
	<?php 
    _e('WordPress Version:', 'event_espresso');
    ?>
											</dt>
											<dd><?php 
    echo $wp_version;
    ?>
</dd>
											<dt>
	<?php 
    _e('PHP Version:', 'event_espresso');
    ?>
											</dt>
											<dd><?php 
    echo phpversion();
    ?>
</dd>
											<dt>
	<?php 
    _e('MySQL Version:', 'event_espresso');
    ?>
											</dt>
											<dd><?php 
    echo $wpdb->db_version();
    ?>
</dd>
											<dt>Event Espresso Version:</dt>
											<dd><?php 
    echo EVENT_ESPRESSO_VERSION;
    ?>
</dd>
											<dt>
	<?php 
    _e('WordPress Address (URL):', 'event_espresso');
    ?>
											</dt>
											<dd><?php 
    echo site_url();
    ?>
</dd>
											<dt>
	<?php 
    _e('WordPress Content Directory:', 'event_espresso');
    ?>
											</dt>
											<dd><?php 
    echo WP_CONTENT_DIR;
    ?>
</dd>
											<dt>
	<?php 
    _e('Site address (URL):', 'event_espresso');
    ?>
											</dt>
											<dd><?php 
    echo home_url();
    ?>
</dd>
											<dt>
	<?php 
    _e('Event Espresso Plugin URL:', 'event_espresso');
    ?>
											</dt>
											<dd><?php 
    echo EVENT_ESPRESSO_PLUGINFULLURL;
    ?>
</dd>
											<dt>
	<?php 
    _e('Event Espresso Plugin Path:', 'event_espresso');
    ?>
											</dt>
											<dd><?php 
    echo EVENT_ESPRESSO_PLUGINFULLPATH;
    ?>
</dd>
											<dt>
	<?php 
    _e('Event Espresso Upload URL:', 'event_espresso');
    ?>
											</dt>
											<dd><?php 
    echo EVENT_ESPRESSO_UPLOAD_URL;
    ?>
</dd>
											<dt>
	<?php 
    _e('Event Espresso Upload Path:', 'event_espresso');
    ?>
											</dt>
											<dd><?php 
    echo EVENT_ESPRESSO_UPLOAD_DIR;
    ?>
</dd>
											<dt>
	<?php 
    _e('Event Espresso Template Path:', 'event_espresso');
    ?>
											</dt>
											<dd><?php 
    echo EVENT_ESPRESSO_TEMPLATE_DIR;
    ?>
</dd>
											<dt>
	<?php 
    _e('Event Espresso Gateway Path:', 'event_espresso');
    ?>
											</dt>
											<dd><?php 
    echo EVENT_ESPRESSO_GATEWAY_DIR;
    ?>
</dd>
										</dl>
									</div>
								</div>
							</div>
						</div>
					</div>
				</li>

				<li><a name="support" id="support"></a>
					<div class="metabox-holder">
						<div class="postbox">
							<div title="Click to toggle" class="handlediv"><br />
							</div>
							<h3 class="hndle">
	<?php 
    _e('Contact Support', 'event_espresso');
    ?>
							</h3>
							<div class="inside">
								<div class="padding">
									<h4>Before Contacting Support</h4>
									<p>Please understand that our primary goal is to offer Event Espresso as a very low cost solution compared to building your own system or using a 3rd party service to handle your registrations.</p><p> As with most open source programs (and closed licensed programs), chances are you will find the occasional bug, glitch, white screen of death, and/or general failure. Please don't panic!</p>
									<p>If your problems are not urgent, please post in our <a href="http://eventespresso.com/support/forums/" target="_blank">support forums</a>. If you need immediate help. Please purchase a support token below, at which time you can schedule time with a dedicated support tech or core developer.</p>
									<p class="attention-block"><strong class="red_text">
										<?php 
    _e('Attention:', 'event_espresso');
    ?>
										</strong><br />
	<?php 
    _e('When requesting support. Please copy and paste the details displayed of the <a href="admin.php?page=support#details">Important Information</a> section above. This will help us determine potential problems with your server, WordPress installation, and/or the Event Espresso plugin. Please also include a list (or screenshot) of all <a href="plugins.php?plugin_status=active">active plugins</a>.', 'event_espresso');
    ?>
									</p>

									<h4>
										<?php 
    _e('Premium Support Options', 'event_espresso');
    ?>
									</h4>
									<p>
										<?php 
    _e('We offer premium support to customers who desire or require a level of support beyond the complimentary support included with all Event Espresso products.', 'event_espresso');
    ?>
									</p>
									<h5>
										<?php 
    _e('Support Tokens', 'event_espresso');
    ?>
									</h5>
									<p>
										<?php 
    _e('A support token can be used to get priority support for a single  incident. It can be used to schedule support via phone or IM for a  single incident (up to 30 minutes), or to receive priority e-mail  support. A support token can be used for &ldquo;how to&rdquo; questions, technical  issues, &ldquo;best practice&rdquo; questions or for custom development consulting. A  support token consists of the PayPal Transaction ID you received from  PayPal at the time of your purchase.', 'event_espresso');
    ?>
									</p>
									<p>
	<?php 
    _e('<strong>You can purchase support tokens</strong> on the <a href="http://eventespresso.com/product/priority-support-tokens/">Premium Support page</a>. Tokens can be purchased one at a time, or in blocks of three at a discount.', 'event_espresso');
    ?>
									</p>
									<p>Support tokens can be used to schedule live support (phone or IM) or for priority e-mail support. See <a href="http://eventespresso.com/support/">details on premium support</a>.</p>
									<div class="support-tokens">
										<h6><a href="http://eventespresso.com/product/priority-support-tokens/" target="_blank">1 Premium Support Token</a></h6>
										<p>Single incident, up to 30 minutes of live support or priority e-mail support.</p>
										<p class="support-prices"><span class="price">Price: $65.00 </span></p>
									</div>
									<div class="support-tokens">
										<h6><a href="http://eventespresso.com/product/3-premium-support-tokens/" target="_blank">3 Premium Support Tokens</a></h6>
										<p>Up to 90 minutes of live support or priority e-mail support.</p>
										<p class="support-prices"><span class="price">Price: $150.00 </span></p>
									</div>
									<h5>
	<?php 
    _e('Installation &amp; Consulting', 'event_espreso');
    ?>
									</h5>
									<div class="install-options">
										<h6><a href="http://eventespresso.com/product/basic-install/" target="_blank">Basic Install</a></h6>
										<p>Includes plugin installation and setting up basic pages for the plugin.</p>
										<p class="support-prices"><span class="price">Price: $35.00 </span></p>
									</div>
									<div class="install-options">
										<h6><a href="http://eventespresso.com/product/basic-install-with-configuration/" target="_blank">Basic Install with Configuration</a></h6>
										<p>Includes configuration and testing Payment Gateway's .</p>
										<p class="support-prices"><span class="price">Price: $65.00 </span></p>
									</div>
									<div class="install-options">
										<h6><a href="http://eventespresso.com/product/consultation/" target="_blank">Consulting (1 hour)</a></h6>
										<p>Developer support and implementation consulting for the Advanced Events Registration plugin for WordPress.</p>
										<p class="support-prices"><span class="price">Price: $135.00 </span></p>
									</div>
									<h5>* Requirements for installation service:</h5>
									<ul>
										<li> The server must be accessible over the internet.</li>
										<li> The server must meet the server requirements (for Advanced Events Registration).</li>
										<li> You must be able to provide a FTP/SFTP username and password. A MySQL database name, username and password is needed for a Basic Install. A WordPress admin user name, password, and login URL.</li>
									</ul>
								</div>
							</div>
						</div>
					</div>
				</li>
				<li>
					<div class="metabox-holder">
						<div class="postbox">
							<div title="Click to toggle" class="handlediv"><br />
							</div>
							<h3 class="hndle">
	<?php 
    _e('Frequently Asked Questions', 'event_espresso');
    ?>
								<a name="faq" id="faq"></a></h3>
							<div class="inside">
								<div class="padding">
									<dl id="faqs">
										<dt>
											<?php 
    _e('Registration page just refreshes?', 'event_espresso');
    ?>
										</dt>
										<dd>
											<?php 
    _e('Usually its because you need to point the &quot;Main registration page:&quot; (in the Organization Settings page) to whatever page you have the shortcode', 'event_espresso');
    ?>
											[ESPRESSO_EVENTS]
										<?php 
    _e('on', 'event_espresso');
    ?>
											. </dd>
										<dt>
											<?php 
    _e('Paypal IPN Problem?', 'event_espresso');
    ?>
										</dt>
										<dd>
	<?php 
    _e('Four things to check with PayPal when payments notifications are not being sent to Event Espresso.', 'event_espresso');
    ?>
											</p>
											<ol>
												<li>
													<?php 
    _e('Make sure you have a standard or a business PayPal account, personal accounts don\'t work.', 'event_espresso');
    ?>
												</li>
												<li>
													<?php 
    _e('Turn on your IPN.', 'event_espresso');
    ?>
												</li>
												<li>
													<?php 
    _e('Make sure your PayPal account is verified.', 'event_espresso');
    ?>
												</li>
												<li>
	<?php 
    _e('Make sure your Event Espresso pages are not protected or private.', 'event_espresso');
    ?>
												</li>
											</ol>
											<p class="more-info">
	<?php 
    _e('More information can be found here:', 'event_espresso');
    ?>
												<br />
												<a href="http://eventespresso.com/forums/?submit.x=0&submit.y=0&s=ipn" target="_blank"> http://eventespresso.com/forums/?submit.x=0&amp;submit.y=0&amp;s=ipn</a></p>
										</dd>
										<dt>
											<?php 
    _e('Why are mails are not being sent when someone registers?', 'event_espresso');
    ?>
										</dt>
										<dd>
	<?php 
    _e('Check your email settings on the', 'event_espresso');
    ?>
											<a href="admin.php?page=event_espresso#email-settings">Event Espresso > General Settings > Email Settings</a> page<br />
											<img class="email-settings-img" src="http://ee-updates.s3.amazonaws.com/images/email-settings.png" width="472" height="120" />
											</p>
											<p>
	<?php 
    _e('If you\'re using WP SMTP with Gmail, also check your spam box to make sure Gmail isn\'t filtering the confirmation emails as spam.', 'event_espresso');
    ?>
											</p>
										</dd>
										<dt>
	<?php 
    _e('My events are not importing correctly when I use the CSV upload tool.', 'event_espresso');
    ?>
										</dt>
										<dd>
											<p>
	<?php 
    _e('Check your CSV for any apotrophes in the title or description. Using Excel (or someother spreadsheet application) find and replace all apostrophes with <tt>\\&amp;#039;</tt>.  This is the HTML entity for \' and is how the titles are entered into the database.  For more information, see <a href="http://eventespresso.com/forums/2011/08/import-csv-malfunction" target="_blank">this forum post</a>.', 'event_espresso');
    ?>
											</p>
										</dd>
									</dl>
								</div>
							</div>
						</div>
					</div>
				</li>
				<?php 
    /*?><li>
    					<div class="metabox-holder">
    						<div class="postbox">
    	            <div title="Click to toggle" class="handlediv"><br />
    	            </div>
    	            <h3 class="hndle">
    	<?php _e('Additional Information', 'event_espresso'); ?>
    	              <a name="additonal" id="additonal"></a></h3>
    	            <div class="inside">
    								<div class="padding">
    									<dl id="additonal">
    										<dt><a href="http://eventespresso.com/support/documentation/">User Guide Forum</a>
    										</dt>
    										<dt><a href="http://eventespresso.com/forums/category/premium-plugin-support/tutorials/template-customization/">Tutorials</a> </dt><dd>(calendar, css override, payment gateway system, etc.)</dd>
    										<dt><a href="http://eventespresso.com/forums/premium-plugin-support/tutorials/template-customization/">Template Customization</a></dt>
    										<dt><a href="http://eventespresso.com/forums/2010/12/my-first-event/">Adding Your First Event</a> (video)</dt>
    										<dt><a href="http://eventespresso.com/forums/2010/12/video-initial-setp-general-settings-pages/">General Setup &amp; Using Shortcodes</a> (video)</dt>
    										<dt><a href="http://eventespresso.com/forums/2010/12/customizing-the-registration-form/%5C">Customizing the Registration Form</a> (video)</dt>
    										<dt><a href="http://eventespresso.com/forums/2010/07/account-optional-setting/">Optional PayPal Account Settings</a> (video)</dt>
    										<dt><a href="http://eventespresso.com/forums/2011/01/templates-for-the-recurring-events-manager/">Recurring Events Manager</a> (video)</dt>
    										<dt><a href="http://eventespresso.com/forums/2010/10/post-type-variables-and-shortcodes/">Variables and Shortcodes</a></dt>
    										<dt><a href="http://eventespresso.com/forums/category/general/compatiblity-issues/">Compatibility Issues</a></dt>
    										<dt><a href="http://eventespresso.com/forums/category/premium-plugin-support/bug-reports/">Bug Submission Form</a></dt>
    										<dt><a href="http://eventespresso.com/forums/category/premium-plugin-support/news-and-updates/">Change log</a></dt>
    										<dt><a href="http://eventespresso.com/update-request-form/">Update Request Form</a></dt>               <dd>Please use this form if a newer version of Event Espresso or an Addon  has been released and you are unable to download it from the specified  page or the email notification.</dd>
    									</dl>
    								</div>
    							</div>
    						</div>
    					</div>
    				</li><?php */
    ?>


				<?php 
    /* ?>
    
    				  <li>
    				  <div class="metabox-holder">
    				  <div class="postbox">
    				  <div title="Click to toggle" class="handlediv"><br />
    				  </div>
    				  <h3 class="hndle">
    				  <?php _e('Additional Information', 'event_espresso'); ?>
    				  <a name="additonal" id="additonal"></a></h3>
    				  <div class="inside">
    				  <div class="padding">
    				  <dl id="additonal">
    				  <dt>
    				  <?php _e('Registration page just refreshes?', 'event_espresso'); ?>
    				  </dt>
    				  <dd>
    				  <?php _e('Usually its because you need to point the &quot;Main registration page:&quot; (in the Organization Settings page) to whatever page you have the shortcode', 'event_espresso'); ?>
    				  [ESPRESSO_EVENTS]
    				  <?php _e('on', 'event_espresso'); ?>
    				  . </dd>
    				  </dl>
    				  </div>
    				  </div>
    				  </div>
    				  </div>
    				  </li>
    
    				  <?php */
    ?>
			</ul>
		</div>
		<!-- / .meta-box-sortables -->
		<?php 
    $main_post_content = ob_get_clean();
    espresso_choose_layout($main_post_content, event_espresso_display_right_column());
    ?>
	</div>
	<!-- / #wrap --> 
	<script type="text/javascript" charset="utf-8">
		//<![CDATA[
		jQuery(document).ready(function() {
			postboxes.add_postbox_toggles('support');
		}); 
		//]]>
	</script>
	<?php 
}
コード例 #19
0
ファイル: index.php プロジェクト: sriram911/pls
function event_espresso_question_groups_config_mnu()
{
    global $wpdb;
    //Update the questions when re-ordering
    if (!empty($_REQUEST['update_sequence'])) {
        $rows = explode(",", $_POST['row_ids']);
        for ($i = 0; $i < count($rows); $i++) {
            $wpdb->query("UPDATE " . EVENTS_QST_GROUP_TABLE . " SET group_order=" . $i . " WHERE id='" . $rows[$i] . "'");
        }
        die;
    }
    // get counts
    $total_question_groups = count(espresso_get_user_question_groups(null, false));
    $total_self_question_groups = count(espresso_get_user_question_groups(get_current_user_id(), true, true));
    ?>
	<div class="wrap">
		<div id="icon-options-event" class="icon32"> </div>
		<h2><?php 
    echo _e('Manage Question Groups', 'event_espresso');
    ?>
			<?php 
    if (!isset($_REQUEST['action']) || $_REQUEST['action'] != 'edit_group' && $_REQUEST['action'] != 'new_group') {
        echo '<a href="admin.php?page=form_groups&amp;action=new_group" class="button add-new-h2" style="margin-left: 20px;">' . __('Add New Group', 'event_espresso') . '</a>';
    }
    ?>
		</h2>


		<?php 
    ob_start();
    if (function_exists('espresso_is_admin') && espresso_is_admin() == true) {
        ?>
			<div style="margin-bottom: 10px;">
				<ul class="subsubsub" style="margin-bottom: 0;clear:both;">
					<li><strong><?php 
        _e('Question Groups', 'event_espresso');
        ?>
: </strong> </li>
					<li><a <?php 
        echo !isset($_REQUEST['self']) && !isset($_REQUEST['all']) || isset($_REQUEST['self']) && $_REQUEST['self'] == 'true' ? ' class="current" ' : '';
        ?>
 href="admin.php?page=form_groups&self=true"><?php 
        _e('My Groups', 'event_espresso');
        ?>
 <span class="count">(<?php 
        echo $total_self_question_groups;
        ?>
)</span> </a> | </li>
					<li><a <?php 
        echo isset($_REQUEST['all']) && $_REQUEST['all'] == 'true' ? ' class="current" ' : '';
        ?>
 href="admin.php?page=form_groups&all=true"><?php 
        _e('All Groups', 'event_espresso');
        ?>
 <span class="count">(<?php 
        echo $total_question_groups;
        ?>
)</span> </a></li>
				</ul>
				<div class="clear"></div>
			</div>
	<?php 
    }
    ?>

		<div class="meta-box-sortables ui-sortables">
			<?php 
    if (isset($_REQUEST['action'])) {
        switch ($_REQUEST['action']) {
            case 'new_group':
                if (file_exists(EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/form-builder/groups/new_group.php')) {
                    require_once EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/form-builder/groups/new_group.php';
                    event_espresso_form_group_new();
                } else {
                    require_once EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/pricing_table.php';
                }
                break;
            case 'edit_group':
                require_once "edit_group.php";
                event_espresso_form_group_edit();
                break;
            case 'insert_group':
                if (file_exists(EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/form-builder/groups/insert_group.php')) {
                    require_once EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/form-builder/groups/insert_group.php';
                    event_espresso_insert_group();
                }
                break;
            case 'update_group':
                require_once "update_group.php";
                event_espresso_form_group_update($_REQUEST['group_id']);
                break;
            case 'delete_group':
                if (file_exists(EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/form-builder/groups/delete_group.php')) {
                    require_once EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/form-builder/groups/delete_group.php';
                    event_espresso_form_group_delete();
                } else {
                    ?>
							<div id="message" class="updated fade">
								<p><strong>
					<?php 
                    _e('This function is not available in the free version of Event Espresso.', 'event_espresso');
                    ?>
									</strong></p>
							</div>
							<?php 
                }
                break;
        }
    }
    if (!empty($_REQUEST['delete_group'])) {
        //This is for the delete checkboxes
        if (file_exists(EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/form-builder/groups/delete_group.php')) {
            require_once EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/form-builder/groups/delete_group.php';
            event_espresso_form_group_delete();
        } else {
            ?>
					<div id="message" class="updated fade">
						<p><strong>
			<?php 
            _e('This function is not available in the free version of Event Espresso.', 'event_espresso');
            ?>
							</strong></p>
					</div>
					<?php 
        }
    }
    ?>
		</div>
		<form id="form1" name="form1" method="post" action="<?php 
    echo $_SERVER["REQUEST_URI"];
    ?>
">
			<table id="table" class="widefat manage-question-group">
				<thead>
					<tr>
						<th class="manage-column" id="cb" scope="col" ><input type="checkbox" /></th>
						<th class="manage-column column-title" id="values" scope="col" title="Click to Sort" style="width:40%;">
	<?php 
    _e('Group Name', 'event_espresso');
    ?>
						</th>

						<?php 
    if (function_exists('espresso_is_admin') && espresso_is_admin() == true) {
        ?>
							<th class="manage-column column-creator" id="creator" scope="col" title="Click to Sort" style="width:30%;"><?php 
        _e('Creator', 'event_espresso');
        ?>
</th>
							<?php 
    }
    ?>
						<th class="manage-column column-title" id="required" scope="col" title="Click to Sort" style="width:20%;">
	<?php 
    _e('Description', 'event_espresso');
    ?>
						</th>
					</tr>
				</thead>
				<tbody>
					<?php 
    $groups = espresso_get_user_question_groups(get_current_user_id());
    if (count($groups) > 0 && is_array($groups)) {
        foreach ($groups as $group) {
            $group_id = $group->id;
            $group_name = stripslashes($group->group_name);
            $group_identifier = stripslashes($group->group_identifier);
            $group_description = stripslashes($group->group_description);
            $question = stripslashes(isset($group->question) ? $group->question : '');
            $group_order = $group->group_order;
            $system_group = $group->system_group;
            $wp_user = $group->wp_user == 0 ? 1 : $group->wp_user;
            ?>
							<tr>
								<td class="checkboxcol">
									<input name="row_id" type="hidden" value="<?php 
            echo $group_id;
            ?>
" />
									<?php 
            if ($system_group == 0) {
                ?>
										<input style="margin:7px 0 22px 8px; vertical-align:top;" name="checkbox[<?php 
                echo $group_id;
                ?>
]" type="checkbox"  title="Delete <?php 
                echo empty($question_name) ? '' : $question_name;
                ?>
">
									<?php 
            } else {
                ?>
										<span><?php 
                echo '<img style="margin:7px 0 22px 8px; vertical-align:top;" src="' . EVENT_ESPRESSO_PLUGINFULLURL . 'images/icons/lock.png" alt="System Group" title="System Group" />';
                ?>
</span>
			<?php 
            }
            ?>
								</td>

								<td class="post-title page-title column-title"><strong><a href="admin.php?page=form_groups&amp;action=edit_group&amp;group_id=<?php 
            echo $group_id;
            ?>
"><?php 
            echo $group_name;
            ?>
</a></strong>
									<div class="row-actions">
										<span class="edit"><a href="admin.php?page=form_groups&amp;action=edit_group&amp;group_id=<?php 
            echo $group_id;
            ?>
"><?php 
            _e('Edit', 'event_espresso');
            ?>
</a> | </span>
			<?php 
            if ($system_group == 0) {
                ?>
<span class="delete"><a onclick="return confirmDelete();" class="submitdelete"  href="admin.php?page=form_groups&amp;action=delete_group&amp;group_id=<?php 
                echo $group_id;
                ?>
"><?php 
                _e('Delete', 'event_espresso');
                ?>
</a></span><?php 
            }
            ?>
									</div>
								</td>
								<?php 
            if (function_exists('espresso_is_admin') && espresso_is_admin() == true) {
                ?>
									<td><?php 
                echo espresso_user_meta($wp_user, 'user_firstname') != '' ? espresso_user_meta($wp_user, 'user_firstname') . ' ' . espresso_user_meta($wp_user, 'user_lastname') . ' (<a href="user-edit.php?user_id=' . $wp_user . '">' . espresso_user_meta($wp_user, 'user_nicename') . '</a>)' : espresso_user_meta($wp_user, 'display_name') . ' (<a href="user-edit.php?user_id=' . $wp_user . '">' . espresso_user_meta($wp_user, 'user_nicename') . '</a>)';
                ?>
</td>
			<?php 
            }
            ?>
								<td class="author column-author"><?php 
            echo $group_description;
            ?>
</td>

							</tr>
						<?php 
        }
    }
    ?>
				</tbody>
			</table>
			<div style="clear:both">
				<p><input type="checkbox" name="sAll" onclick="selectAll(this)" />
					<strong>
	<?php 
    _e('Check All', 'event_espresso');
    ?>
					</strong>
					<input name="delete_group" type="submit" class="button-secondary" id="delete_group" value="<?php 
    _e('Delete Question Group', 'event_espresso');
    ?>
"  style="margin:10 0 0 10px;" onclick="return confirmDelete();">
					<a  style="margin-left:5px"class="button-primary" href="admin.php?page=form_groups&amp;action=new_group"><?php 
    _e('Add New Group', 'event_espresso');
    ?>
</a>
					<a  style="margin-left:5px"class="button-primary" href="admin.php?page=form_builder"><?php 
    _e('Questions', 'event_espresso');
    ?>
</a>
					<a  style="color:#FFF; text-decoration:none; margin-left:5px"class="button-primary thickbox" href="#TB_inline?height=400&width=500&inlineId=group_info"><?php 
    _e('Help', 'event_espresso');
    ?>
</a></p>
			</div>
		</form>
		<?php 
    $main_post_content = ob_get_clean();
    espresso_choose_layout($main_post_content, event_espresso_display_right_column());
    ?>
		
	</div>


	<div id="group_info" class="pop-help" style="display:none">
		<div class="TB-ee-frame">
			<h2><?php 
    _e('Question Groups Overview', 'event_espresso');
    ?>
</h2>
			<p><?php 
    _e('Question Groups are pre-populated groups of ', 'event_espresso');
    ?>
 <a href="admin.php?page=form_builder"><?php 
    _e('questions', 'event_espresso');
    ?>
</a> <?php 
    _e('that can be added your events. These groups of questions are what make up your customized regsistration forms. The personal information group is required for all events and is shown by default on all registration forms.', 'event_espresso');
    ?>
</p>
			<p><?php 
    _e('Question Groups can be organized or re-ordered by dragging and dropping individual table rows into the desired positions.', 'event_espresso');
    ?>
</p>
		</div>
	</div>

	<script type="text/javascript">
		jQuery(document).ready(function($) {

			/* show the table data */
			var mytable = $('#table').dataTable( {
				"bStateSave": true,
				"sPaginationType": "full_numbers",

				"oLanguage": {	"sSearch": "<strong><?php 
    _e('Live Search Filter', 'event_espresso');
    ?>
:</strong>",
					"sZeroRecords": "<?php 
    _e('No Records Found!', 'event_espresso');
    ?>
" },
				"aoColumns": [
					{ "bSortable": true },
	<?php 
    echo function_exists('espresso_is_admin') && espresso_is_admin() == true ? 'null,' : '';
    ?>
					null,
					null
				]
			} );

			var startPosition;
			var endPosition;
			$("#table tbody").sortable({
				cursor: "move",
				start:function(event, ui){
					startPosition = ui.item.prevAll().length + 1;
				},
				update: function(event, ui) {
					endPosition = ui.item.prevAll().length + 1;
					//alert('Start Position: ' + startPosition + ' End Position: ' + endPosition);
					var row_ids="";
					$('#table tbody input[name="row_id"]').each(function(i){
						row_ids= row_ids + ',' + $(this).val();
					});
					$.post(EEGlobals.ajaxurl, { action: "update_qgr_sequence", row_ids: row_ids, update_sequence: "true"} );
				}
			});
			postboxes.add_postbox_toggles('form_groups');
		} );

		jQuery(function(){
			jQuery('#add-new-group').validate({
		  
				rules: {
					group_name: "required"
				},
				messages: {
					group_name: "Please add a name for your group"
				}
			});	
				
		});			
	</script>

	<?php 
}
コード例 #20
0
ファイル: index.php プロジェクト: sriram911/pls
function espresso_ticket_config_mnu()
{
    global $wpdb, $current_user, $espresso_premium;
    ?>
	<div class="wrap">
		<div id="icon-options-event" class="icon32"> </div>
		<h2><?php 
    echo _e('Manage Ticket Templates', 'event_espresso');
    if (!isset($_REQUEST['action']) || $_REQUEST['action'] != 'edit' && $_REQUEST['action'] != 'add_new_ticket') {
        echo '<a href="admin.php?page=event_tickets&amp;action=add_new_ticket" class="button add-new-h2" style="margin-left: 20px;">' . __('Add New', 'event_espresso') . '</a>';
    }
    ?>
		</h2>
		<?php 
    ob_start();
    if (!empty($_POST['delete_ticket'])) {
        if (is_array($_POST['checkbox'])) {
            while (list($key, $value) = each($_POST['checkbox'])) {
                $del_id = $key;
                //Delete ticket data
                $sql = "DELETE FROM " . EVENTS_TICKET_TEMPLATES . " WHERE id='{$del_id}'";
                $wpdb->query($sql);
            }
        }
        ?>
			<div id="message" class="updated fade">
				<p><strong>
			<?php 
        _e('Ticket Templates have been successfully deleted.', 'event_espresso');
        ?>
					</strong></p>
			</div>
		<?php 
    }
    if (isset($_REQUEST['action'])) {
        switch ($_REQUEST['action']) {
            case 'update_ticket':
                require_once "update_ticket.php";
                update_event_ticket();
                break;
            case 'add':
                require_once "add_to_db.php";
                add_ticket_to_db();
                break;
            case 'add_new_ticket':
                require_once "add_new.php";
                add_new_event_ticket();
                break;
            case 'edit_ticket':
                require_once "edit_ticket.php";
                edit_event_ticket();
                break;
        }
    }
    do_action('action_hook_espresso_admin_notices');
    //This line keeps the notices from displaying twice
    if (did_action('action_hook_espresso_admin_notices') == false) {
        do_action('action_hook_espresso_admin_notices');
    }
    ?>
		<p>
			<?php 
    _e('Create customized ticket template for use in multiple events. ', 'event_espresso');
    echo apply_filters('filter_hook_espresso_help', 'customized_ticket_info');
    ?>
		</p>
		<form id="form1" name="form1" method="post" action="<?php 
    echo $_SERVER["REQUEST_URI"];
    ?>
">
			<table id="table" class="widefat manage-tickets">
				<thead>
					<tr>
						<th class="manage-column column-cb check-column" id="cb" scope="col" style="width:3.5%;"><input type="checkbox"></th>
						<th class="manage-column column-comments num" id="id" style="padding-top:7px; width:3.5%;" scope="col" title="Click to Sort"><?php 
    _e('ID', 'event_espresso');
    ?>
</th>
						<th class="manage-column column-title" id="name" scope="col" title="Click to Sort" style="width:60%;"><?php 
    _e('Name', 'event_espresso');
    ?>
</th>
	<?php 
    if (function_exists('espresso_is_admin') && espresso_is_admin() == true) {
        ?>
							<th class="manage-column column-creator" id="creator" scope="col" title="Click to Sort" style="width:10%;"><?php 
        _e('Creator', 'event_espresso');
        ?>
</th>
	<?php 
    }
    ?>
						<th class="manage-column column-title" id="action" scope="col" title="Click to Sort" style="width:30%;"><?php 
    _e('Action', 'event_espresso');
    ?>
</th>
					</tr>
				</thead>
				<tbody>
					<?php 
    $sql = "SELECT * FROM " . EVENTS_TICKET_TEMPLATES . " e";
    if (function_exists('espresso_manager_pro_version') && !empty($_SESSION['espresso_use_selected_manager'])) {
        $sql .= " JOIN {$wpdb->users} u on u.ID = e.wp_user WHERE e.wp_user = "******" JOIN {$wpdb->users} u on u.ID = e.wp_user WHERE e.wp_user = "******" ORDER BY e.id ASC");
        foreach ($results as $result) {
            $ticket_id = $result->id;
            $ticket_name = stripslashes($result->ticket_name);
            $ticket_content = stripslashes($result->ticket_content);
            $wp_user = $result->wp_user;
            ?>
							<tr>
								<td><input name="checkbox[<?php 
            echo $ticket_id;
            ?>
]" type="checkbox"  title="Delete <?php 
            echo stripslashes($ticket_name);
            ?>
"></td>
								<td><?php 
            echo $ticket_id;
            ?>
</td>
								<td class="post-title page-title column-title"><strong><a href="admin.php?page=event_tickets&action=edit_ticket&id=<?php 
            echo $ticket_id;
            ?>
"><?php 
            echo $ticket_name;
            ?>
</a></strong>
									<div class="row-actions"><span class="edit"><a href="admin.php?page=event_tickets&action=edit_ticket&id=<?php 
            echo $ticket_id;
            ?>
"><?php 
            _e('Edit', 'event_espresso');
            ?>
</a> | </span><span class="delete"><a onclick="return confirmDelete();" class="delete submitdelete" href="admin.php?page=event_tickets&action=delete_ticket&id=<?php 
            echo $ticket_id;
            ?>
"><?php 
            _e('Delete', 'event_espresso');
            ?>
</a></span></div>
								</td>
								<?php 
            if (function_exists('espresso_is_admin') && espresso_is_admin() == true && $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;
                ?>
									<td class="date"><?php 
                echo espresso_user_meta($wp_user, 'user_firstname') != '' ? espresso_user_meta($wp_user, 'user_firstname') . ' ' . espresso_user_meta($wp_user, 'user_lastname') . ' (<a href="user-edit.php?user_id=' . $wp_user . '">' . espresso_user_meta($wp_user, 'user_nicename') . '</a>)' : espresso_user_meta($wp_user, 'display_name') . ' (<a href="user-edit.php?user_id=' . $wp_user . '">' . espresso_user_meta($wp_user, 'user_nicename') . '</a>)';
                echo $user_co_org != '' ? '<br />[' . espresso_user_meta($wp_user, 'company') . ']' : '';
                ?>
									</td>
							<?php 
            }
            ?>
								<td><a href="admin.php?page=event_tickets&action=edit_ticket&id=<?php 
            echo $ticket_id;
            ?>
">
							<?php 
            _e('Edit Ticket Template', 'event_espresso');
            ?>
									</a></td>
							</tr>
		<?php 
        }
    }
    ?>
				</tbody>
			</table>
			<p>

				<input type="checkbox" name="sAll" onclick="selectAll(this)" />
				<strong>
		<?php 
    _e('Check All', 'event_espresso');
    ?>
				</strong>
				<input name="delete_ticket" type="submit" class="button-secondary" id="delete_ticket" value="<?php 
    _e('Delete Selected', 'event_espresso');
    ?>
" style="margin-left:100px;" onclick="return confirmDelete();"> <?php 
    echo '<a href="admin.php?page=event_tickets&amp;action=add_new_ticket" style="margin-left:5px"class="button-primary">' . __('Add New', 'event_espresso') . '</a>';
    ?>
			</p>
		</form>
		<?php 
    $main_post_content = ob_get_clean();
    if (function_exists('espresso_version') && espresso_version() >= '3.2') {
        ob_start();
        do_meta_boxes('event-espresso_page_event_tickets', 'side', null);
        $sidebar_content = ob_get_clean();
        espresso_choose_layout($main_post_content, $sidebar_content);
    } else {
        espresso_choose_layout($main_post_content, event_espresso_display_right_column());
    }
    ?>
	</div>
	<?php 
    include_once 'tickets_help.php';
    ?>
	<script>
		jQuery(document).ready(function($) {

			/* show the table data */
			var mytable = $('#table').dataTable( {
				"bStateSave": true,
				"sPaginationType": "full_numbers",

				"oLanguage": {	"sSearch": "<strong><?php 
    _e('Live Search Filter', 'event_espresso');
    ?>
:</strong>",
					"sZeroRecords": "<?php 
    _e('No Records Found!', 'event_espresso');
    ?>
" },
				"aoColumns": [
					{ "bSortable": false },
					null,
					null,
	<?php 
    echo function_exists('espresso_is_admin') && espresso_is_admin() == true ? 'null,' : '';
    ?>
					null

				]

			} );

		} );
	</script>

	<?php 
    //echo event_espresso_custom_ticket_info();
}
コード例 #21
0
function espresso_calendar_config_mnu()
{
    global $espresso_calendar, $notices;
    /* Calendar */
    function espresso_calendar_updated()
    {
    }
    if (isset($_POST['update_calendar']) && check_admin_referer('espresso_form_check', 'update_calendar')) {
        $espresso_calendar['espresso_page_post'] = $_POST['espresso_page_post'];
        $espresso_calendar['espresso_calendar_header'] = $_POST['espresso_calendar_header'];
        $espresso_calendar['espresso_calendar_buttonText'] = $_POST['espresso_calendar_buttonText'];
        $espresso_calendar['espresso_calendar_firstday'] = $_POST['espresso_calendar_firstday'];
        $espresso_calendar['espresso_calendar_weekends'] = $_POST['espresso_calendar_weekends'];
        $espresso_calendar['espresso_calendar_height'] = $_POST['espresso_calendar_height'];
        $espresso_calendar['enable_calendar_thumbs'] = $_POST['enable_calendar_thumbs'];
        $espresso_calendar['show_tooltips'] = $_POST['show_tooltips'];
        $espresso_calendar['show_time'] = $_POST['show_time'];
        $espresso_calendar['time_format'] = $_POST['time_format_custom'];
        $espresso_calendar['espresso_use_pickers'] = $_POST['espresso_use_pickers'];
        $espresso_calendar['ee_event_background'] = !empty($_POST['ee_event_background']) ? $_POST['ee_event_background'] : $espresso_calendar['ee_event_background'];
        $espresso_calendar['ee_event_text_color'] = !empty($_POST['ee_event_text_color']) ? $_POST['ee_event_text_color'] : $espresso_calendar['ee_event_text_color'];
        $espresso_calendar['enable_cat_classes'] = $_POST['enable_cat_classes'];
        //$espresso_calendar['use_themeroller'] = $_POST['use_themeroller'];
        $espresso_calendar['espresso_calendar_titleFormat'] = $_POST['espresso_calendar_titleFormat'];
        $espresso_calendar['espresso_calendar_columnFormat'] = $_POST['espresso_calendar_columnFormat'];
        $espresso_calendar['espresso_calendar_monthNames'] = $_POST['espresso_calendar_monthNames'];
        $espresso_calendar['espresso_calendar_monthNamesShort'] = $_POST['espresso_calendar_monthNamesShort'];
        $espresso_calendar['espresso_calendar_dayNames'] = $_POST['espresso_calendar_dayNames'];
        $espresso_calendar['espresso_calendar_dayNamesShort'] = $_POST['espresso_calendar_dayNamesShort'];
        $espresso_calendar['calendar_pages'] = $_POST['calendar_pages'] == '' ? 0 : $_POST['calendar_pages'];
        update_option('espresso_calendar_settings', $espresso_calendar);
        add_action('admin_notices', 'espresso_calendar_updated');
        $notices['updates'][] = __('The calendar settings were saved ', 'event_espresso');
    }
    if (!empty($_REQUEST['reset_calendar']) && check_admin_referer('espresso_form_check', 'reset_calendar_nonce')) {
        delete_option("espresso_calendar_settings");
        espresso_calendar_install();
        $notices['updates'][] = __('The calendar settings were reset ', 'event_espresso');
    }
    $espresso_calendar = get_option('espresso_calendar_settings');
    ob_start();
    do_meta_boxes('event-espresso_page_espresso_calendar', 'side', null);
    $sidebar_content = ob_get_clean();
    ob_start();
    do_meta_boxes('event-espresso_page_espresso_calendar', 'normal', $espresso_calendar);
    $main_post_content = ob_get_clean();
    ################## Begin admin settings screen ###########################
    ?>
	<div id="ee-calendar-settings" class="wrap meta-box-sortables ui-sortable">
		<div id="icon-options-event" class="icon32"> </div>
		<h2>
			<?php 
    _e('Event Espresso - Calendar Settings', 'event_espresso');
    ?>
		</h2>
		<form class="espresso_form" method="post" action="<?php 
    echo $_SERVER['REQUEST_URI'];
    ?>
">
			<?php 
    if (!espresso_choose_layout($main_post_content, $sidebar_content)) {
        return FALSE;
    }
    ?>
		</form>
		<?php 
    include_once 'calendar_help.php';
    ?>
	</div>
	<!-- / #wrap -->
	<script type="text/javascript">
		//<![CDATA[
		jQuery(document).ready(function($){
			$("input[name='time_format']").click(function(){
				if ( "time_format_custom_radio" != $(this).attr("id") )
					$("input[name='time_format_custom']").val( $(this).val() ).siblings('.example').text( $(this).siblings('span').text() );
			});
			$("input[name='time_format_custom']").focus(function(){
				$("#time_format_custom_radio").attr("checked", "checked");
			});

			// disable color picker & thumb sizes inputs & fade if not use controls true
			window.scp = $('select#espresso_use_pickers option:selected').val();
			window.ect = $('select#enable-calendar-thumbs option:selected').val();

			if(window.scp == ''){
				$('input#event-background, input#event-text').attr('disabled', true);
				$('.color-picker-style').attr('style', "opacity: .3");
				$('tr.color-picker-selections th, tr.color-picker-selections td').attr('style', "opacity: .3");
			}
			if(window.ect == 'false'){
				$('tr#thumbnail-sizes td input').attr('disabled', true);
				$('tr#thumbnail-sizes').attr('style', "opacity: .3");
			}
			$('select#enable-calendar-thumbs').change(function(){
				window.ect = $('select#enable-calendar-thumbs option:selected').val();
				if(window.ect == 'false'){
					$('tr#thumbnail-sizes td input').attr('disabled', true);
					$('tr#thumbnail-sizes').attr('style', "opacity: .3");
				}else{
					$('tr#thumbnail-sizes td input').removeAttr('disabled', true);
					$('tr#thumbnail-sizes').removeAttr('style', "opacity: .3");
				}
			});
			$('select#espresso_use_pickers').change(function(){
				window.scp = $('select#espresso_use_pickers option:selected').val();
				if(window.scp == ''){
					$('input#event-background, input#event-text').attr('disabled', true);
					$('tr.color-picker-selections th, tr.color-picker-selections td').attr('style', "opacity: .3");
				}else {
					$('input#event-background, input#event-text').removeAttr('disabled', true);
					$('tr.color-picker-selections th, tr.color-picker-selections td').removeAttr('style');
				}
			});

			// color picker initialization
			$('#colorpicker-1').hide();
			$('#colorpicker-2').hide();
			$('#colorpicker-1').farbtastic("#background-color");
			$('#colorpicker-2').farbtastic("#text-color");
			$("#background-color").click(function(){$('#colorpicker-1').slideToggle()});
			$("#text-color").click(function(){$('#colorpicker-2').slideToggle()});

		});

		//]]>
	</script>
	<?php 
}
コード例 #22
0
ファイル: index.php プロジェクト: hhgr/uksoccer
function event_espresso_discount_config_mnu()
{
    global $wpdb;
    require_once "search.php";
    ?>
	<div class="wrap">
		<div id="icon-options-event" class="icon32"> </div>
		<h2><?php 
    echo _e('Manage Event Promotional Codes', 'event_espresso');
    ?>
			<?php 
    if (!isset($_REQUEST['action']) || $_REQUEST['action'] != 'edit' && $_REQUEST['action'] != 'new') {
        echo '<a href="admin.php?page=discounts&amp;action=new" class="button add-new-h2" style="margin-left: 20px;">' . __('Add New Code', 'event_espresso') . '</a>';
    }
    ?>
		</h2>

		<?php 
    ob_start();
    $button_style = 'button-primary';
    if (isset($_REQUEST['action'])) {
        switch ($_REQUEST['action']) {
            case 'add':
                require_once "add_discount.php";
                add_discount_to_db();
                //Add the discount to the DB
                break;
            case 'new':
                require_once "new_discount.php";
                add_new_event_discount();
                //Add new discount form
                $button_style = 'button-secondary';
                break;
            case 'edit':
                require_once "edit_discount.php";
                edit_event_discount();
                //Edit discount form
                $button_style = 'button-secondary';
                break;
            case 'update':
                require_once "update_discount.php";
                update_event_discount();
                //Update discount in DB
                break;
            case 'delete_discount':
                require_once "delete_discount.php";
                delete_event_discount();
                //Delete discount in DB
                break;
        }
    }
    if (!empty($_REQUEST['delete_discount'])) {
        //This is for the delete checkboxes
        require_once "delete_discount.php";
        delete_event_discount();
    }
    ?>

		<form id="form1" name="form1" method="post" action="<?php 
    echo $_SERVER["REQUEST_URI"];
    ?>
">
			<table id="table" class="widefat manage-discounts">
				<thead>
					<tr>
						<th class="manage-column column-cb check-column" id="cb" scope="col" style="width:2.5%;"><input type="checkbox"></th>
						<th class="manage-column column-comments num" id="id" style="padding-top:7px; width:2.5%;" scope="col" title="Click to Sort"><?php 
    _e('ID', 'event_espresso');
    ?>
</th>
						<th class="manage-column column-title" id="name" scope="col" title="Click to Sort" style="width:20%;"><?php 
    _e('Name', 'event_espresso');
    ?>
</th>
						<?php 
    if (function_exists('espresso_is_admin') && espresso_is_admin() == true) {
        ?>
							<th class="manage-column column-creator" id="creator" scope="col" title="Click to Sort" style="width:10%;"><?php 
        _e('Creator', 'event_espresso');
        ?>
</th>
	<?php 
    }
    ?>
						<th class="manage-column column-author" id="start" scope="col" title="Click to Sort" style="width:20%;"><?php 
    _e('Amount', 'event_espresso');
    ?>
</th>
						<th class="manage-column column-date" id="begins" scope="col" title="Click to Sort" style="width:20%;"><?php 
    _e('Percentage', 'event_espresso');
    ?>
</th>
						<th class="manage-column column-date" id="begins" scope="col" title="Click to Sort" style="width:20%;"><?php 
    _e('Global', 'event_espresso');
    ?>
</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td colspan=6 class='dataTables_empty' style='text-align:center'>
							 <?php 
    _e("Loading...", "event_espresso");
    ?>
						</td>
					</tr>
					
				<!--	<?php 
    /*foreach(espresso_promocodes_initial_jquery_datatables_data() as $row){?>
    		<tr>
    			<?php foreach($row as $column){ ?>
    			<td><?php echo $column?></td>
    			<?php } ?>
    		</tr>
    		<?php }  */
    ?>
 -->
				</tbody>
				</thead>
				
			</table>
			<div style="clear:both">
				<p><input type="checkbox" name="sAll" onclick="selectAll(this)" />
					<strong>
	<?php 
    _e('Check All', 'event_espresso');
    ?>
					</strong>
					<input name="delete_discount" type="submit" class="button-secondary" id="delete_discount" value="<?php 
    _e('Delete Promotional Code', 'event_espresso');
    ?>
" style="margin:10 0 0 10px;" onclick="return confirmDelete();">

					<a  style="margin-left:5px"class="<?php 
    echo $button_style;
    ?>
" href="admin.php?page=discounts&amp;action=new"><?php 
    _e('Add New Promotional Code', 'event_espresso');
    ?>
</a></p>
			</div>
		</form>
		<?php 
    $main_post_content = ob_get_clean();
    espresso_choose_layout($main_post_content, event_espresso_display_right_column());
    ?>
	</div>

	<script type="text/javascript">
		jQuery(document).ready(function($) {

			/* show the table data */
			var mytable = $('#table').dataTable( {
					
				
				"aoColumns": [
					{ "bSortable": false },
					null,
					null,
					null,
					null,
	<?php 
    echo function_exists('espresso_is_admin') && espresso_is_admin() == true ? 'null,' : '';
    ?>
							null

						],
				'bProcessing': true, 
				'bServerSide': true, 
//				"bDeferRender": true,
				'sAjaxSource': ajaxurl+'?action=event_espresso_get_discount_codes_for_jquery_datatables',// - See more at: http://www.koolkatwebdesigns.com/using-jquery-datatables-with-wordpress-and-ajax/#sthash.H0zsZy6z.dpuf
				"iDeferLoading": <?php 
    echo espresso_promocodes_count_total();
    ?>
,
				"bStateSave": true,
				"sPaginationType": "full_numbers",

				"oLanguage": {	
					"sSearch": "<strong><?php 
    _e('Live Search Filter', 'event_espresso');
    ?>
:</strong>",
					"sZeroRecords": "<?php 
    _e('No Records Found!', 'event_espresso');
    ?>
",
					"sProcessing": "<img src='<?php 
    echo EVENT_ESPRESSO_PLUGINFULLURL . "images/ajax-loader.gif";
    ?>
'>"}
				

					} );

				} );
				// Add new promo code form validation
				jQuery(function(){
					jQuery("#new-promo-code").validate( {
						rules: {
							coupon_code: "required"
						},
						messages: {
							coupon_code: "Please add your promotional code"
						}
					});
		
				});
	</script>
	<?php 
}
コード例 #23
0
function event_espresso_groupon_config_mnu()
{
    do_action('action_hook_espresso_log', __FILE__, __FUNCTION__, '');
    global $wpdb;
    //$wpdb->show_errors();
    $edit_action = !empty($_REQUEST['action']) && $_REQUEST['action'] == 'edit' ? true : false;
    $add_new_action = !empty($_REQUEST['action']) && $_REQUEST['action'] == 'add_new_groupon' ? true : false;
    $delete = empty($_POST['delete_groupon']) ? false : true;
    $checkbox = empty($_POST['checkbox']) ? false : $_POST['checkbox'];
    $csv_import_action = !empty($_REQUEST['action']) && $_REQUEST['action'] == 'csv_import' ? true : false;
    $submit = isset($_POST['Submit']) ? true : false;
    $update_action = !empty($_REQUEST['action']) && $_REQUEST['action'] == 'update' ? true : false;
    $groupon_id = empty($_REQUEST['groupon_id']) ? false : $_REQUEST['groupon_id'];
    $groupon_code = empty($_REQUEST['groupon_code']) ? false : htmlentities2($_REQUEST['groupon_code']);
    $groupon_status = empty($_REQUEST['groupon_status']) ? false : true;
    $old_groupon_status = empty($_REQUEST['old_groupon_status']) ? false : true;
    $attendee_id = empty($_REQUEST['attendee_id']) ? false : $_REQUEST['attendee_id'];
    $code_reuse = $update_action && !$old_groupon_status && $groupon_status && $attendee_id ? true : false;
    $groupon_holder = empty($_REQUEST['groupon_holder']) ? false : $_REQUEST['groupon_holder'];
    $add_action = !empty($_REQUEST['action']) && $_REQUEST['action'] == 'add' ? true : false;
    ?>
	<div class="wrap">
		<div id="icon-options-event" class="icon32"> </div>
		<h2><?php 
    echo _e('Manage Groupon Codes', 'event_espresso');
    ?>
			<?php 
    if (!$edit_action && !$add_new_action) {
        echo '<a href="admin.php?page=groupons&amp;action=add_new_groupon" class="button add-new-h2" style="margin-left: 20px;">' . __('Add New Groupon Code', 'event_espresso') . '</a>';
    }
    ?>
		</h2>
		<?php 
    ob_start();
    if ($delete) {
        if (is_array($checkbox)) {
            while (list($key, $value) = each($checkbox)) {
                $del_id = $key;
                //Delete discount data
                $sql = "DELETE FROM " . EVENTS_GROUPON_CODES_TABLE . " WHERE id='{$del_id}'";
                $wpdb->query($sql);
                //$sql = "DELETE FROM ".EVENTS_GROUPON_REL_TABLE." WHERE groupon_id='$del_id'";
                //$wpdb->query($sql);
            }
        }
        ?>
			<div id="message" class="updated fade"><p><strong><?php 
        _e('Groupon Code(s) have been successfully deleted from the database.', 'event_espresso');
        ?>
</strong></p></div>
			<?php 
    }
    if ($submit) {
        if ($update_action) {
            global $wpdb;
            //Post the new event into the database
            $sql = "UPDATE " . EVENTS_GROUPON_CODES_TABLE . " SET groupon_code='{$groupon_code}', groupon_status='{$groupon_status}', groupon_holder='{$groupon_holder}' WHERE id = {$groupon_id}";
            if ($wpdb->query($sql)) {
                ?>
					<div id="message" class="updated fade"><p><strong><?php 
                _e('The groupon code ' . $groupon_code . ' has been updated.', 'event_espresso');
                ?>
</strong></p></div>
				<?php 
            } else {
                ?>
					<div id="message" class="error"><p><strong><?php 
                _e('The groupon code ' . $groupon_code . ' was not updated.', 'event_espresso');
                ?>
 <?php 
                print $wpdb->print_error();
                ?>
</strong></p></div>
					<?php 
            }
            if ($code_reuse) {
                $sql = "SELECT id FROM " . EVENTS_GROUPON_CODES_TABLE . " WHERE attendee_id='{$attendee_id}'";
                if (!$wpdb->get_row($sql)) {
                    $sql = "INSERT INTO " . EVENTS_GROUPON_CODES_TABLE . " (groupon_code, groupon_status, attendee_id, groupon_holder) VALUES('{$groupon_code}.-(used)', '0', '{$attendee_id}', 'USED_CODE')";
                    $wpdb->query($sql);
                }
            }
        }
    }
    function add_groupon_to_db()
    {
        do_action('action_hook_espresso_log', __FILE__, __FUNCTION__, '');
        global $wpdb;
        $submit = isset($_POST['Submit']) ? true : false;
        $add_action = !empty($_REQUEST['action']) && $_REQUEST['action'] == 'add' ? true : false;
        $groupon_code = empty($_REQUEST['groupon_code']) ? false : htmlentities2($_REQUEST['groupon_code']);
        $groupon_status = empty($_REQUEST['groupon_status']) ? false : $_REQUEST['groupon_status'];
        $groupon_holder = empty($_REQUEST['groupon_holder']) ? false : $_REQUEST['groupon_holder'];
        if ($submit) {
            if ($add_action) {
                $sql = "INSERT INTO " . EVENTS_GROUPON_CODES_TABLE . " (groupon_code, groupon_status, groupon_holder) VALUES('{$groupon_code}', '{$groupon_status}', '{$groupon_holder}')";
                if ($wpdb->query($sql)) {
                    ?>
						<div id="message" class="updated fade"><p><strong><?php 
                    _e('The groupon code ' . $groupon_code . ' has been added.', 'event_espresso');
                    ?>
</strong></p></div>
						<?php 
                } else {
                    ?>
						<div id="message" class="error"><p><strong><?php 
                    _e('The groupon code ' . $groupon_code . ' was not saved.', 'event_espresso');
                    ?>
 <?php 
                    //print $wpdb->print_error();
                    ?>
.</strong></p></div>
						<?php 
                }
            }
        }
    }
    if ($add_action) {
        add_groupon_to_db();
    }
    if ($csv_import_action) {
        require_once 'csv_import.php';
        groupon_csv_import();
    }
    function add_new_event_groupon()
    {
        do_action('action_hook_espresso_log', __FILE__, __FUNCTION__, '');
        $uri = empty($_SERVER['REQUEST_URI']) ? '' : $_SERVER['REQUEST_URI'];
        ?>
			<div class="metabox-holder">
				<div class="postbox">
					<h3><?php 
        _e('Add a Groupon Code', 'event_espresso');
        ?>
</h3>
					<div class="inside">
						<form id="add-new-groupon" method="post" action="<?php 
        echo $uri;
        ?>
">
							<input type="hidden" name="action" value="add">
							<ul>
								<li>
									<label for="groupon_code"><?php 
        _e('Groupon Code: ', 'event_espresso');
        ?>
<em title="<?php 
        _e('This field is required', 'event_espresso');
        ?>
"> *</em></label> <input type="text" id="groupon_code" name="groupon_code" size="25"></li>
								<li>
									<label><?php 
        _e('Groupon Status: ', 'event_espresso');
        ?>
</label>
									<input type="radio" checked="checked" name="groupon_status" value="1"><?php 
        _e('Active', 'event_espresso');
        ?>
									<input type="radio" name="groupon_status" value="0"><?php 
        _e('Used', 'event_espresso');
        ?>
</li>
									<!--<input name="groupon_status"></li>-->
								<li><label><?php 
        _e('Groupon Holder: ', 'event_espresso');
        ?>
</label><input type="text" name="groupon_holder" size="25"></li>
								<li>
									<p>
										<input class="button-primary" type="submit" name="Submit" value="<?php 
        _e('Submit', 'event_espresso');
        ?>
" id="add_new_groupon" />
									</p>
								</li>
							</ul>
						</form>
					</div>
				</div>
			</div>
			<?php 
    }
    if ($add_new_action) {
        add_new_event_groupon();
    }
    function edit_event_groupon()
    {
        do_action('action_hook_espresso_log', __FILE__, __FUNCTION__, '');
        global $wpdb;
        $id = !empty($_REQUEST['id']) ? $_REQUEST['id'] : 0;
        if ($event_groupon = $wpdb->get_row("SELECT * FROM " . EVENTS_GROUPON_CODES_TABLE . " WHERE id = " . $id)) {
            $groupon_id = $event_groupon->id;
            $attendee_id = $event_groupon->attendee_id;
            $groupon_code = $event_groupon->groupon_code;
            $groupon_status = $event_groupon->groupon_status;
            $groupon_holder = $event_groupon->groupon_holder;
            $uri = empty($_SERVER['REQUEST_URI']) ? '' : $_SERVER['REQUEST_URI'];
            ?>
				<!--Add event display-->
				<div class="metabox-holder">
					<div class="postbox">
						<h3><?php 
            _e('Edit Groupon Code:', 'event_espresso');
            ?>
 <?php 
            echo $groupon_code;
            ?>
</h3>
						<div class="inside">
							<form method="post" action="<?php 
            echo $uri;
            ?>
">
								<input type="hidden" name="groupon_id" value="<?php 
            echo $groupon_id;
            ?>
">
								<input type="hidden" name="attendee_id" value="<?php 
            echo $attendee_id;
            ?>
">
								<input type="hidden" name="action" value="update">
								<input type="hidden" name="old_groupon_status" value="<?php 
            echo $groupon_status;
            ?>
">
								<ul>
									<li>
										<label><?php 
            _e('Groupon Code: ', 'event_espresso');
            ?>
</label> <input type="text" name="groupon_code" value="<?php 
            echo $groupon_code;
            ?>
" size="25"></li>
									<li>
										<label><?php 
            _e('Groupon Status: ', 'event_espresso');
            ?>
</label>
										<?php 
            $values = array(array('id' => '1', 'text' => __('Active', 'event_espresso')), array('id' => '0', 'text' => __('Used', 'event_espresso')));
            echo select_input('groupon_status', $values, $groupon_status);
            ?>
 
									</li>
									<li><label><?php 
            _e('Groupon Holder: ', 'event_espresso');
            ?>
</label><input type="text" name="groupon_holder" value="<?php 
            echo $groupon_holder;
            ?>
"></li>

									<li>
										<input class="button-primary" type="submit" name="Submit" value="<?php 
            _e('Update', 'event_espresso');
            ?>
" id="update_groupon" /> 
									</li>
								</ul>
							</form>
						</div>
					</div>
				</div>
				<?php 
        }
    }
    if ($edit_action) {
        edit_event_groupon();
    }
    $uri = empty($_SERVER['REQUEST_URI']) ? '' : $_SERVER['REQUEST_URI'];
    ?>
		<form id="form1" name="form1" method="post" action="<?php 
    echo $uri;
    ?>
">

			<table id="table" class="widefat fixed" width="100%"> 
				<thead>
					<tr>
						<th class="manage-column column-cb check-column" id="cb" scope="col" style="width:5.5%;"><input type="checkbox"></th>
						<th class="manage-column column-comments num" id="id" style="padding-top:7px; width:5.5%;" scope="col" title="Click to Sort"><?php 
    _e('ID', 'event_espresso');
    ?>
</th>
						<th class="manage-column column-title" id="name" scope="col" title="Click to Sort" style="width:20%;"><?php 
    _e('Code', 'event_espresso');
    ?>
</th>
						<th class="manage-column column-author" id="status" scope="col" title="Click to Sort" style="width:20%;"><?php 
    _e('Status', 'event_espresso');
    ?>
</th>
						<th class="manage-column column-author" id="name" scope="col" title="Click to Sort" style="width:20%;"><?php 
    _e('Groupon Holder', 'event_espresso');
    ?>
</th>
						<th class="manage-column column-author" id="action" scope="col" title="Click to Sort" style="width:20%;"><?php 
    _e('Action', 'event_espresso');
    ?>
</th>
					</tr>
				</thead>
				<tbody>
					<?php 
    $wpdb->get_results("SELECT * FROM " . EVENTS_GROUPON_CODES_TABLE);
    if ($wpdb->num_rows > 0) {
        $event_groupons = $wpdb->get_results("SELECT * FROM " . EVENTS_GROUPON_CODES_TABLE . " ORDER BY id ASC");
        foreach ($event_groupons as $event_groupon) {
            $groupon_id = $event_groupon->id;
            $groupon_code = $event_groupon->groupon_code;
            $groupon_status = $event_groupon->groupon_status;
            $groupon_holder = $event_groupon->groupon_holder;
            if ($groupon_holder == 'USED_CODE') {
                continue;
            }
            $active_groupon = '<span style="color: #F00; font-weight:bold;">' . __('USED', 'event_espresso') . '</span>';
            if ($groupon_status > 0) {
                $active_groupon = '<span style="color: #090; font-weight:bold;">' . __('ACTIVE', 'event_espresso') . '</span>';
            }
            ?>
							<tr>
								<td><input name="checkbox[<?php 
            echo $groupon_id;
            ?>
]" type="checkbox"  title="Delete <?php 
            echo $groupon_code;
            ?>
"></td>
								<td><?php 
            echo $groupon_id;
            ?>
</td>
								<td><?php 
            echo $groupon_code;
            ?>
</td>
								<td><?php 
            echo $active_groupon;
            ?>
</td>
								<td><?php 
            echo $groupon_holder;
            ?>
</td>
								<td><a href="admin.php?page=groupons&action=edit&id=<?php 
            echo $groupon_id;
            ?>
"><?php 
            _e('Edit Groupon', 'event_espresso');
            ?>
</a></td>
							</tr>
							<?php 
        }
    }
    ?>

				</tbody>
			</table>
			<input type="checkbox" name="sAll" onclick="selectAll(this)" /> <strong><?php 
    _e('Check All', 'event_espresso');
    ?>
</strong> 
			<input name="delete_groupon" type="submit" class="button-secondary" id="delete_groupon" value="<?php 
    _e('Delete Groupon', 'event_espresso');
    ?>
" style="margin-left:100px;" onclick="return confirmDelete();"> <?php 
    echo '<a href="admin.php?page=groupons&amp;action=add_new_groupon" class="button add-new-h2" style="margin-left: 20px;">' . __('Add New Groupon Code', 'event_espresso') . '</a>';
    ?>
 <?php 
    /* ?><a  style="margin-left:5px"class="button-primary" href="admin.php?page=groupons&amp;action=csv_import"><?php _e('Import CSV','event_espresso'); ?></a><?php */
    ?>
		</form>
		<?php 
    $main_post_content = ob_get_clean();
    espresso_choose_layout($main_post_content, event_espresso_display_right_column());
    ?>
	</div>
	<script type="text/javascript">
		jQuery(document).ready(function($) {						
			/* show the table data */
			var mytable = $('#table').dataTable( {
				"sDom": 'Clfrtip',
				"aoColumns": [
					{ "bSortable": false },
					null,
					null,
					null,
					null,
					null
				],
		               
				"bAutoWidth": false,	
				"bStateSave": true,
				"sPaginationType": "full_numbers",
				"oLanguage": {	"sSearch": "<strong><?php 
    _e('Live Search Filter', 'event_espresso');
    ?>
:</strong>",
					"sZeroRecords": "<?php 
    _e('No Records Found!', 'event_espresso');
    ?>
" }
		        			
			} );
		        	
		} );
		// Add new groupon code form validation
		jQuery(function(){
			jQuery('#add-new-groupon').validate( {
				rules: {
					groupon_code: "required"
				},
				messages: {
					groupon_code: "Please add your groupon code"
				}
			});
		});
	</script>
	<?php 
    //============= End Event Registration Groupon Subpage - Add/Delete/Edit Groupon Codes  =============== //
}
コード例 #24
0
function edit_event($event_id = 0)
{
    global $wpdb, $org_options, $espresso_premium;
    ob_start();
    $SQL = "SELECT e.*, ev.id as venue_id\n\t    FROM " . EVENTS_DETAIL_TABLE . " e\n\t    LEFT JOIN " . EVENTS_VENUE_REL_TABLE . " vr ON e.id = vr.event_id\n\t    LEFT JOIN " . EVENTS_VENUE_TABLE . " ev ON vr.venue_id = ev.id\n\t    WHERE e.id = %d";
    $events = $wpdb->get_results($wpdb->prepare($SQL, $event_id));
    if (!is_array($events) || count($events) <= 0) {
        event_espresso_edit_list();
        #echo "<div class='updated fade below-h2'><p>";
        #_e("Event is not available any more!","eventespresso");
        #echo "</p></div>";
        return 1;
    }
    foreach ($events as $event) {
        $event_id = $event->id;
        $event_name = htmlentities(stripslashes($event->event_name), ENT_QUOTES, 'UTF-8');
        $event_desc = htmlentities(stripslashes($event->event_desc), ENT_QUOTES, 'UTF-8');
        $display_desc = $event->display_desc;
        $display_reg_form = $event->display_reg_form;
        $member_only = $event->member_only;
        $phone = stripslashes_deep($event->phone);
        $externalURL = stripslashes_deep($event->externalURL);
        //Early discounts
        $early_disc = stripslashes_deep($event->early_disc);
        $early_disc_date = stripslashes_deep($event->early_disc_date);
        $early_disc_percentage = stripslashes_deep($event->early_disc_percentage);
        $post_id = $event->post_id;
        $post_type = $event->post_type;
        $event_identifier = stripslashes_deep($event->event_identifier);
        $registration_start = $event->registration_start;
        $registration_end = $event->registration_end;
        $registration_startT = $event->registration_startT;
        $resitration_endT = $event->registration_endT;
        $timezone_string = $event->timezone_string;
        $start_date = $event->start_date;
        $end_date = $event->end_date;
        $tax_percentage = $event->tax_percentage;
        $tax_mode = $event->tax_mode;
        $start_time = isset($event->start_time) ? $event->start_time : '';
        $end_time = isset($event->end_time) ? $event->end_time : '';
        $reg_limit = $event->reg_limit;
        $additional_limit = $event->additional_limit;
        $allow_overflow = $event->allow_overflow;
        $overflow_event_id = $event->overflow_event_id;
        $allow_multiple = $event->allow_multiple;
        $event_cost = unserialize(isset($event->event_cost) ? $event->event_cost : '');
        $is_active = $event->is_active;
        $status = array();
        $status = event_espresso_get_is_active($event_id);
        $event_status = $event->event_status;
        $conf_mail = stripslashes_deep($event->conf_mail);
        $send_mail = stripslashes_deep($event->send_mail);
        $use_coupon_code = $event->use_coupon_code;
        $alt_email = $event->alt_email;
        $address = stripslashes_deep($event->address);
        $address2 = stripslashes_deep($event->address2);
        $city = stripslashes_deep($event->city);
        $state = stripslashes_deep($event->state);
        $zip = stripslashes_deep($event->zip);
        $country = stripslashes_deep($event->country);
        $venue_id = stripslashes_deep($event->venue_id);
        $venue_title = stripslashes_deep($event->venue_title);
        $venue_url = stripslashes_deep($event->venue_url);
        $venue_phone = stripslashes_deep($event->venue_phone);
        $venue_image = stripslashes_deep($event->venue_image);
        $email_id = $event->email_id;
        $ticket_id = $event->ticket_id;
        $wp_user = $event->wp_user;
        $date_submitted = $event->submitted != '0000-00-00 00:00:00' ? empty($event->submitted) ? '' : event_date_display($event->submitted, get_option('date_format')) : 'N/A';
        $google_map_link = espresso_google_map_link(array('address' => $address, 'city' => $city, 'state' => $state, 'zip' => $zip, 'country' => $country));
        //Virtual location
        $virtual_url = stripslashes_deep($event->virtual_url);
        $virtual_phone = stripslashes_deep($event->virtual_phone);
        $question_groups = unserialize($event->question_groups);
        global $event_meta;
        $event_meta = unserialize($event->event_meta);
        $recurrence_id = $event->recurrence_id;
        $visible_on = $event->visible_on;
        $require_pre_approval = $event->require_pre_approval;
        if (function_exists('event_espresso_edit_event_groupon')) {
            $use_groupon_code = $event->use_groupon_code;
        }
    }
    $values = array(array('id' => 'Y', 'text' => __('Yes', 'event_espresso')), array('id' => 'N', 'text' => __('No', 'event_espresso')));
    //If user is an event manager, then show only their events
    if (function_exists('espresso_is_my_event') && espresso_is_my_event($event_id) != true) {
        echo '<h2>' . __('Sorry, you do not have permission to edit this event.', 'event_espresso') . '</h2>';
        return;
    }
    ?>
	<!--Update event display-->
	<div id="submitdiv" class="postbox">
		<div class="handlediv" title="Click to toggle"><br />
		</div>
		<h3 class='hndle'> <span>
	<?php 
    _e('Quick Overview', 'event_espresso');
    ?>
			</span> </h3>
		<div class="inside">
			<div class="submitbox" id="submitpost">
				<div id="minor-publishing">
					<div id="minor-publishing-actions" class="clearfix">
						<div id="preview-action"> <a class="preview button" href="<?php 
    echo espresso_reg_url($event_id);
    ?>
" target="_blank" id="event-preview" tabindex="5">
	<?php 
    _e('View Event', 'event_espresso');
    ?>
							</a>
							<input type="hidden" name="event-preview" id="event-preview" value="" />
						</div>
						<div id="copy-action"> <a class="preview button" href="admin.php?page=events&amp;action=copy_event&event_id=<?php 
    echo $event_id;
    ?>
" id="post-copy" tabindex="4" onclick="return confirm('<?php 
    _e('Are you sure you want to copy ' . $event_name . '?', 'event_espresso');
    ?>
')">
	<?php 
    _e('Duplicate Event', 'event_espresso');
    ?>
							</a>
							<input  type="hidden" name="event-copy" id="event-copy" value="" />
						</div>
					</div>
					<!-- /minor-publishing-actions -->

					<div id="misc-publishing-actions">
						<div class="misc-pub-section curtime" id="visibility"> <span id="timestamp">
	<?php 
    _e('Start Date', 'event_espresso');
    ?>
								<b> <?php 
    echo event_date_display($start_date);
    ?>
 <?php 
    echo event_date_display($start_time, get_option('time_format'));
    ?>
</b> </span> </div>
						<div class="misc-pub-section">
							<label for="post_status">
	<?php 
    _e('Current Status:', 'event_espresso');
    ?>
							</label>
							<span id="post-status-display"> <?php 
    echo $status['display'];
    ?>
</span> </div>
						<div class="misc-pub-section" id="visibility"> <img src="<?php 
    echo EVENT_ESPRESSO_PLUGINFULLURL;
    ?>
images/icons/group.png" width="16" height="16" alt="<?php 
    _e('View Attendees', 'event_espresso');
    ?>
" /> <?php 
    echo !empty($number_attendees) ? __('Attendees', 'event_espresso') : '<a href="admin.php?page=events&amp;event_admin_reports=list_attendee_payments&amp;event_id=' . $event_id . '">' . __('Attendees', 'event_espresso') . '</a>';
    ?>
: <?php 
    echo get_number_of_attendees_reg_limit($event_id, 'num_attendees_slash_reg_limit');
    ?>
 </div>
						<div class="misc-pub-section <?php 
    echo function_exists('espresso_is_admin') && espresso_is_admin() == true && $espresso_premium == true ? '' : 'misc-pub-section-last';
    ?>
" id="visibility2"> <a href="admin.php?page=events&amp;event_admin_reports=event_newsletter&amp;event_id=<?php 
    echo $event_id;
    ?>
" title="<?php 
    _e('Email Event Attendees', 'event_espresso');
    ?>
"><img src="<?php 
    echo EVENT_ESPRESSO_PLUGINFULLURL;
    ?>
images/icons/email_go.png" width="16" height="16" alt="<?php 
    _e('Newsletter', 'event_espresso');
    ?>
" /></a> <a href="admin.php?page=events&amp;event_admin_reports=event_newsletter&amp;event_id=<?php 
    echo $event_id;
    ?>
" title="<?php 
    _e('Email Event Attendees', 'event_espresso');
    ?>
">
						<?php 
    _e('Email Event Attendees', 'event_espresso');
    ?>
							</a></div>
						<?php 
    if (function_exists('espresso_is_admin') && espresso_is_admin() == true && $espresso_premium == true) {
        $user_name = espresso_user_meta($wp_user, 'user_firstname') != '' ? espresso_user_meta($wp_user, 'user_firstname') . ' ' . espresso_user_meta($wp_user, 'user_lastname') . ' (<a href="user-edit.php?user_id=' . $wp_user . '">' . espresso_user_meta($wp_user, 'user_nicename') . '</a>)' : espresso_user_meta($wp_user, 'display_name') . ' (<a href="user-edit.php?user_id=' . $wp_user . '">' . espresso_user_meta($wp_user, 'user_nicename') . '</a>)';
        $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 '<div class="misc-pub-section misc-pub-section-last" id="visibility3">';
        echo '<ul>';
        echo '<li><strong>' . __('Submitted By:', 'event_espresso') . '</strong> ' . $user_name . '</li>';
        echo '<li><strong>' . __('Email:', 'event_espresso') . '</strong> ' . espresso_user_meta($wp_user, 'user_email') . '</li>';
        echo $user_co_org != '' ? '<li><strong>' . __('Organization:', 'event_espresso') . '</strong> ' . espresso_user_meta($wp_user, 'company') . '</li>' : '';
        echo '<li><strong>' . __('Date Submitted:', 'event_espresso') . '</strong> ' . $date_submitted . '</li>';
        echo '</ul>';
        echo '</div>';
    }
    ?>
					</div>
					<!-- /misc-publishing-actions -->
				</div>
				<!-- /minor-publishing -->

				<div id="major-publishing-actions" class="clearfix">
							<?php 
    if ($recurrence_id > 0) {
        ?>
						<div id="delete-action"> &nbsp; <a class="submitdelete deletion" href="admin.php?page=events&amp;action=delete_recurrence_series&recurrence_id=<?php 
        echo $recurrence_id;
        ?>
" onclick="return confirm('<?php 
        _e('Are you sure you want to delete ' . $event_name . '?', 'event_espresso');
        ?>
')">
						<?php 
        _e('Delete all events in this series', 'event_espresso');
        ?>
							</a> </div>
							<?php 
    } else {
        ?>
						<div id="delete-action"> <a class="submitdelete deletion" href="admin.php?page=events&amp;action=delete&event_id=<?php 
        echo $event_id;
        ?>
" onclick="return confirm('<?php 
        _e('Are you sure you want to delete ' . $event_name . '?', 'event_espresso');
        ?>
')">
						<?php 
        _e('Delete Event', 'event_espresso');
        ?>
							</a> </div>
	<?php 
    }
    ?>
					<div id="publishing-action">
						<input class="button-primary" type="submit" name="Submit" value="<?php 
    _e('Update Event', 'event_espresso');
    ?>
" id="save_event_setting" />
					</div>
					<!-- /publishing-action -->
				</div>
				<!-- /major-publishing-actions -->
			</div>
			<!-- /submitpost -->
		</div>
		<!-- /inside -->
	</div>
	<!-- /submitdiv -->

	<?php 
    if ($espresso_premium == true) {
        do_action('action_hook_espresso_edit_event_right_column_top', $event_id);
    }
    $advanced_options = '';
    if (file_exists(EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/event-management/advanced_settings.php')) {
        require_once EVENT_ESPRESSO_PLUGINFULLPATH . "includes/admin-files/event-management/advanced_settings.php";
    } else {
        //Display Lite version options
        $status = array(array('id' => 'A', 'text' => __('Active', 'event_espresso')), array('id' => 'D', 'text' => __('Deleted', 'event_espresso')));
        $advanced_options = '<p><strong>' . __('Advanced Options:', 'event_espresso') . '</strong></p>' . '<p><label>' . __('Is this an active event? ', 'event_espresso') . '</label>' . __(select_input('is_active', $values, $is_active)) . '</p>' . '<p><label>' . __('Display  description? ', 'event_espresso') . '</label>' . select_input('display_desc', $values, $display_desc) . '</p>' . '<p><label>' . __('Display  registration form? ', 'event_espresso') . '</label>' . select_input('display_reg_form', $values, $display_reg_form) . '</p>';
    }
    //Display Lite version options - End
    espresso_postbox('event-status', 'Event Options', '<p><label for"reg-limit">' . __('Attendee Limit', 'event_espresso') . ': </label><input name="reg_limit" id="reg-limit" size="10" type="text" value="' . $reg_limit . '" /><br />' . '<span>(' . __('leave blank for unlimited', 'event_espresso') . ')</span></p>' . '<p><label>' . __('Allow group registrations?', 'event_espresso') . '</label> ' . select_input('allow_multiple', $values, $allow_multiple) . '</p>' . '<p><label for="addit-limit">' . __('Max Group Registrants', 'event_espresso') . ':</label> <input type="text" id="addit-limit" name="additional_limit" value="' . $additional_limit . '" size="4" />' . '</p>' . $advanced_options);
    if (function_exists('espresso_ticket_dd') && $espresso_premium == true) {
        ?>
		<div id="event-category" class="postbox">
			<div class="handlediv" title="Click to toggle"><br>
			</div>
			<h3 class="hndle"> <span>
				<?php 
        _e('Custom Tickets', 'event_espresso');
        ?>
				</span> </h3>
			<div class="inside"> <?php 
        echo espresso_ticket_dd($ticket_id);
        ?>
 </div>
		</div>
	<?php 
    }
    if ($espresso_premium == true) {
        ?>
		<div id="featured-image-options" class="postbox">
				<div class="handlediv" title="Click to toggle"><br />
				</div>
				<h3 class="hndle"> <span>
					<?php 
        _e('Featured Image', 'event_espresso');
        ?>
					</span> </h3>
		<div class="inside">
			<div id="featured-image">
				<?php 
        if (!empty($event_meta['event_thumbnail_url'])) {
            $event_thumb = $event_meta['event_thumbnail_url'];
        } else {
            $event_thumb = '';
        }
        ?>
				<label for="upload_image">
					<?php 
        _e('Add Featured Image', 'event_espresso');
        ?>
				</label>
				<input id="upload_image" type="hidden" size="36" name="upload_image" value="<?php 
        echo $event_thumb;
        ?>
" />
				<input id="upload_image_button" type="button" value="<?php 
        _e('Upload Image', 'event_espresso');
        ?>
" />
				<?php 
        if ($event_thumb) {
            ?>
					<p class="event-featured-thumb"><img style="width: 100%;"  src="<?php 
            echo $event_thumb;
            ?>
" alt="" /></p>
					<a id='remove-image' href='#' title='<?php 
            _e('Remove Image', 'event_espresso');
            ?>
' onclick='return false;'><?php 
            _e('Remove Image', 'event_espresso');
            ?>
</a>
				<?php 
        }
        ?>
			</div>
			
		</div>
		</div>
	<?php 
    }
    /*
     * Added for seating chart addon
     */
    if (defined('ESPRESSO_SEATING_CHART')) {
        $seating_chart_id = 0;
        $seating_chart_event = $wpdb->get_row("select * from " . EVENTS_SEATING_CHART_EVENT_TABLE . " where event_id = {$event_id}");
        if ($seating_chart_event !== NULL) {
            $seating_chart_id = $seating_chart_event->seating_chart_id;
        }
        ?>
		<div style="display: block;" id="seating_chart-options" class="postbox">
			<div class="handlediv" title="Click to toggle"><br />
			</div>
			<h3 class="hndle"><span>
		<?php 
        _e('Seating chart', 'event_espresso');
        ?>
				</span></h3>
			<div class="inside">
				<p>
					<select name="seating_chart_id" id="seating_chart_id" style="float:none;">
						<option value="0" <?php 
        if ($seating_chart_id == 0) {
            echo 'selected="selected"';
        }
        ?>
 ><?php 
        _e('None', 'event_espresso');
        ?>
</option>
						<?php 
        $seating_charts = $wpdb->get_results("select * from " . EVENTS_SEATING_CHART_TABLE . " order by name");
        foreach ($seating_charts as $seating_chart) {
            ?>
							<option value="<?php 
            echo $seating_chart->id;
            ?>
" <?php 
            if ($seating_chart_id == $seating_chart->id) {
                echo 'selected="selected"';
            }
            ?>
 ><?php 
            echo $seating_chart->name;
            ?>
</option>
			<?php 
        }
        ?>
					</select>
					<?php 
        do_action('espresso_seating_chart_select', $event_id);
        ?>
					<?php 
        do_action('ee_seating_chart_js');
        ?>
					<?php 
        do_action('ee_seating_chart_css');
        ?>
					<?php 
        do_action('ee_seating_chart_flush_expired_seats');
        ?>
				</p>
			</div>
		</div>
		<?php 
    }
    /*
     * End
     */
    ###### Modification by wp-developers to introduce attendee pre-approval requirement ##########
    if (isset($org_options['use_attendee_pre_approval']) && $org_options['use_attendee_pre_approval'] == 'Y' && $espresso_premium == true) {
        ?>
		<div id="attendee-pre-approval-options" class="postbox">
			<div class="handlediv" title="Click to toggle"><br />
			</div>
			<h3 class="hndle"> <span>
					<?php 
        _e('Attendee pre-approval required?', 'event_espresso');
        ?>
				</span> </h3>
			<div class="inside">
				<p class="pre-approve">
		<?php 
        $pre_approval_values = array(array('id' => '1', 'text' => __('Yes', 'event_espresso')), array('id' => '0', 'text' => __('No', 'event_espresso')));
        echo select_input("require_pre_approval", $pre_approval_values, $require_pre_approval);
        ?>
				</p>
			</div>
		</div>
		<?php 
    }
    ########## END #################################
    if (defined('EVENT_ESPRESSO_MEMBERS_DIR') && $espresso_premium == true) {
        ?>
		<div  id="member-options" class="postbox">
			<div class="handlediv" title="Click to toggle"><br>
			</div>
			<h3 class="hndle"> <span>
		<?php 
        _e('Member Options', 'event_espresso');
        ?>
				</span> </h3>
			<div class="inside">
				<p><?php 
        echo event_espresso_member_only($member_only);
        ?>
</p>
			</div>
		</div>
		<!-- /member-options -->
		<?php 
    }
    if (defined('EVENTS_MAILCHIMP_ATTENDEE_REL_TABLE') && $espresso_premium == true) {
        MailChimpView::event_list_selection();
    }
    ?>
	
	<div  id="event-categories" class="postbox">
		<div class="handlediv" title="Click to toggle"><br>
		</div>
		<h3 class="hndle"> <span>
	<?php 
    _e('Event Category', 'event_espresso');
    ?>
			</span> </h3>
		<div class="inside"> <?php 
    echo event_espresso_get_categories($event_id);
    ?>
 </div>
	</div>
	<!-- /event-category -->

	<?php 
    if (file_exists(EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/event-management/promotions_box.php')) {
        require_once EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/event-management/promotions_box.php';
    }
    ?>
	<!-- /event-promotions -->

	<?php 
    echo espresso_event_question_groups($question_groups, $event_meta['add_attendee_question_groups'], $event);
    ?>
	<!-- /event-questions -->

	<?php 
    do_action('action_hook_espresso_staff_cb', $event_id, $recurrence_id);
    if (defined('EVENTS_GROUPON_CODES_TABLE') && $espresso_premium == true) {
        ?>
		<div id="groupon-options" class="postbox">
			<div class="handlediv" title="Click to toggle"><br>
			</div>
			<h3 class="hndle"> <span>
		<?php 
        _e('Groupon Options', 'event_espresso');
        ?>
				</span> </h3>
			<div class="inside">
				<p><?php 
        echo event_espresso_edit_event_groupon($use_groupon_code);
        ?>
</p>
			</div>
		</div>
		<!-- /groupon-options -->
			<?php 
    }
    if ($espresso_premium == true) {
        do_action('action_hook_espresso_edit_event_right_column_bottom', $event_id);
    }
    $sidebar_content = ob_get_clean();
    ob_start();
    ?>
	<div id="titlediv"> <strong>
	<?php 
    _e('Event Title', 'event_espresso');
    ?>
		</strong>
		<div id="titlewrap">
			<label class="screen-reader-text" for="title">
	<?php 
    _e('Event Title', 'event_espresso');
    ?>
			</label>
			<input type="text" name="event" size="30" tabindex="1" value="<?php 
    echo $event_name;
    ?>
" id="title" autocomplete="off" />
		</div>
		<!-- /titlewrap -->
		<div class="inside">
			<div id="edit-slug-box"> <strong>
	<?php 
    _e('Unique Event Identifier:', 'event_espresso');
    ?>
				</strong>
				<input disabled="disabled" type="text" size="30" tabindex="2" name="event_identifier" id="event_identifier" value ="<?php 
    echo $event_identifier;
    ?>
" />
	<?php 
    echo '<a href="#" class="button" onclick="prompt(&#39;Event Shortcode:&#39;, \'[SINGLEEVENT single_event_id=&#34;\' + jQuery(\'#event_identifier\').val() + \'&#34;]\'); return false;">' . __('Shortcode') . '</a>';
    ?>
 <?php 
    echo '<a href="#" class="button" onclick="prompt(&#39;Short URL:&#39;, \'' . espresso_reg_url($event_id) . '\'); return false;">' . __('Short URL') . '</a>';
    ?>
 <?php 
    echo '<a href="#" class="button" onclick="prompt(&#39;Full URL:&#39;, \'' . home_url() . '/?page_id=' . $org_options['event_page_id'] . '&amp;regevent_action=register&amp;event_id=' . $event_id . '\'); return false;">' . __('Full URL') . '</a>';
    ?>
 </div>
			<!-- /edit-slug-box -->
		</div>
		<!-- /.inside -->
	</div>
	<!-- /titlediv -->

	<div id="descriptiondivrich" class="postarea"> <strong>
		<?php 
    _e('Event Description', 'event_espresso');
    ?>
		</strong>
		<?php 
    if (function_exists('wp_editor')) {
        $args = array("textarea_rows" => 5, "textarea_name" => "event_desc", "editor_class" => "my_editor_custom");
        wp_editor(espresso_admin_format_content($event_desc), "event_desc", $args);
    } else {
        /*
         This is the editor used by WordPress. It is very very hard to find documentation for this thing, so I pasted everything I could find below.
         param: string $content Textarea content.
         param: string $id Optional, default is 'content'. HTML ID attribute value.
         param: string $prev_id Optional, default is 'title'. HTML ID name for switching back and forth between visual editors.
         param: bool $media_buttons Optional, default is true. Whether to display media buttons.
         param: int $tab_index Optional, default is 2. Tabindex for textarea element.
        */
        //the_editor($content, $id = 'content', $prev_id = 'title', $media_buttons = true, $tab_index = 2)
        //the_editor(espresso_admin_format_content($event_desc), $id = 'event_desc'/* , $prev_id = 'title', $media_buttons = true, $tab_index = 3 */);
        the_editor(espresso_admin_format_content($event_desc), $id = 'event_desc');
    }
    ?>
		<table id="post-status-info" cellspacing="0">
			<tbody>
				<tr>
					<td id="wp-word-count"></td>
					<td class="autosave-info"><span id="autosave">&nbsp;</span></td>
				</tr>
			</tbody>
		</table>
	</div>
	<!-- /postdivrich -->
	<?php 
    $main_post_content = ob_get_clean();
    ob_start();
    ?>
	<div id="normal-sortables" class="meta-box-sortables ui-sortable">
		<div style="display: block;" id="event-date-time" class="postbox">
			<div class="handlediv" title="Click to toggle"><br>
			</div>
			<h3 class="hndle"> <span>
	<?php 
    _e('Event Date/Times', 'event_espresso');
    ?>
				</span> </h3>
			<div class="inside">
				<table width="100%" border="0" cellpadding="5">
					<tr valign="top">
						<td class="a"><fieldset id="add-reg-dates">
								<legend>
	<?php 
    _e('Registration Dates', 'event_espresso');
    ?>
								</legend>
								<p>
									<label for="registration_start"> <?php 
    echo __('Registration Start:', 'event_espresso');
    ?>
</label>
									<input type="text" class="datepicker" size="15" id="registration_start" name="registration_start"  value="<?php 
    echo $registration_start;
    ?>
" />
								</p>
								<p>
									<label for="registration_end"><?php 
    echo __('Registration End:', 'event_espresso');
    ?>
</label>
									<input type="text" class="datepicker" size="15" id="registration_end" name="registration_end"  value="<?php 
    echo $registration_end;
    ?>
" />
								</p>
							</fieldset>
							<fieldset>
								<legend>
	<?php 
    _e('Event Dates', 'event_espresso');
    ?>
								</legend>
								<p>
									<label for="start_date"><?php 
    echo __('Event Start Date', 'event_espresso');
    ?>
</label>
									<input type="text" class="datepicker" size="15" id="start_date" name="start_date" value="<?php 
    echo $start_date;
    ?>
" />
								</p>
								<p>
									<label for="end_date"><?php 
    echo __('Event End Date', 'event_espresso');
    ?>
</label>
									<input type="text" class="datepicker" size="15" id="end_date" name="end_date" value="<?php 
    echo $end_date;
    ?>
" />
								</p>
							</fieldset>
										<?php 
    if (isset($org_options['use_event_timezones']) && $org_options['use_event_timezones'] == 'Y' && $espresso_premium == true) {
        ?>
								<fieldset id="event-timezone">
									<p>
										<label>
								<?php 
        _e('Event Timezone', 'event_espresso');
        ?>
											:</label>
		<?php 
        echo eventespresso_ddtimezone($event_id);
        ?>
</p>
								</fieldset>
									<?php 
    }
    ?>
</td>
								<?php 
    // ADD TIME REGISTRATION
    ?>
						<td class="b"><fieldset id="add-register-times">
								<legend>
	<?php 
    _e('Registration Times', 'event_espresso');
    ?>
								</legend>
									<?php 
    echo event_espresso_timereg_editor($event_id);
    ?>
							</fieldset>
							<fieldset id="add-event-times">
								<legend>
							<?php 
    _e('Event Times', 'event_espresso');
    ?>
								</legend>
									<?php 
    echo event_espresso_time_editor($event_id);
    ?>
							</fieldset>
									<?php 
    if ((!isset($org_options['use_event_timezones']) || $org_options['use_event_timezones'] != 'Y') && $espresso_premium == true) {
        ?>
								<p><span class="run-in">
								<?php 
        _e('Current Time', 'event_espresso');
        ?>
										:</span> <span class="current-date"> <?php 
        echo date(get_option('date_format')) . ' ' . date(get_option('time_format'));
        ?>
</span> <a class="change-date-time" href="options-general.php" target="_blank">
		<?php 
        _e('Change timezone and date format settings?', 'event_espresso');
        ?>
									</a></p>
		<?php 
    }
    ?>
</td>
					</tr>
				</table>
			</div>
		</div>
		<?php 
    /**
     * Load the recurring events form if the add-on has been installed.	*
     */
    if (defined('EVENT_ESPRESSO_RECURRENCE_TABLE') && $espresso_premium == true) {
        require_once EVENT_ESPRESSO_RECURRENCE_FULL_PATH . "functions/re_view_functions.php";
        //For now, only the recurring events will show the form
        if ($recurrence_id > 0) {
            event_espresso_re_form($recurrence_id);
        }
    }
    ?>
		<div id="event-pricing" class="postbox">
					<?php 
    defined('EVENT_ESPRESSO_MEMBERS_DIR') ? $members_active = 'class="members-active"' : ($members_active = '');
    ?>
			<div class="handlediv" title="Click to toggle"><br>
			</div>
			<h3 class="hndle"> <span>
	<?php 
    _e('Event Pricing', 'event_espresso');
    ?>
				</span> </h3>
			<div class="inside">
				<table <?php 
    echo $members_active;
    ?>
width="100%" border="0" cellpadding="5">
					<tr valign="top">
						<td id="standard-pricing" class="a"><?php 
    event_espresso_multi_price_update($event_id);
    //Standard pricing
    ?>
</td>
						<?php 
    //If the members addon is installed, define member only event settings
    if (defined('EVENT_ESPRESSO_MEMBERS_DIR') && $espresso_premium == true) {
        ?>
							<td id="member-pricing" class="b"><?php 
        echo event_espresso_member_only_pricing($event_id);
        //Show the the member only pricing options.
        ?>
</td>
	<?php 
    }
    ?>
					</tr>
				</table>
			</div>
		</div>
		<h2>
	<?php 
    _e('Advanced Options', 'event_espresso');
    ?>
		</h2>
		<?php 
    if ($espresso_premium == true) {
        do_action('action_hook_espresso_edit_event_left_column_advanced_options_top', $event_id);
    }
    ?>
		<div id="event-location" class="postbox">
			<div class="handlediv" title="Click to toggle"><br />
			</div>
			<h3 class="hndle"> <span>
	<?php 
    _e('Additional Event/Venue Information', 'event_espresso');
    ?>
				</span> </h3>
			<div class="inside">
				<table width="100%" border="0" cellpadding="5">
					<tr valign="top">

	<?php 
    if (function_exists('espresso_venue_dd') && $org_options['use_venue_manager'] == 'Y' && $espresso_premium == true) {
        $ven_type = 'class="use-ven-manager"';
        ?>
							<td <?php 
        echo $ven_type;
        ?>
><fieldset id="venue-manager">
									<legend><?php 
        echo __('Venue Information', 'event_espresso');
        ?>
</legend>
									<?php 
        if (!espresso_venue_dd()) {
            ?>
										<p class="info"><b>
										<?php 
            _e('You have not created any venues yet.', 'event_espresso');
            ?>
											</b></p>
										<p><a href="admin.php?page=event_venues"><?php 
            echo __('Add venues to the Venue Manager', 'event_espresso');
            ?>
</a></p>
							<?php 
        } else {
            ?>
								<?php 
            echo espresso_venue_dd($venue_id);
            ?>
							<?php 
        }
        ?>
								</fieldset></td>
		<?php 
    } else {
        $ven_type = 'class="manual-venue"';
        ?>
							<td <?php 
        echo $ven_type;
        ?>
><fieldset>
									<legend>
											<?php 
        _e('Physical Location', 'event_espresso');
        ?>
									</legend>
									<p>
										<label for="phys-addr">
		<?php 
        _e('Address:', 'event_espresso');
        ?>
										</label>
										<input size="20" id="phys-addr" tabindex="100"  type="text"  value="<?php 
        echo $address;
        ?>
" name="address" />
									</p>
									<p>
										<label for="phys-addr-2">
		<?php 
        _e('Address 2:', 'event_espresso');
        ?>
										</label>
										<input size="20" id="phys-addr-2" tabindex="101"  type="text"  value="<?php 
        echo $address2;
        ?>
" name="address2" />
									</p>
									<p>
										<label for="phys-city">
		<?php 
        _e('City:', 'event_espresso');
        ?>
										</label>
										<input size="20" id="phys-city" tabindex="102"  type="text"  value="<?php 
        echo $city;
        ?>
" name="city" />
									</p>
									<p>
										<label for="phys-state">
		<?php 
        _e('State:', 'event_espresso');
        ?>
										</label>
										<input size="20" id="phys-state" tabindex="103"  type="text"  value="<?php 
        echo $state;
        ?>
" name="state" />
									</p>
									<p>
										<label for="zip-postal">
		<?php 
        _e('Zip/Postal Code:', 'event_espresso');
        ?>
										</label>
										<input size="20" id="zip-postal"  tabindex="104"  type="text"  value="<?php 
        echo $zip;
        ?>
" name="zip" />
									</p>
									<p>
										<label for="phys-country">
										<?php 
        _e('Country:', 'event_espresso');
        ?>
										</label>
										<input size="20" id="phys-country" tabindex="105"  type="text"  value="<?php 
        echo $country;
        ?>
" name="country" />
									</p>
									<p>
		<?php 
        _e('Google Map Link (for email):', 'event_espresso');
        ?>
										<br />
		<?php 
        echo $google_map_link;
        ?>
 </p>
								</fieldset></td>
							<td <?php 
        echo $ven_type;
        ?>
>

								<fieldset>

									<legend>
											<?php 
        _e('Venue Information', 'event_espresso');
        ?>
									</legend>
									<p>
										<label for="ven-title">
		<?php 
        _e('Title:', 'event_espresso');
        ?>
										</label>
										<input size="20"id="ven-title" tabindex="106"  type="text"  value="<?php 
        echo $venue_title;
        ?>
" name="venue_title" />
									</p>
									<p>
										<label for="ven-website">
		<?php 
        _e('Website:', 'event_espresso');
        ?>
										</label>
										<input size="20" id="ven-website" tabindex="107"  type="text"  value="<?php 
        echo $venue_url;
        ?>
" name="venue_url" />
									</p>
									<p>
										<label for="ven-phone">
		<?php 
        _e('Phone:', 'event_espresso');
        ?>
										</label>
										<input size="20" id="ven-phone" tabindex="108"  type="text"  value="<?php 
        echo $venue_phone;
        ?>
" name="venue_phone" />
									</p>
									<p>
										<label for="ven-image">
									<?php 
        _e('Image:', 'event_espresso');
        ?>
										</label>
										<input size="20" id="ven-image" tabindex="110"  type="text"  value="<?php 
        echo $venue_image;
        ?>
" name="venue_image" />
									</p>
									<?php 
    }
    ?>
						</td>

						<td <?php 
    echo $ven_type;
    ?>
><fieldset id="virt-location">
								<legend>
										<?php 
    _e('Virtual Location', 'event_espresso');
    ?>
								</legend>
								<p>
									<label for="virt-phone">
	<?php 
    _e('Phone:', 'event_espresso');
    ?>
									</label>
									<input size="20" id="virt-phone" type="text" tabindex="111" value="<?php 
    echo $phone;
    ?>
" name="phone" />
								</p>
								<p>
									<label for="url-event">
	<?php 
    _e('URL of Event:', 'event_espresso');
    ?>
									</label>
									<textarea id="url-event" cols="30" rows="4" tabindex="112"  name="virtual_url"><?php 
    echo $virtual_url;
    ?>
</textarea>
								</p>
								<p>
									<label for="call-in-num">
	<?php 
    _e('Call in Number:', 'event_espresso');
    ?>
									</label>
									<input id="call-in-num" size="20" tabindex="113"  type="text"  value="<?php 
    echo $virtual_phone;
    ?>
" name="virtual_phone" />
								</p>
							</fieldset></td>
					</tr>

				</table>
			</div>
		</div>
		<!-- /event-location-->
					<?php 
    if ($espresso_premium == true) {
        ?>
			<div id="event-meta" class="postbox">
				<div class="handlediv" title="Click to toggle"><br>
				</div>
				<h3 class="hndle"> <span>
		<?php 
        _e('Event Meta', 'event_espresso');
        ?>
					</span> </h3>
				<div class="inside">
		<?php 
        event_espresso_meta_edit($event_meta);
        ?>
				</div>
			</div>
	<?php 
    }
    ?>
		<!-- /event-meta-->
		<div id="confirmation-email" class="postbox">
			<div class="handlediv" title="Click to toggle"><br />
			</div>
			<h3 class="hndle"> <span>
	<?php 
    _e('Email Confirmation:', 'event_espresso');
    ?>
				</span> </h3>
			<div class="inside">
				<div id="emaildescriptiondivrich" class="postarea">
					<div class="email-conf-opts">
						<p><?php 
    echo __('Send custom confirmation emails for this event?', 'event_espresso') . ' ' . select_input('send_mail', $values, $send_mail);
    ?>
 <?php 
    echo '<a class="thickbox" href="#TB_inline?height=300&width=400&inlineId=custom_email_info"><img src="' . EVENT_ESPRESSO_PLUGINFULLURL . '/images/question-frame.png" width="16" height="16" /></a>';
    ?>
</p>
								<?php 
    if ($espresso_premium == true) {
        ?>
							<p>
		<?php 
        _e('Use a ', 'event_espresso');
        ?>
								<a href="admin.php?page=event_emails" target="_blank">
							<?php 
        _e('pre-existing email', 'event_espresso');
        ?>
								</a>? <?php 
        echo espresso_db_dropdown('id', 'email_name', EVENTS_EMAIL_TABLE, 'email_name', $email_id, 'desc') . ' <a class="thickbox" href="#TB_inline?height=300&width=400&inlineId=email_manager_info"><img src="' . EVENT_ESPRESSO_PLUGINFULLURL . '/images/question-frame.png" width="16" height="16" /></a>';
        ?>
 </p>
							<br />
							<em>OR</em>
	<?php 
    }
    ?>
						<p>
						<?php 
    _e('Create a custom email:', 'event_espresso');
    ?>
  <?php 
    echo '<a class="thickbox" href="#TB_inline?height=300&width=400&inlineId=event_custom_emails"><img src="' . EVENT_ESPRESSO_PLUGINFULLURL . '/images/question-frame.png" width="16" height="16" /></a>';
    ?>
						</p>
					</div>

					<div class="postbox">
						<?php 
    //echo '<p>version_compare ='.(version_compare($wp_version, $wp_min_version) >= 0).'</p>';
    if (function_exists('wp_editor')) {
        $args = array("textarea_rows" => 5, "textarea_name" => "conf_mail", "editor_class" => "my_editor_custom");
        wp_editor(espresso_admin_format_content($conf_mail), "conf_mail", $args);
    } else {
        echo '<textarea name="conf_mail" class="theEditor" id="conf_mail">' . espresso_admin_format_content($conf_mail) . '</textarea>';
        espresso_tiny_mce();
    }
    ?>
											<?php 
    /* ?>  <textarea name="conf_mail" class="theEditor" id="conf_mail"><?php echo espresso_admin_format_content($conf_mail); ?></textarea><?php */
    ?>
						<table id="email-confirmation-form" cellspacing="0">
							<tr>
								<td class="aer-word-count"></td>
								<td class="autosave-info"><span><a class="thickbox" href="#TB_inline?height=300&width=400&inlineId=custom_email_info">
	<?php 
    _e('View Custom Email Tags', 'event_espresso');
    ?>
										</a> | <a class="thickbox" href="#TB_inline?height=300&width=400&inlineId=custom_email_example">
	<?php 
    _e('Email Example', 'event_espresso');
    ?>
										</a></span></td>
							</tr>
						</table>
					</div>
				</div>
			</div>
		</div>
		<!-- /confirmation-email-->
	<?php 
    if (file_exists(EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/admin-files/event-management/edit_event_post.php')) {
        require_once EVENT_ESPRESSO_PLUGINFULLPATH . "includes/admin-files/event-management/edit_event_post.php";
    }
    ?>
	</div>
	<!-- /normal-sortables-->
	<?php 
    $center_metabox_content = ob_get_clean();
    espresso_choose_layout($main_post_content, $sidebar_content, $center_metabox_content);
    include_once 'create_events_help.php';
    ?>
	<?php 
    wp_nonce_field('espresso_verify_update_event_nonce', 'nonce_verify_update_event');
    //Security check using nonce
    ?>
	<input type="hidden" name="edit_action" value="update">
	<input type="hidden" name="date_submitted" value="<?php 
    echo $date_submitted;
    ?>
">
	<input type="hidden" name="recurrence_id" value="<?php 
    echo $recurrence_id;
    ?>
">
	<input type="hidden" name="action" value="edit">
	<input type="hidden" name="event_id" value="<?php 
    echo $event_id;
    ?>
">
	<script type="text/javascript" charset="utf-8">
		//<![CDATA[
		jQuery(document).ready(function() {

			postboxes.add_postbox_toggles('events');

			jQuery(".datepicker" ).datepicker({
				changeMonth: true,
				changeYear: true,
				dateFormat: "yy-mm-dd",
				showButtonPanel: true
			});
	
			//Image upload		
			var header_clicked = false;
			jQuery('#upload_image_button').click(function() {
				formfield = jQuery('#upload_image').attr('name');
				tb_show('', 'media-upload.php?type=image&amp;TB_iframe=1');
				jQuery('p.event-featured-thumb').addClass('old');
				header_clicked = true;
				return false;
			});		
					
			window.original_send_to_editor = window.send_to_editor;
		
			window.send_to_editor = function(html) {
				if(header_clicked) {
					imgurl = jQuery('img',html).attr('src');
					jQuery('#' + formfield).val(imgurl);
					jQuery('#featured-image').append("<p id='image-display'><img class='show-selected-image' src='"+imgurl+"' alt='' /></p>");
					header_clicked = false;
					tb_remove();
			
				} else {
					window.original_send_to_editor(html);
				}
			}
		
			// process the remove link in the metabox
			jQuery('#remove-image').click(function(){
				var answer = confirm("<?php 
    _e("Do you really want to delete this image? Please remember to update your event to complete the removal.", 'event_espresso');
    ?>
");
				if (answer){
					jQuery("#upload_image").val('');
					jQuery("p.event-featured-thumb").remove();
					jQuery("p#image-display").remove();
					jQuery('#remove-image').remove();
					jQuery("#show_thumb_in_lists, #show_on_calendar, #show_thumb_in_regpage").val(false);
				}
				return false;
			});
	
	
		});
		//]]>
	</script>
	<?php 
}
コード例 #25
0
function espresso_social_config_mnu()
{
    global $espresso_twitter, $espresso_facebook, $espresso_google;
    $espresso_social = array();
    /* Facebok */
    function espresso_facebook_updated()
    {
        echo '<div class="updated fade"><p>' . __('Facebook details saved.', 'event_espresso') . '</p></div>';
    }
    if (isset($_POST['update_facebook'])) {
        $espresso_facebook['espresso_facebook_layout'] = $_POST['espresso_facebook_layout'];
        $espresso_facebook['espresso_facebook_faces'] = $_POST['espresso_facebook_faces'];
        $espresso_facebook['espresso_facebook_action'] = $_POST['espresso_facebook_action'];
        $espresso_facebook['espresso_facebook_font'] = $_POST['espresso_facebook_font'];
        $espresso_facebook['espresso_facebook_colorscheme'] = $_POST['espresso_facebook_colorscheme'];
        $espresso_facebook['espresso_facebook_height'] = $_POST['espresso_facebook_height'];
        $espresso_facebook['espresso_facebook_width'] = $_POST['espresso_facebook_width'];
        update_option('espresso_facebook_settings', $espresso_facebook);
        add_action('admin_notices', 'espresso_facebook_updated');
    }
    $espresso_facebook = get_option('espresso_facebook_settings');
    $espresso_social['facebook'] = $espresso_facebook;
    /* Twitter */
    function espresso_twitter_updated()
    {
        echo '<div class="updated fade"><p>' . __('Twitter details saved.', 'event_espresso') . '</p></div>';
    }
    if (isset($_POST['update_twitter'])) {
        $espresso_twitter['espresso_twitter_text'] = stripslashes_deep($_POST['espresso_twitter_text']);
        $espresso_twitter['espresso_twitter_username'] = $_POST['espresso_twitter_username'];
        $espresso_twitter['espresso_twitter_count_box'] = $_POST['espresso_twitter_count_box'];
        $espresso_twitter['espresso_twitter_lang'] = $_POST['espresso_twitter_lang'];
        update_option('espresso_twitter_settings', $espresso_twitter);
        add_action('admin_notices', 'espresso_twitter_updated');
    }
    $espresso_twitter = get_option('espresso_twitter_settings');
    $espresso_social['twitter'] = $espresso_twitter;
    /* Google */
    function espresso_google_updated()
    {
        echo '<div class="updated fade"><p>' . __('Google details saved.', 'event_espresso') . '</p></div>';
    }
    if (isset($_POST['update_google'])) {
        $espresso_google['espresso_google_button_size'] = $_POST['espresso_google_button_size'];
        $espresso_google['espresso_google_url'] = $_POST['espresso_google_url'];
        $espresso_google['espresso_google_annotation'] = $_POST['espresso_google_annotation'];
        update_option('espresso_google_settings', $espresso_google);
        add_action('admin_notices', 'espresso_google_updated');
    }
    $espresso_google = get_option('espresso_google_settings');
    $espresso_social['google'] = $espresso_google;
    ob_start();
    do_meta_boxes('event-espresso_page_espresso_social', 'side', null);
    $sidebar_content = ob_get_clean();
    ob_start();
    do_meta_boxes('event-espresso_page_espresso_social', 'normal', $espresso_social);
    $main_post_content = ob_get_clean();
    ?>

	<div id="configure_organization_form" class="wrap meta-box-sortables ui-sortable clearfix">

		<div id="icon-options-event" class="icon32"> </div>
		<h2>
			<?php 
    _e('Event Espresso - Social Media Settings', 'event_espresso');
    ?>
		</h2>
		<?php 
    if (!espresso_choose_layout($main_post_content, $sidebar_content)) {
        return FALSE;
    }
    ?>
	</div><!-- / #wrap -->
	<?php 
}