odea/application/controllers/JuridiqueController.php

44 lines
1.0 KiB
PHP
Raw Normal View History

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()
{
$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();
2012-05-14 08:02:57 +00:00
$fields = new Scores_Fields();
$fields->resetFamille('juridique');
2012-02-15 09:25:21 +00:00
}
public function completedAction()
{
2012-05-10 12:32:57 +00:00
$table = new Application_Model_FormeJuridique();
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$request = $this->getRequest();
2012-05-02 18:19:07 +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
}