// +---------------------------------------------------------------------- // | Demila [ Beautiful Digital Content Trading System ] // +---------------------------------------------------------------------- // | Copyright (c) 2015 http://demila.org All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- // | Email author@demila.org // +---------------------------------------------------------------------- _setView(__FILE__); _setTitle($langArray['add'] . ' ' . $langArray['attribute']); if (!isset($_GET['id']) && !is_numeric($_GET['id'])) { refresh("/" . $languageURL . adminURL . "/?m=" . $_GET['m'] . "&c=list"); } $cms = new attributes(); if (isset($_POST['add'])) { $_POST['category_id'] = $_GET['id']; $status = $cms->add(); if ($status !== true) { abr('error', $status); } else { refresh("?m=" . $_GET['m'] . "&c=attr&id=" . $_GET['id'], $langArray['add_complete']); } } else { $_POST['visible'] = 'true'; } $categoriesClass = new categories(); $pdata = $categoriesClass->get($_GET['id']); abr('pdata', $pdata); require_once ROOT_PATH . '/apps/lists/leftlist_admin.php';