コード例 #1
0
<?php

// TODO: umcomment
include "access.php";
require_once "../includes/SystemConfiguration.class.php";
global $systemConfiguration;
$hotelDetails = $systemConfiguration->getHotelDetails();
$errors = array();
$message = "";
if (sizeof($_POST) > 0 && isset($_POST['conf_hotel_name'])) {
    $details = HotelDetails::fetchFromParameters($_POST);
    if ($details->save()) {
        $message = "Values were succesfully updated.";
    } else {
        $errors = $details->errors;
    }
    $hotelDetails = $details;
}
include "header.php";
?>
	</td>
  </tr> 
  
  <tr>
    <td valign="top" >
    <?php 
if (sizeof($errors) > 0) {
    echo '			<table width="100%">' . "\n";
    foreach ($errors as $error) {
        echo '				<tr><td class="TitleBlue11pt" style="color: red; font-weight: bold;">' . htmlentities($error) . '</td></tr>' . "\n";
    }
コード例 #2
0
 public function getHotelDetails()
 {
     $hotelDetails = HotelDetails::fetchFromParameters($this->config);
     return $hotelDetails;
 }