Modified to use the sandbox database
git-svn-id: file:///svn-source/pmgr/branches/sandbox_0.1@746 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
@echo off
|
||||
mysql --user=pmgr --password=pmgruser < %~dp0\db\property_manager.sql
|
||||
echo Done!
|
||||
sed "s/property_manager/pmgr_sand/g" %~dp0\db\property_manager.sql > H:\pmgr_sand.sql
|
||||
mysql --user=pmgr --password=pmgruser < H:\pmgr_sand.sql
|
||||
del H:\pmgr_sand.sql
|
||||
echo Rebuild Complete!
|
||||
|
||||
|
||||
@@ -179,6 +179,9 @@ class AppController extends Controller {
|
||||
$this->addSideMenuLink('Deposits',
|
||||
array('controller' => 'transactions', 'action' => 'deposit'), null,
|
||||
'SITE');
|
||||
$this->addSideMenuLink('RESET DATA',
|
||||
array('controller' => 'accounts', 'action' => 'reset_data'), null,
|
||||
'SITE');
|
||||
|
||||
/* $this->addSideMenuLink('Move-In', */
|
||||
/* array('controller' => 'customers', 'action' => 'move_in'), null, */
|
||||
@@ -235,7 +238,6 @@ class AppController extends Controller {
|
||||
$this->addSideMenuLink('New Ledgers',
|
||||
array('controller' => 'accounts', 'action' => 'newledger'), null,
|
||||
'SITE', $this->dev_area);
|
||||
//array('name' => 'RESET DATA', array('controller' => 'accounts', 'action' => 'reset_data'));
|
||||
}
|
||||
|
||||
|
||||
@@ -348,20 +350,19 @@ class AppController extends Controller {
|
||||
$this->autoLayout = false;
|
||||
$this->autoRender = false;
|
||||
Configure::write('debug', '0');
|
||||
$script = $_SERVER['DOCUMENT_ROOT'] . '/pmgr/build.cmd';
|
||||
$script = preg_replace("%/webroot/index\.php$%",
|
||||
"/../build.cmd",
|
||||
$_SERVER['SCRIPT_FILENAME']);
|
||||
echo "<P>" . date('r') . "\n";
|
||||
//echo "<P>Script: $script" . "\n";
|
||||
$db = & $this->Account->getDataSource();
|
||||
$script .= ' "' . $db->config['database'] . '"';
|
||||
$script .= ' "' . $db->config['login'] . '"';
|
||||
$script .= ' "' . $db->config['password'] . '"';
|
||||
$handle = popen($script . ' 2>&1', 'r');
|
||||
//echo "<P>Handle: $handle; " . gettype($handle) . "\n";
|
||||
echo "<P><PRE>\n";
|
||||
echo "<P>\n";
|
||||
while (($read = fread($handle, 2096))) {
|
||||
echo $read;
|
||||
echo str_replace("\n", "<BR>\n", htmlspecialchars($read));
|
||||
}
|
||||
echo "</PRE>\n";
|
||||
pclose($handle);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ class DATABASE_CONFIG {
|
||||
'host' => 'localhost',
|
||||
'login' => 'pmgr',
|
||||
'password' => 'pmgruser',
|
||||
'database' => 'property_manager',
|
||||
'database' => 'pmgr_sand',
|
||||
'prefix' => 'pmgr_',
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user