Merge for release in staging
This commit is contained in:
parent
d3ffafb3fe
commit
b9c388a79f
@ -11,7 +11,6 @@ class DirigeantController extends Zend_Controller_Action
|
||||
$this->id = $request->getParam('id', 0);
|
||||
|
||||
require_once 'Scores/WsScores.php';
|
||||
require_once 'Scores/SessionEntreprise.php';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -34,7 +33,7 @@ class DirigeantController extends Zend_Controller_Action
|
||||
$dirigeants = $infos->result->item;
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
$session = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
|
||||
if ($user->checkPerm('dirigeantsop')){
|
||||
$href = $this->view->url(array('controller'=>'dirigeant', 'action'=>'op', 'siret'=>$this->siret));
|
||||
@ -73,7 +72,7 @@ class DirigeantController extends Zend_Controller_Action
|
||||
|
||||
$dirigeants = $infos->result->item;
|
||||
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
$session = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
|
||||
$this->view->assign('dirigeants', $dirigeants);
|
||||
$this->view->assign('exportObjet', $dirigeants);
|
||||
@ -102,7 +101,7 @@ class DirigeantController extends Zend_Controller_Action
|
||||
|
||||
$dirigeants = $infos->item;
|
||||
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
$session = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('siret', $this->siret);
|
||||
|
@ -11,7 +11,6 @@ class EvaluationController extends Zend_Controller_Action
|
||||
$this->id = $request->getParam('id', 0);
|
||||
|
||||
require_once 'Scores/WsScores.php';
|
||||
require_once 'Scores/SessionEntreprise.php';
|
||||
require_once 'Scores/IdentiteEntreprise.php';
|
||||
}
|
||||
|
||||
@ -113,7 +112,7 @@ class EvaluationController extends Zend_Controller_Action
|
||||
$siren = substr($this->siret,0,9);
|
||||
|
||||
$ws = new WsScores();
|
||||
$entreprise = new SessionEntreprise($this->siret, $this->id);
|
||||
$entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
$identite = $ws->getIdentite($siren);
|
||||
$indiscore = $ws->getIndiScore($siren);
|
||||
$infos = $ws->getRatios($siren, 'indiscore2'); // @todo : vérifier la page
|
||||
@ -277,7 +276,7 @@ class EvaluationController extends Zend_Controller_Action
|
||||
));
|
||||
}
|
||||
|
||||
$sessionEntreprise = new SessionEntreprise($this->siret, $this->id);
|
||||
$sessionEntreprise = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
$ws = new WsScores();
|
||||
$siren = substr($this->siret,0,9);
|
||||
|
||||
@ -360,7 +359,7 @@ class EvaluationController extends Zend_Controller_Action
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('id', $this->id);
|
||||
|
||||
$sessionEntreprise = new SessionEntreprise($this->siret, $this->id);
|
||||
$sessionEntreprise = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
$this->view->assign('rs', $sessionEntreprise->getRaisonSociale());
|
||||
|
||||
} else {
|
||||
@ -787,7 +786,7 @@ class EvaluationController extends Zend_Controller_Action
|
||||
if (!empty($companyname)) {
|
||||
$this->view->raisonSociale = $companyname;
|
||||
} else {
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
$session = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
$this->view->raisonSociale = $session->getRaisonSociale();
|
||||
}
|
||||
$this->view->emailCommande = $user->getEmail();
|
||||
@ -848,7 +847,7 @@ class EvaluationController extends Zend_Controller_Action
|
||||
if(!$user->checkPerm('INDISCORE3') && !$user->checkPerm('INDISCORE3P'))
|
||||
$this->_forward('perms', 'error');
|
||||
|
||||
$sessionEntreprise = new SessionEntreprise($this->siret, $this->id);
|
||||
$sessionEntreprise = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
$ws = new WsScores();
|
||||
$siren = substr($this->siret,0,9);
|
||||
|
||||
|
@ -6,7 +6,6 @@ class FinanceController extends Zend_Controller_Action
|
||||
|
||||
public function init()
|
||||
{
|
||||
require_once 'Scores/SessionEntreprise.php';
|
||||
require_once 'Scores/WsScores.php';
|
||||
|
||||
$request = $this->getRequest();
|
||||
@ -27,7 +26,7 @@ class FinanceController extends Zend_Controller_Action
|
||||
public function syntheseAction()
|
||||
{
|
||||
$user = new Scores_Utilisateur();
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
$session = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
|
||||
$request = $this->getRequest();
|
||||
$typeBilan = $request->getParam('typeBilan', 'N');
|
||||
@ -206,7 +205,7 @@ class FinanceController extends Zend_Controller_Action
|
||||
$request = $this->getRequest();
|
||||
$autrePage = $request->getParam('apage');
|
||||
$typeBilan = $request->getParam('typeBilan', 'N');
|
||||
$entreprise = new SessionEntreprise($this->siret, $this->id);
|
||||
$entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
|
||||
//Récupération des informations
|
||||
if (empty($autrePage)) {
|
||||
@ -466,7 +465,7 @@ class FinanceController extends Zend_Controller_Action
|
||||
}
|
||||
|
||||
$typeBilan = $request->getParam('typeBilan', 'N');
|
||||
$entreprise = new SessionEntreprise($this->siret, $this->id);
|
||||
$entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
|
||||
$tabRatio = array(
|
||||
array('titre' => 'EQUILIBRE FINANCIER'),
|
||||
@ -645,7 +644,7 @@ class FinanceController extends Zend_Controller_Action
|
||||
$unite = $request->getParam('unit', '€');
|
||||
$type = $request->getParam('type', '');
|
||||
$date = $request->getParam('date', '');
|
||||
$entreprise = new SessionEntreprise($this->siret, $this->id);
|
||||
$entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
|
||||
switch($type)
|
||||
{
|
||||
@ -742,7 +741,7 @@ class FinanceController extends Zend_Controller_Action
|
||||
$type = 'réel normal ou simplifié';
|
||||
break;
|
||||
}
|
||||
$session = new SessionEntreprise($params['siren']);
|
||||
$session = new Scores_Session_Entreprise($params['siren']);
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
$this->view->assign('size', filesize($file));
|
||||
$this->view->assign('name', $name);
|
||||
@ -893,7 +892,7 @@ class FinanceController extends Zend_Controller_Action
|
||||
$listBilan = $ws->getListeBilans(substr($this->siret, 0, 9));
|
||||
if ($listBilan === false) $this->_forward('soap', 'error');
|
||||
|
||||
$entreprise = new SessionEntreprise($this->siret, $this->id);
|
||||
$entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
|
||||
if( $listBilan->nbReponses > 0 )
|
||||
{
|
||||
@ -966,7 +965,7 @@ class FinanceController extends Zend_Controller_Action
|
||||
|
||||
$urlImg = new Logo($siren);
|
||||
|
||||
$sessionEntreprise = new SessionEntreprise($this->siret, $this->id);
|
||||
$sessionEntreprise = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
|
||||
$ws = new WsScores();
|
||||
$infos = $ws->getInfosBourse($siren);
|
||||
@ -1006,7 +1005,7 @@ class FinanceController extends Zend_Controller_Action
|
||||
$infos = $this->getRequest()->getParam('infos');
|
||||
}
|
||||
|
||||
$entreprise = new SessionEntreprise($this->siret, $this->id);
|
||||
$entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
$this->view->assign('banques', $infos->result->item);
|
||||
$this->view->assign('raisonSociale', $entreprise->getRaisonSociale());
|
||||
$this->view->assign('siren', substr($this->siret, 0, 9));
|
||||
@ -1027,7 +1026,7 @@ class FinanceController extends Zend_Controller_Action
|
||||
$siren = substr($this->siret, 0, 9);
|
||||
|
||||
$ws = new WsScores();
|
||||
$entreprise = new SessionEntreprise($this->siret, $this->id);
|
||||
$entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
$this->view->assign('raisonSociale', $entreprise->getRaisonSociale());
|
||||
|
||||
$infos = $ws->getRatios($siren, 'ratios');
|
||||
@ -1256,7 +1255,7 @@ class FinanceController extends Zend_Controller_Action
|
||||
|
||||
public function subventionsAction()
|
||||
{
|
||||
$sessionEntreprise = new SessionEntreprise($this->siret, $this->id);
|
||||
$sessionEntreprise = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
$siren = substr($this->siret, 0, 9);
|
||||
$this->view->assign('raisonSociale', $sessionEntreprise->getRaisonSociale());
|
||||
$this->view->assign('id', $this->id);
|
||||
@ -1276,7 +1275,7 @@ class FinanceController extends Zend_Controller_Action
|
||||
|
||||
public function subventionAction()
|
||||
{
|
||||
$sessionEntreprise = new SessionEntreprise($this->siret, $this->id);
|
||||
$sessionEntreprise = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
$siren = substr($this->siret, 0, 9);
|
||||
$this->view->assign('raisonSociale', $sessionEntreprise->getRaisonSociale());
|
||||
$this->view->assign('id', $this->id);
|
||||
|
@ -14,7 +14,6 @@ class IdentiteController extends Zend_Controller_Action
|
||||
$this->id = $request->getParam('id', 0);
|
||||
|
||||
require_once 'Scores/WsScores.php';
|
||||
require_once 'Scores/SessionEntreprise.php';
|
||||
require_once 'Scores/IdentiteEntreprise.php';
|
||||
}
|
||||
|
||||
@ -72,7 +71,7 @@ class IdentiteController extends Zend_Controller_Action
|
||||
} else {
|
||||
|
||||
//Mise en session
|
||||
$session = new SessionEntreprise($this->siret, $this->id, true);
|
||||
$session = new Scores_Session_Entreprise($this->siret, $this->id, true);
|
||||
$session->setInfoEntrep($infos);
|
||||
|
||||
//Date de dernière mise à jour
|
||||
@ -209,7 +208,7 @@ class IdentiteController extends Zend_Controller_Action
|
||||
if ($infos === false) $this->_forward('soap', 'error');
|
||||
|
||||
//Mise en session
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
$session = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
$session->setInfoEntrep($infos->Identite);
|
||||
|
||||
//Element Fiche identite
|
||||
@ -314,7 +313,7 @@ class IdentiteController extends Zend_Controller_Action
|
||||
$actif = $this->getRequest()->getParam('actif', -1);
|
||||
$this->view->headTitle()->append('Liste des établissements - Siren '.$siren);
|
||||
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
$session = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
$ws = new WsScores();
|
||||
@ -360,7 +359,7 @@ class IdentiteController extends Zend_Controller_Action
|
||||
$siren = substr($this->siret,0,9);
|
||||
$actif = $this->getRequest()->getParam('actif', -1);
|
||||
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
$session = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
$ws = new WsScores();
|
||||
@ -579,7 +578,7 @@ class IdentiteController extends Zend_Controller_Action
|
||||
//Define SIREN if exist
|
||||
if ( intval($identite->siren)!=0 ) {
|
||||
$siren = $identite->siren;
|
||||
$session = new SessionEntreprise($siren, null, true);
|
||||
$session = new Scores_Session_Entreprise($siren, null, true);
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('siret', $session->getSiret());
|
||||
$this->view->assign('isin', $session->getIsin());
|
||||
@ -599,7 +598,7 @@ class IdentiteController extends Zend_Controller_Action
|
||||
|
||||
$this->view->headTitle()->append('Liens inter-entreprises - Siren '.$siren);
|
||||
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
$session = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
|
||||
$this->view->assign('isin', $session->getIsin());
|
||||
$this->view->assign('siren', $siren);
|
||||
@ -970,7 +969,7 @@ class IdentiteController extends Zend_Controller_Action
|
||||
$siren = substr($this->siret,0,9);
|
||||
$this->view->headTitle()->append('Evènements - Siren '.$siren);
|
||||
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
$session = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
|
||||
$ws = new WsScores();
|
||||
$infos = $ws->getListeEvenements($siren);
|
||||
@ -996,7 +995,7 @@ class IdentiteController extends Zend_Controller_Action
|
||||
$user = new Scores_Utilisateur();
|
||||
if ($user->checkPref('news'))
|
||||
{
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
$session = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
|
||||
$items = array();
|
||||
if ($googleNews!==false){
|
||||
@ -1099,8 +1098,7 @@ class IdentiteController extends Zend_Controller_Action
|
||||
$user = new Scores_Utilisateur();
|
||||
$this->view->assign('facade', $user->checkPref('mappy'));
|
||||
|
||||
require_once 'Scores/Google.php';
|
||||
$google = new Google();
|
||||
$google = new Scores_Google_Maps();
|
||||
$decLat = $google->dec2dms($infos->GeoLat);
|
||||
$decLon = $google->dec2dms($infos->GeoLon);
|
||||
$mapsHref = $google->getGoogleMapLink(urlencode(
|
||||
@ -1186,7 +1184,7 @@ class IdentiteController extends Zend_Controller_Action
|
||||
$heading = $deg[$num];
|
||||
$streetview->setHeading($heading);
|
||||
//$streetview->setLocationTxt($adresse);
|
||||
$url = $this->view->url(array('controller'=>'fichier', 'action'=>'streetview', 'fichier'=> $streetview->display()), null, true);
|
||||
$url = '/fichier/streetview/'.$streetview->display();
|
||||
$this->view->assign('url', $url);
|
||||
}
|
||||
$this->view->assign('lat', $lat);
|
||||
@ -1285,4 +1283,21 @@ class IdentiteController extends Zend_Controller_Action
|
||||
$this->view->assign('result', $result);
|
||||
$this->view->assign('siren', $siren);
|
||||
}
|
||||
|
||||
public function contactsAction()
|
||||
{
|
||||
$session = new Scores_Session_Entreprise($this->siret, $this->id, true);
|
||||
$siren = substr($this->siret,0,9);
|
||||
Zend_Registry::get('firebug')->info($siren);
|
||||
$ws = new WsScores();
|
||||
$result = $ws->getContactEt($siren);
|
||||
Zend_Registry::get('firebug')->info($result);
|
||||
|
||||
if ($result->nbReponses>0) {
|
||||
$this->view->assign('contacts', $result->result->item);
|
||||
}
|
||||
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
$this->view->assign('siren', $siren);
|
||||
}
|
||||
}
|
@ -11,7 +11,6 @@ class JuridiqueController extends Zend_Controller_Action
|
||||
$this->id = $request->getParam('id', 0);
|
||||
|
||||
require_once 'Scores/WsScores.php';
|
||||
require_once 'Scores/SessionEntreprise.php';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -38,7 +37,7 @@ class JuridiqueController extends Zend_Controller_Action
|
||||
}
|
||||
}
|
||||
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
$session = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
$fj = $session->getFormeJuridique();
|
||||
if ( $fj>9000 && $fj<9999 && intval($siren)==0 ) {
|
||||
$vue = 'asso';
|
||||
@ -50,7 +49,7 @@ class JuridiqueController extends Zend_Controller_Action
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
$this->view->assign('AutrePage', $request->getParam('apage'));
|
||||
|
||||
if ($session->getSource()=='006') {
|
||||
if ($session->getSource()=='006' || $session->getSourceId()=='007') {
|
||||
|
||||
$this->view->assign('AutreSource', true);
|
||||
|
||||
@ -224,7 +223,7 @@ class JuridiqueController extends Zend_Controller_Action
|
||||
$request = $this->getRequest();
|
||||
$idAnn = $request->getParam('idann', false);
|
||||
$siren = substr($this->siret, 0,9);
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
$session = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
|
||||
$ws = new WsScores();
|
||||
if ($idAnn!=false) {
|
||||
@ -271,7 +270,7 @@ class JuridiqueController extends Zend_Controller_Action
|
||||
$request = $this->getRequest();
|
||||
$type = $request->getParam('type', '');
|
||||
$siren = substr($this->siret,0,9);
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
$session = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
|
||||
$abbrev = array(
|
||||
' TGI ' => 'TRIBUNAL DE GRANDE INSTANCE DE ',
|
||||
@ -312,7 +311,7 @@ class JuridiqueController extends Zend_Controller_Action
|
||||
public function conventionsAction()
|
||||
{
|
||||
$siren = substr($this->siret, 0,9);
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
$session = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
@ -334,7 +333,7 @@ class JuridiqueController extends Zend_Controller_Action
|
||||
$request = $this->getRequest();
|
||||
$idObject = $request->getParam('idObject', 0);
|
||||
$siren = substr($this->siret, 0,9);
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
$session = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
|
@ -15,18 +15,15 @@ class PiecesController extends Zend_Controller_Action
|
||||
|
||||
protected $siret;
|
||||
protected $id;
|
||||
protected $entrep;
|
||||
|
||||
public function init()
|
||||
{
|
||||
require_once 'Scores/WsScores.php';
|
||||
require_once 'Scores/SessionEntreprise.php';
|
||||
require_once 'Infogreffe/Infogreffe.php';
|
||||
|
||||
$request = $this->getRequest();
|
||||
$this->siret = $request->getParam('siret');
|
||||
$this->id = $request->getParam('id', 0);
|
||||
$this->entrep = new SessionEntreprise($this->siret, $this->id);
|
||||
}
|
||||
|
||||
public function indexAction(){}
|
||||
@ -37,6 +34,7 @@ class PiecesController extends Zend_Controller_Action
|
||||
public function cmdassociationAction()
|
||||
{
|
||||
$user = new Scores_Utilisateur();
|
||||
$session = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
|
||||
$request = $this->getRequest();
|
||||
$email = $request->getParam('email', '');
|
||||
@ -58,7 +56,7 @@ class PiecesController extends Zend_Controller_Action
|
||||
$infoAsso->siren = $siren;
|
||||
$infoAsso->waldec = '';
|
||||
$infoAsso->idEntreprise = $this->id;
|
||||
$infoAsso->raisonSociale = $this->entrep->getRaisonSociale();
|
||||
$infoAsso->raisonSociale = $session->getRaisonSociale();
|
||||
|
||||
$infoDemande = new stdClass();
|
||||
$infoDemande->reference = $request->getParam('reference');
|
||||
@ -92,7 +90,7 @@ class PiecesController extends Zend_Controller_Action
|
||||
$this->view->assign('siren', substr($this->siret, 0,9));
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('id', $this->id);
|
||||
$this->view->assign('raisonSociale', $this->entrep->getRaisonSociale());
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -103,9 +101,10 @@ class PiecesController extends Zend_Controller_Action
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/pieces.js', 'text/javascript');
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
$session = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
|
||||
//Catégorie Juridique
|
||||
$cj = $this->entrep->getFormeJuridique();
|
||||
$cj = $session->getFormeJuridique();
|
||||
if( in_array($cj, $this->association_cj) ) {
|
||||
$this->_forward('associationactes');
|
||||
}
|
||||
@ -336,7 +335,7 @@ class PiecesController extends Zend_Controller_Action
|
||||
$this->view->assign('InfosActes', $infosActes);
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('raisonSociale', $this->entrep->getRaisonSociale());
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
|
||||
$this->view->assign('surveillance', $user->checkPerm('survbilan'));
|
||||
}
|
||||
@ -347,11 +346,12 @@ class PiecesController extends Zend_Controller_Action
|
||||
public function bilansAction()
|
||||
{
|
||||
$user = new Scores_Utilisateur();
|
||||
$session = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
|
||||
$this->view->headScript()->appendFile('/themes/default/scripts/pieces.js', 'text/javascript');
|
||||
|
||||
//Catégorie Juridique
|
||||
$cj = $this->entrep->getFormeJuridique();
|
||||
$cj = $session->getFormeJuridique();
|
||||
if( in_array($cj, $this->association_cj) ) {
|
||||
$this->_forward('associationbilans');
|
||||
} else {
|
||||
@ -462,7 +462,7 @@ class PiecesController extends Zend_Controller_Action
|
||||
$this->view->assign('InfosBilans', $infosBilans);
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('raisonSociale', $this->entrep->getRaisonSociale());
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
|
||||
$this->view->assign('surveillance', $user->checkPerm('survactes'));
|
||||
}
|
||||
@ -659,7 +659,7 @@ class PiecesController extends Zend_Controller_Action
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('siren', $this->siren);
|
||||
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
$session = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
@ -1106,7 +1106,7 @@ class PiecesController extends Zend_Controller_Action
|
||||
|
||||
$siren = substr($this->siret, 0, 9);
|
||||
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
$session = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
$permKbis = false;
|
||||
@ -1179,7 +1179,7 @@ class PiecesController extends Zend_Controller_Action
|
||||
'cp' => '',
|
||||
'ville' => '',
|
||||
'siren' => substr($this->siret,0,9),
|
||||
'raisonSociale' => $this->entrep->getRaisonSociale(),
|
||||
'raisonSociale' => $session->getRaisonSociale(),
|
||||
'type' => 'M',
|
||||
'dateCommande' => date('Y-m-d H:i:s'),
|
||||
);
|
||||
@ -1239,7 +1239,7 @@ class PiecesController extends Zend_Controller_Action
|
||||
'cp' => $params['cp'],
|
||||
'ville' => $params['ville'],
|
||||
'siren' => substr($this->siret,0,9),
|
||||
'raisonSociale' => $this->entrep->getRaisonSociale(),
|
||||
'raisonSociale' => $session->getRaisonSociale(),
|
||||
'type' => 'C',
|
||||
'dateCommande' => date('Y-m-d H:i:s'),
|
||||
);
|
||||
@ -1335,6 +1335,8 @@ class PiecesController extends Zend_Controller_Action
|
||||
|
||||
$siren = substr($this->siret, 0,9);
|
||||
|
||||
$session = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = $c->profil->path->data.'/association/actes';
|
||||
|
||||
@ -1364,7 +1366,7 @@ class PiecesController extends Zend_Controller_Action
|
||||
}
|
||||
}
|
||||
|
||||
$session = new SessionEntreprise($this->siret);
|
||||
$session = new Scores_Session_Entreprise($this->siret);
|
||||
if (substr($session->AutreId,0.1)=='W'){
|
||||
foreach (glob("$path/ST-".$session->AutreId."-*.pdf") as $filename) {
|
||||
preg_match('/ST-(.*)-([0-9]{8})\.pdf$/', $filename, $matches);
|
||||
@ -1385,7 +1387,7 @@ class PiecesController extends Zend_Controller_Action
|
||||
$this->view->assign('siren', $siren);
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('id', $this->id);
|
||||
$this->view->assign('raisonSociale', $this->entrep->getRaisonSociale());
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1423,6 +1425,8 @@ class PiecesController extends Zend_Controller_Action
|
||||
{
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
$session = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
|
||||
$siren = substr($this->siret,0,9);
|
||||
|
||||
$bilans = array();
|
||||
@ -1475,7 +1479,7 @@ class PiecesController extends Zend_Controller_Action
|
||||
$this->view->assign('siren', substr($this->siret, 0,9));
|
||||
$this->view->assign('siret', $this->siret);
|
||||
$this->view->assign('id', $this->id);
|
||||
$this->view->assign('raisonSociale', $this->entrep->getRaisonSociale());
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
|
||||
}
|
||||
|
||||
@ -1525,7 +1529,7 @@ class PiecesController extends Zend_Controller_Action
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
$session = new SessionEntreprise($params['siret']);
|
||||
$session = new Scores_Session_Entreprise($params['siret']);
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
$this->view->assign('siren', $params['siret']);
|
||||
$this->view->assign('email', $user->getEmail());
|
||||
@ -1656,7 +1660,7 @@ class PiecesController extends Zend_Controller_Action
|
||||
if (!empty($type)){
|
||||
$detail = true;
|
||||
}
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
$session = new Scores_Session_Entreprise($this->siret, $this->id);
|
||||
$ws = new WsScores();
|
||||
if ($detail){
|
||||
$infos = $ws->getPrivilegesDetail($siren, array($type));
|
||||
|
@ -81,7 +81,6 @@ class SaisieController extends Zend_Controller_Action
|
||||
public function init()
|
||||
{
|
||||
require_once 'Scores/WsScores.php';
|
||||
require_once 'Scores/SessionEntreprise.php';
|
||||
require_once 'Scores/IdentiteEntreprise.php';
|
||||
|
||||
$ws = new WsScores();
|
||||
@ -140,7 +139,7 @@ class SaisieController extends Zend_Controller_Action
|
||||
$devises = $devisesReponse->result->item;
|
||||
|
||||
//Mise en session
|
||||
$session = new SessionEntreprise($siret, $id, true);
|
||||
$session = new Scores_Session_Entreprise($siret, $id, true);
|
||||
$session->setInfoEntrep($infos);
|
||||
|
||||
$sessionSaisie = new Zend_Session_Namespace('saisie');
|
||||
@ -281,7 +280,7 @@ class SaisieController extends Zend_Controller_Action
|
||||
$siret = $request->getParam('siret');
|
||||
$id = $request->getParam('id', 0);
|
||||
|
||||
$session = new SessionEntreprise($siret, $id);
|
||||
$session = new Scores_Session_Entreprise($siret, $id);
|
||||
|
||||
$ws = new WsScores();
|
||||
|
||||
@ -807,7 +806,7 @@ class SaisieController extends Zend_Controller_Action
|
||||
|
||||
$this->view->inlineScript()->appendFile('/libs/form/jquery.form.js');
|
||||
if ( intval($siren)==0 ) {
|
||||
$session = new SessionEntreprise();
|
||||
$session = new Scores_Session_Entreprise();
|
||||
$siren = '';
|
||||
if ( substr($session->AutreId,0,1)=='W' ) {
|
||||
$siren = $session->AutreId;
|
||||
@ -830,7 +829,7 @@ class SaisieController extends Zend_Controller_Action
|
||||
$siren = substr($siret,0,9);
|
||||
$this->view->assign('siren', $siren);
|
||||
|
||||
$session = new SessionEntreprise($siret, $id);
|
||||
$session = new Scores_Session_Entreprise($siret, $id);
|
||||
$this->view->assign('siret', $siret);
|
||||
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
||||
|
||||
@ -1346,11 +1345,11 @@ class SaisieController extends Zend_Controller_Action
|
||||
//Override session session
|
||||
if ( intval($result->siren) != 0 ) {
|
||||
$siren = $result->siren;
|
||||
$session = new SessionEntreprise($siren);
|
||||
$session = new Scores_Session_Entreprise($siren);
|
||||
}
|
||||
|
||||
} elseif ($siren !== null) {
|
||||
$session = new SessionEntreprise($siren);
|
||||
$session = new Scores_Session_Entreprise($siren);
|
||||
$rs = $session->getRaisonSociale();
|
||||
}
|
||||
|
||||
@ -1959,7 +1958,7 @@ class SaisieController extends Zend_Controller_Action
|
||||
|
||||
$this->view->headTitle()->append('Saisie - '.$siret);
|
||||
|
||||
$session = new SessionEntreprise($siret, $id);
|
||||
$session = new Scores_Session_Entreprise($siret, $id);
|
||||
$isin = $session->getIsin();
|
||||
|
||||
$ws = new WsScores();
|
||||
@ -2211,4 +2210,29 @@ class SaisieController extends Zend_Controller_Action
|
||||
$this->view->assign('message', $message);
|
||||
$this->view->assign('refresh', $refresh);
|
||||
}
|
||||
|
||||
public function citysearchAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
|
||||
$cp = $this->getRequest()->getParam('cp', null);
|
||||
$output = array();
|
||||
|
||||
if ( null !== $cp && strlen($cp)<6) {
|
||||
$city = new Application_Model_City();
|
||||
$sql = $city->select('cp, commune');
|
||||
$sql->where("cp LIKE '".$cp."%'");
|
||||
$rows = $city->fetchAll($sql);
|
||||
if ( count($rows)>0 ) {
|
||||
foreach ($rows as $item) {
|
||||
$output[] = array(
|
||||
'label' => $item->cp.": ".$item->commune,
|
||||
'value' => $item->cp,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->view->assign('output', $output);
|
||||
}
|
||||
}
|
@ -354,7 +354,7 @@ class UserController extends Zend_Controller_Action
|
||||
$pass = $form->getValue('pass');
|
||||
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$authAdapter = new Scores_AuthAdapter($login, md5($login.'|'.$pass));
|
||||
$authAdapter = new Scores_Auth_Adapter_Ws($login, md5($login.'|'.$pass));
|
||||
$result = $auth->authenticate($authAdapter);
|
||||
|
||||
//Auth is valid
|
||||
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
5
application/models/City.php
Normal file
5
application/models/City.php
Normal file
@ -0,0 +1,5 @@
|
||||
<?php
|
||||
class Application_Model_City extends Zend_Db_Table_Abstract
|
||||
{
|
||||
protected $_name = 'tabVilles';
|
||||
}
|
@ -97,17 +97,19 @@
|
||||
<?php }?>
|
||||
<?php }?>
|
||||
</td>
|
||||
<?php if (empty($this->AutrePage)) { ?>
|
||||
<?php if( $this->accessWorldCheck ) { ?>
|
||||
<?php if (empty($this->AutrePage) && $this->accessWorldCheck) {?>
|
||||
<td>
|
||||
<?php if ($dir->Societe != '') { ?>
|
||||
<img class="wcheck" id="<?='/dirType/ORGANISATION/dirSociete/'.$dir->Societe;?>" src='/themes/default/images/worldcheck/wc.png'/>
|
||||
<?php }
|
||||
if ($dir->Nom != '') { ?>
|
||||
<img class="wcheck" id="<?='/dirType/INDIVIDUAL/dirNom/'.$dir->Nom.'/dirPrenom/'.$dir->Prenom;?>" src='/themes/default/images/worldcheck/wc.png'/>
|
||||
<img class="wcheck" data-url="<?=$this->url(array(
|
||||
'controller'=>'worldcheck','action'=>'occurence','siren'=>substr($this->siret,0,9),
|
||||
'dirType'=>'ORGANISATION','dirSociete'=>$dir->Societe),null,true);?>" src='/themes/default/images/worldcheck/wc.png'/>
|
||||
<?php }?>
|
||||
<?php if ($dir->Nom != '') { ?>
|
||||
<img class="wcheck" data-url="<?=$this->url(array(
|
||||
'controller'=>'worldcheck','action'=>'occurence','siren'=>substr($this->siret,0,9),
|
||||
'dirType'=>'INDIVIDUAL','dirNom'=>$dir->Nom,'dirPrenom'=>$dir->Prenom),null,true);?>" src='/themes/default/images/worldcheck/wc.png'/>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<?php } ?>
|
||||
<?php }?>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
@ -156,14 +158,21 @@ $('a.dialog').on('click', function(){
|
||||
return false;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<?php }?>
|
||||
|
||||
<?php if (empty($this->AutrePage) && $this->accessWorldCheck) {?>
|
||||
<script>
|
||||
$('img.wcheck').each(function(){
|
||||
$(this).qtip({
|
||||
hide: { event: 'unfocus' },
|
||||
show: { solo: true, delay: 1000 },
|
||||
content: { title: {button: true}, text: "Chargement...",
|
||||
ajax: { url: '<?=$this->url(array('controller'=>'worldcheck','action'=>'occurence','siren'=>substr($this->siret, 0, 9)),null,true);?>'+$(this).attr('id') } },
|
||||
position: { my: "bottom left", at: "top center" }
|
||||
show: { solo: true, delay: 500 },
|
||||
content: {
|
||||
button: true,
|
||||
title: 'WorlCheck',
|
||||
text: "Chargement...",
|
||||
ajax: { url: $(this).data('url') } },
|
||||
position: { my: 'right center', at: 'left center' }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
@ -24,7 +24,7 @@
|
||||
<td><?=$this->Millesime?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Subvention versé à</td>
|
||||
<td>Subvention versée à</td>
|
||||
<td><?=$this->AssoNom?> (<?=$this->SirenTexte($this->AssoSiren)?>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -32,8 +32,8 @@
|
||||
<td><?=$this->Budget?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Subvention reçu de </td>
|
||||
<td><a href="<?=$this->url(array('controller'=>'identite', 'action'=>'fiche', 'siren'=>$this->OrigineSiren))?>">
|
||||
<td>Subvention reçue de </td>
|
||||
<td><a href="<?=$this->url(array('controller'=>'identite', 'action'=>'fiche', 'siret'=>$this->OrigineSiren), null, true)?>">
|
||||
<?=$this->SirenTexte($this->OrigineSiren)?></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -62,4 +62,6 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
66
application/views/default/scripts/identite/contacts.phtml
Normal file
66
application/views/default/scripts/identite/contacts.phtml
Normal file
@ -0,0 +1,66 @@
|
||||
<div id="center">
|
||||
|
||||
<h1 class="titre">CONTACTS</h1>
|
||||
|
||||
<div class="paragraph">
|
||||
<table class="identite">
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Numéro identifiant Siren</td>
|
||||
<td width="350" class="StyleInfoData"><?=$this->SirenTexte($this->siren)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="30"> </td>
|
||||
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
||||
<td width="350" class="StyleInfoData"><?=$this->raisonSociale?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h2>Liste des contacts</h2>
|
||||
<div class="paragraph">
|
||||
|
||||
<?php if ( count($this->contacts) == 0 ){?>
|
||||
Aucun contacts.
|
||||
<?php } else {?>
|
||||
<table class="data">
|
||||
<tr>
|
||||
<th>Type</th>
|
||||
<th>Contact</th>
|
||||
<th>Date de mise à jour</th>
|
||||
</tr>
|
||||
<?php foreach($this->contacts as $item) {?>
|
||||
<tr>
|
||||
<td>
|
||||
<?php
|
||||
switch($item->type) {
|
||||
case 'fax': echo "Fax"; break;
|
||||
case 'mail': echo "E-mail"; break;
|
||||
case 'tel': echo "Téléphone"; break;
|
||||
case 'web': echo "Site Web"; break;
|
||||
case 'mob': echo "Tel. Mobile"; break;
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($item->type=='fax' || $item->type=='tel' || $item->type=='mob') {?>
|
||||
<?=substr(chunk_split($item->value, 2, '.'), 0, -1)?>
|
||||
<?php } else {?>
|
||||
<?=$item->value?>
|
||||
<?php }?>
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
if (intval($item->date)>0) {
|
||||
$date = new Zend_Date($item->date, 'yyyyMMdd');
|
||||
echo $date->toString('dd/MM/yyyy');
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php }?>
|
||||
</table>
|
||||
<?php }?>
|
||||
</div>
|
||||
|
||||
</div>
|
@ -1,4 +1,4 @@
|
||||
<?php if ($this->source == 'google'):?>
|
||||
<?php if ($this->source == 'google') {?>
|
||||
|
||||
<div id="infogeo_photo">
|
||||
<?=$this->action('streetview', 'identite', null, array(
|
||||
@ -8,20 +8,13 @@
|
||||
));?>
|
||||
</div>
|
||||
|
||||
<?php elseif ($this->source == 'mappy'):?>
|
||||
<?php } elseif ($this->source == 'mappy') {?>
|
||||
|
||||
<div><img id="pp-cb-thumb" width="300px" /></div>
|
||||
<script src="<?=$this->lienJs?>"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
var photoService = new Mappy.api.visiocity.PhotoService();
|
||||
var geo = new Mappy.api.geolocation.Geocoder();
|
||||
|
||||
var address = "<?=$this->adresse?>";
|
||||
geo.geocode(address, function(result) {
|
||||
photoService.search(result[0], "f", serviceHandler);
|
||||
}, function(error) {});
|
||||
|
||||
var serviceHandler = function(result) {
|
||||
var serviceHandler = function(result) {
|
||||
if (result instanceof Mappy.api.visiocity.Frontage) {
|
||||
var current = result.getCurrent();
|
||||
var img = $('<img src="' + current.getURL(320, null) +
|
||||
@ -30,6 +23,12 @@ $(document).ready(function() {
|
||||
$('#pp-cb-thumb').replaceWith(img);
|
||||
}
|
||||
};
|
||||
var address = "<?=$this->adresse?>";
|
||||
var geo = new Mappy.api.geolocation.Geocoder();
|
||||
var photoService = new Mappy.api.visiocity.PhotoService();
|
||||
geo.geocode(address, function(result) {
|
||||
photoService.search(result[0], 'f', serviceHandler);
|
||||
}, function(error) {});
|
||||
});
|
||||
</script>
|
||||
<?php endif;?>
|
||||
<?php }?>
|
@ -1,12 +1,14 @@
|
||||
<?php if ($this->url) {?>
|
||||
<div id="legende-photo">Cliché à l'approche de l'adresse postale.</div>
|
||||
<img id="pp-cb-thumb" src="<?=$this->url?>" width="320" height="320" />
|
||||
<div>
|
||||
<div>
|
||||
<a class="street-heading" href="<?=$this->url(array(
|
||||
'controller'=>'identite','action'=>'streetview', 'lat'=>$this->lat, 'lon'=>$this->lon, 'heading'=>$this->pagePrec))?>"><</a>
|
||||
-
|
||||
'controller'=>'identite','action'=>'streetview',
|
||||
'lat'=>$this->lat, 'lon'=>$this->lon, 'heading'=>$this->pagePrec), null, true)?>"><</a>
|
||||
-
|
||||
<a class="street-heading" href="<?=$this->url(array(
|
||||
'controller'=>'identite','action'=>'streetview', 'lat'=>$this->lat, 'lon'=>$this->lon, 'heading'=>$this->pageSuiv))?>">></a>
|
||||
'controller'=>'identite', 'action'=>'streetview',
|
||||
'lat'=>$this->lat, 'lon'=>$this->lon, 'heading'=>$this->pageSuiv), null, true)?>">></a>
|
||||
</div>
|
||||
<script>
|
||||
$('a.street-heading').click(function(e){
|
||||
|
@ -1,12 +1,13 @@
|
||||
<script type="text/javascript">
|
||||
window.onload = function() {
|
||||
window.print();
|
||||
window.close();
|
||||
window.print(); window.close();
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
#header { width:0px !important;}
|
||||
#global { width:auto !important;}
|
||||
#content { margin:5px; padding:0; width:auto; }
|
||||
body {font-family:Verdana, Arial, sans-serif;font-size: 11px;}
|
||||
#global {width:auto !important;text-align:left;}
|
||||
#content {margin:5px; padding:0; width:auto;}
|
||||
table {page-break-inside:avoid}
|
||||
div.paragraph {page-break-inside:avoid}
|
||||
</style>
|
||||
<?=$this->action($this->action, $this->controller, null, $this->params)?>
|
@ -0,0 +1 @@
|
||||
<?=json_encode($this->output)?>
|
@ -92,6 +92,25 @@ $('input[name=naissance_date]').datepicker({ changeMonth: true, changeYear: true
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$('input[name=adresse_cp]').autocomplete({
|
||||
minLength: 4,
|
||||
delay: 250,
|
||||
source: function(request, response) {
|
||||
var cp = $('input[name=adresse_cp]').val();
|
||||
$.getJSON('<?=$this->url(array('controller'=>'saisie','action'=>'citysearch'),null,true)?>', { cp: cp },
|
||||
function(data) { response(data); }
|
||||
);
|
||||
},
|
||||
select: function( event, ui ) {
|
||||
var value = ui.item.label;
|
||||
value = value.replace(ui.item.value+': ','');
|
||||
$('input[name=adresse_ville]').val(value);
|
||||
$('select[name=adresse_pays]').val('FRA');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="fieldgrp">
|
||||
<label>Pays</label>
|
||||
<div class="field">
|
||||
|
@ -1,20 +1,23 @@
|
||||
<?=($this->occurrence===false) ? "WorldCheck<br/>Cliquez sur le lien" : "WorldCheck<br/>Occurrences: ".$this->occurrence;?>
|
||||
<? $param = array(
|
||||
'controller'=>'worldcheck',
|
||||
'action'=>'index',
|
||||
'dirSociete'=>$this->data->Societe,
|
||||
'dirNom'=>$this->data->Nom,
|
||||
'dirPrenom'=>$this->data->Prenom,
|
||||
'dirType' =>$this->data->Type,
|
||||
'siren'=>substr($this->siret, 0, 9));
|
||||
<?php if ($this->occurrence===false) {?>
|
||||
Aucune information disponible, Lancer une recherche.
|
||||
<?php } else {?>
|
||||
<?=$this->occurrence?> Occurrences.
|
||||
<?php }?>
|
||||
<?php
|
||||
$param = array(
|
||||
'controller'=>'worldcheck',
|
||||
'action'=>'index',
|
||||
'dirSociete'=>$this->data->Societe,
|
||||
'dirNom'=>$this->data->Nom,
|
||||
'dirPrenom'=>$this->data->Prenom,
|
||||
'dirType' =>$this->data->Type,
|
||||
'siren'=>substr($this->siret, 0, 9));
|
||||
|
||||
foreach ($param as $key =>$val)
|
||||
{
|
||||
if ($val=='')
|
||||
{
|
||||
foreach ($param as $key =>$val) {
|
||||
if ($val=='') {
|
||||
unset($param[$key]);
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<br/>
|
||||
<a href="<?=$this->url($param, null, true)?>">Rechercher en WorldCheck</a>
|
||||
<a href="<?=$this->url($param, null, true)?>">Rechercher dans WorldCheck</a>
|
@ -397,14 +397,14 @@ table {
|
||||
|
||||
/* Main
|
||||
----------------------------------*/
|
||||
body{font-family: Verdana, Arial, sans-serif;font-size: 11px;text-align: center; /* pour corriger le bug de centrage IE */ }
|
||||
#global {text-align:left;}
|
||||
#content {padding:0;margin:0;}
|
||||
body {background-color:#bebebe;font-family: Verdana, Arial, sans-serif;font-size:11px;text-align:center; /* pour corriger le bug de centrage IE */ }
|
||||
#global {width:900px; margin:0 auto; text-align:left;}
|
||||
#content {float:right;clear:both;width:680px;padding:0;margin:0;padding-top:20px;}
|
||||
#center {background-color:#fff;padding:5px 0;}
|
||||
#footer {clear:both;text-align:center;margin-top:15px;}
|
||||
#footer p {font:0.9em Arial, Helvetica, sans-serif; }
|
||||
#center h1 {clear:both;margin:5px;padding:5px; background:#606060; color:#ffffff;font:600 1.4em Arial, Verdana, Sans-serif; letter-spacing:1px; line-height:1.2em;}
|
||||
#center h2 {clear:both; margin:5px; padding:5px; background:#00008c; color:#ffffff; font:bold 1.2em Arial, Verdana, Sans-serif; }
|
||||
#center h1 {clear:both;margin:5px;padding:5px;background:#606060;color:#ffffff;font:600 1.4em Arial, Verdana, Sans-serif;letter-spacing:1px;line-height:1.2em;}
|
||||
#center h2 {clear:both; margin:5px; padding:5px;background:#00008c;color:#ffffff;font:bold 1.2em Arial, Verdana, Sans-serif; }
|
||||
div.paragraph {margin:5px;padding:5px;}
|
||||
.clearfix:after {content: ".";display: block;height: 0;clear: both;visibility: hidden;zoom:1;}
|
||||
a:link {color: #9c093a; text-decoration:none;}
|
||||
@ -416,6 +416,7 @@ a:hover {color: #000066; text-decoration:none;}
|
||||
table.identite {border-collapse:separate;border-spacing:4px;}
|
||||
table.data {width:100%;}
|
||||
table.data td {border:1px solid #ccc; padding:5px;}
|
||||
table.data th {border:1px solid #ccc; padding:5px;}
|
||||
.confidentiel {border-top:1px solid; padding-top:5px; font-style:italic; font-size:9px;}
|
||||
.ui-dialog {text-align:left;}
|
||||
.ui-widget {font-size: 1em;}
|
||||
@ -424,12 +425,11 @@ input, select {border: 1px solid #999999;vertical-align: middle;font: 11px Arial
|
||||
div.ui-state-highlight p {margin: 10px;}
|
||||
div.ui-state-highlight a {text-decoration: underline;}
|
||||
.noborder {border:0;}
|
||||
img { vertical-align:middle; }
|
||||
|
||||
img {vertical-align:middle;}
|
||||
|
||||
/* Menu
|
||||
----------------------------------*/
|
||||
div#menu {display:none;}
|
||||
div#menu {position: absolute;width:200px;}
|
||||
div#menu .ui-widget {font-family:Arial, Sans-serif;font-size:12px;}
|
||||
div#menu ul.navigation li {list-style-type:none;}
|
||||
div#menu ul.navigation li a {display:block;padding:0 20px;text-decoration:none;font-weight:bold;color:#fff;height:25px;line-height:25px;background:#808080 url(/themes/default/images/menu/title.gif);}
|
||||
@ -451,7 +451,6 @@ div#menu div.icones {text-align:center;margin-top:5px;}
|
||||
|
||||
/* Recherche
|
||||
----------------------------------*/
|
||||
/*#center{padding:5px;}*/
|
||||
#center-recherche{text-align:center; padding:0;}
|
||||
#recherche{margin:78px auto 20px auto;}
|
||||
#recherche h3{color:#ffffff; font-size:medium; font-weight:bold;}
|
||||
@ -670,7 +669,7 @@ table.greffe td.type {text-align:center;}
|
||||
/* Kbis
|
||||
----------------------------------*/
|
||||
/* progress bar container */
|
||||
#progressbar { border:1px solid black;width:200px;height:20px;position:relative;color:black;}
|
||||
#progressbar {border:1px solid black;width:200px;height:20px;position:relative;color:black;}
|
||||
/* color bar */
|
||||
#progressbar div.progress {position:absolute;width:0;height:100%;overflow:hidden;background-color:#369;}
|
||||
/* text on bar */
|
||||
@ -678,3 +677,14 @@ table.greffe td.type {text-align:center;}
|
||||
/* text off bar */
|
||||
#progressbar div.text {position:absolute;width:100%;height:100%;text-align:center;}
|
||||
|
||||
|
||||
/* Print
|
||||
----------------------------------*/
|
||||
@media print {
|
||||
body {font-family:Verdana, Arial, sans-serif;font-size: 11px;}
|
||||
#global {width:auto !important;text-align:left;}
|
||||
#content {margin:0; padding:0; width:auto; }
|
||||
table {page-break-inside:avoid}
|
||||
div.paragraph {page-break-inside:avoid}
|
||||
div#menu {display:none;}
|
||||
}
|
||||
|
53
docs/README
53
docs/README
@ -5,6 +5,7 @@ README
|
||||
- Installation
|
||||
- Project
|
||||
- Library
|
||||
- Translate
|
||||
|
||||
Note : Project are define to be use on Linux Server, so take care about path and file name.
|
||||
Also some script (CLI) don't work on Windows.
|
||||
@ -136,7 +137,25 @@ WKHTMLTOPDF
|
||||
- On Ubuntu :
|
||||
sudo apt-get install libxrender1 libfontconfig
|
||||
- Set execution flag (chmod +x)
|
||||
- Test
|
||||
- Test on command line
|
||||
|
||||
Page Break with WkhtmlToPdf :
|
||||
In print CSS use all theses page-break-* properties
|
||||
|
||||
page-break-before,
|
||||
page-break-after
|
||||
Auto Pas de règle particulière en ce qui concerne les sauts de page.
|
||||
Always Force un saut de page systématiquement avant ou après l'élément.
|
||||
Avoid Evite dans la mesure du possible un saut de page avant ou après l'élément.
|
||||
Left Définit que le prochain saut de page se fera sur la page de gauche.
|
||||
Right Définit que le prochain saut de page se fera sur la page de droite.
|
||||
Inherit Valeur identique à celle de l'élément parent.
|
||||
|
||||
page-break-inside
|
||||
Auto Pas de règle particulière en ce qui concerne les sauts de page.
|
||||
Avoid Evite dans la mesure du possible un saut de page au milieu l'élément.
|
||||
Inherit Valeur identique à celle de l'élément parent.
|
||||
|
||||
|
||||
WebService
|
||||
----------
|
||||
@ -159,7 +178,39 @@ LIBRARY
|
||||
|
||||
|
||||
|
||||
TRANSLATE
|
||||
=========
|
||||
|
||||
1. Creating PO file
|
||||
--------------------
|
||||
To create a PO file for different applications, first we need to download and install poedit,
|
||||
here is the download link http://www.poedit.net/download.php
|
||||
|
||||
2. Set the poedit preferences
|
||||
-----------------------------
|
||||
File->Preferences : Fill fields to set our identies
|
||||
tab Parsers, edit PHP settings, in the list of extension add *.phtml
|
||||
|
||||
3. Open a po file
|
||||
------------------
|
||||
PO file configuration for each project. As project as to be share use path that could work everywhere.
|
||||
Catalogue->Properties, Set the Base paht to "../../" (to read under the whole project, if po
|
||||
files is located under PROJECT/application/languages/)
|
||||
|
||||
Add supplemental paths to look in (application, library,....)
|
||||
Add more precise search string by configuring in the Sources keywords these items
|
||||
|
||||
translate
|
||||
_
|
||||
setLabel
|
||||
setValue
|
||||
setMessage
|
||||
setLegend
|
||||
_refresh
|
||||
append
|
||||
prepend
|
||||
|
||||
In PHP source embrace all strings only with these functions.
|
||||
|
||||
|
||||
|
||||
|
@ -13,7 +13,7 @@ class Application_Controller_Plugin_Auth extends Zend_Controller_Plugin_Abstract
|
||||
if ($request->getControllerName()=='user' && $request->getActionName()=='login') {
|
||||
$checkAuth = false;
|
||||
}
|
||||
|
||||
|
||||
if ($request->getControllerName()=='user' && $request->getActionName()=='motpasse') {
|
||||
$checkAuth = false;
|
||||
}
|
||||
@ -42,7 +42,7 @@ class Application_Controller_Plugin_Auth extends Zend_Controller_Plugin_Abstract
|
||||
//On vérifie le tout lors d'une connexion par url
|
||||
if ( !empty($login) && !empty($hach) ) {
|
||||
|
||||
$authAdapter = new Scores_AuthAdapter($login, $hach, $iponly);
|
||||
$authAdapter = new Scores_Auth_Adapter_Ws($login, $hach, $iponly);
|
||||
$result = $auth->authenticate($authAdapter);
|
||||
|
||||
if ( $result->isValid() ) {
|
||||
|
@ -56,7 +56,7 @@ class Annonces
|
||||
' du '.$this->dateAnnonce($ann->DateParution);
|
||||
} else {
|
||||
$view = new Zend_View();
|
||||
$session = new SessionEntreprise(null);
|
||||
$session = new Scores_Session_Entreprise(null);
|
||||
$href = $view->url(array(
|
||||
'controller' => 'juridique',
|
||||
'action' => 'competences',
|
||||
|
102
library/Scores/Auth/Adapter/Db.php
Normal file
102
library/Scores/Auth/Adapter/Db.php
Normal file
@ -0,0 +1,102 @@
|
||||
<?php
|
||||
class Scores_Auth_Adapter_Db implements Zend_Auth_Adapter_Interface
|
||||
{
|
||||
protected $_username;
|
||||
|
||||
protected $_password;
|
||||
|
||||
protected $_hash;
|
||||
|
||||
protected $_timeout = 3600;
|
||||
|
||||
protected $checkWs = false;
|
||||
|
||||
protected $clients = array();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param string $username
|
||||
* @param string $password
|
||||
* @param boolean $checkWs
|
||||
*/
|
||||
public function __construct($username, $password, $checkWs = false)
|
||||
{
|
||||
$this->_username = $username;
|
||||
$this->_password = $password;
|
||||
$this->_hash = md5($username.'|'.$password);
|
||||
$this->checkWs = $checkWs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Limit access to only client IDs
|
||||
* @param array $id
|
||||
*/
|
||||
public function limitClient($id = null)
|
||||
{
|
||||
if (is_array($id) && count($id)>0) {
|
||||
$this->clients = $id;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Override the timeout
|
||||
* @param integer $seconds
|
||||
*/
|
||||
public function setTimeout($seconds = null)
|
||||
{
|
||||
if ($seconds===null)
|
||||
return;
|
||||
|
||||
$this->_timeout = $seconds;
|
||||
}
|
||||
|
||||
/**
|
||||
* (non-PHPdoc)
|
||||
* @see Zend_Auth_Adapter_Interface::authenticate()
|
||||
*/
|
||||
public function authenticate()
|
||||
{
|
||||
$userM = new Application_Model_Sdv1Utilisateurs();
|
||||
|
||||
$sql = $userM->select()
|
||||
->setIntegrityCheck(false)
|
||||
->from(array('u'=>'utilisateurs'), array('u.idClient', 'u.id', 'u.login', 'u.password'))
|
||||
->join(array('c'=>'clients'), 'u.idClient = c.id', array('c.timeout'))
|
||||
->where('u.login=?', $this->_username)
|
||||
->where('u.actif=?', 1)
|
||||
->where('u.deleted=?', 0)
|
||||
->where('c.actif=?','Oui');
|
||||
|
||||
if ( count($this->clients) > 0 ) {
|
||||
$sql->where('u.idClient IN('.join(',',$this->clients).')');
|
||||
}
|
||||
|
||||
if ($this->checkWs) {
|
||||
$sql->where('u.accesWS=?',1);
|
||||
}
|
||||
|
||||
$result = $userM->fetchRow($sql);
|
||||
|
||||
$identity = new stdClass();
|
||||
$identity->username = $this->_username;
|
||||
$identity->hash = $this->_hash;
|
||||
|
||||
if ( null === $result ) {
|
||||
return new Zend_Auth_Result(Zend_Auth_Result::FAILURE_IDENTITY_NOT_FOUND, $identity);
|
||||
} else {
|
||||
if ( $this->_password == $result->password
|
||||
|| $this->_password == md5($result->login.'|'.$result->password) ) {
|
||||
|
||||
$identity->id = $result->id;
|
||||
$identity->idClient = $result->idClient;
|
||||
$timeout = (!empty($result->timeout)) ? $result->timeout : $this->_timeout;
|
||||
$identity->timeout = $timeout;
|
||||
$identity->time = time() + $timeout;
|
||||
return new Zend_Auth_Result(Zend_Auth_Result::SUCCESS, $identity);
|
||||
|
||||
} else {
|
||||
return new Zend_Auth_Result(Zend_Auth_Result::FAILURE_CREDENTIAL_INVALID, $identity);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,9 +1,28 @@
|
||||
<?php
|
||||
class Scores_AuthAdapter implements Zend_Auth_Adapter_Interface
|
||||
class Scores_Auth_Adapter_Ws implements Zend_Auth_Adapter_Interface
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @var unknown
|
||||
*/
|
||||
protected $_username;
|
||||
|
||||
/**
|
||||
*
|
||||
* @var unknown
|
||||
*/
|
||||
protected $_password;
|
||||
|
||||
/**
|
||||
*
|
||||
* @var unknown
|
||||
*/
|
||||
protected $_timeout = 1800;
|
||||
|
||||
/**
|
||||
*
|
||||
* @var unknown
|
||||
*/
|
||||
protected $_checkIp = false;
|
||||
|
||||
public function __construct($username, $password, $iponly = false)
|
||||
@ -16,6 +35,10 @@ class Scores_AuthAdapter implements Zend_Auth_Adapter_Interface
|
||||
$this->_checkIp = $iponly;
|
||||
}
|
||||
|
||||
/**
|
||||
* (non-PHPdoc)
|
||||
* @see Zend_Auth_Adapter_Interface::authenticate()
|
||||
*/
|
||||
public function authenticate()
|
||||
{
|
||||
$adressIp = $_SERVER['REMOTE_ADDR'];
|
||||
@ -44,7 +67,7 @@ class Scores_AuthAdapter implements Zend_Auth_Adapter_Interface
|
||||
$identity->dateValidation = $InfosLogin->result->dateValidation;
|
||||
$identity->nombreConnexions = $InfosLogin->result->nombreConnexions;
|
||||
$identity->dateDerniereConnexion = $InfosLogin->result->dateDerniereConnexion;
|
||||
$identity->dateDebutCompte = $InfosLogin->result->dateDebutCompte;
|
||||
$identity->dateDebutCompte = $InfosLogin->result->dateDebutCompte;
|
||||
$identity->dateFinCompte = $InfosLogin->result->dateFinCompte;
|
||||
$identity->acceptationCGU = $InfosLogin->result->acceptationCGU;
|
||||
$identity->ip = $adressIp;
|
||||
@ -93,9 +116,13 @@ class Scores_AuthAdapter implements Zend_Auth_Adapter_Interface
|
||||
}
|
||||
|
||||
/**
|
||||
* Controle si une adresse IP est dans une liste des IP communiquées sous la forme 192.168.3.5-192.68.3.10;192.168.3.*;192.168.3.10
|
||||
* @param string $strPlageIP La plage d'adresses IP
|
||||
* @param string $adresseIP L'adresse IP à tester
|
||||
* Controle si une adresse IP est dans une liste des IP communiquées sous la forme
|
||||
* 192.168.3.5-192.68.3.10;192.168.3.*;192.168.3.10
|
||||
* @param string $strPlageIP
|
||||
* La plage d'adresses IP
|
||||
* @param string $adresseIP
|
||||
* L'adresse IP à tester
|
||||
* @return boolean
|
||||
*/
|
||||
protected function checkPlagesIp($strPlageIP, $adresseIP)
|
||||
{
|
||||
@ -143,7 +170,8 @@ class Scores_AuthAdapter implements Zend_Auth_Adapter_Interface
|
||||
* @param string $ip Adresse IP
|
||||
* @return integer
|
||||
*/
|
||||
protected function getIpNumber($ip) {
|
||||
protected function getIpNumber($ip)
|
||||
{
|
||||
$tab=explode('.', $ip);
|
||||
return (($tab[0]*256*256*256) + ($tab[1]*256*256) + ($tab[2]*256) + ($tab[3]));
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
class Google
|
||||
class Scores_Google_Maps
|
||||
{
|
||||
protected $url = 'http://maps.google.fr/maps?f=q&hl=fr&geocode=&q=';
|
||||
protected $urlPhoto = '';
|
||||
|
||||
|
||||
public function getGoogleKey($domain)
|
||||
{
|
||||
switch ($domain) {
|
||||
@ -25,7 +25,7 @@ class Google
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected function supprDecimales($dec)
|
||||
{
|
||||
if ($dec>0 )
|
||||
@ -33,7 +33,7 @@ class Google
|
||||
else
|
||||
return ceil($dec);
|
||||
}
|
||||
|
||||
|
||||
public function dec2dms($dec)
|
||||
{
|
||||
$d = $this->supprDecimales($dec);
|
||||
@ -42,9 +42,9 @@ class Google
|
||||
$m = abs($m);
|
||||
return $d.'°'.$m."'".$s.'"';
|
||||
}
|
||||
|
||||
|
||||
public function getGoogleMapLink($q)
|
||||
{
|
||||
return $this->url.$q;
|
||||
}
|
||||
return $this->url.$q;
|
||||
}
|
||||
}
|
@ -695,8 +695,6 @@ class IdentiteEntreprise
|
||||
public function getTelTexte()
|
||||
{
|
||||
$data = '';
|
||||
$data.= '<div class="txtAdresse">';
|
||||
$data.= '<p>';
|
||||
|
||||
if (trim($this->identite->Tel)=='')
|
||||
$data.= 'N/C';
|
||||
@ -715,11 +713,18 @@ class IdentiteEntreprise
|
||||
$adresse = substr($this->identite->Adresse,1,strlen($this->identite->Adresse)-1);
|
||||
if ($i_adr>4) break;
|
||||
}
|
||||
|
||||
$data.= ' <a title="Rechercher le numéro de téléphone dans l\'annuaire" target="_blank" href="http://local.search.ke.voila.fr/S/searchproxi?act=&nom='.$libNom.
|
||||
'&adr='.urlencode($this->identite->Adresse).
|
||||
'&loc='.urlencode($this->identite->CP.' '.$this->identite->Ville).
|
||||
'&x=0&y=0&bhv=searchproxi&profil=enville&guidelocid=&guideregid=&guidedepid=&actid=&ke=&locid=">(Recherche annuaire)</a></p>';
|
||||
$data.= '</div>';
|
||||
'&x=0&y=0&bhv=searchproxi&profil=enville&guidelocid=&guideregid=&guidedepid=&actid=&ke=&locid=">(Recherche annuaire)</a>';
|
||||
|
||||
$data.= '<br/><a href="'.$this->view->url(array(
|
||||
'controller'=>'identite',
|
||||
'action'=>'contacts',
|
||||
'siret'=>$this->identite->Siret,
|
||||
'id'=>$this->identite->id), null, true).
|
||||
'"/>Liste de contacts supplémentaires</a>';
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
@ -1,39 +1,39 @@
|
||||
<?php
|
||||
class Mappy
|
||||
class Mappy
|
||||
{
|
||||
protected $login = 'scoresdecisions';
|
||||
protected $password = 'g1nq3iKv';
|
||||
|
||||
|
||||
protected $villes = array(
|
||||
'BORDEAUX',
|
||||
'CAEN' ,
|
||||
'BORDEAUX',
|
||||
'CAEN' ,
|
||||
'CANNES',
|
||||
'GRENOBLE',
|
||||
'LA BAULE',
|
||||
'GRENOBLE',
|
||||
'LA BAULE',
|
||||
'LILLE',
|
||||
'LYON',
|
||||
'MARSEILLE',
|
||||
'LYON',
|
||||
'MARSEILLE',
|
||||
'MONTPELLIER',
|
||||
'NANCY',
|
||||
'NANTES',
|
||||
'NANCY',
|
||||
'NANTES',
|
||||
'NICE',
|
||||
'RENNES',
|
||||
'STRASBOURG',
|
||||
'RENNES',
|
||||
'STRASBOURG',
|
||||
'TOULOUSE',
|
||||
'ASNIERES-SUR-SEINE',
|
||||
'BOULOGNE-BILLANCOURT',
|
||||
'ASNIERES-SUR-SEINE',
|
||||
'BOULOGNE-BILLANCOURT',
|
||||
'COURBEVOIE',
|
||||
'ISSY-LES-MOULINEAUX',
|
||||
'ISSY-LES-MOULINEAUX',
|
||||
'LEVALLOIS-PERRET',
|
||||
'MONTROUGE',
|
||||
'NANTERRE',
|
||||
'MONTROUGE',
|
||||
'NANTERRE',
|
||||
'NEUILLY-SUR-SEINE',
|
||||
'RUEIL-MALMAISON',
|
||||
'SEVRES',
|
||||
'RUEIL-MALMAISON',
|
||||
'SEVRES',
|
||||
'VERSAILLES',
|
||||
'PARIS'
|
||||
'PARIS'
|
||||
);
|
||||
|
||||
|
||||
public function getToken()
|
||||
{
|
||||
$ACCESSOR_URL = 'http://axe.mappy.com/1v1/';
|
||||
@ -41,36 +41,36 @@ class Mappy
|
||||
$hash = md5($this->login."@".$this->password."@".$timestamp);
|
||||
$preToken = $this->login."@".$timestamp."@".$hash;
|
||||
$urlGetToken = $ACCESSOR_URL . 'token/generate.aspx?auth=' . urlencode($preToken) . '&ip=' . urlencode($_SERVER["REMOTE_ADDR"]);
|
||||
$fh = @fopen($urlGetToken, 'rb');
|
||||
|
||||
$fh = @fopen($urlGetToken, 'rb');
|
||||
|
||||
if ($fh == false) return false;
|
||||
$token = '';
|
||||
while (!feof($fh))$token .= fread($fh, 8192);
|
||||
fclose($fh);
|
||||
return ($token);
|
||||
}
|
||||
|
||||
|
||||
protected function cleanAdress($ville)
|
||||
{
|
||||
$ville = ' '.trim(preg_replace('/([0-9]|ARRONDISSEMENT|_)/i', ' ', $ville)).' ';
|
||||
$ville = trim(strtr($ville, array(' EME ' => '', ' ER ' => '')));
|
||||
return (ucwords(strtolower($ville)));
|
||||
}
|
||||
|
||||
|
||||
public function villeCouverte($ville)
|
||||
{
|
||||
$ville = $this->cleanAdress($ville);
|
||||
if (in_array(strtoupper($ville),$this->villes)){
|
||||
/*if (in_array(strtoupper($ville),$this->villes)){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}*/
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getJs()
|
||||
{
|
||||
$token = $this->getToken();
|
||||
$href = 'http://axe.mappy.com/1v1/init/get.aspx?auth='.$token.'&version=2.16&solution=ajax';
|
||||
return $href;
|
||||
return $href;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -101,6 +101,9 @@ class Scores_Menu
|
||||
),
|
||||
array(
|
||||
'label' => 'IDENTITE',
|
||||
'activateMenu' => array(
|
||||
array('controller'=>'identite', 'action'=>'contacts'),
|
||||
),
|
||||
'pages' => array(
|
||||
array(
|
||||
'label' => "Fiche d'identité",
|
||||
@ -484,8 +487,6 @@ class Scores_Menu
|
||||
*/
|
||||
public function __construct($parameters)
|
||||
{
|
||||
require_once 'Scores/SessionEntreprise.php';
|
||||
|
||||
//Special case, edit foreign company
|
||||
if (array_key_exists('lienref', $parameters)) {
|
||||
$this->lienref = $parameters['lienref'];
|
||||
@ -499,7 +500,7 @@ class Scores_Menu
|
||||
$this->id = $parameters['id'];
|
||||
}
|
||||
if (empty($this->siret) && empty($this->id)) {
|
||||
$session = new SessionEntreprise(null);
|
||||
$session = new Scores_Session_Entreprise(null);
|
||||
$this->siret = $session->getSiret();
|
||||
$this->id = $session->getId();
|
||||
}
|
||||
|
@ -1,22 +0,0 @@
|
||||
<?php
|
||||
class SelectLang
|
||||
{
|
||||
protected $curLang = 'fr';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$utilisateur = new Scores_Utilisateur();
|
||||
$this->curLang = $utilisateur->getLang();
|
||||
}
|
||||
|
||||
/**
|
||||
* Retourne le titre de la colonne de la table selon la langue choisie
|
||||
* @param string Column Name
|
||||
* @return string New Column Name
|
||||
*/
|
||||
public function langSetDB($colName)
|
||||
{
|
||||
$newColName = ($this->curLang == 'fr') ? $colName : $colName.ucfirst($this->curLang);
|
||||
return $newColName;
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
class SessionEntreprise
|
||||
class Scores_Session_Entreprise
|
||||
{
|
||||
protected $index = 'entrep';
|
||||
|
||||
@ -157,4 +157,4 @@ class SessionEntreprise
|
||||
return $compare;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -36,7 +36,8 @@ class Scores_Wkhtml_Pdf
|
||||
if (empty($fileOut)) {$fileOut = str_replace('.html', '.pdf', $fileIn); }
|
||||
if(file_exists($fileOut)){ unlink($fileOut); }
|
||||
|
||||
$options = '--disable-internal-links';
|
||||
$options = '--print-media-type';
|
||||
$options.= ' --disable-internal-links';
|
||||
if ( count($this->options) )
|
||||
{
|
||||
foreach ( $this->options as $name => $value )
|
||||
|
@ -101,6 +101,45 @@ class WsScores
|
||||
return $client;
|
||||
}
|
||||
|
||||
public function getContactEt($siret)
|
||||
{
|
||||
$filename = 'getcontactset-'.$siret;
|
||||
|
||||
if ($this->cacheWrite) {
|
||||
$cache = new Cache($filename);
|
||||
if ($cache->exist() && $this->cacheEnable ){
|
||||
return $cache->getBlock();
|
||||
}
|
||||
}
|
||||
|
||||
$params = new stdClass();
|
||||
$params->siret = $siret;
|
||||
$client = $this->loadClient('interne');
|
||||
try {
|
||||
$reponse = $client->getContactEt($params);
|
||||
if ($this->cacheWrite) {
|
||||
$cache->deletefile();
|
||||
$cache->setBlock($reponse->getContactEtResult);
|
||||
}
|
||||
return $reponse->getContactEtResult;
|
||||
} catch (SoapFault $fault) {
|
||||
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
|
||||
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
|
||||
return $fault->faultstring;
|
||||
} else {
|
||||
$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param unknown $siren
|
||||
* @param number $offset
|
||||
* @param number $nbItems
|
||||
* @return boolean
|
||||
*/
|
||||
public function getSubventionList($siren, $offset = 0, $nbItems = 100)
|
||||
{
|
||||
$params = new stdClass();
|
||||
@ -281,6 +320,26 @@ class WsScores
|
||||
}
|
||||
}
|
||||
|
||||
public function getCatalogCity($id, $columns)
|
||||
{
|
||||
$params = new stdClass();
|
||||
$params->id = $id;
|
||||
$params->columns = $columns;
|
||||
$client = $this->loadClient('catalog');
|
||||
try {
|
||||
$reponse = $client->getCity($params);
|
||||
return $reponse->getCityResult;
|
||||
} catch (SoapFault $fault) {
|
||||
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
|
||||
return $fault->faultstring;
|
||||
} else {
|
||||
echo $client->__getLastResponse();
|
||||
//$this->soaperror(__FUNCTION__, $fault, $client->__getLastRequest(), $client->__getLastResponse());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function getCatalogLegalForm($id, $columns)
|
||||
{
|
||||
$params = new stdClass();
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Jeditable - jQuery in place edit plugin
|
||||
*
|
||||
* Copyright (c) 2006-2009 Mika Tuupola, Dylan Verheul
|
||||
* Copyright (c) 2006-2013 Mika Tuupola, Dylan Verheul
|
||||
*
|
||||
* Licensed under the MIT license:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Version 1.7.2-dev
|
||||
* Version 1.7.3
|
||||
*
|
||||
* ** means there is basic unit tests for this parameter.
|
||||
*
|
||||
@ -452,8 +452,8 @@
|
||||
text: {
|
||||
element : function(settings, original) {
|
||||
var input = $('<input />');
|
||||
if (settings.width != 'none') { input.attr('width', settings.width); }
|
||||
if (settings.height != 'none') { input.attr('height', settings.height); }
|
||||
if (settings.width != 'none') { input.width(settings.width); }
|
||||
if (settings.height != 'none') { input.height(settings.height); }
|
||||
/* https://bugzilla.mozilla.org/show_bug.cgi?id=236791 */
|
||||
//input[0].setAttribute('autocomplete','off');
|
||||
input.attr('autocomplete','off');
|
||||
|
@ -397,14 +397,14 @@ table {
|
||||
|
||||
/* Main
|
||||
----------------------------------*/
|
||||
body{ background-color: #bebebe;font-family: Verdana, Arial, sans-serif;font-size: 11px;text-align: center; /* pour corriger le bug de centrage IE */ }
|
||||
body {background-color:#bebebe;font-family: Verdana, Arial, sans-serif;font-size:11px;text-align:center; /* pour corriger le bug de centrage IE */ }
|
||||
#global {width:900px; margin:0 auto; text-align:left;}
|
||||
#content {float:right;clear:both;width:680px;padding:0;margin:0;padding-top:20px;}
|
||||
#center {background-color:#fff;padding:5px 0;}
|
||||
#footer {clear:both;text-align:center;margin-top:15px;}
|
||||
#footer p {font:0.9em Arial, Helvetica, sans-serif; }
|
||||
#center h1 {clear:both;margin:5px;padding:5px; background:#606060; color:#ffffff;font:600 1.4em Arial, Verdana, Sans-serif; letter-spacing:1px; line-height:1.2em;}
|
||||
#center h2 {clear:both; margin:5px; padding:5px; background:#00008c; color:#ffffff; font:bold 1.2em Arial, Verdana, Sans-serif; }
|
||||
#center h1 {clear:both;margin:5px;padding:5px;background:#606060;color:#ffffff;font:600 1.4em Arial, Verdana, Sans-serif;letter-spacing:1px;line-height:1.2em;}
|
||||
#center h2 {clear:both; margin:5px; padding:5px;background:#00008c;color:#ffffff;font:bold 1.2em Arial, Verdana, Sans-serif; }
|
||||
div.paragraph {margin:5px;padding:5px;}
|
||||
.clearfix:after {content: ".";display: block;height: 0;clear: both;visibility: hidden;zoom:1;}
|
||||
a:link {color: #9c093a; text-decoration:none;}
|
||||
@ -425,8 +425,7 @@ input, select {border: 1px solid #999999;vertical-align: middle;font: 11px Arial
|
||||
div.ui-state-highlight p {margin: 10px;}
|
||||
div.ui-state-highlight a {text-decoration: underline;}
|
||||
.noborder {border:0;}
|
||||
img { vertical-align:middle; }
|
||||
|
||||
img {vertical-align:middle;}
|
||||
|
||||
/* Menu
|
||||
----------------------------------*/
|
||||
@ -452,7 +451,6 @@ div#menu div.icones {text-align:center;margin-top:5px;}
|
||||
|
||||
/* Recherche
|
||||
----------------------------------*/
|
||||
/*#center{padding:5px;}*/
|
||||
#center-recherche{text-align:center; padding:0;}
|
||||
#recherche{margin:78px auto 20px auto;}
|
||||
#recherche h3{color:#ffffff; font-size:medium; font-weight:bold;}
|
||||
@ -671,7 +669,7 @@ table.greffe td.type {text-align:center;}
|
||||
/* Kbis
|
||||
----------------------------------*/
|
||||
/* progress bar container */
|
||||
#progressbar { border:1px solid black;width:200px;height:20px;position:relative;color:black;}
|
||||
#progressbar {border:1px solid black;width:200px;height:20px;position:relative;color:black;}
|
||||
/* color bar */
|
||||
#progressbar div.progress {position:absolute;width:0;height:100%;overflow:hidden;background-color:#369;}
|
||||
/* text on bar */
|
||||
@ -679,3 +677,14 @@ table.greffe td.type {text-align:center;}
|
||||
/* text off bar */
|
||||
#progressbar div.text {position:absolute;width:100%;height:100%;text-align:center;}
|
||||
|
||||
|
||||
/* Print
|
||||
----------------------------------*/
|
||||
@media print {
|
||||
body {font-family:Verdana, Arial, sans-serif;font-size: 11px;}
|
||||
#global {width:auto !important;text-align:left;}
|
||||
#content {margin:0; padding:0; width:auto; }
|
||||
table {page-break-inside:avoid}
|
||||
div.paragraph {page-break-inside:avoid}
|
||||
div#menu {display:none;}
|
||||
}
|
||||
|
6
scripts/build/config/_sql/structure/tabVilles.sql
Normal file
6
scripts/build/config/_sql/structure/tabVilles.sql
Normal file
@ -0,0 +1,6 @@
|
||||
CREATE TABLE IF NOT EXISTS `tabVilles` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`cp` char(5) NOT NULL,
|
||||
`commune` varchar(80) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM COMMENT='Codes Postales';
|
@ -43,6 +43,11 @@ $catalogs = array(
|
||||
'table' => 'tabFJur',
|
||||
'method' => array('name'=>'getCatalogLegalForm', 'params'=> array( null , array('code', 'libelle', 'libelleEn') ))
|
||||
),
|
||||
'city' => array(
|
||||
'sql' => 'tabVilles.sql',
|
||||
'table' => 'tabVilles',
|
||||
'method' => array('name'=>'getCatalogCity', 'params'=> array( null , array('cp', 'commune') ))
|
||||
),
|
||||
);
|
||||
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user