/** * function construct */ function __construct() { $FilterRequest = new magixcjquery_filter_request(); $CleanUrl = new magixcjquery_url_clean(); if ($FilterRequest->isGet('getnews')) { $this->idNews = magixcjquery_filter_var::clean($_GET['getnews']); } if ($FilterRequest->isGet('getdate')) { $this->dateNews = $_GET['getdate']; } $this->idPagination = 1; if ($FilterRequest->isGet('page') and is_numeric($_GET['page'])) { $this->idPagination = intval($_GET['page']); } if ($FilterRequest->isGet('tag')) { $this->idTag = $CleanUrl->make2tagString($_GET['tag']); } }
/** * * */ public function __construct() { if (class_exists('backend_model_access')) { $this->model_access = new backend_model_access(); } if (class_exists('backend_model_message')) { $this->message = new backend_model_message(); } if (magixcjquery_filter_request::isSession('keyuniqid_admin')) { $this->idadmin = magixcjquery_filter_isVar::isPostNumeric($_SESSION['id_admin']); } if (magixcjquery_filter_request::isGet('action')) { $this->action = magixcjquery_form_helpersforms::inputClean($_GET['action']); } if (magixcjquery_filter_request::isGet('tab')) { $this->tab = magixcjquery_form_helpersforms::inputClean($_GET['tab']); } if (magixcjquery_filter_request::isGet('edit')) { $this->edit = magixcjquery_filter_isVar::isPostNumeric($_GET['edit']); } if (magixcjquery_filter_request::isGet('getlang')) { $this->getlang = (int) magixcjquery_filter_isVar::isPostNumeric($_GET['getlang']); } if (magixcjquery_filter_request::isPost('idnews')) { $this->idnews = magixcjquery_filter_isVar::isPostNumeric($_POST['idnews']); } if (magixcjquery_filter_request::isPost('n_title')) { $this->n_title = magixcjquery_form_helpersforms::inputClean($_POST['n_title']); } if (magixcjquery_filter_request::isPost('n_uri')) { $this->n_uri = magixcjquery_url_clean::rplMagixString($_POST['n_uri']); } if (magixcjquery_filter_request::isPost('n_content')) { $this->n_content = $_POST['n_content']; } if (isset($_FILES['n_image']["name"])) { $this->n_image = magixcjquery_url_clean::rplMagixString($_FILES['n_image']["name"]); } if (magixcjquery_filter_request::isPost('idlang')) { $this->idlang = magixcjquery_filter_isVar::isPostNumeric($_POST['idlang']); } if (magixcjquery_filter_request::isGet('page')) { // si numéric if (is_numeric($_GET['page'])) { $this->getpage = intval($_GET['page']); } else { // Sinon retourne la première page $this->getpage = 1; } } else { $this->getpage = 1; } if (magixcjquery_filter_request::isPost('published')) { $this->published = magixcjquery_filter_isVar::isPostNumeric($_POST['published']); } if (magixcjquery_filter_request::isPost('delete_news')) { $this->delete_news = magixcjquery_filter_isVar::isPostNumeric($_POST['delete_news']); } if (magixcjquery_filter_request::isPost('delete_image')) { $this->delete_image = magixcjquery_filter_isVar::isPostNumeric($_POST['delete_image']); } /** * Système de tags */ if (magixcjquery_filter_request::isPost('name_tag')) { $this->name_tag = (string) magixcjquery_url_clean::make2tagString($_POST['name_tag']); } if (magixcjquery_filter_request::isPost('delete_tag')) { $this->delete_tag = magixcjquery_form_helpersforms::inputClean($_POST['delete_tag']); } //SEARCH if (magixcjquery_filter_request::isGet('get_search_news')) { $this->get_search_news = magixcjquery_form_helpersforms::inputClean($_GET['get_search_news']); } if (magixcjquery_filter_request::isPost('news_search')) { $this->news_search = magixcjquery_form_helpersforms::inputClean($_POST['news_search']); } //plugin if (magixcjquery_filter_request::isGet('plugin')) { $this->plugin = magixcjquery_form_helpersforms::inputClean($_GET['plugin']); } }