Example #1
0
     $uID = $_POST['uID'];
     $vCode = $_POST['vCode'];
     $char = new eveApiSkills($Db);
     if (!$char->fetch($id, $uID, $vCode)) {
         return $id . "<321>ERROR";
     }
     $char->loadSkills();
     $info['id'] = $id;
     $info['balance'] = number_format($char->balance, 2);
     $info['sptotal'] = number_format($char->SPTotal, 0);
     $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";
     }
Example #2
0
         $id = add_api_key($Db, $_SESSION['uid'], $_POST['apik'], $_POST['vcode'], $_POST['keyName'], $_POST['notes']);
         echo $id['id'];
         echo "<br><a href='index.php'> Auditor</a>   <a href='manage.php'> Manage Account </a>";
         insert_header("Jackknife - Save Key");
     } else {
         echo "<span class=\"infobar\">&lt;&nbsp;" . get_loginbar(true) . "&gt;</span><br>";
         echo get_form_divs();
         echo save_api_view();
         insert_header("Jackknife - Save Key");
     }
 } else {
     #remove a key
     if (isset($_GET['removeKey'])) {
         insert_header("Jackknife - Remove Key");
         if (isset($_GET['id'])) {
             $id = remove_api_key($Db, $_GET['id']);
             echo $id['id'];
         } else {
             echo "Key to remove not supplied";
         }
         echo "<br><a href='index.php'> Auditor</a>   <a href='manage.php'> Manage Account </a>";
     } else {
         # editing a key name
         if (isset($_GET['editName'])) {
             if (isset($_POST['name'])) {
                 $id = edit_api_key($Db, $_POST['id'], $_POST['name']);
                 redirect("/manage.php");
             } else {
                 $result = $Db->selectWhere("keyInformation", ['id' => $_GET['id'], 'userID' => $_SESSION['uid']], ['keyName']);
                 if ($result != false) {
                     if ($result->rows > 0) {
Example #3
0
    $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);
}
Example #4
0
     if (isset($_POST['save'])) {
         $id = explode("<321>", add_api_key($Db->link, $_SESSION['uid'], $_POST['apik'], $_POST['vcode'], $_POST['keyName'], $_POST['notes']));
         echo $id[1];
         echo "<br><a href='index.php'> Auditor</a>   <a href='manage.php'> Manage Account </a>";
         insert_header("Jackknife - Save Key");
     } else {
         echo "<span class=\"infobar\">&lt;&nbsp;" . get_loginbar(true) . "&gt;</span><br>";
         echo get_form_divs();
         echo save_api_view();
         insert_header("Jackknife - Save Key");
     }
 } else {
     #remove a key
     if (isset($_GET['removeKey'])) {
         if (isset($_GET['id'])) {
             $id = explode("<321>", remove_api_key($Db, $_GET['id']));
             echo $id[1];
         } else {
             echo "Key to remove not supplied";
         }
         echo "<br><a href='index.php'> Auditor</a>   <a href='manage.php'> Manage Account </a>";
         insert_header("Jackknife - Remove Key");
     } else {
         # editing a key name
         if (isset($_GET['editName'])) {
             if (isset($_POST['name'])) {
                 $id = edit_api_key($Db->link, $_POST['id'], $_POST['name']);
                 redirect("/manage.php");
             } else {
                 $sql = "SELECT keyName FROM " . DB_PREFIX . "keyInformation WHERE id = '" . mysql_real_escape_string($_GET['id']) . "' AND userID ='" . mysql_real_escape_string($_SESSION['uid']) . "' LIMIT 1";
                 $result = mysql_query($sql);