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(); if ($statusStr == true) { $cid = 0; } } elseif ($formSubmit == 'Delete State') { $statusStr = $keyManager->deleteCharState($_POST['cs']);