Added changes to allow for being hosted on a secure server, as well as a sandboxed version.

git-svn-id: file:///svn-source/pmgr/branches/pre_0.1_work_20090819@786 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-08-26 18:55:41 +00:00
parent fbd716634a
commit 80fe5ca4de
2 changed files with 19 additions and 2 deletions

View File

@@ -10,5 +10,10 @@ class DATABASE_CONFIG {
'database' => 'property_manager',
'prefix' => 'pmgr_',
);
function __construct() {
if (preg_match("%^/[^/]*sand/%", $_SERVER['REQUEST_URI']))
$this->default['database'] = 'pmgr_sand';
}
}
?>

View File

@@ -24,6 +24,13 @@
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<?php
/* print("<!--\n"); */
/* print("SERVER = "); print_r($_SERVER); print("\n"); */
/* print("REQUEST = "); print_r($_REQUEST); print("\n"); */
/* print("COOKIE = "); print_r($_COOKIE); print("\n"); */
/* print("-->\n"); */
?>
<head>
<?php echo $html->charset(); ?>
<title>
@@ -41,13 +48,18 @@
// mechanism _additional_ to what Cake has provided :-/
$this->__scripts = array();
if (!empty($_SERVER['HTTPS']))
$protocol = 'https://';
else
$protocol = 'http://';
echo $html->meta('icon') . "\n";
echo $html->css('cake.generic') . "\n";
echo $html->css('layout') . "\n";
echo $html->css('print', null, array('media' => 'print')) . "\n";
echo $html->css('sidemenu') . "\n";
echo $javascript->link('http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js') . "\n";
echo $javascript->link('http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js') . "\n";
echo $javascript->link($protocol . 'ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js') . "\n";
echo $javascript->link($protocol . 'ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js') . "\n";
//echo $html->css('themes/base/ui.all') . "\n";
//echo $html->css('themes/smoothness/ui.all') . "\n";
//echo $html->css('themes/dotluv/ui.all') . "\n";