public function module_uninstall() { if (isset($_POST['module_uninstall']) && mapi_csrf_check(MGet::string('mapi_csrf'))) { $this->model('uninstall_modules'); } $this->module_list(); }
public function widget_uninstall() { if (isset($_POST['widget_uninstall']) && mapi_csrf_check(MGet::string('mapi_csrf'))) { $this->model('uninstall_widgets'); } $this->widget_list(); }
public function geocode() { if (isset($_GET['address']) && mapi_csrf_check(MGet::string('mapi_csrf'))) { $result = $this->model('geocode', null, 'majax_geo'); } if ($result) { echo json_encode($result); } }
public function preferences() { $this->set_page_title('#mappiamo - Preferences'); if (isset($_POST['preferences_update']) && mapi_csrf_check(MGet::string('mapi_csrf'))) { $this->model('update_preferences'); } $preferences = $this->model('get_preferences'); $this->view('default', $preferences); }
public function page_menu() { $this->set_as_ajax(); if (isset($_GET['menu_add']) && mapi_csrf_check(MGet::string('mapi_csrf'))) { $this->model('add_menu', $this->get_object()); } if (isset($_GET['menu_remove']) && mapi_csrf_check(MGet::string('mapi_csrf'))) { $this->model('remove_menu', $this->get_object()); } }
public function profile() { $this->set_page_title('#mappiamo - Profile'); if (isset($_POST['profile_update']) && mapi_csrf_check(MGet::string('mapi_csrf'))) { $this->model('update_profile'); } if (isset($_POST['change_password']) && mapi_csrf_check(MGet::string('mapi_csrf'))) { $this->model('change_password'); } $profile = $this->model('get_profile'); $this->view('default', $profile); }
public function category_delete() { $this->set_page_title('#mappiamo - Delete category'); if (isset($_POST['category_delete']) && mapi_csrf_check(MGet::string('mapi_csrf'))) { $this->model('delete_category', $this->get_object()); } $category = $this->model('get_category', $this->get_object()); if ($category) { $this->view('delete', $category); } else { $this->category_list(); } }
public function menu_delete() { $this->set_page_title('#mappiamo - Delete menu'); if (isset($_POST['menu_delete']) && mapi_csrf_check(MGet::string('mapi_csrf'))) { $this->model('delete_menu', $this->get_object()); } $menu = $this->model('get_menu', $this->get_object()); if ($menu) { $this->view('delete', $menu); } else { $this->menu_list(); } }
public function user_delete() { $this->set_page_title('#mappiamo - Delete user'); if (isset($_POST['user_delete']) && mapi_csrf_check(MGet::string('mapi_csrf'))) { $this->model('delete_user', $this->get_object()); } $user = $this->model('get_user', $this->get_object()); if ($user) { $this->view('delete', $user); } else { $this->user_list(); } }
public function register() { $reg_allowed = MObject::get('preference', 'registration'); if ('yes' == $reg_allowed->get_value()) { if (isset($_POST['do-register']) && mapi_csrf_check(MGet::string('mapi_csrf'))) { $this->model('register'); } if (isset($_GET['activate']) && 1 == $_GET['activate']) { $this->model('activate'); } $this->view(); } else { header('Location: ../index.php'); exit(0); } }
public function content_import() { $this->set_page_title('#mappiamo - Import content'); if (isset($_POST['content_import']) && mapi_csrf_check(MGet::string('mapi_csrf'))) { $content = $this->model('import_content'); if ($content && $content->get_id()) { header('Location: index.php?module=mcontent&task=content_edit&object=' . intval($content->get_id())); exit(0); } } if (isset($_POST['import_begin'])) { $data = $this->model('import', null, 'mcontent_import'); $this->view('import_results', $data); } else { $this->view('import'); } }