示例#1
0
 function __construct()
 {
     try {
         $DBCon = new DBCon();
         $this->SetDB = new PDO($DBCon->getDsn(), $DBCon->getUsr(), $DBCon->getPass());
     } catch (PDOException $e) {
         $this->Error = $e->getMessage();
     }
     $this->Sql = "Select Id, Path, PhotoName, Size, PostTime From List Where AlbumName = ?";
     $this->Result = null;
 }
示例#2
0
 function __construct()
 {
     try {
         $DBCon = new DBCon();
         $this->SetDB = new PDO($DBCon->getDsn(), $DBCon->getUsr(), $DBCon->getPass());
     } catch (PDOException $e) {
         $this->Error = $e->getMessage();
     }
     $this->Sql = 'Select AlbumName From List Group By AlbumName';
     $this->Result = null;
 }
示例#3
0
 function __construct()
 {
     $this->PhotoNum = $_GET['Id'];
     // 削除対象のIDを取得
     $this->PhotoPath = $_GET['Path'];
     // 削除対象のPathを取得
     try {
         $DBCon = new DBCon();
         $this->SetDB = new PDO($DBCon->getDsn(), $DBCon->getUsr(), $DBCon->getPass());
     } catch (PDOException $e) {
         $this->Error = $e->getMessage();
     }
     $this->DeleteSql = 'Delete From List Where Id = ?';
     $this->SelectSql = 'Select Path From List Where Path = ?';
     $this->Result = null;
 }
示例#4
0
<?php

include "DBCon.php";
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Content-Type:application/json");
$db = new DBCon();
$authToken = md5("get_messages");
$response = $db->select(array('*'))->get("estate");
if (empty($response)) {
    $response = array('status' => 0);
}
echo json_encode(array('properties' => $response));
示例#5
0
/**
 * @param $countryID
 * @return string
 * INFO : Tested, works fine |
 */
function getCountryDisplayValue($countryID)
{
    $db = new DBCon();
    $countryDisplayValue = "";
    $query = "SELECT display_text FROM " . TABLE_COUNTRIES_INFO . " WHERE id = '{$countryID}'";
    $result = $db->executeQuery($query);
    $resultAsArray = mysql_fetch_assoc($result);
    if ($resultAsArray) {
        $countryDisplayValue = $resultAsArray['display_text'];
    }
    return $countryDisplayValue;
}
示例#6
0
 function __construct()
 {
     $DBCon = new DBCon();
     $this->SetDB = new PDO($DBCon->getDsn(), $DBCon->getUsr(), $DBCon->getPass());
     $this->Sql = "Select Id From List Where PostTime = ?";
     $this->Result = null;
 }
示例#7
0
<?php

include_once "include/app/config.php";
include_once "include/data/DBCon.php";
$db = new DBCon();
$db->Link();
$db->setQueryStmt("SELECT * FROM User");
if (!$db->Query()) {
    echo $db->GetLastErrorMsg();
    exit;
}
echo "<pre>";
print_r($db->GetAll());
echo "</pre>";
exit;
示例#8
0
include_once ABSPATH . "Application/includes/initialize.php";
$campus = new campusArray();
$campus->load();
$data["campus"] = $campus->getArrayKeyValue();
$data["building"] = array();
$data["room"] = array();
if (isset($_SESSION["APP"]["campus"])) {
    $building = new buildingArray();
    $data["building"] = $building->loadByCampus($_SESSION["APP"]["campus"]);
    if (isset($_SESSION["APP"]["building"])) {
        $room = new roomArray();
        $data["room"] = $room->loadByBuilding($_SESSION["APP"]["building"]);
    }
}
if (isset($_REQUEST["RoomID"])) {
    $db = new DBCon();
    $db->Link();
    $strSQL = "DELETE FROM ffpac.roomattribute WHERE RoomID = {$_REQUEST["RoomID"]}";
    $db->SetQueryStmt($strSQL);
    if ($db->Query()) {
        foreach ($_REQUEST as $key => $value) {
            if (strstr($key, "att_")) {
                $key = substr($key, 4);
                $strSQL = "INSERT INTO ffpac.roomattribute (RoomID, AttributeID) VALUES ('" . $_REQUEST["RoomID"] . "', '{$key}')";
                $db->SetQueryStmt($strSQL);
                if (!$db->Query()) {
                    echo "failed {$value}";
                }
            }
        }
    }
示例#9
0
<?php

$attributes = new attributeArray();
$attributes->load();
/* figure out a cleaner way to do this */
if (isset($_SESSION["APP"]["room"])) {
    $db = new DBCon();
    $db->Link();
    $strSQL = "SELECT * FROM ffpac.roomattribute WHERE RoomID = {$_SESSION["APP"]["room"]}";
    $db->SetQueryStmt($strSQL);
    if ($db->Query()) {
        foreach ($db->GetAll() as $row) {
            $selectedAttributes[] = $row["AttributeID"];
        }
    }
}
?>
<form method="post" name="attributes">
	<input type="hidden" name="RoomID" value="<?php 
echo $_SESSION["APP"]["room"];
?>
" />
	<?php 
foreach ($attributes->getArray() as $attribute) {
    ?>
		<div class="checkbox"><label for="att_<?php 
    echo $attribute->getID();
    ?>
">
				<input <?php 
    if (isset($selectedAttributes)) {