コード例 #1
0
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
                <!-- Latest compiled and minified CSS -->
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
        <!-- Optional theme -->
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
    </head>
    <body>

        <?php 
require_once '../functions/dbconnect.php';
require_once '../functions/util.php';
$addresses = getAllAddresses();
if (getAllAddresses()) {
    echo '<h1>' . 'Address List' . '</h1>';
    echo '<table class="table">';
    echo '<tr>';
    echo '<th>' . 'Fullname' . '</th>';
    echo '<th>' . 'Email' . '</th>';
    echo '<th>' . 'Address Line 1' . '</th>';
    echo '<th>' . 'City' . '</th>';
    echo '<th>' . 'State' . '</th>';
    echo '<th>' . 'Zip' . '</th>';
    echo '<th>' . 'Birthday' . '</th>';
    echo '</tr>';
    foreach ($addresses as $value) {
        echo '<tr>';
        echo '<td>' . $value["fullname"] . '</td>';
        echo '<td>' . $value["email"] . '</td>';
コード例 #2
0
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
    <?php 
include '../functions/dbconnect.php';
include '../functions/utils.php';
//    html form
include '../includes/createcontactform.html.php';
$addressees = getAllAddresses();
if (isPostRequest()) {
    $fullname = filter_input(INPUT_POST, 'fullname');
    $email = filter_input(INPUT_POST, 'email');
    $address = filter_input(INPUT_POST, 'address');
    $phone = filter_input(INPUT_POST, 'phone');
    $website = filter_input(INPUT_POST, 'website');
    $birthday = filter_input(INPUT_POST, 'birthday');
    $image = filter_input(INPUT_POST, 'image');
    if (createNewAdd($fullname, $email, $address, $phone, $website, $birthday, $image)) {
        $results = 'New Contact Added';
    }
}
?>
    </body>
</html>
コード例 #3
0
    signUp();
}
if ($function == "log_in") {
    LogIn();
}
if ($function == "get_personal_info") {
    getPersonalInfo();
}
if ($function == "update_personal_info") {
    updatePersonalInfo();
}
if ($function == "change_password") {
    changePassword();
}
if ($function == "get_all_addresses") {
    getAllAddresses();
}
if ($function == "get_address") {
    getAddress();
}
if ($function == "update_address") {
    updateAddress();
}
if ($function == "add_address") {
    addAddress();
}
if ($function == "get_all_cards") {
    getAllCards();
}
if ($function == "get_card") {
    getCard();