Realschule

This commit is contained in:
2018-04-03 17:22:43 +02:00
parent ad9bd84844
commit 1e9a4e65c5
5 changed files with 35 additions and 3 deletions

View File

@@ -43,6 +43,12 @@ class AppController extends Controller
$this->loadComponent('RequestHandler');
$this->loadComponent('Flash');
$session = $this->request->session();
if(!($session->check('SchoolType'))) {
$session->write('SchoolType','02');
}
/*
* Enable the following components for recommended CakePHP security settings.

View File

@@ -13,7 +13,20 @@ use AsdCurl\AsdUp;
*/
class BudgetController extends AppController
{
public function changeSchool()
{
$session = $this->request->session();
if ($session->read('SchoolType') == '02') {
$session->write('SchoolType','04');
}
else {
$session->write('SchoolType','02');
}
$this->redirect($this->referer());
}
public function listBudgets() {
$wlBudgets = $this->Budget->wlBudgets->find('all', [
'conditions' => array('schulart' => 'GY')
]);