예제 #1
0
function get_form_divs()
{
    global $Db;
    $infobar = "";
    if (!LOGGED_IN) {
        $infobar .= makeDiv("register", show_registration($Db));
        $infobar .= makediv("login", get_login_form());
        $infobar .= makediv("reset", resetPasswordForm());
    } else {
        if (!(isset($_GET['key']) && !isset($_GET['chid'])) && defined("API_KEY")) {
            $infobar .= makediv("api", add_key_form());
        }
    }
    return $infobar;
}
예제 #2
0
                            if ($email && $pass) {
                                $pass .= " and ";
                            }
                            if ($pass || $email) {
                                mail($_SESSION['email'], $pass . $email, wordwrap("Your " . $pass . $email . " has been changed for Eve Jackknife", 70));
                            }
                            redirect("/manage.php");
                        } else {
                            # account page
                            $result = $Db->selectWhere("accounts", ['id' => $_GET['id']]);
                            if ($result != false) {
                                if ($result->rows > 0) {
                                    $row = $result->results[0];
                                }
                            }
                        }
                        echo "<br><a href='index.php'> Auditor</a>   <a href='manage.php'> Manage Account </a>";
                        insert_header("Jackknife - Edit Notes");
                    } else {
                        echo "<span class=\"infobar\">&lt;&nbsp;" . get_loginbar() . "<a onclick=\"if(!show_div('account')) return false;\" href='manage.php?editAccount=1'> Account Settings</a> &gt;</span><br>";
                        echo get_form_divs();
                        echo makeDiv("account", get_account_change($_SESSION['email']));
                        echo management_view($Db);
                        insert_header("Jackknife - Manage Account");
                        $_SESSION['redirect'] = "manage.php";
                    }
                }
            }
        }
    }
}