Changeset 127 for Dev/branches


Ignore:
Timestamp:
10/14/11 17:54:42 (14 years ago)
Author:
fpvanagthoven
Message:

Login works good. Mainmenu looks visually the same now.

Location:
Dev/branches/cakephp/app
Files:
6 added
7 edited

Legend:

Unmodified
Added
Removed
  • Dev/branches/cakephp/app/app_controller.php

    r126 r127  
    5050        $this->Auth->loginError = "This message shows up when the wrong credentials are used";
    5151        $this->Auth->authError = "Please log in first.";
    52 //        $this->Auth->loginRedirec
    5352        $this->Auth->logoutRedirect = array('controller' => 'pages', 'action' => 'home');
    5453    }
  • Dev/branches/cakephp/app/controllers/pages_controller.php

    r126 r127  
    8484            $title_for_layout = Inflector::humanize($path[$count - 1]);
    8585        }
     86       
     87        if ($page == 'home')
     88        {
     89            $this->home();
     90        }
     91       
    8692        $this->set(compact('page', 'subpage', 'title_for_layout'));
    8793        $this->render(implode('/', $path));
     
    8995
    9096    function home() {
    91        
     97        if($this->Auth->user())
     98        {
     99            $this->redirect(array('action' => 'display', 'mainmenu'));
     100        }
    92101    }
    93102
  • Dev/branches/cakephp/app/controllers/users_controller.php

    r126 r127  
    6666                $this->User->create();
    6767                $this->User->save($this->data);
     68                $this->redirect(array('action' => 'login'));
    6869            } else {
    6970                $this->Session->setFlash('Could not register. Try again.');
  • Dev/branches/cakephp/app/mysql.sql

    r126 r127  
     1DROP TABLE IF EXISTS users;
     2
    13CREATE TABLE users (
    24    id integer auto_increment,
  • Dev/branches/cakephp/app/tmp/logs/debug.log

    r126 r127  
    15152011-10-14 14:24:59 Debug: Notice (8): Undefined offset: 1 in [C:\wamp\www\researchtool\branches\cakephp\cake\libs\view\view.php, line 854]
    16162011-10-14 14:24:59 Debug: Notice (8): Undefined offset: 0 in [C:\wamp\www\researchtool\branches\cakephp\cake\libs\view\view.php, line 859]
     172011-10-14 15:26:26 Debug: Notice (8): Undefined variable: applications in [C:\wamp\www\researchtool\branches\cakephp\app\views\elements\application_menu.ctp, line 17]
     182011-10-14 15:30:35 Debug: Notice (8): Undefined variable: surveys in [C:\wamp\www\researchtool\branches\cakephp\app\views\elements\survey_menu.ctp, line 22]
  • Dev/branches/cakephp/app/tmp/logs/error.log

    r126 r127  
    112011-10-14 14:24:59 Warning: Warning (2): strpos() expects parameter 1 to be string, array given in [C:\wamp\www\researchtool\branches\cakephp\cake\libs\view\view.php, line 851]
    222011-10-14 14:24:59 Warning: Warning (2): strpos() expects parameter 1 to be string, array given in [C:\wamp\www\researchtool\branches\cakephp\cake\libs\view\view.php, line 853]
     32011-10-14 15:26:26 Warning: Warning (2): Missing argument 1 for ApplicationMenu::__construct(), called in C:\wamp\www\researchtool\branches\cakephp\app\views\elements\application_menu.ctp on line 63 and defined in [C:\wamp\www\researchtool\branches\cakephp\app\views\elements\application_menu.ctp, line 10]
     42011-10-14 15:30:35 Warning: Warning (2): Missing argument 1 for SurveyMenu::__construct(), called in C:\wamp\www\researchtool\branches\cakephp\app\views\elements\survey_menu.ctp on line 72 and defined in [C:\wamp\www\researchtool\branches\cakephp\app\views\elements\survey_menu.ctp, line 14]
     52011-10-14 15:30:35 Warning: Warning (2): Invalid argument supplied for foreach() in [C:\wamp\www\researchtool\branches\cakephp\app\views\elements\survey_menu.ctp, line 62]
     62011-10-14 15:30:43 Warning: Warning (2): Invalid argument supplied for foreach() in [C:\wamp\www\researchtool\branches\cakephp\app\views\elements\survey_menu.ctp, line 62]
     72011-10-14 15:32:33 Warning: Warning (2): Invalid argument supplied for foreach() in [C:\wamp\www\researchtool\branches\cakephp\app\views\elements\survey_menu.ctp, line 62]
     82011-10-14 15:32:52 Warning: Warning (2): Invalid argument supplied for foreach() in [C:\wamp\www\researchtool\branches\cakephp\app\views\elements\survey_menu.ctp, line 62]
     92011-10-14 15:39:24 Warning: Warning (2): Invalid argument supplied for foreach() in [C:\wamp\www\researchtool\branches\cakephp\app\views\elements\survey_menu.ctp, line 62]
     102011-10-14 15:39:26 Warning: Warning (2): Invalid argument supplied for foreach() in [C:\wamp\www\researchtool\branches\cakephp\app\views\elements\survey_menu.ctp, line 62]
     112011-10-14 15:39:26 Warning: Warning (2): Invalid argument supplied for foreach() in [C:\wamp\www\researchtool\branches\cakephp\app\views\elements\survey_menu.ctp, line 62]
     122011-10-14 15:39:27 Warning: Warning (2): Invalid argument supplied for foreach() in [C:\wamp\www\researchtool\branches\cakephp\app\views\elements\survey_menu.ctp, line 62]
     132011-10-14 15:41:42 Warning: Warning (2): Invalid argument supplied for foreach() in [C:\wamp\www\researchtool\branches\cakephp\app\views\elements\survey_menu.ctp, line 62]
     142011-10-14 15:42:35 Warning: Warning (2): Invalid argument supplied for foreach() in [C:\wamp\www\researchtool\branches\cakephp\app\views\elements\survey_menu.ctp, line 62]
     152011-10-14 15:42:37 Warning: Warning (2): Invalid argument supplied for foreach() in [C:\wamp\www\researchtool\branches\cakephp\app\views\elements\survey_menu.ctp, line 62]
     162011-10-14 15:42:37 Warning: Warning (2): Invalid argument supplied for foreach() in [C:\wamp\www\researchtool\branches\cakephp\app\views\elements\survey_menu.ctp, line 62]
     172011-10-14 15:42:38 Warning: Warning (2): Invalid argument supplied for foreach() in [C:\wamp\www\researchtool\branches\cakephp\app\views\elements\survey_menu.ctp, line 62]
     182011-10-14 15:47:04 Warning: Warning (2): Invalid argument supplied for foreach() in [C:\wamp\www\researchtool\branches\cakephp\app\views\elements\survey_menu.ctp, line 62]
  • Dev/branches/cakephp/app/views/pages/mainmenu.ctp

    r126 r127  
    1 <div class="menu">mainmenuuu</div>
     1<?php
     2echo $this->Session->flash('auth');
     3echo $this->Session->flash();
     4
     5echo $this->element('menu');
     6echo $this->element('session_menu');
     7echo $this->element('application_menu');
     8echo $this->element('survey_menu');
     9echo $this->element('question_menu');
     10?>
Note: See TracChangeset for help on using the changeset viewer.