$keyID = $_POST['keyID']; $vCode = $_POST['vCode']; $name = $_POST['name']; $notes = $_POST['notes']; echo add_api_key($Db->link, $_SESSION['uid'], $keyID, $vCode, $name, $notes); } if (isset($_POST['Edit'])) { session_start(); $id = $_POST['keyID']; if (isset($_POST['name'])) { $name = $_POST['name']; echo edit_api_key($Db->link, $id, $name, ""); } if (isset($_POST['notes'])) { $notes = $_POST['notes']; echo edit_api_key($Db->link, $id, "", $notes); } } elseif (isset($_POST['Remove'])) { session_start(); $id = $_POST['keyID']; echo remove_api_key($Db, $id); } elseif (isset($_POST['Character'])) { $id = $_POST['cID']; $uID = $_POST['uID']; $vCode = $_POST['vCode']; $char = new eveApiSkills($Db); if (!$char->fetch($id, $uID, $vCode)) { return $id . "<321>ERROR"; } $char->loadSkills(); echo $id . "<321>" . number_format($char->balance, 2) . "<321>" . number_format($char->SPTotal, 0) . "<321>" . date("Y-m-d", $char->charDOB);
$info['dob'] = date("Y-m-d", $char->charDOB); break; case "removeKey": session_start(); $id = $_POST['keyID']; $result = remove_api_key($Db, $id); if ($result !== false) { $info['id'] = $id; } else { $info['result'] = "failure"; } break; case "editKey": session_start(); $id = $_POST['keyID']; $result = edit_api_key($Db, $id, $_POST['name'], $_POST['notes']); if ($result !== false) { $info['id'] = $id; } else { $info['result'] = "failure"; } break; case "save": session_start(); $keyID = $_POST['keyID']; $vCode = $_POST['vCode']; $name = $_POST['name']; $notes = $_POST['notes']; $info = add_api_key($Db, $_SESSION['uid'], $keyID, $vCode, $name, $notes); break; case "changeMailFormat":
\t\t\t<input type="submit" value="Edit name"> \t\t\t</form> EOD; } else { echo "This key does not exist, please try again"; } } } echo "<br><a href='index.php'> Auditor</a> <a href='manage.php'> Manage Account </a>"; insert_header("Jackknife - Edit Notes"); } else { #Editing notes of a key if (isset($_GET['editNotes'])) { # if notes have been changed if (isset($_POST['Notes'])) { $id = edit_api_key($Db, $_POST['id'], $name = "", $_POST['Notes']); redirect("/manage.php"); } else { # first page $result = $Db->selectWhere("keyInformation", ['id' => $_GET['id'], 'userID' => $_SESSION['uid']], ['notes']); if ($result != false) { if ($result->rows > 0) { $row = $result->results[0]; echo <<<EOD \t\t\t<form id='notes' action="manage.php?editNotes" method="POST"> \t\t\t<input type="hidden" name="id" value="{$_GET['id']}"> \t\t\t<textarea name="Notes" Cols="50" Rows="15" id="noteText" style="resize:none;background-color:#222222; color:#EEEEEE;" onKeyDown="limitText(this,3000)">{$row['notes']}</textarea><br> \t\t\t<input type="submit" value="Save Notes"> \t\t\t</form> EOD; } else {