Пример #1
0
<?php

include 'common.php';
//echo $res;
require_once __SITE_PATH . '/model/dbaccess.class.php';
$sqlselect = 'cat_id,cat_url,cat_title title';
if ($lang == 'vn') {
    $sqlselect = 'cat_id,cat_url,cat_title_vn title';
}
$db = new dbaccess(DB_NAME, DB_HOST, DB_USER, DB_PASSWORD);
$db->connect();
$db->select('tbl_category', $sqlselect, 'cat_parent = 0 and status = 0', 'cat_seq');
$res = $db->getResult();
?>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link rel="shortcut icon" href="<?php 
echo __SITE_URL;
?>
/images/icon.ico" />
        <link rel="stylesheet" href="<?php 
echo __SITE_URL;
?>
/themes/css/nav.css">
        <link rel="stylesheet" href="<?php 
echo __SITE_URL;
?>
/themes/css/main.css">
        <script src="<?php 
Пример #2
0
    $lastname = $_POST['lastname'];
}
if (isset($_POST['email'])) {
    $email = $_POST['email'];
}
if (isset($_POST['streetaddr'])) {
    $streetaddr = $_POST['streetaddr'];
}
if (isset($_POST['streetname'])) {
    $streetval = $_POST['streetname'];
}
// set the flag which determines if we display the registration info
$display = true;
$streetArray = array();
// call the function to populate the array of street names
$conn = new dbaccess($debug);
$conn->getStreetNames($streetArray);
if (isset($_POST['submit'])) {
    unset($_POST['submit']);
    if (validate_reg($err_msg)) {
        if ($conn->dbAddUser($firstname, $lastname, $streetnum, $streetval, $email, $tempPW)) {
            if (sendRegEmail($email, $tempPW)) {
                echo "<div class='bgWhite'><p class='userMsg'>User '{$email}' is successfully registered.<br />";
                echo "Check your inbox for an email containing your temporary password ";
                echo "and further instructions on how to complete the registration process.</p></div>";
                $display = false;
            } else {
                echo "<div class='bgWhite'><p class='userMsg'>User " . $email . " was successfully registered.<br />";
                echo "BUT we were unable to send your temporary password via the email address you ";
                echo "provided. Please contact the Vista Verde Community Webmaster to complete ";
                echo "the registration process</p><div class='bgWhite'>";
Пример #3
0
} else {
    $streetNum = '';
}
if (isset($_POST['streetName'])) {
    $streetName = $_POST['streetName'];
} else {
    $streetName = "0";
}
if (isset($_POST['phoneNum'])) {
    $phoneNum = $_POST['phoneNum'];
} else {
    $phoneNum = "";
}
// set the flag which determines if we display the registration info
$display = true;
$dbConn = new dbaccess($debug);
$hoodArray = array();
$orgArray = array();
$streetArray = array();
// call the function to populate the neighborhood array
$dbConn->getHoodNames($hoodArray, 'NBHD');
$dbConn->getGroupNames($orgArray, 'GRUP');
$dbConn->getStreetNames($streetArray);
if ($debug === true) {
    $i = 0;
    foreach ($streetArray as $org) {
        echo "{$i} = {$org}" . "<br>";
        $i++;
    }
    echo "Neighborhoods: <br />";
    print_r($hoodArray);
Пример #4
0
    $firstname = $_POST['firstname'];
}
if (isset($_POST['lastname'])) {
    $lastname = $_POST['lastname'];
}
if (isset($_POST['email'])) {
    $email = $_POST['email'];
}
if (isset($_POST['streetaddr'])) {
    $streetaddr = $_POST['streetaddr'];
}
// set the flag which determines if we display the registration info
$display = true;
$streetArray = array();
// call the function to populate the array of street names
$conn = new dbaccess($debug);
$conn->getStreetNames($streetArray);
if (isset($_POST['submit'])) {
    unset($_POST['submit']);
    if (validate_reg($err_msg)) {
        if ($conn->dbAddUser($tempPW)) {
            if (sendRegEmail($email, $tempPW)) {
                echo "<div class='bgWhite'><div class='userMsg'><div class='bigBold'>User Registration</div>";
                echo "User '{$email}' is successfully registered.<br />";
                echo "Check your inbox for an email containing your temporary password ";
                echo "and further instructions on how to complete the registration process.</div></div>";
            } else {
                echo "<div class='bgWhite'><div class='userMsg'><div class='bigBold'>User Registration</div>";
                echo "User '{$email}' was successfully registered <br />";
                echo "BUT we were unable to send your temporary password via the email address you ";
                echo "provided. Please contact the Vista Verde Community Webmaster to complete ";
Пример #5
0
        $query .= "KEY eventdate (eventdate), KEY eventtime (eventtime)) TYPE=MyISAM";
        $this->query($query);
    }
    function CheckSetup()
    {
        $query = "SELECT rights FROM calusers WHERE userid='admin'";
        $this->query($query);
        if ($this->affected_rows() > 0) {
            $this->next_record();
            return $this->f('rights');
        }
        return 0;
    }
}
// Create the database object.
$db = new dbaccess();
echo '<HTML>
<HEAD>
   <TITLE>' . $site_title . ' Database Setup</TITLE>
   <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
</HEAD>
<BODY TOPMARGIN=0 LEFTMARGIN=0 MARGINHEIGHT=0 MARGINWIDTH=0>
<CENTER>';
$db->SetupDB();
$nr = $db->CheckSetup();
if (isset($nr) && $nr >= 1) {
    echo 'The Calendar Database Has Been Created<br><br>
	Administrative Userid created for Calender(no password)<br>
	Userid: admin<br>
	Password: <br><br>
	The userid is case sensitive.<br>