Exemplo n.º 1
0
 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);
     }
 }
Exemplo n.º 2
0
 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);
     }
 }
Exemplo n.º 3
0
 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();
     }
 }
Exemplo n.º 4
0
 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);
 }
Exemplo n.º 5
0
 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);
 }
Exemplo n.º 6
0
 public function display()
 {
     /** check permission **/
     wpl_global::min_access('administrator');
     $function = wpl_request::getVar('wpl_function');
     if ($function == 'generate_modify_page') {
         $level = wpl_request::getVar('level');
         $parent = wpl_request::getVar('parent');
         $location_id = wpl_request::getVar('location_id');
         self::generate_modify_page($level, $parent, $location_id);
     } elseif ($function == 'set_enabled_location') {
         $location_id = wpl_request::getVar('location_id');
         $enabeled_status = wpl_request::getVar('enabeled_status');
         self::set_enabled_location($location_id, $enabeled_status);
     } elseif ($function == 'save_location') {
         $name = wpl_request::getVar('name');
         $abbr = wpl_request::getVar('abbr');
         $level = wpl_request::getVar('level');
         $parent = wpl_request::getVar('parent');
         $location_id = wpl_request::getVar('location_id');
         self::save_location($name, $abbr, $level, $parent, $location_id);
     } elseif ($function == 'delete_location') {
         $level = wpl_request::getVar('level');
         $location_id = wpl_request::getVar('location_id');
         self::delete_location($level, $location_id);
     } elseif ($function == 'generate_params_page') {
         $level = wpl_request::getVar('level');
         $location_id = wpl_request::getVar('location_id');
         self::generate_params_page($level, $location_id);
     }
 }
 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();
     }
 }
Exemplo n.º 8
0
 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'));
         }
     }
 }
Exemplo n.º 9
0
 public function home()
 {
     /** check permission **/
     wpl_global::min_access('administrator');
     $this->setting_categories = wpl_settings::get_categories();
     /** import tpl **/
     parent::render($this->tpl_path, $this->tpl);
 }
Exemplo n.º 10
0
 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);
 }
Exemplo n.º 11
0
 public function display()
 {
     /** check permission **/
     wpl_global::min_access('author');
     $function = wpl_request::getVar('wpl_function');
     if ($function == 'save_params') {
         $this->save_params();
     }
 }
Exemplo n.º 12
0
 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);
 }
Exemplo n.º 13
0
 public function home()
 {
     /** check permission **/
     wpl_global::min_access('administrator');
     $possible_orders = array('index', 'id', 'title');
     $this->orderby = in_array(wpl_request::getVar('orderby'), $possible_orders) ? wpl_request::getVar('orderby') : $possible_orders[0];
     $this->order = in_array(strtoupper(wpl_request::getVar('order')), array('ASC', 'DESC')) ? wpl_request::getVar('order') : 'ASC';
     /** import tpl **/
     parent::render($this->tpl_path, $this->tpl);
 }
