|
|
|
|
@@ -222,6 +222,9 @@ class AppController extends Controller {
|
|
|
|
|
$this->addSideMenuLink('Assess Charges',
|
|
|
|
|
array('controller' => 'leases', 'action' => 'assess_all'), null,
|
|
|
|
|
'SITE', $this->admin_area);
|
|
|
|
|
$this->addSideMenuLink('RESET DATA',
|
|
|
|
|
array('controller' => 'accounts', 'action' => 'reset_data'), null,
|
|
|
|
|
'SITE', $this->admin_area);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$this->addSideMenuLink('Un-Nuke',
|
|
|
|
|
@@ -231,7 +234,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'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$this->addSideMenuLink('New Receipt',
|
|
|
|
|
@@ -293,13 +295,13 @@ class AppController extends Controller {
|
|
|
|
|
$this->sideMenuEnable($area_name, $this->dev_area, false);
|
|
|
|
|
if (empty($this->params['admin']))
|
|
|
|
|
$this->sideMenuEnable($area_name, $this->admin_area, false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$this->authorize("controller.{$this->params['controller']}");
|
|
|
|
|
$this->authorize("controller.{$this->params['controller']}");
|
|
|
|
|
$this->authorize("action.{$this->params['controller']}.{$this->params['action']}");
|
|
|
|
|
$this->authorize("action.{$this->params['controller']}.{$this->params['action']}");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
@@ -410,20 +412,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);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|