48 lines
1.3 KiB
PHP
48 lines
1.3 KiB
PHP
<?php
|
|
Class IndexController extends Libs_Controller
|
|
{
|
|
|
|
public function init()
|
|
{
|
|
$this->view->headScript()
|
|
->appendFile('/themes/default/scripts/jquery.jstree.js', 'text/javascript')
|
|
->appendFile('/themes/default/scripts/fields.js', 'text/javascript')
|
|
->appendFile('/themes/default/scripts/autocompleted.js', 'text/javascript');
|
|
/* Initialize action controller here */
|
|
}
|
|
|
|
public function indexAction()
|
|
{
|
|
$auth = Zend_Auth::getInstance();
|
|
$user = $auth->getIdentity();
|
|
if ($user->customisation) {
|
|
$this->view->assign('preferences', $user->customisation);
|
|
}
|
|
}
|
|
|
|
public function criteresAction()
|
|
{
|
|
$ajax = $this->getRequest()->getParam('ajax');
|
|
if($ajax)
|
|
$this->_helper->layout()->disableLayout();
|
|
require_once 'Scores/SessionCiblage.php';
|
|
require_once 'Scores/Field.php';
|
|
$session = new SessionCiblage();
|
|
|
|
$this->view->field = new Fields();
|
|
$this->view->criteres = $session->getCriteres();
|
|
}
|
|
|
|
public function removeAction()
|
|
{
|
|
require_once('Scores/SessionCiblage.php');
|
|
$this->_helper->layout()->disableLayout();
|
|
$session = new SessionCiblage();
|
|
$session->unsetCritere($this->getRequest()->getParam('critere'));
|
|
$objet = new Object_Comptage();
|
|
$objet->count(null, null);
|
|
$this->_redirect('/');
|
|
}
|
|
}
|
|
|