44 lines
1.0 KiB
PHP
44 lines
1.0 KiB
PHP
<?php
|
|
class EconomiqueController extends Zend_Controller_Action
|
|
{
|
|
public function init()
|
|
{
|
|
/* Initialize action controller here */
|
|
}
|
|
|
|
public function indexAction()
|
|
{
|
|
$field = new Scores_Fields();
|
|
$this->view->fields = $field;
|
|
}
|
|
|
|
public function resetAction()
|
|
{
|
|
$this->_helper->layout()->disableLayout();
|
|
$this->_helper->viewRenderer->setNoRender();
|
|
require_once('Scores/SessionCiblage.php');
|
|
$session = new SessionCiblage();
|
|
$session->resetFamille('economique');
|
|
}
|
|
|
|
public function completedAction()
|
|
{
|
|
$this->_helper->layout()->disableLayout();
|
|
$this->_helper->viewRenderer->setNoRender();
|
|
$request = $this->getRequest();
|
|
$table = new Application_Model_Naf();
|
|
|
|
$sql = $table->select()
|
|
->where('lib LIKE "%'.$this->getRequest()->getParam('q').'%"');
|
|
$result = $table->fetchAll($sql);
|
|
foreach ($result as $item) {
|
|
$output[] = array(
|
|
'label' => $item->lib . $separator . $item->code,
|
|
'value' => $item->code
|
|
);
|
|
}
|
|
echo json_encode($output);
|
|
}
|
|
}
|
|
|