<?php /* # ---------------------------------------------------------------------- # COLOR MANAGER - EDIT: CONTROL # ---------------------------------------------------------------------- */ $_get = new COLLECTION_GET(); $_update = new COLLECTION_UPDATE(); $color_id = filter_var($_REQUEST['collection_id'], FILTER_SANITIZE_NUMBER_INT); $color_detail = $_get->get_color($color_id); $color_visibility_active = ''; $color_visibility_inactive = ''; if ($color_detail->collection_visibility_status == 'yes') { $color_visibility_active = 'checked="checked"'; } else { if ($color_Detail->collection_visibility_status == 'no') { $color_visibility_inactive = 'checked="checked"'; } } if (isset($_POST['btn-detail-collection']) && $_POST['btn-detail-collection'] == 'Save Changes') { $collection_id = $color_detail->collection_id; $visibility = filter_var($_POST['visibility'], FILTER_SANITIZE_STRING); $name = filter_var($_POST['name'], FILTER_SANITIZE_STRING); $description = filter_var($_POST['description'], FILTER_SANITIZE_STRING); $check_name = $_get->count_name($name, $collection_id); if ($check_name->rows > 0) { $page = 'self'; $type = 'danger'; $msg = $name . ' has already existed, please choose another collection name'; set_alert($type, $msg);