Exemplo n.º 14
0
 public function display()
 {
     $function = wpl_request::getVar('wpl_function');
     if ($function == 'add_user_to_wpl') {
         /** check permission **/
         wpl_global::min_access('administrator');
         $user_id = wpl_request::getVar('user_id');
         self::add_user_to_wpl($user_id);
     } elseif ($function == 'del_user_from_wpl') {
         /** check permission **/
         wpl_global::min_access('administrator');
         $user_id = wpl_request::getVar('user_id');
         $confirmed = wpl_request::getVar('wpl_confirmed', 0);
         self::del_user_from_wpl($user_id, $confirmed);
     } elseif ($function == 'generate_edit_page') {
         /** check permission **/
         wpl_global::min_access('administrator');
         $user_id = wpl_request::getVar('user_id');
         self::generate_edit_page($user_id);
     } elseif ($function == 'save_user') {
         /** check permission **/
         wpl_global::min_access('administrator');
         $inputs = wpl_request::get('POST');
         self::save_user($inputs);
     } elseif ($function == 'save') {
         $table_name = wpl_request::getVar('table_name', 'wpl_users');
         $table_column = wpl_request::getVar('table_column');
         $value = wpl_request::getVar('value');
         $item_id = wpl_request::getVar('item_id');
         self::save($table_name, $table_column, $value, $item_id);
     } elseif ($function == 'change_membership') {
         $user_id = wpl_request::getVar('id');
         $membership_id = wpl_request::getVar('membership_id');
         self::change_membership($user_id, $membership_id);
     } elseif ($function == 'location_save') {
         $table_name = wpl_request::getVar('table_name');
         $table_column = wpl_request::getVar('table_column');
         $value = wpl_request::getVar('value');
         $item_id = wpl_request::getVar('item_id');
         self::location_save($table_name, $table_column, $value, $item_id);
     } elseif ($function == 'finalize') {
         $item_id = wpl_request::getVar('item_id');
         self::finalize($item_id);
     } elseif ($function == 'upload_file') {
         $file_name = wpl_request::getVar('file_name');
         $user_id = wpl_request::getVar('item_id');
         self::upload_file($file_name, $user_id);
     } elseif ($function == 'delete_file') {
         $field_id = wpl_request::getVar('field_id');
         $user_id = wpl_request::getVar('item_id');
         self::delete_file($field_id, $user_id);
     } elseif ($function == 'save_multilingual') {
         self::save_multilingual();
     }
 }
Exemplo n.º 15
0
 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();
     }
 }
Exemplo n.º 16
0
 public function display()
 {
     /** check permission **/
     wpl_global::min_access('administrator');
     $function = wpl_request::getVar('wpl_function');
     if ($function == 'set_enabled_notification') {
         $this->set_enabled_notification();
     } elseif ($function == 'save_notification') {
         $this->save_notification();
     }
 }
Exemplo n.º 17
0
 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);
     }
 }
Exemplo n.º 18
0
 public function home()
 {
     /** check permission **/
     wpl_global::min_access('administrator');
     $this->tpl = wpl_request::getVar('tpl', 'default');
     if ($this->tpl == 'modify') {
         $this->id = wpl_request::getVar('id', 0);
         $this->modify();
     } else {
         $this->notifications = wpl_notifications::get_notifications();
         parent::render($this->tpl_path, $this->tpl);
     }
 }
Exemplo n.º 19
0
 public function display()
 {
     /** check permission **/
     wpl_global::min_access('administrator');
     $function = wpl_request::getVar('wpl_function');
     if ($function == 'install_package') {
         $this->install_package();
     } elseif ($function == 'check_addon_update') {
         $this->check_addon_update();
     } elseif ($function == 'update_package') {
         $this->update_package();
     } elseif ($function == 'save_realtyna_credentials') {
         $this->save_realtyna_credentials();
     }
 }
Exemplo n.º 20
0
 public function home()
 {
     /** check permission **/
     wpl_global::min_access('administrator');
     $this->kind = trim(wpl_request::getVar('kind')) != '' ? wpl_request::getVar('kind') : 0;
     if (!in_array($this->kind, wpl_flex::get_valid_kinds())) {
         $this->message = __('Invalid Kind!', WPL_TEXTDOMAIN);
         /** import tpl **/
         return parent::render($this->tpl_path, 'message');
     }
     $this->field_categories = wpl_flex::get_categories(0, $this->kind);
     $this->kind_label = wpl_flex::get_kind_label($this->kind);
     $this->dbst_types = wpl_flex::get_dbst_types(1, $this->kind);
     $this->new_dbst_id = wpl_flex::get_new_dbst_id();
     /** import tpl **/
     parent::render($this->tpl_path, $this->tpl);
 }
Exemplo n.º 21
0
 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);
     }
 }
Exemplo n.º 22
0
 public function display()
 {
     /** check permission * */
     wpl_global::min_access('administrator');
     $function = wpl_request::getVar('wpl_function');
     if ($function == 'generate_modify_page') {
         $this->generate_modify_page();
     } elseif ($function == 'sort_activities') {
         $this->sort_activities(wpl_request::getVar('sort_ids'));
     } elseif ($function == 'set_enabled_activity') {
         $this->set_enabled_activity(wpl_request::getVar('activity_id'), wpl_request::getVar('enabled_status'));
     } elseif ($function == 'remove_activity') {
         $this->remove_activity(wpl_request::getVar('activity_id'), wpl_request::getVar('wpl_confirmed', 0));
     } elseif ($function == 'save_activity') {
         $this->save_activity();
     } elseif ($function == 'load_options') {
         $this->load_options(wpl_request::getVar('activity_name'), wpl_request::getVar('activity_layout'));
     }
 }
