Ejemplo n.º 1
0
<body id="mainBody" class="shadowBody">
<?php 
displayBanner();
$conn = new dbAccess($debug);
$residenceInfo = array();
$saveInfo = !empty($_GET['s']) ? true : false;
if ($saveInfo) {
    if (($rc = $conn->saveResidenceInfo()) !== GOOD_RC) {
        echo "Error occurred saving residence information<br />";
    } else {
        $userId = $_POST['resId'];
    }
} else {
    $userId = !empty($_GET['i']) ? $_GET['i'] : "0";
}
if (($rc = $conn->getResidenceInfo($userId, &$residenceInfo)) !== GOOD_RC) {
    echo "Error occurred retrieving residence information<br />";
} else {
    if ($debug) {
        echo "Retrieved residence information<br />";
        var_dump($residenceInfo);
    }
    /*
        $userName = $residenceInfo['firstName'];
        if (!empty($residentInfo['middleInit']) )
            $userName = $userName . " " . $residentInfo['middleInit'];
        $userName = $userName . " " . $residentInfo['lastName'];
        $email = $residentInfo['email'];
        $birthDate = $residentInfo['birthDate'];
        $phone1 = $residentInfo['phone1'];
        $phone2 = $residentInfo['phone2'];
Ejemplo n.º 2
0
</head>
<body id="mainBody" class="shadowBody">
<?php 
displayBanner();
?>
<form id="userInfo" method="post" action="/dataAccess/updateUser.php">
<?php 
$conn = new dbAccess($debug);
// get the information from database to populate the form
$orgCode = "";
$userId = !empty($_GET['i']) ? $_GET['i'] : $_SESSION['user_id'];
if (!filter_var($userId, FILTER_VALIDATE_INT, array("options" => array("min_range" => 0, "max_range" => 20000)))) {
    $userId = $_SESSION['user_id'];
}
//if (($rc = $conn->getResidenceInfo($_SESSION['user_id'], &$orgCode)) !== GOOD_RC) {
if (($rc = $conn->getResidenceInfo($userId, &$orgCode)) !== GOOD_RC) {
    echo "Error occurred retrieving User Info<br />";
}
if (($rc = $conn->getLeaderInfo($_SESSION['user_id'], $orgCode)) !== GOOD_RC) {
    echo "Error occurred retrieving Leader Info<br />";
}
?>
<input class="press" title="Print this Page" type="button" value="Print" onclick="window.print();"></input>
</form>
<?php 
displayFooter();
?>
 
</body>
</html>