<?php /* # ---------------------------------------------------------------------- # LOCATION - CITY ADD: CONTROL # ---------------------------------------------------------------------- */ $_get = new LOCATION_GET(); $_update = new LOCATION_UPDATE(); //$full_order = $_get->count_listing_news_category($search_query, $sort_by, $query_per_page); //$total_query = $full_order['total_query']; //$total_page = $full_order['total_page']; //$all_news = $_get->get_listing_news_category($search_query, $sort_by, $first_record, $query_per_page); /* --- BUTTON HANDLER --- */ if (isset($_POST['btn-insert-new-category']) && $_POST['btn-insert-new-category'] == 'Save Changes') { $name = filter_var($_POST['name'], FILTER_SANITIZE_STRING); $description = filter_var($_POST['description'], FILTER_SANITIZE_STRING); $active = filter_var($_POST['active'], FILTER_SANITIZE_STRING); $visibility = filter_var($_POST['visibility']); $meta_description = filter_var($_POST['meta_description'], FILTER_SANITIZE_STRING); $meta_keyword = filter_var($_POST['meta_keyword'], FILTER_SANITIZE_STRING); $alias = cleanurl($name); $temp_order = $_get->get_max_category_order(); $order = $temp_order->max_order + 1; $count_alias = $_get->count_category($_POST['name']); if ($count_alias->rows > 0) { $page = 'self'; $type = 'danger'; $msg = $name . ' has already existed'; set_alert($type, $msg); safe_redirect($page);
<?php /* # ---------------------------------------------------------------------- # LOCATION: CONTROL # ---------------------------------------------------------------------- */ $_get = new LOCATION_GET(); $_update = new LOCATION_UPDATE(); /* # ---------------------------------------------------------------------- # SORTING # ---------------------------------------------------------------------- */ $equal_search = array('news_visibility', 'news_created_date'); $default_sort_by = "order_ DESC"; $pgdata = page_init($equal_search, $default_sort_by); // static/general.php $page = $pgdata['page']; $query_per_page = $pgdata['query_per_page']; $sort_by = $pgdata['sort_by']; $first_record = $pgdata['first_record']; $search_parameter = $pgdata['search_parameter']; $search_value = $pgdata['search_value']; $search_query = $pgdata['search_query']; $search = $pgdata['search']; if (isset($_REQUEST['src'])) { $_REQUEST['src'] = $_REQUEST['src']; } else { $_REQUEST['src'] = ''; }
<?php /* # ---------------------------------------------------------------------- # LOCATION - DETAILS: CONTROL # ---------------------------------------------------------------------- */ $_get = new LOCATION_GET(); $_update = new LOCATION_UPDATE(); /* --- DEFINED VARIABLE --- */ $news_id = filter_var($_REQUEST['nid'], FILTER_SANITIZE_NUMBER_INT); $news_alias = filter_var($_REQUEST['nn'], FILTER_SANITIZE_STRING); $news_detail = $_get->get_news_detail($news_id); $category = $_get->getAllCategory(); if (isset($_POST['btn-edit-news'])) { if ($_POST['btn-edit-news'] == "Save Changes" || $_POST['btn-edit-news'] == "Save Changes & Exit") { $news_id = $news_detail->news_id; $category = filter_var($_POST['category'], FILTER_SANITIZE_NUMBER_INT); $title = filter_var($_POST['title'], FILTER_SANITIZE_STRING); $date = filter_var($_POST['date'], FILTER_SANITIZE_NUMBER_FLOAT); $excerpt = filter_var($_POST['excerpt'], FILTER_SANITIZE_STRING); $content = filter_var($_POST['content'], FILTER_SANITIZE_STRING); $alias = cleanurl($_POST['title']); $description = filter_var($_POST['description'], FILTER_SANITIZE_STRING); $keywords = filter_var($_POST['keywords'], FILTER_SANITIZE_STRING); $visibility = filter_var($_POST['visibility'], FILTER_SANITIZE_NUMBER_INT); $check_title = $_get->check_news_title($title, $news_id); if ($check_title->rows > 0) { if ($news_detail->category_alias == $alias) { $alias = $alias; } else {
<?php /* # ---------------------------------------------------------------------- # LOCATION - CITY: CONTROL # ---------------------------------------------------------------------- */ $_get = new LOCATION_GET(); $_update = new LOCATION_UPDATE(); /* # ---------------------------------------------------------------------- # SORTING # ---------------------------------------------------------------------- */ $equal_search = array('category_visibility'); $default_sort_by = "category_order"; $pgdata = page_init($equal_search, $default_sort_by); // static/general.php $page = $pgdata['page']; $query_per_page = $pgdata['query_per_page']; $sort_by = $pgdata['sort_by']; $first_record = $pgdata['first_record']; $search_parameter = $pgdata['search_parameter']; $search_value = $pgdata['search_value']; $search_query = $pgdata['search_query']; $search = $pgdata['search']; if (isset($_REQUEST['src'])) { $_REQUEST['src'] = $_REQUEST['src']; } else { $_REQUEST['src'] = ''; }