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

PHP espresso_is_admin函数代码示例

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

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



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

示例1: espresso_event_export

 function espresso_event_export($ename)
 {
     global $wpdb, $org_options;
     $sql = '';
     $htables = array();
     $htables[] = 'Event Id';
     $htables[] = 'Name';
     $htables[] = 'Venue';
     $htables[] = 'Start Date';
     $htables[] = 'Start Time';
     $htables[] = 'DoW';
     $htables[] = 'Reg Begins';
     if (function_exists('espresso_is_admin') && espresso_is_admin() == true && (isset($espresso_premium) && $espresso_premium == true)) {
         $htables[] = 'Submitter';
     }
     $htables[] = 'Status';
     $htables[] = 'Attendees';
     if (isset($_REQUEST['month_range'])) {
         $pieces = explode('-', $_REQUEST['month_range'], 3);
         $year_r = $pieces[0];
         $month_r = $pieces[1];
     }
     $group = '';
     if (function_exists('espresso_member_data') && espresso_member_data('role') == 'espresso_group_admin') {
         $group = get_user_meta(espresso_member_data('id'), "espresso_group", true);
         $group = maybe_unserialize($group);
         $sql = "(SELECT e.id event_id, e.event_name, e.event_identifier, e.reg_limit, e.registration_start, ";
         $sql .= " e.start_date, e.is_active, e.recurrence_id, e.registration_startT, ";
         $sql .= " e.address, e.address2, e.city, e.state, e.zip, e.country, ";
         $sql .= " e.venue_title, e.phone, e.wp_user ";
         if (isset($org_options['use_venue_manager']) && $org_options['use_venue_manager'] == 'Y') {
             $sql .= ", v.name venue_name, v.address venue_address, v.address2 venue_address2, v.city venue_city, v.state venue_state, v.zip venue_zip, v.country venue_country, v.meta venue_meta ";
         }
         $sql .= " FROM " . EVENTS_DETAIL_TABLE . " e ";
         if (isset($org_options['use_venue_manager']) && $org_options['use_venue_manager'] == 'Y') {
             $sql .= " LEFT JOIN " . EVENTS_VENUE_REL_TABLE . " r ON r.event_id = e.id LEFT JOIN " . EVENTS_VENUE_TABLE . " v ON v.id = r.venue_id ";
         }
         if ($_REQUEST['category_id'] != '') {
             $sql .= " JOIN " . EVENTS_CATEGORY_REL_TABLE . " r ON r.event_id = e.id ";
             $sql .= " JOIN " . EVENTS_CATEGORY_TABLE . " c ON  c.id = r.cat_id ";
         }
         if ($group != '') {
             $sql .= " JOIN " . EVENTS_VENUE_REL_TABLE . " r ON r.event_id = e.id ";
             $sql .= " JOIN " . EVENTS_LOCALE_REL_TABLE . " l ON  l.venue_id = r.venue_id ";
         }
         $sql .= $_POST['event_status'] != '' && $_POST['event_status'] != 'IA' ? " WHERE event_status = '" . $_POST['event_status'] . "' " : " WHERE event_status != 'D' ";
         $sql .= $_REQUEST['category_id'] != '' ? " AND c.id = '" . $_REQUEST['category_id'] . "' " : '';
         $sql .= $group != '' ? " AND l.locale_id IN (" . implode(",", $group) . ") " : '';
         if ($_POST['month_range'] != '') {
             $sql .= " AND start_date BETWEEN '" . date('Y-m-d', strtotime($year_r . '-' . $month_r . '-01')) . "' AND '" . date('Y-m-d', strtotime($year_r . '-' . $month_r . '-31')) . "' ";
         }
         if ($_REQUEST['today'] == 'true') {
             $sql .= " AND start_date = '" . $curdate . "' ";
         }
         if ($_REQUEST['this_month'] == 'true') {
             $sql .= " AND start_date BETWEEN '" . date('Y-m-d', strtotime($this_year_r . '-' . $this_month_r . '-01')) . "' AND '" . date('Y-m-d', strtotime($this_year_r . '-' . $this_month_r . '-' . $days_this_month)) . "' ";
         }
         $sql .= ") UNION ";
     }
     $sql .= "(SELECT e.id event_id, e.event_name, e.event_identifier, e.reg_limit, e.registration_start, ";
     $sql .= " e.start_date,  e.end_date, e.is_active, e.recurrence_id, e.registration_startT, ";
     $sql .= " e.address, e.address2, e.city, e.state, e.zip, e.country, ";
     $sql .= " e.venue_title, e.phone, e.wp_user ";
     if (isset($org_options['use_venue_manager']) && $org_options['use_venue_manager'] == 'Y') {
         $sql .= ", v.name venue_name, v.address venue_address, v.address2 venue_address2, v.city venue_city, v.state venue_state, v.zip venue_zip, v.country venue_country, v.meta venue_meta ";
     }
     $sql .= " FROM " . EVENTS_DETAIL_TABLE . " e ";
     if (isset($org_options['use_venue_manager']) && $org_options['use_venue_manager'] == 'Y') {
         $sql .= " LEFT JOIN " . EVENTS_VENUE_REL_TABLE . " r ON r.event_id = e.id LEFT JOIN " . EVENTS_VENUE_TABLE . " v ON v.id = r.venue_id ";
     }
     if (isset($_REQUEST['category_id']) && $_REQUEST['category_id'] != '') {
         $sql .= " JOIN " . EVENTS_CATEGORY_REL_TABLE . " r ON r.event_id = e.id ";
         $sql .= " JOIN " . EVENTS_CATEGORY_TABLE . " c ON  c.id = r.cat_id ";
     }
     $sql .= isset($_POST['event_status']) && $_POST['event_status'] != '' && $_POST['event_status'] != 'IA' ? " WHERE event_status = '" . $_POST['event_status'] . "' " : " WHERE event_status != 'D' ";
     $sql .= isset($_REQUEST['category_id']) && $_REQUEST['category_id'] != '' ? " AND c.id = '" . $_REQUEST['category_id'] . "' " : '';
     if (isset($_POST['month_range']) && $_POST['month_range'] != '') {
         $sql .= " AND start_date BETWEEN '" . date('Y-m-d', strtotime($year_r . '-' . $month_r . '-01')) . "' AND '" . date('Y-m-d', strtotime($year_r . '-' . $month_r . '-31')) . "' ";
     }
     if (isset($_REQUEST['today']) && $_REQUEST['today'] == 'true') {
         $sql .= " AND start_date = '" . $curdate . "' ";
     }
     if (isset($_REQUEST['this_month']) && $_REQUEST['this_month'] == 'true') {
         $sql .= " AND start_date BETWEEN '" . date('Y-m-d', strtotime($this_year_r . '-' . $this_month_r . '-01')) . "' AND '" . date('Y-m-d', strtotime($this_year_r . '-' . $this_month_r . '-' . $days_this_month)) . "' ";
     }
     if (function_exists('espresso_member_data') && (espresso_member_data('role') == 'espresso_event_manager' || espresso_member_data('role') == 'espresso_group_admin')) {
         $sql .= " AND wp_user = '" . espresso_member_data('id') . "' ";
     }
     $sql .= ") ORDER BY start_date = '0000-00-00' ASC, start_date ASC, event_name ASC";
     ob_start();
     //echo $sql;
     $today = date("Y-m-d-Hi", time());
     $filename = $_REQUEST['all_events'] == "true" ? __('all-events', 'event_espresso') : sanitize_title_with_dashes($event_name);
     $filename = $filename . "-" . $today;
     switch ($_REQUEST['type']) {
         case "csv":
             $st = "";
             $et = ",";
             $s = $et . $st;
             header("Content-type: application/x-msdownload");
//.........这里部分代码省略.........
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:101,代码来源:export.php


示例2: event_espresso_staff_config_mnu

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>

 <div id="poststuff" class="metabox-holder has-right-sidebar">
  <?php 
    event_espresso_display_right_column();
    ?>
  <div id="post-body">
<div id="post-body-content">   

<?php 
    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');
//.........这里部分代码省略.........
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:101,代码来源:index.php


示例3: event_espresso_edit_list


//.........这里部分代码省略.........

					<th class="manage-column column-author" id="start" scope="col" title="Click to Sort" style="width:12%;">
						<span><?php 
    _e('Start Date', 'event_espresso');
    ?>
</span>
						<span class="sorting-indicator"></span>
					</th>

					<th class="manage-column column-author" id="start" scope="col" title="Click to Sort" style="width:7%;">
						<span><?php 
    _e('Start Time', 'event_espresso');
    ?>
</span>
						<span class="sorting-indicator"></span>
					</th>

					<th class="manage-column column-date" id="begins" scope="col" title="Click to Sort" style="width:16%;">
						<span><?php 
    _e('Reg Begins', 'event_espresso');
    ?>
</span>
						<span class="sorting-indicator"></span>
					</th>

					<th class="manage-column column-date" id="status" scope="col" title="Click to Sort" style="width:8%;">
						<span><?php 
    _e('Status', 'event_espresso');
    ?>
</span>
						<span class="sorting-indicator"></span>
					</th>
					<?php 
    if (function_exists('espresso_is_admin') && espresso_is_admin() == true && $espresso_premium == true) {
        ?>
						<th class="manage-column column-date" id="status" scope="col" title="Click to Sort" style="width:10%;">
							<span><?php 
        _e('Creator', 'event_espresso');
        ?>
</span>
							<span class="sorting-indicator"></span>
						</th>
	<?php 
    }
    ?>
					<th class="manage-column column-date" id="attendees" scope="col" title="Click to Sort" style="width:7%;">
						<span><?php 
    _e('Attendees', 'event_espresso');
    ?>
</span>
						<span class="sorting-indicator"></span>
					</th>
					<th class="manage-column column-author" id="actions" scope="col" style="width:25%;">
	<?php 
    _e('Actions', 'event_espresso');
    ?>
					</th>

				</tr>
			</thead>

			<tbody>
				<?php 
    if ($total_events > 0) {
        // instead of doing queries for each event while looping through them, we're going to grab a list of event IDs and consolidate our queries outside the loop
        $event_ids = implode(',', array_keys($events));
开发者ID:HandsomeDogStudio,项目名称:peanutbutterplan,代码行数:67,代码来源:event_list.php


示例4: event_espresso_discount_config_mnu

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>
//.........这里部分代码省略.........
开发者ID:hhgr,项目名称:uksoccer,代码行数:101,代码来源:index.php


示例5: espresso_promocodes_format_for_jquery_datatables

/**
 * Formats wpdb results from query to the EVENTS_DISCOUNT_CODES_TABLE for use in a jquery data table
 * @param array $wpdb_result_objects results from $wpdb->get_results($query);
 * @return array formatted for jquery datatables row entries
 */
function espresso_promocodes_format_for_jquery_datatables($wpdb_result_objects)
{
    $prepared_results = array();
    foreach ($wpdb_result_objects as $result_object) {
        $jquery_datatables_row = array();
        $jquery_datatables_row[] = $checkbox_html = "<input name='checkbox[{$result_object->id}]' type='checkbox'  title='Delete {$result_object->coupon_code}'>";
        $jquery_datatables_row[] = $id_html = $result_object->id;
        $jquery_datatables_row[] = $name_html = "<strong><a href='admin.php?page=discounts&amp;action=edit&amp;discount_id={$result_object->id}'>{$result_object->coupon_code}</a></strong>" . "<div class='row-actions'><span class='edit'><a href='admin.php?page=discounts&action=edit&amp;discount_id={$result_object->id}'>" . __('Edit', 'event_espresso') . "</a> | </span><span class='delete'><a onclick='return confirmDelete();' class='submitdelete' href='admin.php?page=discounts&action=delete_discount&discount_id={$result_object->id}'>" . __("Delete", "event_espresso") . "</a></span></div>";
        if (function_exists('espresso_is_admin') && espresso_is_admin() == true) {
            $jquery_datatables_row[] = espresso_user_meta($result_object->wp_user, 'user_firstname') != '' ? espresso_user_meta($result_object->wp_user, 'user_firstname') . ' ' . espresso_user_meta($result_object->wp_user, 'user_lastname') : espresso_user_meta($result_object->wp_user, 'display_name');
        }
        $jquery_datatables_row[] = $result_object->coupon_code_price;
        $jquery_datatables_row[] = $result_object->use_percentage;
        $jquery_datatables_row[] = $result_object->apply_to_all ? 'Y' : 'N';
        $prepared_results[] = $jquery_datatables_row;
    }
    return $prepared_results;
}
开发者ID:hhgr,项目名称:uksoccer,代码行数:23,代码来源:search.php


示例6: event_espresso_venue_config_mnu


//.........这里部分代码省略.........
        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.
开发者ID:sriram911,项目名称:pls,代码行数:67,代码来源:index.php


示例7: espresso_ticket_config_mnu

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 
//.........这里部分代码省略.........
开发者ID:sriram911,项目名称:pls,代码行数:101,代码来源:index.php


示例8: event_espresso_form_group_edit

function event_espresso_form_group_edit()
{
    global $wpdb;
    $groups = espresso_get_user_question_groups(null, false, false, $_REQUEST['group_id']);
    if (count($groups) > 0) {
        foreach ($groups as $group) {
            $group_id = $group->id;
            $group_order = $group->group_order;
            $group_name = stripslashes($group->group_name);
            $group_identifier = stripslashes($group->group_identifier);
            $group_description = stripslashes($group->group_description);
            $question = stripslashes(empty($group->question) ? '' : $group->question);
            $show_group_name = $group->show_group_name;
            $show_group_description = $group->show_group_description;
            $wp_user = $group->wp_user;
            if ($group->system_group > 0) {
                $system_group = true;
            } else {
                $system_group = false;
            }
        }
    }
    if (function_exists('espresso_member_data')) {
        if (function_exists('espresso_is_admin')) {
            // If the user doesn't have admin access get only user's own question groups
            if (!espresso_is_admin()) {
                if (espresso_member_data('id') != $wp_user) {
                    echo '<h2>' . __('Sorry, you do not have permission to edit this question group.', 'event_espresso') . '</h2>';
                    return;
                }
            }
        }
    }
    ?>
    <div id="add-edit-new-group" class="metabox-holder">
        <div class="postbox">
					 	<div title="Click to toggle" class="handlediv"><br /></div>
            <h3 class="hndle"><?php 
    _e('Edit Group - ', 'event_espresso');
    ?>
<span><?php 
    echo $group_name;
    ?>
</span></h3>
             <div class="inside">
			 <?php 
    if ($system_group == true) {
        echo '<p class="yellow_inform">' . __('Attention: This is a "System Group", some settings may be disabled.', 'event_espresso') . '</p>';
    }
    ?>
                <form name="newgroup" method="post" action="<?php 
    echo $_SERVER["REQUEST_URI"];
    ?>
">
                    <table id="table-edit-group" class="ee-tables" border="0">
                        <tr>
                            <td class="a"  valign="top">
                                <fieldset id="general-group-info">
									<legend><?php 
    _e('Group Information', 'event_espresso');
    ?>
</legend>
								<ul>

                                    <li>
                                        <label for="group_name"><?php 
    _e('Group Name:', 'event_espresso');
    ?>
</label>
                                        <input name="group_name" id="group_name" size="50" value="<?php 
    echo $group_name;
    ?>
" type="text" />
                                    </li>

                                    <li>
                                        <label for="group_order"><?php 
    _e('Group Order:', 'event_espresso');
    ?>
</label>
                                        <input name="group_order" id="group_order" size="6" value="<?php 
    echo $group_order;
    ?>
" type="text" />
                                    </li>

                                    <li>
                                        <label for="group_identifier"><?php 
    _e('Group Identifier:', 'event_espresso');
    ?>
</label>
                                        <input disabled="disabled" name="group_identifier" id="group_identifier" size="50" value="<?php 
    echo $group_identifier;
    ?>
" type="text" />
                                    </li>

                                    <li>
                                        <label for="group_description"><?php 
    _e('Description:', 'event_espresso');
//.........这里部分代码省略.........
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:101,代码来源:edit_group.php


示例9: espresso_rp_basic_get_user_questions_where

function espresso_rp_basic_get_user_questions_where($where, $user_id, $num)
{
    $modified_where = " WHERE q.wp_user = '" . $user_id . "' ";
    if (espresso_is_admin() && !$num) {
        $where = !isset($_REQUEST['all']) ? $modified_where : "";
    } else {
        $where = $modified_where;
    }
    return $where;
}
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:10,代码来源:espresso-permissions.php


示例10: event_espresso_form_builder_edit

function event_espresso_form_builder_edit()
{
    global $wpdb;
    $question_id = $_REQUEST['question_id'];
    $questions = espresso_get_user_questions(null, $question_id);
    if (count($questions) > 0) {
        foreach ($questions as $question) {
            $question_id = $question->id;
            $question_name = stripslashes($question->question);
            $question_values = stripslashes($question->response);
            $question_type = stripslashes($question->question_type);
            $required = stripslashes($question->required);
            $sequence = $question->sequence;
            $required_text = $question->required_text;
            $admin_only = $question->admin_only;
            $system_name = $question->system_name;
            if ($question->system_name != '') {
                $system_question = true;
            } else {
                $system_question = false;
            }
            $wp_user = $question->wp_user;
            if (function_exists('espresso_member_data')) {
                if (function_exists('espresso_is_admin')) {
                    // If the user doesn't have admin access get only user's own question groups
                    if (!espresso_is_admin()) {
                        if (espresso_member_data('id') != $wp_user) {
                            echo '<h2>' . __('Sorry, you do not have permission to edit this question.', 'event_espresso') . '</h2>';
                            return;
                        }
                    }
                }
            }
            ?>

<div class="metabox-holder">
  <div class="postbox">
		<div class="handlediv" title="Click to toggle"><br>
		</div>
		<h3 class="hndle">
	  <?php 
            _e('Edit Question', 'event_espresso');
            ?>
		</h3>
	  <div class="inside">
			<form id="edit-new-question-form" name="newquestion" method="post" action="<?php 
            echo $_SERVER["REQUEST_URI"];
            ?>
">
			<p class="intro"> <?php 
            _e('Edit the question using the form below.  By default all participants will be asked for their first name, last name, and email address.', 'event_espresso');
            ?>
</p>
					<?php 
            if ($system_question == true) {
                echo '<p class="inform">' . __('Attention: This is a "System Question", some settings may be disabled.', 'event_espresso') . '</p>';
            }
            ?>

			<table class="form-table">
				<tbody>
					<tr>
						<th>
		  				<label for="question"><?php 
            _e('Question', 'event_espresso');
            ?>
</label>
						</th>
						<td>
		  				<input name="question" id="question" size="50" value="<?php 
            echo htmlspecialchars($question_name, ENT_QUOTES, 'UTF-8');
            ?>
" type="text">
						</td>
					</tr>
					<tr>
				  	<th id="question-type-select">
		  				<label for="question_type"><?php 
            _e('Type', 'event_espresso');
            ?>
</label>
						</th>
						<td>
		 				<?php 
            $q_values = array(array('id' => 'TEXT', 'text' => __('Text', 'event_espresso')), array('id' => 'TEXTAREA', 'text' => __('Text Area', 'event_espresso')), array('id' => 'SINGLE', 'text' => __('Radio Button', 'event_espresso')), array('id' => 'DROPDOWN', 'text' => __('Drop Down', 'event_espresso')), array('id' => 'MULTIPLE', 'text' => __('Checkbox', 'event_espresso')));
            if ($system_question == true) {
                $q_values = array(array('id' => 'TEXT', 'text' => __('Text', 'event_espresso')));
            }
            echo select_input('question_type', $q_values, $question_type, 'id="question_type"');
            ?>
					</td>
				</tr>
				<tr id="add-question-values">
					<th>
		  			<label for="values"><?php 
            _e('Values', 'event_espresso');
            ?>
</label>
					</th>
					<td>
//.........这里部分代码省略.........
开发者ID:sriram911,项目名称:pls,代码行数:101,代码来源:edit_question.php


示例11: event_espresso_form_group_delete

function event_espresso_form_group_delete()
{
    global $wpdb;
    if ($_POST['delete_group']) {
        if (is_array($_POST['checkbox'])) {
            while (list($key, $value) = each($_POST['checkbox'])) {
                $del_id = $key;
                $go_delete = true;
                if (function_exists('espresso_member_data')) {
                    if (function_exists('espresso_is_admin')) {
                        // If the user doesn't have admin access get only user's own question groups
                        if (!espresso_is_admin()) {
                            $go_delete = false;
                            $sql = " SELECT * FROM " . EVENTS_QST_GROUP_TABLE . " WHERE id = '" . $del_id . "' AND wp_user = '" . espresso_member_data('id') . "' ";
                            $rs = $wpdb->get_results($sql);
                            if (is_array($rs) && count($rs) > 0) {
                                $go_delete = true;
                            }
                        }
                    }
                }
                if ($go_delete) {
                    //Delete question group data
                    $sql = "DELETE FROM " . EVENTS_QST_GROUP_TABLE . " WHERE id='" . $del_id . "'";
                    $wpdb->query($sql);
                    //Delete question group rel data
                    $sql = "DELETE FROM " . EVENTS_QST_GROUP_REL_TABLE . " WHERE group_id='" . $del_id . "'";
                    $wpdb->query($sql);
                }
            }
        }
    }
    if ($_REQUEST['action'] == 'delete_group') {
        $go_delete = true;
        if (function_exists('espresso_member_data')) {
            if (function_exists('espresso_is_admin')) {
                // If the user doesn't have admin access get only user's own question groups
                if (!espresso_is_admin()) {
                    $go_delete = false;
                    $sql = " SELECT * FROM " . EVENTS_QST_GROUP_TABLE . " WHERE id = '" . $_REQUEST['group_id'] . "' AND wp_user = '" . espresso_member_data('id') . "' ";
                    $rs = $wpdb->get_results($sql);
                    if (is_array($rs) && count($rs) > 0) {
                        $go_delete = true;
                    }
                }
            }
        }
        if ($go_delete) {
            //Delete question group data
            $sql = "DELETE FROM " . EVENTS_QST_GROUP_TABLE . " WHERE id='" . $_REQUEST['group_id'] . "'";
            $wpdb->query($sql);
            //Delete question group rel data
            $sql = "DELETE FROM " . EVENTS_QST_GROUP_REL_TABLE . " WHERE group_id='" . $_REQUEST['group_id'] . "'";
            $wpdb->query($sql);
        }
    }
    ?>
	<div id="message" class="updated fade">
	  <p><strong>
		<?php 
    _e('Question Groups have been successfully deleted.', 'event_espresso');
    ?>
		</strong></p>
	</div>
	<?php 
}
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:66,代码来源:delete_group.php


示例12: event_espresso_email_config_mnu

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>
        <div id="poststuff" class="metabox-holder has-right-sidebar">
            <?php 
    event_espresso_display_right_column();
    ?>
            <div id="post-body">
                <div id="post-body-content">


                    <?php 
    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 
    if (isset($_REQUEST['action'])) {
        switch ($_REQUEST['action']) {
            case 'update':
                update_event_email();
                break;
            case 'add':
                add_email_to_db();
                break;
            case 'add_new_email':
                add_new_event_email();
                break;
            case 'edit':
                edit_event_email();
                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>
//.........这里部分代码省略.........
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:101,代码来源:index.php


示例13: event_espresso_question_groups_config_mnu

function 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP espresso_member_data函数代码示例发布时间:2022-05-15
下一篇:
PHP espresso_google_map_link函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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