Exemplo n.º 23
0
 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);
     }
 }
Exemplo n.º 24
0
 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')));
     }
 }
Exemplo n.º 25
0
 public function display()
 {
     /** check permission **/
     wpl_global::min_access('administrator');
     $function = wpl_request::getVar('wpl_function');
     if ($function == 'generate_new_page') {
         $this->generate_new_page();
     } elseif ($function == 'generate_delete_page') {
         $this->generate_delete_page();
     } elseif ($function == 'set_enabled_listing_type') {
         $listing_type_id = wpl_request::getVar('listing_type_id');
         $enabled_status = wpl_request::getVar('enabled_status');
         $this->set_enabled_listing_type($listing_type_id, $enabled_status);
     } elseif ($function == 'remove_listing_type') {
         $listing_type_id = wpl_request::getVar('listing_type_id');
         $confirmed = wpl_request::getVar('wpl_confirmed', 0);
         $this->remove_listing_type($listing_type_id, $confirmed);
     } elseif ($function == 'generate_edit_page') {
         $listing_type_id = wpl_request::getVar('listing_type_id');
         $this->generate_edit_page($listing_type_id);
     } elseif ($function == 'sort_listing_types') {
         $sort_ids = wpl_request::getVar('sort_ids');
         $this->sort_listing_types($sort_ids);
     } elseif ($function == 'gicon_delete') {
         $icon = wpl_request::getVar('icon');
         $this->gicon_delete($icon);
     } elseif ($function == 'gicon_upload_file') {
         $this->gicon_upload_file();
     } elseif ($function == 'save_listing_type') {
         $this->save_listing_type();
     } elseif ($function == 'insert_listing_type') {
         $this->insert_listing_type();
     } elseif ($function == 'can_remove_listing_type') {
         $this->can_remove_listing_type();
     } elseif ($function == 'purge_related_property') {
         $this->purge_related_property();
     } elseif ($function == 'assign_related_properties') {
         $this->assign_related_properties();
     }
 }
Exemplo n.º 26
0
 public function display()
 {
     /** check permission **/
     wpl_global::min_access('agent');
     $function = wpl_request::getVar('wpl_function');
     if ($function == 'save') {
         $table_name = wpl_request::getVar('table_name');
         $table_column = wpl_request::getVar('table_column');
         $value = wpl_request::getVar('value');
         $item_id = wpl_request::getVar('item_id');
         self::save($table_name, $table_column, $value, $item_id);
     } elseif ($function == 'location_save') {
         $table_name = wpl_request::getVar('table_name');
         $table_column = wpl_request::getVar('table_column');
         $value = wpl_request::getVar('value');
         $item_id = wpl_request::getVar('item_id');
         self::location_save($table_name, $table_column, $value, $item_id);
     } elseif ($function == 'get_locations') {
         $location_level = wpl_request::getVar('location_level');
         $parent = wpl_request::getVar('parent');
         $current_location_id = wpl_request::getVar('current_location_id');
         self::get_locations($location_level, $parent, $current_location_id);
     } elseif ($function == 'finalize') {
         $item_id = wpl_request::getVar('item_id');
         $mode = wpl_request::getVar('mode');
         $value = wpl_request::getVar('value', 1);
         self::finalize($item_id, $mode, $value);
     } elseif ($function == 'item_save') {
         self::item_save();
     } elseif ($function == 'get_parents') {
         self::get_parents();
     } elseif ($function == 'set_parent') {
         self::set_parent();
     } elseif ($function == 'save_multilingual') {
         self::save_multilingual();
     }
 }
Exemplo n.º 27
0
 public function display()
 {
     /** check permission **/
     wpl_global::min_access('administrator');
     $function = wpl_request::getVar('wpl_function');
 }