Beispiel #1
0
 public static function build($action, $settings)
 {
     global $config;
     if ($action == 'all') {
         file_write($config['dir']['home'] . $settings['file'], rules::install($settings));
     }
 }
Beispiel #2
0
 /**
  * Get html to display on the page.
  *
  * @param rules|subs $renderable renderable widget
  *
  * @return string to display on the mangesubs page.
  */
 protected function render_table($renderable)
 {
     $o = '';
     ob_start();
     $renderable->out($renderable->pagesize, true);
     $o = ob_get_contents();
     ob_end_clean();
     return $o;
 }
 /**
  * 
  * @param string $type
  */
 public function __construct($type = 'app')
 {
     if ($type == 'app') {
         die('unknown $type 1111111111111');
         $this->setConfig(config::getAppConfig());
     } elseif ($type == 'exp') {
         die('unknown $type 2222222222222');
         $this->setConfig(getExceptionConfig());
     } elseif ($type == 'rules') {
         $this->setConfig(rules::getExceptionRules());
     }
 }
Beispiel #4
0
require_once "../../includes/initialize.php";
if (!$session->is_logged_in()) {
    redirect_to("login.php");
}
if (!isset($_GET['id'])) {
    redirect_to("login.php");
}
$hotel = Hotel::find_by_id($_GET['id']);
if (!$hotel) {
    redirect_to("login.php");
}
if ($session->user_id != $hotel->id) {
    redirect_to("login.php");
}
$rule = rules::find_hotel_rules($hotel->id);
if (!$rule) {
    redirect_to("login.php");
}
$rooms = $hotel->rooms();
$photos = Photograph::find_by_hotel_id($hotel->id);
?>
<!DOCTYPE html>
<html>
<head>
	<title>
		Hotel
	</title>
	<link rel="stylesheet" type="text/css" href="../css/reset.css">
	<link rel="stylesheet" type="text/css" href="../css/hotel.css">
	<link rel="stylesheet" type="text/css" href="../css/demo.css">