<?php /* # ---------------------------------------------------------------------- # PAGES - INFO(HOW IT WORKS): CONTROL # ---------------------------------------------------------------------- */ $_get = new STATIC_GET(); $page = 'info'; $count_data = $_get->count_static($page); if($count_data->rows > 0){ $_class_backup = 'hidden'; $get_data = $_get->get_static($page); $data = $get_data->content; }else{ $_class_backup = '<div class="col-md-8 col-md-offset-2 text-center"> <p>Hunt Street is your one-stop destination </p> <p>for pre-loved and brand new luxuries and vintage collectibles.</p> <h5 >B U Y | S E L L | T R A D E | C O N S I G N</h5> <div class="col-md-6"> <div class="roundbox"> <h3>BUY</h3> <h4>with us</h4> <div class="divide"></div> <p>Get up to 80% of the retail prices in stores!</p> </div> </div> <div class="col-md-6"> <div class="roundbox">
/* # ---------------------------------------------------------------------- # PAGES - INFO(HOW IT WORKS), AUTHENTICITY, TERMS & CONDITIONS, FAQ: CONTROL # ---------------------------------------------------------------------- */ include "get.php"; include "update.php"; $_get = new STATIC_GET(); /* --- BUTTON HANDLER --- */ if (isset($_POST['btn-page-static']) && $_POST['btn-page-static'] == "Save Changes") { $type_array = array('info', 'authenticity', 'terms', 'faq'); $_update = new STATIC_UPDATE(); foreach ($type_array as $type_array) { $page = filter_var($type_array, FILTER_SANITIZE_STRING); $check_about = $_get->count_static($page); $content = $_POST[$page]; $meta_description = filter_var($_POST[$page . '_description'], FILTER_SANITIZE_STRING); $meta_keywords = filter_var($_POST[$page . '_keywords'], FILTER_SANITIZE_STRING); if ($check_about->rows > 0) { $_update->update_static($content, $meta_description, $meta_keywords, $page); } else { $_update->insert_static($page, $content, $meta_description, $meta_keywords); } } $page = 'self'; $type = 'success'; $msg = 'Changes successfully saved'; set_alert($type, $msg); safe_redirect($page); }