<?php /* # ---------------------------------------------------------------------- # PAGES - HOME: CONTROL # ---------------------------------------------------------------------- */ include "get.php"; include "update.php"; $_get = new HOME_GET(); $_update = new HOME_UPDATE(); $get_slideshows = $_get->get_slideshows(); $count_slideshow = $_get->count_slideshow(); $get_order_slideshow = $_get->get_order_slideshow(); $new_id = $_get->get_new_id(); $slideshow_get = $_get->slideshow_get(); if (isset($_POST['btn-link-banner'])) { $link = filter_var($_POST['name_link'], FILTER_SANITIZE_URL); $link_id = filter_var($_POST['link_id'], FILTER_SANITIZE_NUMBER_INT); if ($_POST['btn-link-banner'] == "Save Changes") { $_update->insertLinkBanner($link, $link_id); } else { if ($_POST['btn-link-banner'] == "Delete") { $_update->insertLinkBanner('', $link_id); } } $page = 'home'; $type = 'success'; $msg = 'Changes have been successfully saved.'; set_alert($type, $msg); safe_redirect($page);
include "get.php"; include "update.php"; function encode_data_array($array_label, $array_value) { $data = array(); foreach ($array_label as $key => $value) { $data = array_merge($data, array($value => $array_value[$key])); } $render = json_encode($data); return $render; } $_get = new HOME_GET(); $_update = new HOME_UPDATE(); $get_data_header = $_get->get_data_header($request_menu); $get_slideshows = $_get->get_slideshows($request_menu); $count_slideshow = $_get->count_slideshow($request_menu); $get_order_slideshow = $_get->get_order_slideshow($request_menu); $new_id = $_get->get_new_id(); $slideshow_get = $_get->slideshow_get($request_menu); // var_dump($slideshow_get); $temp_pdf = explode('/', $_get->get_pdf($request_menu)); $get_pdf = $temp_pdf[count($temp_pdf) - 1]; $get_list_menu = $_get->get_menu(); // var_dump($get_list_menu); if (isset($_POST['btn-link-banner'])) { $link = filter_var($_POST['name_link'], FILTER_SANITIZE_STRING); $link_id = filter_var($_POST['link_id'], FILTER_SANITIZE_NUMBER_INT); if ($_POST['btn-link-banner'] == "Save Changes") { $_update->insertLinkBanner($link, $link_id); } else { if ($_POST['btn-link-banner'] == "Delete") {