From 822bfb7fa13f8e70ff812f263d18a5054400bbd3 Mon Sep 17 00:00:00 2001 From: esclkm Date: Sat, 5 Dec 2015 11:44:59 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D0=B4=D0=B0=D0=BA=D1=82=D0=BE?= =?UTF-8?q?=D1=80=20=D0=BA=D0=BE=D0=BD=D1=84=D0=B8=D0=B3=D0=BE=D0=B2.=20?= =?UTF-8?q?=D0=92=20=D0=BE=D1=82=D0=BB=D0=B8=D1=87=D0=B8=D0=B5=20=D0=BE?= =?UTF-8?q?=D1=82=20customconfigs=20-=20=D0=B8=D1=81=D0=BF=D0=BE=D0=BB?= =?UTF-8?q?=D1=8C=D0=B7=D1=83=D0=B5=D1=82=20=D0=B2=D1=81=D1=82=D1=80=D0=BE?= =?UTF-8?q?=D0=B5=D0=BD=D0=BD=D1=83=D1=8E=20=D1=81=D0=B8=D1=81=D1=82=D0=B5?= =?UTF-8?q?=D0=BC=D1=83=20=D1=83=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=BA=D0=BE=D0=BD=D1=84=D0=B8=D0=B3=D0=B0=D0=BC?= =?UTF-8?q?=D0=B8,=20=D1=87=D1=82=D0=BE=20=D0=B4=D0=B5=D0=BB=D0=B0=D0=B5?= =?UTF-8?q?=D1=82=20=D0=B5=D0=B5=20=D0=B1=D0=BE=D0=BB=D0=B5=D0=B5=20=D0=BF?= =?UTF-8?q?=D1=80=D0=BE=D1=81=D1=82=D0=BE=D0=B9=20=D0=B4=D0=BB=D1=8F=20?= =?UTF-8?q?=D0=BE=D0=B1=D1=8B=D1=87=D0=BD=D0=BE=D0=B3=D0=BE=20=D0=BE=D0=B1?= =?UTF-8?q?=D1=8B=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 12 ++ configeditor.config.first.php | 39 ++++++ configeditor.png | Bin 0 -> 700 bytes configeditor.setup.php | 32 +++++ configeditor.tools.php | 40 ++++++ inc/configeditor.admin.edit.php | 143 +++++++++++++++++++++ inc/configeditor.admin.editcat.php | 104 +++++++++++++++ inc/configeditor.functions.php | 196 +++++++++++++++++++++++++++++ lang/configeditor.en.lang.php | 24 ++++ lang/configeditor.ru.lang.php | 36 ++++++ setup/configeditor.install.sql | 9 ++ setup/configeditor.uninstall.sql | 3 + tpl/configeditor.admin.edit.tpl | 86 +++++++++++++ tpl/configeditor.admin.editcat.tpl | 69 ++++++++++ 14 files changed, 793 insertions(+) create mode 100644 README.md create mode 100644 configeditor.config.first.php create mode 100644 configeditor.png create mode 100644 configeditor.setup.php create mode 100644 configeditor.tools.php create mode 100644 inc/configeditor.admin.edit.php create mode 100644 inc/configeditor.admin.editcat.php create mode 100644 inc/configeditor.functions.php create mode 100644 lang/configeditor.en.lang.php create mode 100644 lang/configeditor.ru.lang.php create mode 100644 setup/configeditor.install.sql create mode 100644 setup/configeditor.uninstall.sql create mode 100644 tpl/configeditor.admin.edit.tpl create mode 100644 tpl/configeditor.admin.editcat.tpl diff --git a/README.md b/README.md new file mode 100644 index 0000000..c44be30 --- /dev/null +++ b/README.md @@ -0,0 +1,12 @@ +# Пользовательские конфиги +Плагин является заменой слотам меню. +Позваляет быстро создавать произольные пользовательские настройки и использовать в ваших шаблонах + +# Установка +Просто скачайте и установите плагин + +# Использование +Вставьте в ваши шаблоны код + + {PHP.cfg.:configname} + diff --git a/configeditor.config.first.php b/configeditor.config.first.php new file mode 100644 index 0000000..e3dd736 --- /dev/null +++ b/configeditor.config.first.php @@ -0,0 +1,39 @@ +query("SELECT * FROM $db_configeditor"); +while($row = $sql->fetch()) +{ + $name = $row['configcat_name']; + $L['core_'.$name] = $row['configcat_title']; + $L['core_'.$name.'_desc'] = $row['configcat_desc']; +} + +$sql = $db->query("SELECT * FROM $db_config WHERE config_owner = 'core' AND config_donor='configeditor'"); +while($row = $sql->fetch()) +{ + $name = $row['config_name']; + $L['cfg_'.$name] = $row['config_text']; + $L['cfg_'.$name.'_hint'] = $row['config_desc']; +} \ No newline at end of file diff --git a/configeditor.png b/configeditor.png new file mode 100644 index 0000000000000000000000000000000000000000..62186f2b905e595e0ffe0fe22671802d78d59292 GIT binary patch literal 700 zcmV;t0z>_YP)NqOGS-fd<`o2ATlcL zBc6gg6g4S&=!o;d?*raP=UNit^;2eoW=rx$lW@PZ~9uHY@I-Nv>RYIW2z9m`aORF$_C#ELzY9BNF?ZRI0#{Y^8|a_?Un^tOs(fLz$n9`-D8r; zBuW-j*RrVoCy<5E2ZI64=W~(?hr=xPVpMUUHNd@6sX*+X6W(sO$p%OPW(ykD29N@v zn{XRgr$Fj(YBAyVST2`(1DtE8(@BfPLS%Wr-$R(QEv9_EUfX#G$QpVBY=R>fkH=B^ zBBZ_!;cHl&lSK{7|)8O_u`9hV2yOayjim1mT;d0B|RKl8r_q zQRDGg6zFt1XIvW&hbXMY-v7XVpY@>afCxuTJ@auA^3?nNex$(m5UOjAwweN-1wMLF zazd{9Nd^p#81j$eH9kn>&ZXWbXB%BD3?Fy(J~mLgJc@hyzr-t+3*YZ@$=CScG7N)@ i+-|pA@-;RrQ~C=&7PO-U?w(2j0000 \ No newline at end of file diff --git a/configeditor.tools.php b/configeditor.tools.php new file mode 100644 index 0000000..17fd4b9 --- /dev/null +++ b/configeditor.tools.php @@ -0,0 +1,40 @@ +parse('MAIN'); + $adminmain = $t->text('MAIN'); +} +else +{ + // Error page + cot_die_message(404); + exit; +} diff --git a/inc/configeditor.admin.edit.php b/inc/configeditor.admin.edit.php new file mode 100644 index 0000000..d2bcf02 --- /dev/null +++ b/inc/configeditor.admin.edit.php @@ -0,0 +1,143 @@ + '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)) + { + cot_error($L['err_no_name']); + } + if(cfg_editor::config_exists($name)) + { + cot_error($L['err_exists_name']); + } + if(!cot_error_found()) + { + cfg_editor::config_add($c, $name, $order, $title, $desc, $type, $default, $variants); + cot_message('added_success'); + } + $cache && $cache->clear(); + cot_redirect(cot_url('admin', array('m' => 'other', 'p' => 'configeditor', 'n' => 'edit', 'c' => $c), '', true)); +} +if($a == 'update') +{ + + $titles = cot_import('rtitle', 'P', "ARR"); + $descs = cot_import('rdesc', 'P', "ARR"); + $orders = cot_import('rorder', 'P', "ARR"); + $variantss = cot_import('rvariants', 'P', "ARR"); + $defaults = cot_import('rdefault', 'P', "ARR"); + $types = cot_import('rtype', 'P', "ARR"); + $names = array_keys($titles); + foreach($names as $name) + { + $name = cot_import($name, 'D', "ALP"); + $title = cot_import($titles[$name], 'D', "TXT"); + $desc = cot_import($descs[$name], 'D', "HTM"); + $order = cot_import($orders[$name], 'D', "INT"); + $variants = cot_import($variantss[$name], 'D', "HTM"); + $default = cot_import($defaults[$name], 'D', "HTM"); + $type = cot_import($types[$name], 'D', "INT"); + cfg_editor::config_edit($c, $name, $order, $title, $desc, $type, $default, $variants); + } + cot_message('updated_success'); + $cache && $cache->clear(); + cot_redirect(cot_url('admin', array('m' => 'other', 'p' => 'configeditor', 'n' => 'edit', 'c' => $c), '', true)); +} +if($a == 'delete') +{ + cot_check_xg(); + $name = cot_import('rname', 'G', "ALP"); + cfg_editor::config_delete($c, $name); + cot_message('deleted_success'); + $cache && $cache->clear(); + cot_redirect(cot_url('admin', array('m' => 'other', 'p' => 'configeditor', 'n' => 'edit', 'c' => $c), '', true)); +} +$rows = cfg_editor::config_list($c); +foreach ($rows as $row) +{ + $readonly = array(); + if($row['config_donor'] != 'configeditor') + { + $readonly = array( + 'readonly' => 'readonly', + 'disabled' => 'disabled' + ); + } + $t->assign(array( + 'FORM_EDIT_NAME' => $row['config_name'], + 'FORM_EDIT_TITLE' => cot_inputbox('text', 'rtitle['.$row['config_name'].']', isset($L['cfg_'.$row['config_name']]) ? $L['cfg_'.$row['config_name']] : $row['config_text'], array('maxlength' => '255') + $readonly), + 'FORM_EDIT_DESC' => cot_textarea('rdesc['.$row['config_name'].']', isset($L['cfg_'.$row['config_name'].'_hint']) ? $L['cfg_'.$row['config_name'].'_hint'] : $row['config_desc'], 2, 60, array('maxlength' => '255') + $readonly), + 'FORM_EDIT_ORDER' => cot_inputbox('text', 'rorder['.$row['config_name'].']', $row['config_order'], array('maxlength' => '2') + $readonly), + 'FORM_EDIT_VARIANTS' => cot_textarea('rvariants['.$row['config_name'].']', $row['config_variants'], 2, 60, array('maxlength' => '255') + $readonly), + 'FORM_EDIT_DEFAULT' => cot_textarea('rdefault['.$row['config_name'].']', $row['config_default'], 2, 60, array('maxlength' => '255') + $readonly), + 'FORM_EDIT_TYPE' => cot_selectbox($row['config_type'], 'rtype['.$row['config_name'].']', array_keys($types_array), array_values($types_array), false, $readonly), + 'FORM_EDIT_DELETE_URL' => $row['config_donor'] != 'configeditor' ? '' : cot_url('admin', array('m' => 'other', 'p' => 'configeditor', 'n' => 'edit', 'c' => $c, 'a' => 'delete', 'rname' => $row['config_name'],'x' => $sys['xk'])), + )); + $t->parse('MAIN.ROW'); +} +if(!count($rows)) +{ + $t->parse('MAIN.NOROW'); +} +$t->assign(array( + 'FORM_EDIT_URL' => cot_url('admin', array('m' => 'other', 'p' => 'configeditor', 'n' => 'edit', 'a' => 'update', 'c' => $c)), + 'FORM_ADD_URL' => cot_url('admin', array('m' => 'other', 'p' => 'configeditor', 'n' => 'edit', 'a' => 'add', 'c' => $c)), + + 'FORM_ADD_TITLE' => cot_inputbox('text', 'rtitle', '', array('maxlength' => '255')), + 'FORM_ADD_NAME' => cot_inputbox('text', 'rname', '', array('size' => '20', 'maxlength' => '32')), + 'FORM_ADD_DESC' => cot_textarea('rdesc', '', 2, 60), + 'FORM_ADD_ORDER' => cot_inputbox('text', 'rorder', '', array('maxlength' => '2')), + 'FORM_ADD_VARIANTS' => cot_textarea('rvariants', '', 2, 60), + 'FORM_ADD_DEFAULT' => cot_textarea('rdefault', '', 2, 60), + 'FORM_ADD_TYPE' => cot_selectbox(0, 'rtype', array_keys($types_array), array_values($types_array), false), +)); +cot_display_messages($t); \ No newline at end of file diff --git a/inc/configeditor.admin.editcat.php b/inc/configeditor.admin.editcat.php new file mode 100644 index 0000000..39c91b5 --- /dev/null +++ b/inc/configeditor.admin.editcat.php @@ -0,0 +1,104 @@ + 'other', 'p' => 'configeditor')), $L['Custom_configs']); +$adminpath[] = $L['edit_cats']; + +if($a == 'add') +{ + $name = cot_import('rname', 'P', "ALP"); + $title = cot_import('rtitle', 'P', "TXT"); + $desc = cot_import('rdesc', 'P', "HTM"); + if(empty($name)) + { + cot_error($L['err_no_name']); + } + if(in_array($name, cfg_editor::cat_exists_list())) + { + cot_error($L['err_exists_name']); + } + if(!cot_error_found()) + { + cfg_editor::cat_add($name, $title, $desc); + cot_message('added_success'); + } + cot_redirect(cot_url('admin', array('m' => 'other', 'p' => 'configeditor', 'n' => 'editcat'), '', true)); +} +if($a == 'update') +{ + + $titles = cot_import('rtitle', 'P', "ARR"); + $descs = cot_import('rdesc', 'P', "ARR"); + $names = array_keys($titles); + foreach($names as $name) + { + $name = cot_import($name, 'D', "ALP"); + $title = cot_import($titles[$name], 'D', "TXT"); + $desc = cot_import($descs[$name], 'D', "HTM"); + + cfg_editor::cat_edit($name, $title, $desc); + + } + cot_message('updated_success'); + cot_redirect(cot_url('admin', array('m' => 'other', 'p' => 'configeditor', 'n' => 'editcat'), '', true)); +} +if($a == 'delete') +{ + cot_check_xg(); + $name = cot_import('rname', 'G', "ALP"); + cfg_editor::cat_delete($name); + cot_message('deleted_success'); + cot_redirect(cot_url('admin', array('m' => 'other', 'p' => 'configeditor', 'n' => 'editcat'), '', true)); +} +$system_cats = cfg_editor::cat_system_list(); +foreach ($system_cats as $cat) +{ + $t->assign(array( + 'FORM_EDIT_TITLE' => cot_inputbox('text', '_rtitle['.$cat.']', $L['core_'.$cat], array('maxlength' => '255', 'readonly'=>'readonly')), + 'FORM_EDIT_DESC' => cot_textarea('_rdesc['.$cat.']', $L['core_'.$cat.'_desc'], 1, 60, array('maxlength' => '255', 'readonly'=>'readonly')), + 'FORM_EDIT_NAME' => $cat, + 'FORM_EDIT_HREF' => cot_url('admin', array('m' => 'other', 'p' => 'configeditor', 'n' => 'edit', 'c' => $cat)), + 'FORM_EDIT_CONFIG_HREF' => cot_url('admin', array('m' => 'config', 'n'=> 'edit', 'o' => 'core', 'p' => $cat)), + 'FORM_EDIT_DELETE_URL' => '', + )); + $t->parse('MAIN.ROW'); +} +$rows = cfg_editor::cat_list(); +foreach ($rows as $row) +{ + $t->assign(array( + 'FORM_EDIT_TITLE' => cot_inputbox('text', 'rtitle['.$row['configcat_name'].']', $row['configcat_title'], array('maxlength' => '255')), + 'FORM_EDIT_DESC' => cot_textarea('rdesc['.$row['configcat_name'].']', $row['configcat_desc'], 1, 60), + 'FORM_EDIT_NAME' => $row['configcat_name'], + 'FORM_EDIT_HREF' => cot_url('admin', array('m' => 'other', 'p' => 'configeditor', 'n' => 'edit', 'c' => $row['configcat_name'])), + 'FORM_CONFIG_HREF' => cot_url('admin', array('m' => 'config', 'n'=> 'edit', 'o' => 'core', 'p' => $row['configcat_name'])), + 'FORM_EDIT_DELETE_URL' => cot_url('admin', array('m' => 'other', 'p' => 'configeditor', 'n' => 'editcat', 'a' => 'delete', 'rname' => $row['configcat_name'],'x' => $sys['xk'])), + )); + $t->parse('MAIN.ROW'); +} +if(!count($rows) && !count($system_cats)) +{ + $t->parse('MAIN.NOROW'); +} +$t->assign(array( + 'FORM_EDIT_URL' => cot_url('admin', array('m' => 'other', 'p' => 'configeditor', 'n' => 'editcat', 'a' => 'update')), + 'FORM_ADD_URL' => cot_url('admin', array('m' => 'other', 'p' => 'configeditor', 'n' => 'editcat', 'a' => 'add')), + 'FORM_ADD_TITLE' => cot_inputbox('text', 'rtitle', '', array('maxlength' => '255')), + 'FORM_ADD_NAME' => cot_inputbox('text', 'rname', '', array('size' => '20', 'maxlength' => '32')), + 'FORM_ADD_DESC' => cot_textarea('rdesc', '', 1, 60), +)); +cot_display_messages($t); \ No newline at end of file diff --git a/inc/configeditor.functions.php b/inc/configeditor.functions.php new file mode 100644 index 0000000..2fd1cd0 --- /dev/null +++ b/inc/configeditor.functions.php @@ -0,0 +1,196 @@ +registerTable('configeditor'); + +require_once cot_langfile('configeditor', 'plug'); +if(!class_exists('cfg_editor')) +{ + class cfg_editor + { + + public $cats; + + public static function cat_add($name, $title, $desc) + { + global $cache, $db, $db_configeditor; + if (empty($name) || in_array($name, self::cat_exists_list())) + { + return false; + } + if (empty($title)) + { + $title = $name; + } + $db->insert($db_configeditor, array('configcat_name' => $name, 'configcat_title' => $title, 'configcat_desc' => $desc)); + return $db->lastInsertId(); + } + + public static function cat_edit($name, $title, $desc) + { + global $cache, $db, $db_configeditor; + if (empty($title)) + { + $title = $name; + } + $db->update($db_configeditor, array('configcat_title' => $title, 'configcat_desc' => $desc), 'configcat_name="'.$db->prep($name).'"'); + return true; + } + + public static function cat_delete($name) + { + global $cache, $db, $db_configeditor; + $db->delete($db_configeditor, 'configcat_name="'.$db->prep($name).'"'); + return true; + } + + public static function cat_list() + { + global $cache, $db, $db_configeditor; + $rows = $db->query("SELECT * FROM $db_configeditor ORDER BY configcat_title")->fetchAll(); + return $rows; + } + public static function cat_system_list() + { + global $cache, $db, $db_config; + $cats = $db->query("SELECT DISTINCT config_cat FROM $db_config WHERE config_owner = 'core' AND (config_donor IS NULL OR config_donor='') ORDER BY config_cat")->fetchAll(PDO::FETCH_COLUMN, 0); + return $cats; + } + public static function cat_exists_list() + { + global $cache, $db, $db_config, $db_configeditor; + $cats = $db->query("SELECT DISTINCT config_cat FROM $db_config WHERE config_owner = 'core' AND (config_donor IS NULL OR config_donor='') ORDER BY config_cat")->fetchAll(PDO::FETCH_COLUMN, 0); + + global $cache, $db, $db_configeditor; + $rows = $db->query("SELECT configcat_name FROM $db_configeditor ORDER BY configcat_title")->fetchAll(PDO::FETCH_COLUMN, 0); + $rows; + + return array_merge($cats, $rows); + + } + + public static function cat_info($name) + { + global $cache, $db, $db_configeditor, $db_config, $L; + $row = $db->query("SELECT * FROM $db_configeditor WHERE configcat_name='".$db->prep($name)."' LIMIT 1")->fetch(); + if(empty($row)) + { + $cat = $db->query("SELECT config_cat FROM $db_config WHERE config_owner = 'core' + AND (config_donor IS NULL OR config_donor='') AND config_cat='".$db->prep($name)."' LIMIT 1")->fetchColumn(); + if(!empty($cat)) + { + $row = array( + 'configcat_id' => 0, + 'configcat_name' => $name, + 'configcat_title' => $L['core_'.$name], + 'configcat_desc' => $L['core_'.$name.'_desc'], + ); + } + } + + return $row; + } + + public static function config_add($cat, $name, $order, $title, $desc, $type, $default, $variants) + { + global $cache, $db, $db_config, $sys; + if (empty($name) || empty($cat) || self::config_exists($name)) + { + return false; + } + if (empty($title)) + { + $title = $name; + } + if (!empty($variants)) + { + $vars = array_map('trim', explode(',', $variants)); + if (!in_array($default, $vars)) + { + $default = $vars[0]; + } + } + $db->insert($db_config, array( + 'config_owner' => 'core', + 'config_cat' => $cat, + 'config_subcat' => '', + 'config_order' => $order, + 'config_name' => $name, + 'config_type' => $type, + 'config_value' => $default, + 'config_default' => $default, + 'config_variants' => $variants, + 'config_donor' => 'configeditor', + 'config_text' => $title, + 'config_desc' => $desc, + )); + return $db->lastInsertId(); + } + + public static function config_edit($cat, $name, $order, $title, $desc, $type, $default, $variants) + { + global $cache, $db, $db_config, $sys; + if (empty($title)) + { + $title = $name; + } + if (!empty($variants)) + { + $vars = array_map('trim', explode(',', $variants)); + if (!in_array($default, $vars)) + { + $default = $vars[0]; + } + } + $db->update($db_config, array( + 'config_order' => $order, + 'config_text' => $title, + 'config_desc' => $desc, + 'config_type' => $type, + 'config_default' => $default, + 'config_variants' => $variants, + ), 'config_name="'.$db->prep($name).'" AND config_donor="configeditor" AND config_owner="core" AND config_cat="'.$db->prep($cat).'"'); + return true; + } + + public static function config_delete($cat, $name) + { + global $cache, $db, $db_config; + $db->delete($db_config, 'config_name="'.$db->prep($name).'" AND config_donor="configeditor" AND config_owner="core" AND config_cat="'.$db->prep($cat).'"'); + return true; + } + + public static function config_exists($name) + { + global $cache, $db, $db_config; + $count = $db->query("SELECT COUNT(*) FROM $db_config + WHERE config_name='".$db->prep($name)."' AND config_owner = 'core' LIMIT 1")->fetchColumn(); + + return (int)$count > 0 ? true : false; + } + + public static function config_list($cat) + { + global $cache, $db, $db_config; + $rows = $db->query("SELECT * FROM $db_config WHERE config_owner='core' + AND config_cat='".$db->prep($cat)."' + ORDER BY config_order ASC")->fetchAll(); + return $rows; + } + + } +} \ No newline at end of file diff --git a/lang/configeditor.en.lang.php b/lang/configeditor.en.lang.php new file mode 100644 index 0000000..537040d --- /dev/null +++ b/lang/configeditor.en.lang.php @@ -0,0 +1,24 @@ + \ No newline at end of file diff --git a/lang/configeditor.ru.lang.php b/lang/configeditor.ru.lang.php new file mode 100644 index 0000000..e39c662 --- /dev/null +++ b/lang/configeditor.ru.lang.php @@ -0,0 +1,36 @@ + +{FILE "{PHP.cfg.themes_dir}/{PHP.cfg.defaulttheme}/warnings.tpl"} +
+

