<?php include_once '../../config/symbini.php'; include_once $serverRoot . '/classes/KeyCharAdmin.php'; header("Content-Type: text/html; charset=" . $charset); if (!$SYMB_UID) { header('Location: ../../profile/index.php?refurl=../ident/admin/index.php?' . $_SERVER['QUERY_STRING']); } $langId = array_key_exists('langid', $_REQUEST) ? $_REQUEST['langid'] : ''; $charManager = new KeyCharAdmin(); $charManager->setLangId($langId); $charArr = $charManager->getCharacterArr(); $headingArr = array(); if (isset($charArr['head'])) { $headingArr = $charArr['head']; unset($charArr['head']); } $isEditor = false; if ($isAdmin || array_key_exists("KeyAdmin", $userRights)) { $isEditor = true; } ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset; ?> "> <title>Character Admin</title> <link href="../../css/base.css?<?php echo $CSS_VERSION;
<?php include_once '../../config/symbini.php'; include_once $SERVER_ROOT . '/classes/KeyCharAdmin.php'; header("Content-Type: text/html; charset=" . $CHARSET); if (!$SYMB_UID) { header('Location: ../../profile/index.php?refurl=../ident/admin/index.php'); } $formSubmit = array_key_exists('formsubmit', $_POST) ? $_POST['formsubmit'] : ''; $cid = array_key_exists('cid', $_REQUEST) ? $_REQUEST['cid'] : 0; $tabIndex = array_key_exists('tabindex', $_REQUEST) ? $_REQUEST['tabindex'] : 0; $langId = array_key_exists('langid', $_REQUEST) ? $_REQUEST['langid'] : ''; $keyManager = new KeyCharAdmin(); $keyManager->setLangId($langId); //$keyManager->setCollId($collId); $keyManager->setCid($cid); $statusStr = ''; if ($formSubmit) { if ($formSubmit == 'Create') { $statusStr = $keyManager->createCharacter($_POST, $paramsArr['un']); $cid = $keyManager->getCid(); } elseif ($formSubmit == 'Save Char') { $statusStr = $keyManager->editCharacter($_POST); } elseif ($formSubmit == 'Add State') { $keyManager->createCharState($_POST['charstatename'], $_POST['illustrationurl'], $_POST['description'], $_POST['notes'], $_POST['sortsequence'], $paramsArr['un']); $tabIndex = 1; } elseif ($formSubmit == 'Save State') { $statusStr = $keyManager->editCharState($_POST); $tabIndex = 1; } elseif ($formSubmit == 'Delete Char') { $statusStr = $keyManager->deleteChar();