diff --git a/src/Controller/AppController.php b/src/Controller/AppController.php index f1fcf5a..3ce0a2e 100644 --- a/src/Controller/AppController.php +++ b/src/Controller/AppController.php @@ -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. diff --git a/src/Controller/BudgetController.php b/src/Controller/BudgetController.php index e342886..0a9425d 100644 --- a/src/Controller/BudgetController.php +++ b/src/Controller/BudgetController.php @@ -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') ]); diff --git a/src/Template/Layout/default.ctp b/src/Template/Layout/default.ctp index 34f5cc8..3bfca22 100644 --- a/src/Template/Layout/default.ctp +++ b/src/Template/Layout/default.ctp @@ -28,6 +28,7 @@ $cakeDescription = 'CakePHP: the rapid development php framework'; Html->css('base.css') ?> Html->css('cake.css') ?> + Html->css('budget-costum.css') ?> Html->css('handsontable.min.css') ?> Html->css('handsontable.costum.css') ?> @@ -42,13 +43,22 @@ $cakeDescription = 'CakePHP: the rapid development php framework'; diff --git a/webroot/css/budget-costum.css b/webroot/css/budget-costum.css new file mode 100644 index 0000000..63e8218 --- /dev/null +++ b/webroot/css/budget-costum.css @@ -0,0 +1,3 @@ +h1 { + color: aliceblue; +} \ No newline at end of file diff --git a/webroot/files/debug.txt b/webroot/files/debug.txt index 661e138..66bfc65 100644 Binary files a/webroot/files/debug.txt and b/webroot/files/debug.txt differ