{PHP.L.edit_cats}

+
+
+ + + + + + + + + + + + + + + + + + + + + + +
{PHP.L.Code}{PHP.L.Title}/{PHP.L.Description}{PHP.L.Type}/{PHP.L.Order}{PHP.L.ccfg_variants}/{PHP.L.Default}{PHP.L.Delete}
{FORM_EDIT_NAME} + {FORM_EDIT_TITLE} + {FORM_EDIT_DESC} + + {FORM_EDIT_TYPE} + {FORM_EDIT_ORDER} + + {FORM_EDIT_VARIANTS} + {FORM_EDIT_DEFAULT} + + {PHP.L.Delete} +
{DESC}
+
+ {PHP.L.None} +
+ +
+
+
+
+

{PHP.L.add_cat}

+
+
+ + + + + + + + + + + + + + + + +
{PHP.L.Code}{PHP.L.Title}/{PHP.L.Description}{PHP.L.Type}/{PHP.L.Order}{PHP.L.ccfg_variants}/{PHP.L.Default}
{FORM_ADD_NAME} + {FORM_ADD_TITLE} + {FORM_ADD_DESC} + + {FORM_ADD_TYPE} + {FORM_ADD_ORDER} + + {FORM_ADD_VARIANTS} + {FORM_ADD_DEFAULT} +
+ +
+
+
+ \ No newline at end of file diff --git a/tpl/configeditor.admin.editcat.tpl b/tpl/configeditor.admin.editcat.tpl new file mode 100644 index 0000000..a3bd9c1 --- /dev/null +++ b/tpl/configeditor.admin.editcat.tpl @@ -0,0 +1,69 @@ + +{FILE "{PHP.cfg.themes_dir}/{PHP.cfg.defaulttheme}/warnings.tpl"} +
+

{PHP.L.edit_cats}

+
+
+ + + + + + + + + + + + + + + + + + + + + +
{PHP.L.Code}{PHP.L.Title}{PHP.L.Description}{PHP.L.Action}
{FORM_EDIT_NAME}{FORM_EDIT_TITLE}{FORM_EDIT_DESC} + + {PHP.L.Open} + {PHP.L.Options} + {PHP.L.Delete} +
{DESC}
+
+ {PHP.L.None} +
+ +
+
+
+ +
+

{PHP.L.add_cat}

+
+
+ + + + + + + + + + + + + + +
{PHP.L.Code}{PHP.L.Title}{PHP.L.Description}
{FORM_ADD_NAME}{FORM_ADD_TITLE}{FORM_ADD_DESC}
+ +
+
+
+ \ No newline at end of file