Merge for release in staging

This commit is contained in:
Michael RICOIS 2013-11-21 16:31:49 +00:00
parent d3ffafb3fe
commit b9c388a79f
38 changed files with 1371 additions and 1056 deletions

View File

@ -11,7 +11,6 @@ class DirigeantController extends Zend_Controller_Action
$this->id = $request->getParam('id', 0); $this->id = $request->getParam('id', 0);
require_once 'Scores/WsScores.php'; require_once 'Scores/WsScores.php';
require_once 'Scores/SessionEntreprise.php';
} }
/** /**
@ -34,7 +33,7 @@ class DirigeantController extends Zend_Controller_Action
$dirigeants = $infos->result->item; $dirigeants = $infos->result->item;
$user = new Scores_Utilisateur(); $user = new Scores_Utilisateur();
$session = new SessionEntreprise($this->siret, $this->id); $session = new Scores_Session_Entreprise($this->siret, $this->id);
if ($user->checkPerm('dirigeantsop')){ if ($user->checkPerm('dirigeantsop')){
$href = $this->view->url(array('controller'=>'dirigeant', 'action'=>'op', 'siret'=>$this->siret)); $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; $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('dirigeants', $dirigeants);
$this->view->assign('exportObjet', $dirigeants); $this->view->assign('exportObjet', $dirigeants);
@ -102,7 +101,7 @@ class DirigeantController extends Zend_Controller_Action
$dirigeants = $infos->item; $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('siren', $siren);
$this->view->assign('siret', $this->siret); $this->view->assign('siret', $this->siret);

View File

@ -11,7 +11,6 @@ class EvaluationController extends Zend_Controller_Action
$this->id = $request->getParam('id', 0); $this->id = $request->getParam('id', 0);
require_once 'Scores/WsScores.php'; require_once 'Scores/WsScores.php';
require_once 'Scores/SessionEntreprise.php';
require_once 'Scores/IdentiteEntreprise.php'; require_once 'Scores/IdentiteEntreprise.php';
} }
@ -113,7 +112,7 @@ class EvaluationController extends Zend_Controller_Action
$siren = substr($this->siret,0,9); $siren = substr($this->siret,0,9);
$ws = new WsScores(); $ws = new WsScores();
$entreprise = new SessionEntreprise($this->siret, $this->id); $entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
$identite = $ws->getIdentite($siren); $identite = $ws->getIdentite($siren);
$indiscore = $ws->getIndiScore($siren); $indiscore = $ws->getIndiScore($siren);
$infos = $ws->getRatios($siren, 'indiscore2'); // @todo : vérifier la page $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(); $ws = new WsScores();
$siren = substr($this->siret,0,9); $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('siret', $this->siret);
$this->view->assign('id', $this->id); $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()); $this->view->assign('rs', $sessionEntreprise->getRaisonSociale());
} else { } else {
@ -787,7 +786,7 @@ class EvaluationController extends Zend_Controller_Action
if (!empty($companyname)) { if (!empty($companyname)) {
$this->view->raisonSociale = $companyname; $this->view->raisonSociale = $companyname;
} else { } else {
$session = new SessionEntreprise($this->siret, $this->id); $session = new Scores_Session_Entreprise($this->siret, $this->id);
$this->view->raisonSociale = $session->getRaisonSociale(); $this->view->raisonSociale = $session->getRaisonSociale();
} }
$this->view->emailCommande = $user->getEmail(); $this->view->emailCommande = $user->getEmail();
@ -848,7 +847,7 @@ class EvaluationController extends Zend_Controller_Action
if(!$user->checkPerm('INDISCORE3') && !$user->checkPerm('INDISCORE3P')) if(!$user->checkPerm('INDISCORE3') && !$user->checkPerm('INDISCORE3P'))
$this->_forward('perms', 'error'); $this->_forward('perms', 'error');
$sessionEntreprise = new SessionEntreprise($this->siret, $this->id); $sessionEntreprise = new Scores_Session_Entreprise($this->siret, $this->id);
$ws = new WsScores(); $ws = new WsScores();
$siren = substr($this->siret,0,9); $siren = substr($this->siret,0,9);

View File

@ -6,7 +6,6 @@ class FinanceController extends Zend_Controller_Action
public function init() public function init()
{ {
require_once 'Scores/SessionEntreprise.php';
require_once 'Scores/WsScores.php'; require_once 'Scores/WsScores.php';
$request = $this->getRequest(); $request = $this->getRequest();
@ -27,7 +26,7 @@ class FinanceController extends Zend_Controller_Action
public function syntheseAction() public function syntheseAction()
{ {
$user = new Scores_Utilisateur(); $user = new Scores_Utilisateur();
$session = new SessionEntreprise($this->siret, $this->id); $session = new Scores_Session_Entreprise($this->siret, $this->id);
$request = $this->getRequest(); $request = $this->getRequest();
$typeBilan = $request->getParam('typeBilan', 'N'); $typeBilan = $request->getParam('typeBilan', 'N');
@ -206,7 +205,7 @@ class FinanceController extends Zend_Controller_Action
$request = $this->getRequest(); $request = $this->getRequest();
$autrePage = $request->getParam('apage'); $autrePage = $request->getParam('apage');
$typeBilan = $request->getParam('typeBilan', 'N'); $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 //Récupération des informations
if (empty($autrePage)) { if (empty($autrePage)) {
@ -466,7 +465,7 @@ class FinanceController extends Zend_Controller_Action
} }
$typeBilan = $request->getParam('typeBilan', 'N'); $typeBilan = $request->getParam('typeBilan', 'N');
$entreprise = new SessionEntreprise($this->siret, $this->id); $entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
$tabRatio = array( $tabRatio = array(
array('titre' => 'EQUILIBRE FINANCIER'), array('titre' => 'EQUILIBRE FINANCIER'),
@ -645,7 +644,7 @@ class FinanceController extends Zend_Controller_Action
$unite = $request->getParam('unit', '€'); $unite = $request->getParam('unit', '€');
$type = $request->getParam('type', ''); $type = $request->getParam('type', '');
$date = $request->getParam('date', ''); $date = $request->getParam('date', '');
$entreprise = new SessionEntreprise($this->siret, $this->id); $entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
switch($type) switch($type)
{ {
@ -742,7 +741,7 @@ class FinanceController extends Zend_Controller_Action
$type = 'réel normal ou simplifié'; $type = 'réel normal ou simplifié';
break; break;
} }
$session = new SessionEntreprise($params['siren']); $session = new Scores_Session_Entreprise($params['siren']);
$this->view->assign('raisonSociale', $session->getRaisonSociale()); $this->view->assign('raisonSociale', $session->getRaisonSociale());
$this->view->assign('size', filesize($file)); $this->view->assign('size', filesize($file));
$this->view->assign('name', $name); $this->view->assign('name', $name);
@ -893,7 +892,7 @@ class FinanceController extends Zend_Controller_Action
$listBilan = $ws->getListeBilans(substr($this->siret, 0, 9)); $listBilan = $ws->getListeBilans(substr($this->siret, 0, 9));
if ($listBilan === false) $this->_forward('soap', 'error'); 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 ) if( $listBilan->nbReponses > 0 )
{ {
@ -966,7 +965,7 @@ class FinanceController extends Zend_Controller_Action
$urlImg = new Logo($siren); $urlImg = new Logo($siren);
$sessionEntreprise = new SessionEntreprise($this->siret, $this->id); $sessionEntreprise = new Scores_Session_Entreprise($this->siret, $this->id);
$ws = new WsScores(); $ws = new WsScores();
$infos = $ws->getInfosBourse($siren); $infos = $ws->getInfosBourse($siren);
@ -1006,7 +1005,7 @@ class FinanceController extends Zend_Controller_Action
$infos = $this->getRequest()->getParam('infos'); $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('banques', $infos->result->item);
$this->view->assign('raisonSociale', $entreprise->getRaisonSociale()); $this->view->assign('raisonSociale', $entreprise->getRaisonSociale());
$this->view->assign('siren', substr($this->siret, 0, 9)); $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); $siren = substr($this->siret, 0, 9);
$ws = new WsScores(); $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()); $this->view->assign('raisonSociale', $entreprise->getRaisonSociale());
$infos = $ws->getRatios($siren, 'ratios'); $infos = $ws->getRatios($siren, 'ratios');
@ -1256,7 +1255,7 @@ class FinanceController extends Zend_Controller_Action
public function subventionsAction() 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); $siren = substr($this->siret, 0, 9);
$this->view->assign('raisonSociale', $sessionEntreprise->getRaisonSociale()); $this->view->assign('raisonSociale', $sessionEntreprise->getRaisonSociale());
$this->view->assign('id', $this->id); $this->view->assign('id', $this->id);
@ -1276,7 +1275,7 @@ class FinanceController extends Zend_Controller_Action
public function subventionAction() 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); $siren = substr($this->siret, 0, 9);
$this->view->assign('raisonSociale', $sessionEntreprise->getRaisonSociale()); $this->view->assign('raisonSociale', $sessionEntreprise->getRaisonSociale());
$this->view->assign('id', $this->id); $this->view->assign('id', $this->id);

View File

@ -14,7 +14,6 @@ class IdentiteController extends Zend_Controller_Action
$this->id = $request->getParam('id', 0); $this->id = $request->getParam('id', 0);
require_once 'Scores/WsScores.php'; require_once 'Scores/WsScores.php';
require_once 'Scores/SessionEntreprise.php';
require_once 'Scores/IdentiteEntreprise.php'; require_once 'Scores/IdentiteEntreprise.php';
} }
@ -72,7 +71,7 @@ class IdentiteController extends Zend_Controller_Action
} else { } else {
//Mise en session //Mise en session
$session = new SessionEntreprise($this->siret, $this->id, true); $session = new Scores_Session_Entreprise($this->siret, $this->id, true);
$session->setInfoEntrep($infos); $session->setInfoEntrep($infos);
//Date de dernière mise à jour //Date de dernière mise à jour
@ -209,7 +208,7 @@ class IdentiteController extends Zend_Controller_Action
if ($infos === false) $this->_forward('soap', 'error'); if ($infos === false) $this->_forward('soap', 'error');
//Mise en session //Mise en session
$session = new SessionEntreprise($this->siret, $this->id); $session = new Scores_Session_Entreprise($this->siret, $this->id);
$session->setInfoEntrep($infos->Identite); $session->setInfoEntrep($infos->Identite);
//Element Fiche identite //Element Fiche identite
@ -314,7 +313,7 @@ class IdentiteController extends Zend_Controller_Action
$actif = $this->getRequest()->getParam('actif', -1); $actif = $this->getRequest()->getParam('actif', -1);
$this->view->headTitle()->append('Liste des établissements - Siren '.$siren); $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(); $user = new Scores_Utilisateur();
$ws = new WsScores(); $ws = new WsScores();
@ -360,7 +359,7 @@ class IdentiteController extends Zend_Controller_Action
$siren = substr($this->siret,0,9); $siren = substr($this->siret,0,9);
$actif = $this->getRequest()->getParam('actif', -1); $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(); $user = new Scores_Utilisateur();
$ws = new WsScores(); $ws = new WsScores();
@ -579,7 +578,7 @@ class IdentiteController extends Zend_Controller_Action
//Define SIREN if exist //Define SIREN if exist
if ( intval($identite->siren)!=0 ) { if ( intval($identite->siren)!=0 ) {
$siren = $identite->siren; $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('siren', $siren);
$this->view->assign('siret', $session->getSiret()); $this->view->assign('siret', $session->getSiret());
$this->view->assign('isin', $session->getIsin()); $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); $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('isin', $session->getIsin());
$this->view->assign('siren', $siren); $this->view->assign('siren', $siren);
@ -970,7 +969,7 @@ class IdentiteController extends Zend_Controller_Action
$siren = substr($this->siret,0,9); $siren = substr($this->siret,0,9);
$this->view->headTitle()->append('Evènements - Siren '.$siren); $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(); $ws = new WsScores();
$infos = $ws->getListeEvenements($siren); $infos = $ws->getListeEvenements($siren);
@ -996,7 +995,7 @@ class IdentiteController extends Zend_Controller_Action
$user = new Scores_Utilisateur(); $user = new Scores_Utilisateur();
if ($user->checkPref('news')) if ($user->checkPref('news'))
{ {
$session = new SessionEntreprise($this->siret, $this->id); $session = new Scores_Session_Entreprise($this->siret, $this->id);
$items = array(); $items = array();
if ($googleNews!==false){ if ($googleNews!==false){
@ -1099,8 +1098,7 @@ class IdentiteController extends Zend_Controller_Action
$user = new Scores_Utilisateur(); $user = new Scores_Utilisateur();
$this->view->assign('facade', $user->checkPref('mappy')); $this->view->assign('facade', $user->checkPref('mappy'));
require_once 'Scores/Google.php'; $google = new Scores_Google_Maps();
$google = new Google();
$decLat = $google->dec2dms($infos->GeoLat); $decLat = $google->dec2dms($infos->GeoLat);
$decLon = $google->dec2dms($infos->GeoLon); $decLon = $google->dec2dms($infos->GeoLon);
$mapsHref = $google->getGoogleMapLink(urlencode( $mapsHref = $google->getGoogleMapLink(urlencode(
@ -1186,7 +1184,7 @@ class IdentiteController extends Zend_Controller_Action
$heading = $deg[$num]; $heading = $deg[$num];
$streetview->setHeading($heading); $streetview->setHeading($heading);
//$streetview->setLocationTxt($adresse); //$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('url', $url);
} }
$this->view->assign('lat', $lat); $this->view->assign('lat', $lat);
@ -1285,4 +1283,21 @@ class IdentiteController extends Zend_Controller_Action
$this->view->assign('result', $result); $this->view->assign('result', $result);
$this->view->assign('siren', $siren); $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);
}
} }

View File

@ -11,7 +11,6 @@ class JuridiqueController extends Zend_Controller_Action
$this->id = $request->getParam('id', 0); $this->id = $request->getParam('id', 0);
require_once 'Scores/WsScores.php'; 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(); $fj = $session->getFormeJuridique();
if ( $fj>9000 && $fj<9999 && intval($siren)==0 ) { if ( $fj>9000 && $fj<9999 && intval($siren)==0 ) {
$vue = 'asso'; $vue = 'asso';
@ -50,7 +49,7 @@ class JuridiqueController extends Zend_Controller_Action
$this->view->assign('raisonSociale', $session->getRaisonSociale()); $this->view->assign('raisonSociale', $session->getRaisonSociale());
$this->view->assign('AutrePage', $request->getParam('apage')); $this->view->assign('AutrePage', $request->getParam('apage'));
if ($session->getSource()=='006') { if ($session->getSource()=='006' || $session->getSourceId()=='007') {
$this->view->assign('AutreSource', true); $this->view->assign('AutreSource', true);
@ -224,7 +223,7 @@ class JuridiqueController extends Zend_Controller_Action
$request = $this->getRequest(); $request = $this->getRequest();
$idAnn = $request->getParam('idann', false); $idAnn = $request->getParam('idann', false);
$siren = substr($this->siret, 0,9); $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(); $ws = new WsScores();
if ($idAnn!=false) { if ($idAnn!=false) {
@ -271,7 +270,7 @@ class JuridiqueController extends Zend_Controller_Action
$request = $this->getRequest(); $request = $this->getRequest();
$type = $request->getParam('type', ''); $type = $request->getParam('type', '');
$siren = substr($this->siret,0,9); $siren = substr($this->siret,0,9);
$session = new SessionEntreprise($this->siret, $this->id); $session = new Scores_Session_Entreprise($this->siret, $this->id);
$abbrev = array( $abbrev = array(
' TGI ' => 'TRIBUNAL DE GRANDE INSTANCE DE ', ' TGI ' => 'TRIBUNAL DE GRANDE INSTANCE DE ',
@ -312,7 +311,7 @@ class JuridiqueController extends Zend_Controller_Action
public function conventionsAction() public function conventionsAction()
{ {
$siren = substr($this->siret, 0,9); $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('siren', $siren);
$this->view->assign('siret', $this->siret); $this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale()); $this->view->assign('raisonSociale', $session->getRaisonSociale());
@ -334,7 +333,7 @@ class JuridiqueController extends Zend_Controller_Action
$request = $this->getRequest(); $request = $this->getRequest();
$idObject = $request->getParam('idObject', 0); $idObject = $request->getParam('idObject', 0);
$siren = substr($this->siret, 0,9); $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('siren', $siren);
$this->view->assign('siret', $this->siret); $this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale()); $this->view->assign('raisonSociale', $session->getRaisonSociale());

View File

@ -15,18 +15,15 @@ class PiecesController extends Zend_Controller_Action
protected $siret; protected $siret;
protected $id; protected $id;
protected $entrep;
public function init() public function init()
{ {
require_once 'Scores/WsScores.php'; require_once 'Scores/WsScores.php';
require_once 'Scores/SessionEntreprise.php';
require_once 'Infogreffe/Infogreffe.php'; require_once 'Infogreffe/Infogreffe.php';
$request = $this->getRequest(); $request = $this->getRequest();
$this->siret = $request->getParam('siret'); $this->siret = $request->getParam('siret');
$this->id = $request->getParam('id', 0); $this->id = $request->getParam('id', 0);
$this->entrep = new SessionEntreprise($this->siret, $this->id);
} }
public function indexAction(){} public function indexAction(){}
@ -37,6 +34,7 @@ class PiecesController extends Zend_Controller_Action
public function cmdassociationAction() public function cmdassociationAction()
{ {
$user = new Scores_Utilisateur(); $user = new Scores_Utilisateur();
$session = new Scores_Session_Entreprise($this->siret, $this->id);
$request = $this->getRequest(); $request = $this->getRequest();
$email = $request->getParam('email', ''); $email = $request->getParam('email', '');
@ -58,7 +56,7 @@ class PiecesController extends Zend_Controller_Action
$infoAsso->siren = $siren; $infoAsso->siren = $siren;
$infoAsso->waldec = ''; $infoAsso->waldec = '';
$infoAsso->idEntreprise = $this->id; $infoAsso->idEntreprise = $this->id;
$infoAsso->raisonSociale = $this->entrep->getRaisonSociale(); $infoAsso->raisonSociale = $session->getRaisonSociale();
$infoDemande = new stdClass(); $infoDemande = new stdClass();
$infoDemande->reference = $request->getParam('reference'); $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('siren', substr($this->siret, 0,9));
$this->view->assign('siret', $this->siret); $this->view->assign('siret', $this->siret);
$this->view->assign('id', $this->id); $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'); $this->view->headScript()->appendFile('/themes/default/scripts/pieces.js', 'text/javascript');
$user = new Scores_Utilisateur(); $user = new Scores_Utilisateur();
$session = new Scores_Session_Entreprise($this->siret, $this->id);
//Catégorie Juridique //Catégorie Juridique
$cj = $this->entrep->getFormeJuridique(); $cj = $session->getFormeJuridique();
if( in_array($cj, $this->association_cj) ) { if( in_array($cj, $this->association_cj) ) {
$this->_forward('associationactes'); $this->_forward('associationactes');
} }
@ -336,7 +335,7 @@ class PiecesController extends Zend_Controller_Action
$this->view->assign('InfosActes', $infosActes); $this->view->assign('InfosActes', $infosActes);
$this->view->assign('siren', $siren); $this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret); $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')); $this->view->assign('surveillance', $user->checkPerm('survbilan'));
} }
@ -347,11 +346,12 @@ class PiecesController extends Zend_Controller_Action
public function bilansAction() public function bilansAction()
{ {
$user = new Scores_Utilisateur(); $user = new Scores_Utilisateur();
$session = new Scores_Session_Entreprise($this->siret, $this->id);
$this->view->headScript()->appendFile('/themes/default/scripts/pieces.js', 'text/javascript'); $this->view->headScript()->appendFile('/themes/default/scripts/pieces.js', 'text/javascript');
//Catégorie Juridique //Catégorie Juridique
$cj = $this->entrep->getFormeJuridique(); $cj = $session->getFormeJuridique();
if( in_array($cj, $this->association_cj) ) { if( in_array($cj, $this->association_cj) ) {
$this->_forward('associationbilans'); $this->_forward('associationbilans');
} else { } else {
@ -462,7 +462,7 @@ class PiecesController extends Zend_Controller_Action
$this->view->assign('InfosBilans', $infosBilans); $this->view->assign('InfosBilans', $infosBilans);
$this->view->assign('siren', $siren); $this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret); $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')); $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('siret', $this->siret);
$this->view->assign('siren', $this->siren); $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()); $this->view->assign('raisonSociale', $session->getRaisonSociale());
$user = new Scores_Utilisateur(); $user = new Scores_Utilisateur();
@ -1106,7 +1106,7 @@ class PiecesController extends Zend_Controller_Action
$siren = substr($this->siret, 0, 9); $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(); $user = new Scores_Utilisateur();
$permKbis = false; $permKbis = false;
@ -1179,7 +1179,7 @@ class PiecesController extends Zend_Controller_Action
'cp' => '', 'cp' => '',
'ville' => '', 'ville' => '',
'siren' => substr($this->siret,0,9), 'siren' => substr($this->siret,0,9),
'raisonSociale' => $this->entrep->getRaisonSociale(), 'raisonSociale' => $session->getRaisonSociale(),
'type' => 'M', 'type' => 'M',
'dateCommande' => date('Y-m-d H:i:s'), 'dateCommande' => date('Y-m-d H:i:s'),
); );
@ -1239,7 +1239,7 @@ class PiecesController extends Zend_Controller_Action
'cp' => $params['cp'], 'cp' => $params['cp'],
'ville' => $params['ville'], 'ville' => $params['ville'],
'siren' => substr($this->siret,0,9), 'siren' => substr($this->siret,0,9),
'raisonSociale' => $this->entrep->getRaisonSociale(), 'raisonSociale' => $session->getRaisonSociale(),
'type' => 'C', 'type' => 'C',
'dateCommande' => date('Y-m-d H:i:s'), 'dateCommande' => date('Y-m-d H:i:s'),
); );
@ -1335,6 +1335,8 @@ class PiecesController extends Zend_Controller_Action
$siren = substr($this->siret, 0,9); $siren = substr($this->siret, 0,9);
$session = new Scores_Session_Entreprise($this->siret, $this->id);
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
$path = $c->profil->path->data.'/association/actes'; $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'){ if (substr($session->AutreId,0.1)=='W'){
foreach (glob("$path/ST-".$session->AutreId."-*.pdf") as $filename) { foreach (glob("$path/ST-".$session->AutreId."-*.pdf") as $filename) {
preg_match('/ST-(.*)-([0-9]{8})\.pdf$/', $filename, $matches); 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('siren', $siren);
$this->view->assign('siret', $this->siret); $this->view->assign('siret', $this->siret);
$this->view->assign('id', $this->id); $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(); $user = new Scores_Utilisateur();
$session = new Scores_Session_Entreprise($this->siret, $this->id);
$siren = substr($this->siret,0,9); $siren = substr($this->siret,0,9);
$bilans = array(); $bilans = array();
@ -1475,7 +1479,7 @@ class PiecesController extends Zend_Controller_Action
$this->view->assign('siren', substr($this->siret, 0,9)); $this->view->assign('siren', substr($this->siret, 0,9));
$this->view->assign('siret', $this->siret); $this->view->assign('siret', $this->siret);
$this->view->assign('id', $this->id); $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(); $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('raisonSociale', $session->getRaisonSociale());
$this->view->assign('siren', $params['siret']); $this->view->assign('siren', $params['siret']);
$this->view->assign('email', $user->getEmail()); $this->view->assign('email', $user->getEmail());
@ -1656,7 +1660,7 @@ class PiecesController extends Zend_Controller_Action
if (!empty($type)){ if (!empty($type)){
$detail = true; $detail = true;
} }
$session = new SessionEntreprise($this->siret, $this->id); $session = new Scores_Session_Entreprise($this->siret, $this->id);
$ws = new WsScores(); $ws = new WsScores();
if ($detail){ if ($detail){
$infos = $ws->getPrivilegesDetail($siren, array($type)); $infos = $ws->getPrivilegesDetail($siren, array($type));

View File

@ -81,7 +81,6 @@ class SaisieController extends Zend_Controller_Action
public function init() public function init()
{ {
require_once 'Scores/WsScores.php'; require_once 'Scores/WsScores.php';
require_once 'Scores/SessionEntreprise.php';
require_once 'Scores/IdentiteEntreprise.php'; require_once 'Scores/IdentiteEntreprise.php';
$ws = new WsScores(); $ws = new WsScores();
@ -140,7 +139,7 @@ class SaisieController extends Zend_Controller_Action
$devises = $devisesReponse->result->item; $devises = $devisesReponse->result->item;
//Mise en session //Mise en session
$session = new SessionEntreprise($siret, $id, true); $session = new Scores_Session_Entreprise($siret, $id, true);
$session->setInfoEntrep($infos); $session->setInfoEntrep($infos);
$sessionSaisie = new Zend_Session_Namespace('saisie'); $sessionSaisie = new Zend_Session_Namespace('saisie');
@ -281,7 +280,7 @@ class SaisieController extends Zend_Controller_Action
$siret = $request->getParam('siret'); $siret = $request->getParam('siret');
$id = $request->getParam('id', 0); $id = $request->getParam('id', 0);
$session = new SessionEntreprise($siret, $id); $session = new Scores_Session_Entreprise($siret, $id);
$ws = new WsScores(); $ws = new WsScores();
@ -807,7 +806,7 @@ class SaisieController extends Zend_Controller_Action
$this->view->inlineScript()->appendFile('/libs/form/jquery.form.js'); $this->view->inlineScript()->appendFile('/libs/form/jquery.form.js');
if ( intval($siren)==0 ) { if ( intval($siren)==0 ) {
$session = new SessionEntreprise(); $session = new Scores_Session_Entreprise();
$siren = ''; $siren = '';
if ( substr($session->AutreId,0,1)=='W' ) { if ( substr($session->AutreId,0,1)=='W' ) {
$siren = $session->AutreId; $siren = $session->AutreId;
@ -830,7 +829,7 @@ class SaisieController extends Zend_Controller_Action
$siren = substr($siret,0,9); $siren = substr($siret,0,9);
$this->view->assign('siren', $siren); $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('siret', $siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale()); $this->view->assign('raisonSociale', $session->getRaisonSociale());
@ -1346,11 +1345,11 @@ class SaisieController extends Zend_Controller_Action
//Override session session //Override session session
if ( intval($result->siren) != 0 ) { if ( intval($result->siren) != 0 ) {
$siren = $result->siren; $siren = $result->siren;
$session = new SessionEntreprise($siren); $session = new Scores_Session_Entreprise($siren);
} }
} elseif ($siren !== null) { } elseif ($siren !== null) {
$session = new SessionEntreprise($siren); $session = new Scores_Session_Entreprise($siren);
$rs = $session->getRaisonSociale(); $rs = $session->getRaisonSociale();
} }
@ -1959,7 +1958,7 @@ class SaisieController extends Zend_Controller_Action
$this->view->headTitle()->append('Saisie - '.$siret); $this->view->headTitle()->append('Saisie - '.$siret);
$session = new SessionEntreprise($siret, $id); $session = new Scores_Session_Entreprise($siret, $id);
$isin = $session->getIsin(); $isin = $session->getIsin();
$ws = new WsScores(); $ws = new WsScores();
@ -2211,4 +2210,29 @@ class SaisieController extends Zend_Controller_Action
$this->view->assign('message', $message); $this->view->assign('message', $message);
$this->view->assign('refresh', $refresh); $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);
}
} }

View File

@ -354,7 +354,7 @@ class UserController extends Zend_Controller_Action
$pass = $form->getValue('pass'); $pass = $form->getValue('pass');
$auth = Zend_Auth::getInstance(); $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); $result = $auth->authenticate($authAdapter);
//Auth is valid //Auth is valid

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,5 @@
<?php
class Application_Model_City extends Zend_Db_Table_Abstract
{
protected $_name = 'tabVilles';
}

View File

@ -97,17 +97,19 @@
<?php }?> <?php }?>
<?php }?> <?php }?>
</td> </td>
<?php if (empty($this->AutrePage)) { ?> <?php if (empty($this->AutrePage) && $this->accessWorldCheck) {?>
<?php if( $this->accessWorldCheck ) { ?>
<td> <td>
<?php if ($dir->Societe != '') { ?> <?php if ($dir->Societe != '') { ?>
<img class="wcheck" id="<?='/dirType/ORGANISATION/dirSociete/'.$dir->Societe;?>" src='/themes/default/images/worldcheck/wc.png'/> <img class="wcheck" data-url="<?=$this->url(array(
<?php } 'controller'=>'worldcheck','action'=>'occurence','siren'=>substr($this->siret,0,9),
if ($dir->Nom != '') { ?> 'dirType'=>'ORGANISATION','dirSociete'=>$dir->Societe),null,true);?>" src='/themes/default/images/worldcheck/wc.png'/>
<img class="wcheck" id="<?='/dirType/INDIVIDUAL/dirNom/'.$dir->Nom.'/dirPrenom/'.$dir->Prenom;?>" 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 } ?> <?php } ?>
</td> </td>
<?php } ?>
<?php }?> <?php }?>
</tr> </tr>
<?php } ?> <?php } ?>
@ -156,14 +158,21 @@ $('a.dialog').on('click', function(){
return false; return false;
} }
}); });
</script>
<?php }?>
<?php if (empty($this->AutrePage) && $this->accessWorldCheck) {?>
<script>
$('img.wcheck').each(function(){ $('img.wcheck').each(function(){
$(this).qtip({ $(this).qtip({
hide: { event: 'unfocus' }, hide: { event: 'unfocus' },
show: { solo: true, delay: 1000 }, show: { solo: true, delay: 500 },
content: { title: {button: true}, text: "Chargement...", content: {
ajax: { url: '<?=$this->url(array('controller'=>'worldcheck','action'=>'occurence','siren'=>substr($this->siret, 0, 9)),null,true);?>'+$(this).attr('id') } }, button: true,
position: { my: "bottom left", at: "top center" } title: 'WorlCheck',
text: "Chargement...",
ajax: { url: $(this).data('url') } },
position: { my: 'right center', at: 'left center' }
}); });
}); });
</script> </script>

View File

@ -24,7 +24,7 @@
<td><?=$this->Millesime?></td> <td><?=$this->Millesime?></td>
</tr> </tr>
<tr> <tr>
<td>Subvention versé à</td> <td>Subvention versée à</td>
<td><?=$this->AssoNom?> (<?=$this->SirenTexte($this->AssoSiren)?>)</td> <td><?=$this->AssoNom?> (<?=$this->SirenTexte($this->AssoSiren)?>)</td>
</tr> </tr>
<tr> <tr>
@ -32,8 +32,8 @@
<td><?=$this->Budget?></td> <td><?=$this->Budget?></td>
</tr> </tr>
<tr> <tr>
<td>Subvention reçu de </td> <td>Subvention reçue de </td>
<td><a href="<?=$this->url(array('controller'=>'identite', 'action'=>'fiche', 'siren'=>$this->OrigineSiren))?>"> <td><a href="<?=$this->url(array('controller'=>'identite', 'action'=>'fiche', 'siret'=>$this->OrigineSiren), null, true)?>">
<?=$this->SirenTexte($this->OrigineSiren)?></a></td> <?=$this->SirenTexte($this->OrigineSiren)?></a></td>
</tr> </tr>
<tr> <tr>
@ -62,4 +62,6 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div>
</div> </div>

View File

@ -0,0 +1,66 @@
<div id="center">
<h1 class="titre">CONTACTS</h1>
<div class="paragraph">
<table class="identite">
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Num&eacute;ro identifiant Siren</td>
<td width="350" class="StyleInfoData"><?=$this->SirenTexte($this->siren)?></td>
</tr>
<tr>
<td width="30">&nbsp;</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>

View File

@ -1,4 +1,4 @@
<?php if ($this->source == 'google'):?> <?php if ($this->source == 'google') {?>
<div id="infogeo_photo"> <div id="infogeo_photo">
<?=$this->action('streetview', 'identite', null, array( <?=$this->action('streetview', 'identite', null, array(
@ -8,20 +8,13 @@
));?> ));?>
</div> </div>
<?php elseif ($this->source == 'mappy'):?> <?php } elseif ($this->source == 'mappy') {?>
<div><img id="pp-cb-thumb" width="300px" /></div> <div><img id="pp-cb-thumb" width="300px" /></div>
<script src="<?=$this->lienJs?>"></script> <script src="<?=$this->lienJs?>"></script>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function() { $(document).ready(function() {
var photoService = new Mappy.api.visiocity.PhotoService(); var serviceHandler = function(result) {
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) {
if (result instanceof Mappy.api.visiocity.Frontage) { if (result instanceof Mappy.api.visiocity.Frontage) {
var current = result.getCurrent(); var current = result.getCurrent();
var img = $('<img src="' + current.getURL(320, null) + var img = $('<img src="' + current.getURL(320, null) +
@ -30,6 +23,12 @@ $(document).ready(function() {
$('#pp-cb-thumb').replaceWith(img); $('#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> </script>
<?php endif;?> <?php }?>

View File

@ -1,12 +1,14 @@
<?php if ($this->url) {?> <?php if ($this->url) {?>
<div id="legende-photo">Cliché à l'approche de l'adresse postale.</div> <div id="legende-photo">Cliché à l'approche de l'adresse postale.</div>
<img id="pp-cb-thumb" src="<?=$this->url?>" width="320" height="320" /> <img id="pp-cb-thumb" src="<?=$this->url?>" width="320" height="320" />
<div> <div>
<a class="street-heading" href="<?=$this->url(array( <a class="street-heading" href="<?=$this->url(array(
'controller'=>'identite','action'=>'streetview', 'lat'=>$this->lat, 'lon'=>$this->lon, 'heading'=>$this->pagePrec))?>">&lt;</a> 'controller'=>'identite','action'=>'streetview',
- 'lat'=>$this->lat, 'lon'=>$this->lon, 'heading'=>$this->pagePrec), null, true)?>">&lt;</a>
-
<a class="street-heading" href="<?=$this->url(array( <a class="street-heading" href="<?=$this->url(array(
'controller'=>'identite','action'=>'streetview', 'lat'=>$this->lat, 'lon'=>$this->lon, 'heading'=>$this->pageSuiv))?>">&gt;</a> 'controller'=>'identite', 'action'=>'streetview',
'lat'=>$this->lat, 'lon'=>$this->lon, 'heading'=>$this->pageSuiv), null, true)?>">&gt;</a>
</div> </div>
<script> <script>
$('a.street-heading').click(function(e){ $('a.street-heading').click(function(e){

View File

@ -1,12 +1,13 @@
<script type="text/javascript"> <script type="text/javascript">
window.onload = function() { window.onload = function() {
window.print(); window.print(); window.close();
window.close();
} }
</script> </script>
<style> <style>
#header { width:0px !important;} body {font-family:Verdana, Arial, sans-serif;font-size: 11px;}
#global { width:auto !important;} #global {width:auto !important;text-align:left;}
#content { margin:5px; padding:0; width:auto; } #content {margin:5px; padding:0; width:auto;}
table {page-break-inside:avoid}
div.paragraph {page-break-inside:avoid}
</style> </style>
<?=$this->action($this->action, $this->controller, null, $this->params)?> <?=$this->action($this->action, $this->controller, null, $this->params)?>

View File

@ -0,0 +1 @@
<?=json_encode($this->output)?>

View File

@ -92,6 +92,25 @@ $('input[name=naissance_date]').datepicker({ changeMonth: true, changeYear: true
</div> </div>
</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"> <div class="fieldgrp">
<label>Pays</label> <label>Pays</label>
<div class="field"> <div class="field">

View File

@ -1,20 +1,23 @@
<?=($this->occurrence===false) ? "WorldCheck<br/>Cliquez sur le lien" : "WorldCheck<br/>Occurrences: ".$this->occurrence;?> <?php if ($this->occurrence===false) {?>
<? $param = array( Aucune information disponible, Lancer une recherche.
'controller'=>'worldcheck', <?php } else {?>
'action'=>'index', <?=$this->occurrence?> Occurrences.
'dirSociete'=>$this->data->Societe, <?php }?>
'dirNom'=>$this->data->Nom, <?php
'dirPrenom'=>$this->data->Prenom, $param = array(
'dirType' =>$this->data->Type, 'controller'=>'worldcheck',
'siren'=>substr($this->siret, 0, 9)); '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) foreach ($param as $key =>$val) {
{ if ($val=='') {
if ($val=='')
{
unset($param[$key]); unset($param[$key]);
} }
} }
?> ?>
<br/> <br/>
<a href="<?=$this->url($param, null, true)?>">Rechercher en WorldCheck</a> <a href="<?=$this->url($param, null, true)?>">Rechercher dans WorldCheck</a>

View File

@ -397,14 +397,14 @@ table {
/* Main /* Main
----------------------------------*/ ----------------------------------*/
body{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 {text-align:left;} #global {width:900px; margin:0 auto; text-align:left;}
#content {padding:0;margin:0;} #content {float:right;clear:both;width:680px;padding:0;margin:0;padding-top:20px;}
#center {background-color:#fff;padding:5px 0;} #center {background-color:#fff;padding:5px 0;}
#footer {clear:both;text-align:center;margin-top:15px;} #footer {clear:both;text-align:center;margin-top:15px;}
#footer p {font:0.9em Arial, Helvetica, sans-serif; } #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 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 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;} div.paragraph {margin:5px;padding:5px;}
.clearfix:after {content: ".";display: block;height: 0;clear: both;visibility: hidden;zoom:1;} .clearfix:after {content: ".";display: block;height: 0;clear: both;visibility: hidden;zoom:1;}
a:link {color: #9c093a; text-decoration:none;} 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.identite {border-collapse:separate;border-spacing:4px;}
table.data {width:100%;} table.data {width:100%;}
table.data td {border:1px solid #ccc; padding:5px;} 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;} .confidentiel {border-top:1px solid; padding-top:5px; font-style:italic; font-size:9px;}
.ui-dialog {text-align:left;} .ui-dialog {text-align:left;}
.ui-widget {font-size: 1em;} .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 p {margin: 10px;}
div.ui-state-highlight a {text-decoration: underline;} div.ui-state-highlight a {text-decoration: underline;}
.noborder {border:0;} .noborder {border:0;}
img { vertical-align:middle; } img {vertical-align:middle;}
/* Menu /* 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 .ui-widget {font-family:Arial, Sans-serif;font-size:12px;}
div#menu ul.navigation li {list-style-type:none;} 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);} 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 /* Recherche
----------------------------------*/ ----------------------------------*/
/*#center{padding:5px;}*/
#center-recherche{text-align:center; padding:0;} #center-recherche{text-align:center; padding:0;}
#recherche{margin:78px auto 20px auto;} #recherche{margin:78px auto 20px auto;}
#recherche h3{color:#ffffff; font-size:medium; font-weight:bold;} #recherche h3{color:#ffffff; font-size:medium; font-weight:bold;}
@ -670,7 +669,7 @@ table.greffe td.type {text-align:center;}
/* Kbis /* Kbis
----------------------------------*/ ----------------------------------*/
/* progress bar container */ /* 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 */ /* color bar */
#progressbar div.progress {position:absolute;width:0;height:100%;overflow:hidden;background-color:#369;} #progressbar div.progress {position:absolute;width:0;height:100%;overflow:hidden;background-color:#369;}
/* text on bar */ /* text on bar */
@ -678,3 +677,14 @@ table.greffe td.type {text-align:center;}
/* text off bar */ /* text off bar */
#progressbar div.text {position:absolute;width:100%;height:100%;text-align:center;} #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;}
}

View File

@ -5,6 +5,7 @@ README
- Installation - Installation
- Project - Project
- Library - Library
- Translate
Note : Project are define to be use on Linux Server, so take care about path and file name. 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. Also some script (CLI) don't work on Windows.
@ -136,7 +137,25 @@ WKHTMLTOPDF
- On Ubuntu : - On Ubuntu :
sudo apt-get install libxrender1 libfontconfig sudo apt-get install libxrender1 libfontconfig
- Set execution flag (chmod +x) - 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 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.

View File

@ -13,7 +13,7 @@ class Application_Controller_Plugin_Auth extends Zend_Controller_Plugin_Abstract
if ($request->getControllerName()=='user' && $request->getActionName()=='login') { if ($request->getControllerName()=='user' && $request->getActionName()=='login') {
$checkAuth = false; $checkAuth = false;
} }
if ($request->getControllerName()=='user' && $request->getActionName()=='motpasse') { if ($request->getControllerName()=='user' && $request->getActionName()=='motpasse') {
$checkAuth = false; $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 //On vérifie le tout lors d'une connexion par url
if ( !empty($login) && !empty($hach) ) { 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); $result = $auth->authenticate($authAdapter);
if ( $result->isValid() ) { if ( $result->isValid() ) {

View File

@ -56,7 +56,7 @@ class Annonces
' du '.$this->dateAnnonce($ann->DateParution); ' du '.$this->dateAnnonce($ann->DateParution);
} else { } else {
$view = new Zend_View(); $view = new Zend_View();
$session = new SessionEntreprise(null); $session = new Scores_Session_Entreprise(null);
$href = $view->url(array( $href = $view->url(array(
'controller' => 'juridique', 'controller' => 'juridique',
'action' => 'competences', 'action' => 'competences',

View 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);
}
}
}
}

View File

@ -1,9 +1,28 @@
<?php <?php
class Scores_AuthAdapter implements Zend_Auth_Adapter_Interface class Scores_Auth_Adapter_Ws implements Zend_Auth_Adapter_Interface
{ {
/**
*
* @var unknown
*/
protected $_username; protected $_username;
/**
*
* @var unknown
*/
protected $_password; protected $_password;
/**
*
* @var unknown
*/
protected $_timeout = 1800; protected $_timeout = 1800;
/**
*
* @var unknown
*/
protected $_checkIp = false; protected $_checkIp = false;
public function __construct($username, $password, $iponly = false) public function __construct($username, $password, $iponly = false)
@ -16,6 +35,10 @@ class Scores_AuthAdapter implements Zend_Auth_Adapter_Interface
$this->_checkIp = $iponly; $this->_checkIp = $iponly;
} }
/**
* (non-PHPdoc)
* @see Zend_Auth_Adapter_Interface::authenticate()
*/
public function authenticate() public function authenticate()
{ {
$adressIp = $_SERVER['REMOTE_ADDR']; $adressIp = $_SERVER['REMOTE_ADDR'];
@ -44,7 +67,7 @@ class Scores_AuthAdapter implements Zend_Auth_Adapter_Interface
$identity->dateValidation = $InfosLogin->result->dateValidation; $identity->dateValidation = $InfosLogin->result->dateValidation;
$identity->nombreConnexions = $InfosLogin->result->nombreConnexions; $identity->nombreConnexions = $InfosLogin->result->nombreConnexions;
$identity->dateDerniereConnexion = $InfosLogin->result->dateDerniereConnexion; $identity->dateDerniereConnexion = $InfosLogin->result->dateDerniereConnexion;
$identity->dateDebutCompte = $InfosLogin->result->dateDebutCompte; $identity->dateDebutCompte = $InfosLogin->result->dateDebutCompte;
$identity->dateFinCompte = $InfosLogin->result->dateFinCompte; $identity->dateFinCompte = $InfosLogin->result->dateFinCompte;
$identity->acceptationCGU = $InfosLogin->result->acceptationCGU; $identity->acceptationCGU = $InfosLogin->result->acceptationCGU;
$identity->ip = $adressIp; $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 * Controle si une adresse IP est dans une liste des IP communiquées sous la forme
* @param string $strPlageIP La plage d'adresses IP * 192.168.3.5-192.68.3.10;192.168.3.*;192.168.3.10
* @param string $adresseIP L'adresse IP à tester * @param string $strPlageIP
* La plage d'adresses IP
* @param string $adresseIP
* L'adresse IP à tester
* @return boolean
*/ */
protected function checkPlagesIp($strPlageIP, $adresseIP) protected function checkPlagesIp($strPlageIP, $adresseIP)
{ {
@ -143,7 +170,8 @@ class Scores_AuthAdapter implements Zend_Auth_Adapter_Interface
* @param string $ip Adresse IP * @param string $ip Adresse IP
* @return integer * @return integer
*/ */
protected function getIpNumber($ip) { protected function getIpNumber($ip)
{
$tab=explode('.', $ip); $tab=explode('.', $ip);
return (($tab[0]*256*256*256) + ($tab[1]*256*256) + ($tab[2]*256) + ($tab[3])); return (($tab[0]*256*256*256) + ($tab[1]*256*256) + ($tab[2]*256) + ($tab[3]));
} }

View File

@ -1,9 +1,9 @@
<?php <?php
class Google class Scores_Google_Maps
{ {
protected $url = 'http://maps.google.fr/maps?f=q&hl=fr&geocode=&q='; protected $url = 'http://maps.google.fr/maps?f=q&hl=fr&geocode=&q=';
protected $urlPhoto = ''; protected $urlPhoto = '';
public function getGoogleKey($domain) public function getGoogleKey($domain)
{ {
switch ($domain) { switch ($domain) {
@ -25,7 +25,7 @@ class Google
break; break;
} }
} }
protected function supprDecimales($dec) protected function supprDecimales($dec)
{ {
if ($dec>0 ) if ($dec>0 )
@ -33,7 +33,7 @@ class Google
else else
return ceil($dec); return ceil($dec);
} }
public function dec2dms($dec) public function dec2dms($dec)
{ {
$d = $this->supprDecimales($dec); $d = $this->supprDecimales($dec);
@ -42,9 +42,9 @@ class Google
$m = abs($m); $m = abs($m);
return $d.'°'.$m."'".$s.'"'; return $d.'°'.$m."'".$s.'"';
} }
public function getGoogleMapLink($q) public function getGoogleMapLink($q)
{ {
return $this->url.$q; return $this->url.$q;
} }
} }

View File

@ -695,8 +695,6 @@ class IdentiteEntreprise
public function getTelTexte() public function getTelTexte()
{ {
$data = ''; $data = '';
$data.= '<div class="txtAdresse">';
$data.= '<p>';
if (trim($this->identite->Tel)=='') if (trim($this->identite->Tel)=='')
$data.= 'N/C'; $data.= 'N/C';
@ -715,11 +713,18 @@ class IdentiteEntreprise
$adresse = substr($this->identite->Adresse,1,strlen($this->identite->Adresse)-1); $adresse = substr($this->identite->Adresse,1,strlen($this->identite->Adresse)-1);
if ($i_adr>4) break; if ($i_adr>4) break;
} }
$data.= '&nbsp;<a title="Rechercher le num&eacute;ro de t&eacute;l&eacute;phone dans l\'annuaire" target="_blank" href="http://local.search.ke.voila.fr/S/searchproxi?act=&nom='.$libNom. $data.= '&nbsp;<a title="Rechercher le num&eacute;ro de t&eacute;l&eacute;phone dans l\'annuaire" target="_blank" href="http://local.search.ke.voila.fr/S/searchproxi?act=&nom='.$libNom.
'&adr='.urlencode($this->identite->Adresse). '&adr='.urlencode($this->identite->Adresse).
'&loc='.urlencode($this->identite->CP.' '.$this->identite->Ville). '&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>'; '&x=0&y=0&bhv=searchproxi&profil=enville&guidelocid=&guideregid=&guidedepid=&actid=&ke=&locid=">(Recherche annuaire)</a>';
$data.= '</div>';
$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; return $data;
} }

View File

@ -1,39 +1,39 @@
<?php <?php
class Mappy class Mappy
{ {
protected $login = 'scoresdecisions'; protected $login = 'scoresdecisions';
protected $password = 'g1nq3iKv'; protected $password = 'g1nq3iKv';
protected $villes = array( protected $villes = array(
'BORDEAUX', 'BORDEAUX',
'CAEN' , 'CAEN' ,
'CANNES', 'CANNES',
'GRENOBLE', 'GRENOBLE',
'LA BAULE', 'LA BAULE',
'LILLE', 'LILLE',
'LYON', 'LYON',
'MARSEILLE', 'MARSEILLE',
'MONTPELLIER', 'MONTPELLIER',
'NANCY', 'NANCY',
'NANTES', 'NANTES',
'NICE', 'NICE',
'RENNES', 'RENNES',
'STRASBOURG', 'STRASBOURG',
'TOULOUSE', 'TOULOUSE',
'ASNIERES-SUR-SEINE', 'ASNIERES-SUR-SEINE',
'BOULOGNE-BILLANCOURT', 'BOULOGNE-BILLANCOURT',
'COURBEVOIE', 'COURBEVOIE',
'ISSY-LES-MOULINEAUX', 'ISSY-LES-MOULINEAUX',
'LEVALLOIS-PERRET', 'LEVALLOIS-PERRET',
'MONTROUGE', 'MONTROUGE',
'NANTERRE', 'NANTERRE',
'NEUILLY-SUR-SEINE', 'NEUILLY-SUR-SEINE',
'RUEIL-MALMAISON', 'RUEIL-MALMAISON',
'SEVRES', 'SEVRES',
'VERSAILLES', 'VERSAILLES',
'PARIS' 'PARIS'
); );
public function getToken() public function getToken()
{ {
$ACCESSOR_URL = 'http://axe.mappy.com/1v1/'; $ACCESSOR_URL = 'http://axe.mappy.com/1v1/';
@ -41,36 +41,36 @@ class Mappy
$hash = md5($this->login."@".$this->password."@".$timestamp); $hash = md5($this->login."@".$this->password."@".$timestamp);
$preToken = $this->login."@".$timestamp."@".$hash; $preToken = $this->login."@".$timestamp."@".$hash;
$urlGetToken = $ACCESSOR_URL . 'token/generate.aspx?auth=' . urlencode($preToken) . '&ip=' . urlencode($_SERVER["REMOTE_ADDR"]); $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; if ($fh == false) return false;
$token = ''; $token = '';
while (!feof($fh))$token .= fread($fh, 8192); while (!feof($fh))$token .= fread($fh, 8192);
fclose($fh); fclose($fh);
return ($token); return ($token);
} }
protected function cleanAdress($ville) protected function cleanAdress($ville)
{ {
$ville = ' '.trim(preg_replace('/([0-9]|ARRONDISSEMENT|_)/i', ' ', $ville)).' '; $ville = ' '.trim(preg_replace('/([0-9]|ARRONDISSEMENT|_)/i', ' ', $ville)).' ';
$ville = trim(strtr($ville, array(' EME ' => '', ' ER ' => ''))); $ville = trim(strtr($ville, array(' EME ' => '', ' ER ' => '')));
return (ucwords(strtolower($ville))); return (ucwords(strtolower($ville)));
} }
public function villeCouverte($ville) public function villeCouverte($ville)
{ {
$ville = $this->cleanAdress($ville); $ville = $this->cleanAdress($ville);
if (in_array(strtoupper($ville),$this->villes)){ /*if (in_array(strtoupper($ville),$this->villes)){
return true; return true;
} }*/
return false; return false;
} }
public function getJs() public function getJs()
{ {
$token = $this->getToken(); $token = $this->getToken();
$href = 'http://axe.mappy.com/1v1/init/get.aspx?auth='.$token.'&version=2.16&solution=ajax'; $href = 'http://axe.mappy.com/1v1/init/get.aspx?auth='.$token.'&version=2.16&solution=ajax';
return $href; return $href;
} }
} }

View File

@ -101,6 +101,9 @@ class Scores_Menu
), ),
array( array(
'label' => 'IDENTITE', 'label' => 'IDENTITE',
'activateMenu' => array(
array('controller'=>'identite', 'action'=>'contacts'),
),
'pages' => array( 'pages' => array(
array( array(
'label' => "Fiche d'identité", 'label' => "Fiche d'identité",
@ -484,8 +487,6 @@ class Scores_Menu
*/ */
public function __construct($parameters) public function __construct($parameters)
{ {
require_once 'Scores/SessionEntreprise.php';
//Special case, edit foreign company //Special case, edit foreign company
if (array_key_exists('lienref', $parameters)) { if (array_key_exists('lienref', $parameters)) {
$this->lienref = $parameters['lienref']; $this->lienref = $parameters['lienref'];
@ -499,7 +500,7 @@ class Scores_Menu
$this->id = $parameters['id']; $this->id = $parameters['id'];
} }
if (empty($this->siret) && empty($this->id)) { if (empty($this->siret) && empty($this->id)) {
$session = new SessionEntreprise(null); $session = new Scores_Session_Entreprise(null);
$this->siret = $session->getSiret(); $this->siret = $session->getSiret();
$this->id = $session->getId(); $this->id = $session->getId();
} }

View File

@ -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;
}
}

View File

@ -1,5 +1,5 @@
<?php <?php
class SessionEntreprise class Scores_Session_Entreprise
{ {
protected $index = 'entrep'; protected $index = 'entrep';
@ -157,4 +157,4 @@ class SessionEntreprise
return $compare; return $compare;
} }
} }

View File

@ -36,7 +36,8 @@ class Scores_Wkhtml_Pdf
if (empty($fileOut)) {$fileOut = str_replace('.html', '.pdf', $fileIn); } if (empty($fileOut)) {$fileOut = str_replace('.html', '.pdf', $fileIn); }
if(file_exists($fileOut)){ unlink($fileOut); } if(file_exists($fileOut)){ unlink($fileOut); }
$options = '--disable-internal-links'; $options = '--print-media-type';
$options.= ' --disable-internal-links';
if ( count($this->options) ) if ( count($this->options) )
{ {
foreach ( $this->options as $name => $value ) foreach ( $this->options as $name => $value )

View File

@ -101,6 +101,45 @@ class WsScores
return $client; 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) public function getSubventionList($siren, $offset = 0, $nbItems = 100)
{ {
$params = new stdClass(); $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) public function getCatalogLegalForm($id, $columns)
{ {
$params = new stdClass(); $params = new stdClass();

View File

@ -1,7 +1,7 @@
/* /*
* Jeditable - jQuery in place edit plugin * 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: * Licensed under the MIT license:
* http://www.opensource.org/licenses/mit-license.php * 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. * ** means there is basic unit tests for this parameter.
* *
@ -452,8 +452,8 @@
text: { text: {
element : function(settings, original) { element : function(settings, original) {
var input = $('<input />'); var input = $('<input />');
if (settings.width != 'none') { input.attr('width', settings.width); } if (settings.width != 'none') { input.width(settings.width); }
if (settings.height != 'none') { input.attr('height', settings.height); } if (settings.height != 'none') { input.height(settings.height); }
/* https://bugzilla.mozilla.org/show_bug.cgi?id=236791 */ /* https://bugzilla.mozilla.org/show_bug.cgi?id=236791 */
//input[0].setAttribute('autocomplete','off'); //input[0].setAttribute('autocomplete','off');
input.attr('autocomplete','off'); input.attr('autocomplete','off');

View File

@ -397,14 +397,14 @@ table {
/* Main /* 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;} #global {width:900px; margin:0 auto; text-align:left;}
#content {float:right;clear:both;width:680px;padding:0;margin:0;padding-top:20px;} #content {float:right;clear:both;width:680px;padding:0;margin:0;padding-top:20px;}
#center {background-color:#fff;padding:5px 0;} #center {background-color:#fff;padding:5px 0;}
#footer {clear:both;text-align:center;margin-top:15px;} #footer {clear:both;text-align:center;margin-top:15px;}
#footer p {font:0.9em Arial, Helvetica, sans-serif; } #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 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 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;} div.paragraph {margin:5px;padding:5px;}
.clearfix:after {content: ".";display: block;height: 0;clear: both;visibility: hidden;zoom:1;} .clearfix:after {content: ".";display: block;height: 0;clear: both;visibility: hidden;zoom:1;}
a:link {color: #9c093a; text-decoration:none;} 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 p {margin: 10px;}
div.ui-state-highlight a {text-decoration: underline;} div.ui-state-highlight a {text-decoration: underline;}
.noborder {border:0;} .noborder {border:0;}
img { vertical-align:middle; } img {vertical-align:middle;}
/* Menu /* Menu
----------------------------------*/ ----------------------------------*/
@ -452,7 +451,6 @@ div#menu div.icones {text-align:center;margin-top:5px;}
/* Recherche /* Recherche
----------------------------------*/ ----------------------------------*/
/*#center{padding:5px;}*/
#center-recherche{text-align:center; padding:0;} #center-recherche{text-align:center; padding:0;}
#recherche{margin:78px auto 20px auto;} #recherche{margin:78px auto 20px auto;}
#recherche h3{color:#ffffff; font-size:medium; font-weight:bold;} #recherche h3{color:#ffffff; font-size:medium; font-weight:bold;}
@ -671,7 +669,7 @@ table.greffe td.type {text-align:center;}
/* Kbis /* Kbis
----------------------------------*/ ----------------------------------*/
/* progress bar container */ /* 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 */ /* color bar */
#progressbar div.progress {position:absolute;width:0;height:100%;overflow:hidden;background-color:#369;} #progressbar div.progress {position:absolute;width:0;height:100%;overflow:hidden;background-color:#369;}
/* text on bar */ /* text on bar */
@ -679,3 +677,14 @@ table.greffe td.type {text-align:center;}
/* text off bar */ /* text off bar */
#progressbar div.text {position:absolute;width:100%;height:100%;text-align:center;} #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;}
}

View 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';

View File

@ -43,6 +43,11 @@ $catalogs = array(
'table' => 'tabFJur', 'table' => 'tabFJur',
'method' => array('name'=>'getCatalogLegalForm', 'params'=> array( null , array('code', 'libelle', 'libelleEn') )) '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 { try {