Delete file not needed
This commit is contained in:
parent
c6c53f90b5
commit
f74ecd6ad1
@ -1,49 +0,0 @@
|
||||
<?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();
|
||||
|
||||
$fields = new Scores_Fields();
|
||||
$fields->resetFamille('economique');
|
||||
}
|
||||
|
||||
public function completedAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender();
|
||||
$request = $this->getRequest();
|
||||
|
||||
$q = strtolower($request->getParam('q'));
|
||||
|
||||
$separator = ' , ';
|
||||
|
||||
$table = new Application_Model_Naf();
|
||||
|
||||
$sql = $table->select()
|
||||
->where('LOWER(lib) LIKE "%'.$q.'%"')
|
||||
->where('niveau = 5');
|
||||
$result = $table->fetchAll($sql);
|
||||
foreach ($result as $item) {
|
||||
$output[] = array(
|
||||
'label' => $item->lib . $separator . $item->code,
|
||||
'value' => $item->code
|
||||
);
|
||||
}
|
||||
echo json_encode($output);
|
||||
}
|
||||
}
|
||||
|
@ -1,118 +0,0 @@
|
||||
<?php
|
||||
class GeographiqueController extends Zend_Controller_Action
|
||||
{
|
||||
|
||||
public function init()
|
||||
{
|
||||
/* Initialize action controller here */
|
||||
}
|
||||
|
||||
public function indexAction()
|
||||
{
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$user = $auth->getIdentity();
|
||||
$field = new Scores_Fields();
|
||||
$this->view->fields = $field;
|
||||
}
|
||||
|
||||
public function resetAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender();
|
||||
$fields = new Scores_Fields();
|
||||
$fields->resetFamille('geographique');
|
||||
}
|
||||
|
||||
public function completedAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender();
|
||||
$request = $this->getRequest();
|
||||
|
||||
$q = $request->getParam('q');
|
||||
|
||||
//Région
|
||||
$output = $this->completedReg($q);
|
||||
|
||||
//Département
|
||||
if ( count($output)==0 ) {
|
||||
$output = $this->completedDep($q);
|
||||
}
|
||||
|
||||
//Ville
|
||||
if ( count($output)==0 ) {
|
||||
$output = $this->completedVil($q);
|
||||
}
|
||||
echo json_encode($output);
|
||||
}
|
||||
|
||||
protected function completedDep($q)
|
||||
{
|
||||
$separator = ' , ';
|
||||
|
||||
$table = new Application_Model_Departements();
|
||||
$sql = $table->select()->where('libdep LIKE "'.$q.'%"');
|
||||
$result = $table->fetchAll($sql);
|
||||
foreach ($result as $item) {
|
||||
$output[] = array(
|
||||
'label' => $item->libdep . $separator . $item->numdep,
|
||||
'value' => 'D'.$item->numdep
|
||||
);
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
protected function completedVil($q)
|
||||
{
|
||||
$separator = ' , ';
|
||||
|
||||
$table = new Application_Model_CodePostaux();
|
||||
$separator = ' ';
|
||||
|
||||
$sql = $table->select()->where('Commune LIKE "'.$q.'%"');
|
||||
$result = $table->fetchAll($sql);
|
||||
foreach ($result as $item) {
|
||||
$output[] = array(
|
||||
'label' => $item->Commune . $separator . $item->Codepos,
|
||||
'value' => 'C'.$item->INSEE
|
||||
);
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
protected function getDeptFromReg($dep)
|
||||
{
|
||||
$separator = ' , ';
|
||||
|
||||
$table = new Application_Model_Departements();
|
||||
$sql = $table->select()
|
||||
->where('codeRegionInsee = '.$dep);
|
||||
$result = $table->fetchAll($sql)->toArray();
|
||||
$string = '';
|
||||
foreach ($result as $res) {
|
||||
$string .= $res['numdep'].',';
|
||||
}
|
||||
$string = substr($string, 0, strlen($string)-1);
|
||||
return $string;
|
||||
}
|
||||
|
||||
protected function completedReg($q)
|
||||
{
|
||||
$separator = ' , ';
|
||||
|
||||
$table = new Application_Model_Regions();
|
||||
$separator = ' ';
|
||||
|
||||
$sql = $table->select()
|
||||
->where('NCCENR LIKE "%'.$q.'%" OR REGION LIKE "%'.$q.'%"');
|
||||
$result = $table->fetchAll($sql);
|
||||
foreach ($result as $item) {
|
||||
$output[] = array(
|
||||
'label' => $item->NCCENR . $separator . $item->REGION,
|
||||
'value' => 'R'.$item->REGION
|
||||
);
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
@ -1,18 +0,0 @@
|
||||
<div id="economique">
|
||||
<ul id="fieldsblock">
|
||||
<li><?=$this->Field('capital')?></li>
|
||||
<li><?=$this->Field('ape_entrep')?></li>
|
||||
<li class="advanced"><?=$this->Field('ape_etab')?></li>
|
||||
<li><?=$this->Field('age_entrep')?></li>
|
||||
<li class="advanced"><?=$this->Field('age_etab')?></li>
|
||||
<li><?=$this->Field('teff_entrep')?></li>
|
||||
<li class="advanced"><?=$this->Field('teff_etab')?></li>
|
||||
<li><?=$this->Field('eff_entrep')?></li>
|
||||
<li class="advanced"><?=$this->Field('eff_etab')?></li>
|
||||
<li class="advanced"><?=$this->Field('nbEtab')?></li>
|
||||
<li class="mode"><img src="/themes/default/images/fleche-bas.gif" /></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div style="text-align:right;margin-top:20px;">
|
||||
<a class="resetFamille" id="economique">Réinitialiser les critères economiques</a>
|
||||
</div>
|
@ -1,19 +0,0 @@
|
||||
<div id="geographique">
|
||||
<ul id="fieldsblock">
|
||||
<li>
|
||||
<?=$this->Field('geo')?>
|
||||
<?=$this->Field('geo_domtom')?>
|
||||
<?=$this->Field('geo_etranger')?>
|
||||
<?=$this->Field('geo_corse')?>
|
||||
</li>
|
||||
<li><?=$this->Field('zus')?></li>
|
||||
<li><?=$this->Field('zru')?></li>
|
||||
<li><?=$this->Field('zfu')?></li>
|
||||
<li><?=$this->Field('cucs')?></li>
|
||||
<li><?=$this->Field('zrr')?></li>
|
||||
<li><?=$this->Field('zafr')?></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div style="text-align:right;margin-top:20px;">
|
||||
<a class="resetFamille" id="econmique">Réinitialiser les critères geographiques</a>
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user