$UI_CONFIG = new ui_config_class('import', $ClassID, $ClassGroup); AddClassForm(); break; case 2: # добавим шаблон if (!$nc_core->token->verify()) { BeginHtml($Title2, $Title2, "http://" . $DOC_DOMAIN . "/management/class/"); nc_print_status(NETCAT_TOKEN_INVALID, 'error'); EndHtml(); exit; } BeginHtml($Title2, $Title2, "http://" . $DOC_DOMAIN . "/management/class/"); $UI_CONFIG = new ui_config_class('import', $ClassID, $ClassGroup); if (!$FilePatch['tmp_name']) { nc_print_status(CONTROL_CLASS_IMPORT_ERROR_NOTUPLOADED, 'error'); break; #InstallationAborted(CONTROL_CLASS_IMPORT_ERROR_NOTUPLOADED); } $res = ParseClassFile($FilePatch['tmp_name']); if ($res) { $AJAX_SAVER = true; BeginHtml($Title2, $Title2, "http://" . $DOC_DOMAIN . "/management/class/"); $UI_CONFIG = new ui_config_class('edit', $res, ''); nc_print_status(CONTROL_CONTENT_CLASS_SUCCESS_ADD, 'ok'); ClassForm($res, "index.php", 5, 2, 0); } else { nc_print_status(CONTROL_CLASS_IMPORT_ERROR_CANNOTBEINSTALLED, 'error'); } break; } EndHtml();
function ParseClassFileFs($file) { return ParseClassFile($file); }