2012-02-02 17:29:14 +00:00
|
|
|
<?php
|
2012-05-02 18:19:07 +00:00
|
|
|
class JuridiqueController extends Zend_Controller_Action
|
2012-02-02 17:29:14 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
public function init()
|
|
|
|
{
|
|
|
|
/* Initialize action controller here */
|
|
|
|
}
|
|
|
|
|
|
|
|
public function indexAction()
|
|
|
|
{
|
2012-05-11 12:26:16 +00:00
|
|
|
$field = new Scores_Fields();
|
2012-02-02 17:29:14 +00:00
|
|
|
$this->view->fields = $field;
|
|
|
|
}
|
|
|
|
|
2012-02-15 09:25:21 +00:00
|
|
|
public function resetAction()
|
|
|
|
{
|
|
|
|
$this->_helper->layout()->disableLayout();
|
|
|
|
$this->_helper->viewRenderer->setNoRender();
|
|
|
|
require_once('Scores/SessionCiblage.php');
|
|
|
|
$session = new SessionCiblage();
|
|
|
|
$session->resetFamille('juridique');
|
|
|
|
}
|
2012-02-24 14:59:27 +00:00
|
|
|
|
|
|
|
public function completedAction()
|
|
|
|
{
|
2012-05-10 12:32:57 +00:00
|
|
|
$table = new Application_Model_FormeJuridique();
|
2012-02-24 14:59:27 +00:00
|
|
|
$this->_helper->layout()->disableLayout();
|
|
|
|
$this->_helper->viewRenderer->setNoRender();
|
|
|
|
$request = $this->getRequest();
|
2012-05-02 18:19:07 +00:00
|
|
|
|
2012-02-24 14:59:27 +00:00
|
|
|
$sql = $table->select()
|
|
|
|
->where('fjLibelle LIKE "'.$request->getParam('q').'%"');
|
|
|
|
$result = $table->fetchAll($sql);
|
|
|
|
foreach ($result as $item) {
|
|
|
|
$output[] = array(
|
|
|
|
'label' => $item->fjLibelle . $separator . $item->fjCode,
|
|
|
|
'value' => $item->fjCode
|
|
|
|
);
|
|
|
|
}
|
|
|
|
echo json_encode($output);
|
|
|
|
}
|
2012-02-02 17:29:14 +00:00
|
|
|
}
|
|
|
|
|