* @package configeditor
 * @version 1.0.0
 * @author esclkm
 * @copyright 
 * @license BSD
 *  */
// Generated by Cotonti developer tool (littledev.ru)
defined('COT_CODE') or die('Wrong URL.');
/* @var $db CotDB */
/* @var $cache Cache */
/* @var $t Xtemplate */
$c = cot_import('c', 'G', 'ALP');
if (!$c) {
    cot_redirect(cot_url('admin', array('m' => 'other', 'p' => 'configeditor'), '', true));
}
$info = cfg_editor::cat_info($c);
if (!$info) {
    cot_redirect(cot_url('admin', array('m' => 'other', 'p' => 'configeditor'), '', true));
}
$adminpath[] = array(cot_url('admin', array('m' => 'other', 'p' => 'configeditor', 'n' => 'set', 'c' => $c)), $info['configcat_title']);
$adminpath[] = $L['edit_cat'];
$types_array = array(COT_CONFIG_TYPE_TEXT => $L['ccfg_type_text'], COT_CONFIG_TYPE_STRING => $L['ccfg_type_string'], COT_CONFIG_TYPE_SELECT => $L['ccfg_type_select'], COT_CONFIG_TYPE_RADIO => $L['ccfg_type_radio'], COT_CONFIG_TYPE_CALLBACK => $L['ccfg_type_callback'], COT_CONFIG_TYPE_HIDDEN => $L['ccfg_type_hidden'], COT_CONFIG_TYPE_SEPARATOR => $L['ccfg_type_separator'], COT_CONFIG_TYPE_RANGE => $L['ccfg_type_range'], COT_CONFIG_TYPE_CUSTOM => $L['ccfg_type_custom']);
if ($a == 'add') {
    $name = cot_import('rname', 'P', "ALP");
    $title = cot_import('rtitle', 'P', "TXT");
    $desc = cot_import('rdesc', 'P', "HTM");
    $order = cot_import('rorder', 'P', "INT");
    $variants = cot_import('rvariants', 'P', "HTM");
    $default = cot_import('rdefault', 'P', "HTM");
    $type = cot_import('rtype', 'P', "INT");
    if (empty($name)) {