本文整理汇总了PHP中wpl_global::min_access方法的典型用法代码示例。如果您正苦于以下问题:PHP wpl_global::min_access方法的具体用法?PHP wpl_global::min_access怎么用?PHP wpl_global::min_access使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wpl_global
的用法示例。
在下文中一共展示了wpl_global::min_access方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
public function display()
{
/** check permission **/
wpl_global::min_access('administrator');
$function = wpl_request::getVar('wpl_function');
if ($function == 'sort_rooms') {
$sort_ids = wpl_request::getVar('sort_ids');
self::sort_rooms($sort_ids);
}
if ($function == 'generate_new_room_type') {
self::generate_new_room_type();
} elseif ($function == 'room_types_enabled_state_change') {
$id = wpl_request::getVar('id');
$enabled_status = wpl_request::getVar('enabled_status');
self::update('wpl_room_types', $id, 'enabled', $enabled_status);
} elseif ($function == 'remove_room_type') {
/** check permission **/
wpl_global::min_access('administrator');
$room_type_id = wpl_request::getVar('room_type_id');
$confirmed = wpl_request::getVar('wpl_confirmed', 0);
self::remove_room_type($room_type_id, $confirmed);
} elseif ($function == 'change_room_type_name') {
$id = wpl_request::getVar('id');
$name = wpl_request::getVar('name');
self::update('wpl_room_types', $id, 'name', $name);
} elseif ($function == 'save_room_type') {
$name = wpl_request::getVar('name');
self::save_room_type($name);
}
}
示例2: display
public function display()
{
/** check permission **/
wpl_global::min_access('administrator');
$function = wpl_request::getVar('wpl_function');
if ($function == 'save_dbst') {
self::save_dbst();
} elseif ($function == 'remove_dbst') {
$dbst_id = wpl_request::getVar('dbst_id');
self::remove_dbst($dbst_id);
} elseif ($function == 'generate_params_page') {
$dbst_id = wpl_request::getVar('dbst_id');
self::generate_params_page($dbst_id);
} elseif ($function == 'enabled') {
$dbst_id = wpl_request::getVar('dbst_id');
$enabled_status = wpl_request::getVar('enabled_status');
self::enabled($dbst_id, $enabled_status);
} elseif ($function == 'sort_flex') {
$sort_ids = wpl_request::getVar('sort_ids');
self::sort_flex($sort_ids);
} elseif ($function == 'mandatory') {
$dbst_id = wpl_request::getVar('dbst_id');
$mandatory_status = wpl_request::getVar('mandatory_status');
self::mandatory($dbst_id, $mandatory_status);
}
}
示例3: display
public function display()
{
/** check permission **/
wpl_global::min_access('administrator');
$function = wpl_request::getVar('wpl_function');
if ($function == 'save') {
$setting_name = wpl_request::getVar('setting_name');
$setting_value = wpl_request::getVar('setting_value');
$setting_category = wpl_request::getVar('setting_category');
$this->save($setting_name, $setting_value, $setting_category);
} elseif ($function == 'save_watermark_image') {
$this->save_watermark_image();
} elseif ($function == 'save_languages') {
$this->save_languages();
} elseif ($function == 'generate_language_keywords') {
$this->generate_language_keywords();
} elseif ($function == 'save_customizer') {
$this->save_customizer();
} elseif ($function == 'clear_cache') {
$this->clear_cache();
} elseif ($function == 'remove_upload') {
$this->remove_upload();
} elseif ($function == 'clear_calendar_data') {
$this->clear_calendar_data();
} elseif ($function == 'import_settings') {
$this->import_settings();
} elseif ($function == 'export_settings') {
$this->export_settings();
} elseif ($function == 'uploader') {
$this->uploader();
}
}
示例4: home
public function home()
{
/** check permission **/
wpl_global::min_access('administrator');
$this->level = trim(wpl_request::getVar('level')) != '' ? wpl_request::getVar('level') : 1;
$this->parent = trim(wpl_request::getVar('sf_select_parent')) != '' ? wpl_request::getVar('sf_select_parent') : "";
$this->enabled = trim(wpl_request::getVar('sf_select_enabled')) != '' ? wpl_request::getVar('sf_select_enabled') : 1;
$this->text_search = trim(wpl_request::getVar('sf_text_name')) != '' ? wpl_request::getVar('sf_text_name') : '';
$this->admin_url = wpl_global::get_wp_admin_url();
$this->load_zipcodes = trim(wpl_request::getVar('load_zipcodes')) != '' ? 1 : 0;
/** set show all based on level **/
if ($this->level != 1) {
$this->enabled = '';
}
$possible_orders = array('id', 'name');
$orderby = in_array(wpl_request::getVar('orderby'), $possible_orders) ? wpl_request::getVar('orderby') : $possible_orders[0];
$order = in_array(strtoupper(wpl_request::getVar('order')), array('ASC', 'DESC')) ? wpl_request::getVar('order') : 'ASC';
$page_size = trim(wpl_request::getVar('page_size')) != '' ? wpl_request::getVar('page_size') : NULL;
/** create where **/
$vars = array_merge(wpl_request::get('POST'), wpl_request::get('GET'));
$vars = array_merge($vars, array('sf_select_parent' => $this->parent, 'sf_select_enabled' => $this->enabled));
$where_query = wpl_db::create_query($vars);
$num_result = wpl_db::num("SELECT COUNT(id) FROM `#__wpl_location" . $this->level . "` WHERE 1 " . $where_query);
$this->pagination = wpl_pagination::get_pagination($num_result, $page_size);
$where_query .= " ORDER BY {$orderby} {$order} " . $this->pagination->limit_query;
$this->wp_locations = wpl_locations::get_locations(!$this->load_zipcodes ? $this->level : 'zips', '', '', $where_query);
$this->zipcode_parent_level = wpl_settings::get('zipcode_parent_level');
/** import tpl **/
parent::render($this->tpl_path, $this->tpl);
}
示例5: user_manager
public function user_manager()
{
/** check permission **/
wpl_global::min_access('administrator');
$possible_orders = array('u.id', 'u.user_registered');
$orderby = in_array(wpl_request::getVar('orderby'), $possible_orders) ? wpl_request::getVar('orderby') : $possible_orders[0];
$order = in_array(strtoupper(wpl_request::getVar('order')), array('ASC', 'DESC')) ? wpl_request::getVar('order') : 'ASC';
$page_size = trim(wpl_request::getVar('page_size')) != '' ? wpl_request::getVar('page_size') : NULL;
$this->show_all = wpl_request::getVar('show_all', 0);
$this->filter = wpl_request::getVar('filter', '');
$this->membership_id = wpl_request::getVar('membership_id', '');
$where_query = wpl_db::create_query();
if (trim($this->filter)) {
$where_query = " AND (`user_login` LIKE '%" . $this->filter . "%' OR `user_email` LIKE '%" . $this->filter . "%' OR `first_name` LIKE '%" . $this->filter . "%' OR `last_name` LIKE '%" . $this->filter . "%')";
}
if (trim($this->membership_id)) {
$where_query = " AND `membership_id`='" . $this->membership_id . "'";
}
$num_result = wpl_db::num("SELECT COUNT(u.ID) FROM `#__users` AS u " . ($this->show_all ? 'LEFT' : 'INNER') . " JOIN `#__wpl_users` AS wpl ON u.ID = wpl.id WHERE 1 {$where_query}");
$this->pagination = wpl_pagination::get_pagination($num_result, $page_size);
$where_query .= " ORDER BY {$orderby} {$order} " . $this->pagination->limit_query;
if ($this->show_all) {
$this->wp_users = wpl_users::get_wp_users($where_query);
} else {
$this->wp_users = wpl_users::get_wpl_users($where_query);
}
$this->memberships = wpl_users::get_wpl_memberships();
/** import tpl **/
parent::render($this->tpl_path, $this->tpl);
}
示例6: display
public function display()
{
/** check permission **/
wpl_global::min_access('administrator');
$function = wpl_request::getVar('wpl_function');
if ($function == 'generate_new_page') {
self::generate_new_page();
} elseif ($function == 'generate_delete_page') {
self::generate_delete_page();
} elseif ($function == 'set_enabled_property_type') {
$property_type_id = wpl_request::getVar('property_type_id');
$enabeled_status = wpl_request::getVar('enabeled_status');
self::set_enabled_property_type($property_type_id, $enabeled_status);
} elseif ($function == 'remove_property_type') {
$property_type_id = wpl_request::getVar('property_type_id');
$confirmed = wpl_request::getVar('wpl_confirmed', 0);
self::remove_property_type($property_type_id, $confirmed);
} elseif ($function == 'generate_edit_page') {
$property_type_id = wpl_request::getVar('property_type_id');
self::generate_edit_page($property_type_id);
} elseif ($function == 'sort_property_types') {
$sort_ids = wpl_request::getVar('sort_ids');
self::sort_property_types($sort_ids);
} elseif ($function == 'save_property_type') {
self::save_property_type();
} elseif ($function == 'insert_property_type') {
self::insert_property_type();
} elseif ($function == 'can_remove_property_type') {
self::can_remove_property_type();
} elseif ($function == 'purge_related_property') {
self::purge_related_property();
} elseif ($function == 'assign_related_properties') {
self::assign_related_properties();
}
}
示例7: display
public function display()
{
/** check permission **/
wpl_global::min_access('agent');
$function = wpl_request::getVar('wpl_function');
if ($function == 'upload') {
self::upload();
} elseif ($function == 'title_update') {
wpl_items::update_file(wpl_request::getVar('video'), wpl_request::getVar('pid'), array('item_extra1' => wpl_request::getVar('value')));
} elseif ($function == 'desc_update') {
wpl_items::update_file(wpl_request::getVar('video'), wpl_request::getVar('pid'), array('item_extra2' => wpl_request::getVar('value')));
} elseif ($function == 'cat_update') {
wpl_items::update_file(wpl_request::getVar('video'), wpl_request::getVar('pid'), array('item_cat' => wpl_request::getVar('value')));
} elseif ($function == 'delete_video') {
wpl_items::delete_file(wpl_request::getVar('video'), wpl_request::getVar('pid'), wpl_request::getVar('kind'));
} elseif ($function == 'sort_videos') {
wpl_items::sort_items(wpl_request::getVar('pid'), wpl_request::getVar('order'));
} elseif ($function == 'change_status') {
wpl_items::update_file(wpl_request::getVar('video'), wpl_request::getVar('pid'), array('enabled' => wpl_request::getVar('enabled')));
} elseif ($function == 'embed_video') {
if (wpl_request::getVar('item_id') != -1) {
wpl_items::update(wpl_request::getVar('item_id'), array('item_name' => wpl_request::getVar('title'), 'item_extra1' => wpl_request::getVar('desc'), 'item_extra2' => wpl_request::getVar('embedcode')));
} else {
$item = array('parent_id' => wpl_request::getVar('pid'), 'parent_kind' => wpl_request::getVar('kind'), 'item_type' => 'video', 'item_cat' => 'video_embed', 'item_name' => wpl_request::getVar('title'), 'creation_date' => date("Y-m-d H:i:s"), 'item_extra1' => wpl_request::getVar('desc'), 'item_extra2' => wpl_request::getVar('embedcode'), 'index' => '1.00');
$id = wpl_items::save($item);
echo $id;
}
} elseif ($function == 'del_embed_video') {
if (wpl_request::getVar('item_id') != -1) {
wpl_items::delete(wpl_request::getVar('item_id'));
}
}
}
示例8: admin_home
public function admin_home()
{
/** check permission **/
wpl_global::min_access('administrator');
$this->submenus = wpl_global::get_menus('submenu', 'backend', 1, 1);
$this->settings = wpl_global::get_settings();
/** import tpl **/
parent::render($this->tpl_path, $this->tpl);
}
示例9: display
public function display()
{
/** check permission **/
wpl_global::min_access('author');
$function = wpl_request::getVar('wpl_function');
if ($function == 'save_params') {
$this->save_params();
}
}
示例10: home
public function home()
{
/** check permission **/
wpl_global::min_access('administrator');
// get list of all activity
$this->activities = wpl_activity::get_activities('', '', ' ORDER BY `index` ASC, `ID` DESC');
$this->available_activities = wpl_activity::get_available_activities();
/** import tpl * */
parent::render($this->tpl_path, $this->tpl);
}
示例11: display
public function display()
{
/** check permission **/
wpl_global::min_access('agent');
$function = wpl_request::getVar('wpl_function');
if ($function == 'save_room') {
self::save_room();
} elseif ($function == 'delete_room') {
self::delete_room();
}
}
示例12: display
public function display()
{
/** check permission **/
wpl_global::min_access('administrator');
$function = wpl_request::getVar('wpl_function');
if ($function == 'generate_modify_page') {
$field_id = wpl_request::getVar('field_id', 0);
$field_type = wpl_request::getVar('field_type', 'text');
$kind = wpl_request::getVar('kind', 0);
self::generate_modify_page($field_type, $field_id, $kind);
}
}
示例13: display
public function display()
{
/** check permission **/
wpl_global::min_access('administrator');
$function = wpl_request::getVar('wpl_function');
if ($function == 'sort_options') {
$sort_ids = wpl_request::getVar('sort_ids');
self::sort_options($sort_ids);
} elseif ($function == 'sort_options_enabled_state_change') {
$id = wpl_request::getVar('id');
$enabled_status = wpl_request::getVar('enabled_status');
self::update('wpl_sort_options', $id, 'enabled', $enabled_status);
} elseif ($function == 'save_sort_option') {
$id = wpl_request::getVar('id');
$sort_name = wpl_request::getVar('sort_name', '');
self::update('wpl_sort_options', $id, 'name', $sort_name);
}
}
示例14: display
public function display()
{
/** check permission **/
wpl_global::min_access('administrator');
$function = wpl_request::getVar('wpl_function');
if ($function == 'generate_new_page') {
$type = wpl_request::getVar('type');
$this->generate_new_page($type);
} elseif ($function == 'sort_units') {
$sort_ids = wpl_request::getVar('sort_ids');
$this->sort_units($sort_ids);
} elseif ($function == 'unit_enabled_state_change') {
$unit_id = wpl_request::getVar('unit_id');
$enabled_status = wpl_request::getVar('enabled_status');
$this->update($unit_id, 'enabled', $enabled_status);
} elseif ($function == 'after_before_change_state') {
$unit_id = wpl_request::getVar('unit_id');
$after_before_status = wpl_request::getVar('after_before_status');
$this->update($unit_id, 'after_before', $after_before_status);
} elseif ($function == 'unit_3digit_seperator_change') {
$unit_id = wpl_request::getVar('unit_id');
$seperator = wpl_request::getVar('seperator');
$this->update($unit_id, "seperator", $seperator);
} elseif ($function == 'unit_decimal_seperator_change') {
$unit_id = wpl_request::getVar('unit_id');
$d_seperator = wpl_request::getVar('d_seperator');
$this->update($unit_id, 'd_seperator', $d_seperator);
} elseif ($function == 'update_exchange_rates') {
$this->update_exchange_rates();
} elseif ($function == 'update_a_exchange_rate') {
$unit_id = wpl_request::getVar('unit_id');
$currency_code = wpl_request::getVar('currency_code');
$this->update_a_exchange_rate($unit_id, $currency_code);
} elseif ($function == 'exchange_rate_manual') {
$unit_id = wpl_request::getVar('unit_id');
$tosi = wpl_request::getVar('tosi');
$this->update($unit_id, 'tosi', $tosi);
} elseif ($function == 'change_currnecy_name') {
$unit_id = wpl_request::getVar('unit_id');
$name = wpl_request::getVar('name');
$this->update($unit_id, 'name', $name);
}
}
示例15: display
public function display()
{
/** check permission **/
wpl_global::min_access('agent');
$function = wpl_request::getVar('wpl_function');
if ($function == 'upload') {
$this->upload();
} elseif ($function == 'title_update') {
wpl_items::update_file(wpl_request::getVar('attachment'), wpl_request::getVar('pid'), array('item_extra1' => wpl_request::getVar('value')));
} elseif ($function == 'desc_update') {
wpl_items::update_file(wpl_request::getVar('attachment'), wpl_request::getVar('pid'), array('item_extra2' => wpl_request::getVar('value')));
} elseif ($function == 'cat_update') {
wpl_items::update_file(wpl_request::getVar('attachment'), wpl_request::getVar('pid'), array('item_cat' => wpl_request::getVar('value')));
} elseif ($function == 'delete_attachment') {
wpl_items::delete_file(wpl_request::getVar('attachment'), wpl_request::getVar('pid'), wpl_request::getVar('kind'));
} elseif ($function == 'sort_attachments') {
wpl_items::sort_items(wpl_request::getVar('pid'), wpl_request::getVar('order'));
} elseif ($function == 'change_status') {
wpl_items::update_file(wpl_request::getVar('attachment'), wpl_request::getVar('pid'), array('enabled' => wpl_request::getVar('enabled')));
}
}