diff --git a/application/controllers/GiantController.php b/application/controllers/GiantController.php
index c1b498d51..205603471 100644
--- a/application/controllers/GiantController.php
+++ b/application/controllers/GiantController.php
@@ -9,29 +9,29 @@ require_once 'common/dates.php';
class GiantController extends Zend_Controller_Action
{
protected $TestIndication = true;
-
+
protected $TestCompanies = array(
- 'BE' => array(
- '0439546194', '0436576412', '0430459076', '0430000604', '0404869783', '0404869783',
- '0406952018'
- ),
- 'ES' => array(
- 'A00000000', 'A80192727'
- ),
- 'GB' => array(
- '00000086', '00082932', '98888888', '214436', '1777777', '991581', '1800000'
- ),
- 'NL' => array(
- '533885', '1383988', '1383989', '891962239', '891974008', '892130032', '896614719',
- '896614735', '896614735', '896615243'
- ),
- 'FR' => array(
- '55214450300018', '49496793800031', '47997411500012', '48765114300017',
- '43235433000040', '39435613300022', '39504742600014', '76980020200020',
- '35379698000020', '56202109700018', '70204756400068', '70204756400068'
- ),
+ 'BE' => array(
+ '0439546194', '0436576412', '0430459076', '0430000604', '0404869783', '0404869783',
+ '0406952018'
+ ),
+ 'ES' => array(
+ 'A00000000', 'A80192727'
+ ),
+ 'GB' => array(
+ '00000086', '00082932', '98888888', '214436', '1777777', '991581', '1800000'
+ ),
+ 'NL' => array(
+ '533885', '1383988', '1383989', '891962239', '891974008', '892130032', '896614719',
+ '896614735', '896614735', '896615243'
+ ),
+ 'FR' => array(
+ '55214450300018', '49496793800031', '47997411500012', '48765114300017',
+ '43235433000040', '39435613300022', '39504742600014', '76980020200020',
+ '35379698000020', '56202109700018', '70204756400068', '70204756400068'
+ ),
);
-
+
public function init()
{
@@ -63,32 +63,32 @@ class GiantController extends Zend_Controller_Action
{
$rechercheParams = new RechercheHistorique();
$giantFunction = new GiantFunction();
- if (count($rechercheParams->liste()) > 0)
- {
- $recherche = $rechercheParams->item(0);
- $type = $recherche['type'];
- $params = $recherche['params'];
- }
- $Commande = new Commandes();
- $user = new Scores_Utilisateur();
- $listeCommandes = $Commande->getCommandesByLogin($user->getLogin());
- $total = 0;
- $liste = $giantFunction->divCommande($listeCommandes, $total);
- $ListeRapport = new GiantRechercheController($params['pays'], $this->TestIndication);
- $result = $ListeRapport->ListeRapport($this->getRequest()->getParam('CompanyId'));
- $this->view->total = $total;
- $this->view->listeCommandes = $liste;
- $this->view->modification = (isset($result->MonitoringOptions))?($ListeRapport->getModification($result->MonitoringOptions->MonitoringOption[0])):null;
- $this->view->description = $ListeRapport->getDescription();
- $this->view->raisonSociale = $this->getRequest()->getParam('raisonSociale');
- $this->view->listeRapport = $result;
- $this->view->telephone = $this->getRequest()->getParam('telephone');
- $this->view->CompanyId = $this->getRequest()->getParam('CompanyId');
- $this->view->raisonSociale = $this->getRequest()->getParam('raisonSociale');
- $this->view->CompanyRegisterNumber = $this->getRequest()->getParam('CompanyRegisterNumber');
- $this->view->Pays = $this->getRequest()->getParam('Pays');
- $this->view->Adresse = explode(':', $this->getRequest()->getParam('Adresse'));
- if($this->view->debug)
+ if (count($rechercheParams->liste()) > 0)
+ {
+ $recherche = $rechercheParams->item(0);
+ $type = $recherche['type'];
+ $params = $recherche['params'];
+ }
+ $Commande = new Commandes();
+ $user = new Scores_Utilisateur();
+ $listeCommandes = $Commande->getCommandesByLogin($user->getLogin());
+ $total = 0;
+ $liste = $giantFunction->divCommande($listeCommandes, $total);
+ $ListeRapport = new GiantRechercheController($params['pays'], $this->TestIndication);
+ $result = $ListeRapport->ListeRapport($this->getRequest()->getParam('CompanyId'));
+ $this->view->total = $total;
+ $this->view->listeCommandes = $liste;
+ $this->view->modification = (isset($result->MonitoringOptions))?($ListeRapport->getModification($result->MonitoringOptions->MonitoringOption[0])):null;
+ $this->view->description = $ListeRapport->getDescription();
+ $this->view->raisonSociale = $this->getRequest()->getParam('raisonSociale');
+ $this->view->listeRapport = $result;
+ $this->view->telephone = $this->getRequest()->getParam('telephone');
+ $this->view->CompanyId = $this->getRequest()->getParam('CompanyId');
+ $this->view->raisonSociale = $this->getRequest()->getParam('raisonSociale');
+ $this->view->CompanyRegisterNumber = $this->getRequest()->getParam('CompanyRegisterNumber');
+ $this->view->Pays = $this->getRequest()->getParam('Pays');
+ $this->view->Adresse = explode(':', $this->getRequest()->getParam('Adresse'));
+ if($this->view->debug)
$this->view->soap = $ListeRapport->soapG;
}
@@ -96,10 +96,10 @@ class GiantController extends Zend_Controller_Action
{
$giantController = new GiantControllerLib($this->getRequest()->getParam('CompanyId'));
$id = $giantController->commande($this->getRequest()->getParam('CompanyId'),
- $this->getRequest()->getParam('Type'),
- $this->getRequest()->getParam('Pays'),
- $this->getRequest()->getParam('Language'),
- $this->TestIndication
+ $this->getRequest()->getParam('Type'),
+ $this->getRequest()->getParam('Pays'),
+ $this->getRequest()->getParam('Language'),
+ $this->TestIndication
);
$creditrecommendationAction = array('getAvisDeCredit' => 'CreditRecommendation');
$creditrecommendation = unserialize(base64_decode($id));
@@ -124,13 +124,13 @@ class GiantController extends Zend_Controller_Action
{
$giantController = new GiantControllerLib($this->getRequest()->getParam('CompanyId'));
$id = $giantController->commande($this->getRequest()->getParam('CompanyId'),
- $this->getRequest()->getParam('Type'),
- $this->getRequest()->getParam('Pays'),
- $this->getRequest()->getParam('Language'),
- $this->TestIndication
+ $this->getRequest()->getParam('Type'),
+ $this->getRequest()->getParam('Pays'),
+ $this->getRequest()->getParam('Language'),
+ $this->TestIndication
);
$compactAction = array('getAvisDeCredit' => 'CreditRecommendation', 'getPositionFinanciere' => 'FinancialSummary',
- 'getStructureEntreprise' => 'Associated', 'getDirigeant' => 'Position'
+ 'getStructureEntreprise' => 'Associated', 'getDirigeant' => 'Position'
);
$compact = unserialize(base64_decode($id));
$identiteController = new GiantIdentiteController($compact);
@@ -155,14 +155,14 @@ class GiantController extends Zend_Controller_Action
{
$giantController = new GiantControllerLib($this->getRequest()->getParam('CompanyId').'-'.$this->getRequest()->getParam('Type'));
$id = $giantController->commande($this->getRequest()->getParam('CompanyId'),
- $this->getRequest()->getParam('Type'),
- $this->getRequest()->getParam('Pays'),
- $this->getRequest()->getParam('Language'),
- $this->TestIndication
+ $this->getRequest()->getParam('Type'),
+ $this->getRequest()->getParam('Pays'),
+ $this->getRequest()->getParam('Language'),
+ $this->TestIndication
);
$fullAction = array('getAvisDeCredit' => 'CreditRecommendation', 'getComptesAnnuels' => 'AnnualAccounts', 'getPositionFinanciere' => 'FinancialSummary',
- 'getComportementPaiement' => 'PaymentBehaviour', 'getStructureEntreprise' => 'Associated', 'getDirigeant' => 'Position',
- 'getComparaisonValeurs'=> 'PeerGroup', 'getHistoriques' => 'Event'
+ 'getComportementPaiement' => 'PaymentBehaviour', 'getStructureEntreprise' => 'Associated', 'getDirigeant' => 'Position',
+ 'getComparaisonValeurs'=> 'PeerGroup', 'getHistoriques' => 'Event'
);
$full = unserialize(base64_decode($id));
$full->DataSet->Company->CompanyId= $this->getRequest()->getParam('CompanyId');
@@ -187,7 +187,7 @@ class GiantController extends Zend_Controller_Action
{
$form = new Zend_Form();
$form->setMethod('post')
- ->setAction('investigation');
+ ->setAction('investigation');
$reference = $form->createElement('text', 'reference', array('label' => 'Votre Reference'));
$reference->setRequired(true);
@@ -224,4 +224,28 @@ class GiantController extends Zend_Controller_Action
} else
$this->view->form = $this->getForm();
}
+ public function startmonitoringAction()
+ {
+ $this->_helper->layout()->disableLayout();
+ $this->view->headLink()->appendStylesheet('/themes/default/styles/giant.css', 'all');
+ $this->view->lang = $this->getRequest()->getParam('lang');
+ $this->view->CompanyId = $this->getRequest()->getParam('CompanyId');
+ $this->view->Pays = $this->getRequest()->getParam('Pays');
+ $this->view->values = $this->getRequest()->getParams();
+
+ if ($this->getRequest()->isPost()) {
+ $giantController = new GiantControllerLib($this->getRequest()->getParam('CompanyId'));
+ $result = $giantController->monitoring($this->getRequest()->getParam('CompanyId'),
+ $this->getRequest()->getParam('CategoryName'),
+ $this->getRequest()->getParam('EventType'),
+ $this->getRequest()->getParam('StartDate'),
+ $this->getRequest()->getParam('EndDate'),
+ $this->getRequest()->getParam('Version'),
+ $this->getRequest()->getParam('LanguageCode'),
+ $this->getRequest()->getParam('Pays')
+ );
+ $this->view->result = $result;
+ }
+
+ }
}
\ No newline at end of file
diff --git a/application/controllers/UserController.php b/application/controllers/UserController.php
index aa9d56f1d..128dfdd16 100644
--- a/application/controllers/UserController.php
+++ b/application/controllers/UserController.php
@@ -335,8 +335,9 @@ class UserController extends Zend_Controller_Action
public function loginAction()
{
$this->view->inlineScript()
- ->appendFile('/libs/jquery/jquery-1.9.1.min.js')
- ->appendFile('/libs/jquery/jquery.infieldlabel.min.js');
+ ->appendFile('/libs/jquery/jquery.infieldlabel.min.js')
+ ->appendFile('/libs/jquery/jquery-1.9.1.min.js')
+ ->appendFile('/libs/ui-1.9.2/jquery-ui.min.js');
//@todo : gestion des affichages particuliers pour les clients
$this->view->headTitle()->append('Connexion');
@@ -547,5 +548,75 @@ class UserController extends Zend_Controller_Action
print_r($device->getAllFeatures());
echo "";
}
-
+
+ /**
+ * Sends email to the specific client, who requests for forgotten password
+ */
+ public function motpasseAction()
+ {
+ $request = $this->getRequest();
+ $name = 'Mot de passe, Identifiant oubliés';
+ $params = array(
+ 'identifiant' => '',
+ 'telephone' => '',
+ 'email' => '',
+ 'nom' => '',
+ 'prenom' => '',
+ 'fonction' => '',
+ 'rsociale' => '',
+ );
+
+ if ( $request->isXmlHttpRequest() ) {
+ $this->_helper->layout()->disableLayout();
+ if ( $request->isPost() ) {
+ $params = $request->getParams();
+ $message = '';
+
+ $paramlist = array(
+ 'telephone' => 'Numéro de téléphone direct',
+ 'email' => 'Adresse email',
+ 'nom' => 'Nom',
+ 'prenom' => 'Prénom',
+ 'fonction' => 'Fonction',
+ 'rsociale' => 'Sociale',
+ );
+
+ foreach ($paramlist as $item => $val) {
+ if (!isset($params[$item])) {
+ $message .= "Valeur $val vide ! ";
+ }
+ }
+
+ $validator = new Zend_Validate_EmailAddress();
+ if (isset($params['email'])){
+ if (!$validator->isValid($params['email'])) {
+ $message .="Adress email n'est pas correct! ";
+ }
+ }
+
+ if ($message == '') {
+
+ require_once 'Scores/Mail.php';
+ $mail = new Mail();
+ $mail->setSubject($name);
+ $mail->setBodyHTML($params['mailbody']);
+ $mail->setFrom('support');
+ $mail->addToKey('support');
+ $mail->setReplyTo($params['email']);
+ try {
+ $mail->send();
+ $message = "Votre demande avec les informations suivantes a été envoyée. Nous vous contacterons prochainement.";
+ }
+ catch ( Zend_Mail_Transport_Exception $e ){
+ $message = $e->getMessage();
+ }
+ }
+ $this->view->assign('message', $message);
+ }
+ } else {
+ $this->view->assign('name', $name);
+ $this->view->assign('href', $this->view->url(array('controller'=>'user','action'=>'motpasse')));
+ }
+ $this->view->assign('params', $params);
+ }
}
\ No newline at end of file
diff --git a/application/views/default/scripts/giant/identite.phtml b/application/views/default/scripts/giant/identite.phtml
index 621481def..42f76dfd1 100644
--- a/application/views/default/scripts/giant/identite.phtml
+++ b/application/views/default/scripts/giant/identite.phtml
@@ -70,7 +70,7 @@
- Consulter le rapport en immédiat
+ Consulter le rapport en immédiat
@@ -129,4 +129,12 @@
+
+
+ Liste des monitoring
+
+ Start monitoring
+ ';print_r($this->modification); ?>
+
+
diff --git a/application/views/default/scripts/giant/startmonitoring.phtml b/application/views/default/scripts/giant/startmonitoring.phtml
new file mode 100644
index 000000000..42b1962e7
--- /dev/null
+++ b/application/views/default/scripts/giant/startmonitoring.phtml
@@ -0,0 +1,34 @@
+
+
+'; print_r($this->values);print_r($this->result);?>
+
+
\ No newline at end of file
diff --git a/application/views/default/scripts/saisie/scorecutoff.phtml b/application/views/default/scripts/saisie/scorecutoff.phtml
index afe563f31..a2344cc17 100644
--- a/application/views/default/scripts/saisie/scorecutoff.phtml
+++ b/application/views/default/scripts/saisie/scorecutoff.phtml
@@ -82,25 +82,25 @@ $wdate = new WDate();
Encours
-
+
K€ (de 0 à 500 K€)
'IndiScore', 'scoreDir' => 'Score dirigeance', 'scoreConf' => 'Score de conformité');
+$select = array('scoreConf' => 'Score de conformité', 'scoreDir' => 'Score dirigeance', 'scoreSolv' => 'IndiScore');
foreach($select as $item => $val) {
?>
=$val?>
- ---
+ ---
typescore; $i++) {
$selected = '';
- if ($i == $getcutoff[$item]) {
+ if (is_numeric($getcutoff[$item]) && $i == $getcutoff[$item]) {
$selected = 'selected';
}
- echo ''.$i.' ';
+ echo ''.$i.' ';
}
?>
diff --git a/application/views/default/scripts/user/login.phtml b/application/views/default/scripts/user/login.phtml
index ec15f9fa0..3016244bb 100644
--- a/application/views/default/scripts/user/login.phtml
+++ b/application/views/default/scripts/user/login.phtml
@@ -1,6 +1,7 @@
doctype()?>
+
=$this->headMeta();?>
=$this->headTitle();?>
@@ -606,7 +607,7 @@ $(document).ready(function(){
-
+
=$this->action('motpasse','user', null); ?>
diff --git a/application/views/default/scripts/user/motpasse.phtml b/application/views/default/scripts/user/motpasse.phtml
new file mode 100644
index 000000000..37422962d
--- /dev/null
+++ b/application/views/default/scripts/user/motpasse.phtml
@@ -0,0 +1,167 @@
+href) {?>
+
+=$this->name?>
+
+
+
+
+
+
+message!='') {?>
+
+
+params;
+?>
+
+
+
Cher client,
+
+Pour recevoir votre mot de passe ou votre identifiant oubliés, nous vous invitons à saisir les informations ci-dessous et cliquer sur valider.
+A réception de ces données, nous vous informerons par e-mail.
+
+Tous les champs (*) sont obligatoires : en cas de données manquantes ou erronées , votre demande ne pourra pas être prise en compte par nos services. * = champ obligatoire.
+
+
+
+
+
+
+
+Les informations que vous nous communiquez dans ce formulaire seront utilisées exclusivement par nos services internes pour le traitement de votre demande et pour personnaliser la communication.
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/library/Application/Controller/Plugin/Auth.php b/library/Application/Controller/Plugin/Auth.php
index 5cabace8f..9dc16ae72 100644
--- a/library/Application/Controller/Plugin/Auth.php
+++ b/library/Application/Controller/Plugin/Auth.php
@@ -13,6 +13,10 @@ 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;
+ }
if ($request->getControllerName()=='fichier'
&& $request->getClientIp(false)=='78.31.45.206') {
@@ -50,8 +54,12 @@ class Application_Controller_Plugin_Auth extends Zend_Controller_Plugin_Abstract
$user = new Scores_Utilisateur();
$info = get_browser();
- $isMobile = ($info->ismobiledevice==1) ? 1 : 0;
- $user->setBrowserInfo($info->platform, $info->browser, $info->version, $isMobile);
+ if ( $info ) {
+ $isMobile = ($info->ismobiledevice==1) ? 1 : 0;
+ $user->setBrowserInfo($info->platform, $info->browser, $info->version, $isMobile);
+ } else {
+ //Save botnet information
+ }
} else {
$messageF = '';
diff --git a/library/Giant/Controllers.lib.php b/library/Giant/Controllers.lib.php
index 8574998ef..2b91e2bd1 100644
--- a/library/Giant/Controllers.lib.php
+++ b/library/Giant/Controllers.lib.php
@@ -1,8 +1,8 @@
pathImg = $c->profil->path->pages.'/imgcache/'.$companyId;
+ $c = Zend_Registry::get('config');
+ $this->pathImg = $c->profil->path->pages.'/imgcache/'.$companyId;
}
@@ -33,14 +33,14 @@ Class GiantControllerLib
$result = $rapport->GetRapport($CompanyId, $Type, $Language);
$result = base64_encode(serialize($result));
$id = $Rapport->setReport($CompanyId,
- $Type,
- $Pays,
- $result,
- $Language);
+ $Type,
+ $Pays,
+ $result,
+ $Language);
}
-
+
$report_id = $Rapport->getRapportExistId($CompanyId, $Language);
-
+
$CommandeP->login = $Utilisateur->getLogin();
$CommandeP->date = date("Y-m-d");
$CommandeP->typeReport = $function->getTypeReport($Type);
@@ -52,63 +52,69 @@ Class GiantControllerLib
print_r($report_id);
echo'';
if(!$Commande->getCommandeExistToday($CommandeP->login, $CommandeP->date, $CommandeP->typeReport, $CommandeP->pays)) {
- $Commande->setCommandes($CommandeP);
+ $Commande->setCommandes($CommandeP);
}*/
$Commande->setCommandes($CommandeP);
return ($id);
}
+ public function monitoring($CompanyId, $CategorieName, $EventType, $PreferredStartDate, $PreferredEndDate, $Version, $LanguageCode,$Pays)
+ {
+ $rapport = new GiantRechercheController($Pays, $TestIndication);
+ $result = $rapport->GetStartMonitoring($CompanyId, $CategorieName, $EventType, $PreferredStartDate, $PreferredEndDate, $Version, $LanguageCode);
+ return ($result);
+ }
protected function parcourTableau($array)
- {
- $tableau = array();
- foreach($array as $key => $element){
- if((is_array($element)) && (($element instanceof stdClass)))
- GiantControllerLib::parcourTableau($element);
- else
- return $element;
- }
- }
+ {
+ $tableau = array();
+ foreach($array as $key => $element){
+ if((is_array($element)) && (($element instanceof stdClass)))
+ GiantControllerLib::parcourTableau($element);
+ else
+ return $element;
+ }
+ }
- public function getAvisDeCredit($report) {
- $getAvisDeCredit = new AvisDeCredit($report, $this->pathImg);
- return ($getAvisDeCredit->getDatas());
- }
+ public function getAvisDeCredit($report) {
+ $getAvisDeCredit = new AvisDeCredit($report, $this->pathImg);
+ return ($getAvisDeCredit->getDatas());
+ }
- public function getStructureEntreprise($report) {
- $StructureEntreprise = new StructureEntreprise($report, $this->pathImg);
- return ($StructureEntreprise->getDatas());
- }
+ public function getStructureEntreprise($report) {
+ $StructureEntreprise = new StructureEntreprise($report, $this->pathImg);
+ return ($StructureEntreprise->getDatas());
+ }
- public function getPositionFinanciere($report) {
- $PositionFinanciere = new PositionFinanciere($report, $this->pathImg);
- return ($PositionFinanciere->getDatas());
- }
+ public function getPositionFinanciere($report) {
+ $PositionFinanciere = new PositionFinanciere($report, $this->pathImg);
+ return ($PositionFinanciere->getDatas());
+ }
- public function getInformationGenerale($report) {
- $InformationGenerale = new InformationGenerale($report, $this->pathImg);
- return ($InformationGenerale->getDatas());
- }
+ public function getInformationGenerale($report) {
+ $InformationGenerale = new InformationGenerale($report, $this->pathImg);
+ return ($InformationGenerale->getDatas());
+ }
- public function getHistoriques($report) {
- $Historique = new Historiques($report, $this->pathImg);
- return ($Historique->getDatas());
- }
+ public function getHistoriques($report) {
+ $Historique = new Historiques($report, $this->pathImg);
+ return ($Historique->getDatas());
+ }
- public function getDirigeant($report) {
- $Dirigeant = new Dirigeant($report, $this->pathImg);
- return ($Dirigeant->getDatas());
- }
+ public function getDirigeant($report) {
+ $Dirigeant = new Dirigeant($report, $this->pathImg);
+ return ($Dirigeant->getDatas());
+ }
- public function getComportementPaiement($report) {
- $ComportementPaiement = new ComportementPaiement($report, $this->pathImg);
- return ($ComportementPaiement->getDatas());
- }
+ public function getComportementPaiement($report) {
+ $ComportementPaiement = new ComportementPaiement($report, $this->pathImg);
+ return ($ComportementPaiement->getDatas());
+ }
- public function getComptesAnnuels($report) {
- $ComptesAnnuels = new ComptesAnnuels($report, $this->pathImg);
- return ($ComptesAnnuels->getDatas());
- }
+ public function getComptesAnnuels($report) {
+ $ComptesAnnuels = new ComptesAnnuels($report, $this->pathImg);
+ return ($ComptesAnnuels->getDatas());
+ }
public function getComparaisonValeurs($report) {
$ComparaisonValeurs = new ComparaisonValeurs($report, $this->pathImg);
@@ -118,208 +124,218 @@ Class GiantControllerLib
Class GiantRechercheController extends GiantFunction
{
- protected $listAutorized = array(
- 'FR' => '006', 'BE' => '001', 'ES' => '001',
- 'GB' => '002', 'NL' => '003'
- );
- protected $Provider;
- public $soapG;
+ protected $listAutorized = array(
+ 'FR' => '006', 'BE' => '001', 'ES' => '001',
+ 'GB' => '002', 'NL' => '003'
+ );
+ protected $Provider;
+ public $soapG;
- protected $Search;
- public $CreditData;
+ protected $Search;
+ public $CreditData;
- public function __construct($CountryCode, $TestIndication = true)
- {
- $this->Provider = new stdClass();
- $this->Provider->CountryCode = $CountryCode;
- $this->Provider->ProviderId = parent::setCountryCode($CountryCode, $this->listAutorized);
- $this->Provider->TestIndication = $TestIndication;
- $this->soapG = new WSgiant($this->Provider);
- }
+ public function __construct($CountryCode, $TestIndication = true)
+ {
+ $this->Provider = new stdClass();
+ $this->Provider->CountryCode = $CountryCode;
+ $this->Provider->ProviderId = parent::setCountryCode($CountryCode, $this->listAutorized);
+ $this->Provider->TestIndication = $TestIndication;
+ $this->soapG = new WSgiant($this->Provider);
+ }
- public function Liste($parametres, $page)
- {
- if (parent::selectTypeSearch($parametres))
- return (self::ListeSearch($parametres, $page));
- else
- return (self::ListeAdvancedSearch($parametres, $page));
- }
+ public function Liste($parametres, $page)
+ {
+ if (parent::selectTypeSearch($parametres))
+ return (self::ListeSearch($parametres, $page));
+ else
+ return (self::ListeAdvancedSearch($parametres, $page));
+ }
- public function ListeSearch($parametres, $page)
- {
- $this->Search = new Search($this->soapG);
- $searchParametre = new stdClass();
- $searchParametre->Query = '';
- $searchParametre->StartRow = $page;
- $searchParametre->NumRows = parent::getNumRows();
- $champQuery = array( 'raisonSociale', 'numero', 'voie', 'cpVille',
- 'telFax', 'naf', 'siret'
- );
- $this->soapG->getAllMethodesFromWsdl('search');
- foreach($parametres as $champ => $parametre) {
- if(!empty($parametre)) {
- foreach($champQuery as $valeur) {
- if($champ == $valeur)
- $searchParametre->Query .= $parametre.' ';
- }}}
- $result = $this->Search->getMethode('search', array($searchParametre, $page));
- if ($result->NumberOfHits > 0)
- $result = parent::replaceAcronyme($result);
+ public function ListeSearch($parametres, $page)
+ {
+ $this->Search = new Search($this->soapG);
+ $searchParametre = new stdClass();
+ $searchParametre->Query = '';
+ $searchParametre->StartRow = $page;
+ $searchParametre->NumRows = parent::getNumRows();
+ $champQuery = array( 'raisonSociale', 'numero', 'voie', 'cpVille',
+ 'telFax', 'naf', 'siret'
+ );
+ $this->soapG->getAllMethodesFromWsdl('search');
+ foreach($parametres as $champ => $parametre) {
+ if(!empty($parametre)) {
+ foreach($champQuery as $valeur) {
+ if($champ == $valeur)
+ $searchParametre->Query .= $parametre.' ';
+ }
+ }
+ }
+ $result = $this->Search->getMethode('search', array($searchParametre, $page));
+ if ($result->NumberOfHits > 0)
+ $result = parent::replaceAcronyme($result);
- return ($result);
- }
+ return ($result);
+ }
- public function ListeAdvancedSearch($parametres, $page)
- {
- $this->Search = new Search($this->soapG);
- $advancedParametres = new stdClass();
- $TypeAdvanced = new stdClass();
- $advancedParametres->StartRow = $page;
- $advancedParametres->NumRows = parent::getNumRows();
+ public function ListeAdvancedSearch($parametres, $page)
+ {
+ $this->Search = new Search($this->soapG);
+ $advancedParametres = new stdClass();
+ $TypeAdvanced = new stdClass();
+ $advancedParametres->StartRow = $page;
+ $advancedParametres->NumRows = parent::getNumRows();
- //((strlen($parametres['siret']) == 9) ? $id = 'CompanyRegisterNumber' : $id = 'CompanyId');
- $labelForm = array(
- 'siret' => 'CompanyId',
- 'raisonSociale' => 'RegisteredName',
- 'numero' => 'HouseNumber',
- 'voie' => 'Street',
- 'cpVille' => 'City'
- );
+ //((strlen($parametres['siret']) == 9) ? $id = 'CompanyRegisterNumber' : $id = 'CompanyId');
+ $labelForm = array(
+ 'siret' => 'CompanyId',
+ 'raisonSociale' => 'RegisteredName',
+ 'numero' => 'HouseNumber',
+ 'voie' => 'Street',
+ 'cpVille' => 'City'
+ );
- foreach ($parametres as $champ => $parametre) {
- if (!empty($parametre)) {
- foreach ($labelForm as $nameForm => $valeur) {
- if ($champ == $nameForm)
- $TypeAdvanced->$valeur = $parametre;
- }}}
- $advancedParametres->Query = $TypeAdvanced;
- if($page == 0 and empty($_SESSION['recherche']['giant']['query'])) {
- $_SESSION['recherche']['giant']['query'] = serialize($advancedParametres);
- $result = $this->Search->getMethode('advancedSearch', array($advancedParametres, $page));
- $this->Search->setQuery(implode(' ', $parametres));
- } else {
- $result = $this->Search->getMethode('advancedSearch', array(unserialize($_SESSION['recherche']['giant']['query']), $page));
- $this->Search->setQuery(implode(' ', $parametres));
- }
+ foreach ($parametres as $champ => $parametre) {
+ if (!empty($parametre)) {
+ foreach ($labelForm as $nameForm => $valeur) {
+ if ($champ == $nameForm)
+ $TypeAdvanced->$valeur = $parametre;
+ }
+ }
+ }
+ $advancedParametres->Query = $TypeAdvanced;
+ if($page == 0 and empty($_SESSION['recherche']['giant']['query'])) {
+ $_SESSION['recherche']['giant']['query'] = serialize($advancedParametres);
+ $result = $this->Search->getMethode('advancedSearch', array($advancedParametres, $page));
+ $this->Search->setQuery(implode(' ', $parametres));
+ } else {
+ $result = $this->Search->getMethode('advancedSearch', array(unserialize($_SESSION['recherche']['giant']['query']), $page));
+ $this->Search->setQuery(implode(' ', $parametres));
+ }
- return ($result);
- }
+ return ($result);
+ }
- public function Identite($siret, $pays)
- {
- $this->Search = new Search($this->soapG);
- $parametres = new stdClass();
- $parametres->siret = $siret;
- $parametres->pays = $pays;
- $result = $this->Search->advancedSearch($parametres);
+ public function Identite($siret, $pays)
+ {
+ $this->Search = new Search($this->soapG);
+ $parametres = new stdClass();
+ $parametres->siret = $siret;
+ $parametres->pays = $pays;
+ $result = $this->Search->advancedSearch($parametres);
- foreach ($result->Results->Company as $element) {
- if ($element->CompanyId == $siret)
- return ($element);
- }
+ foreach ($result->Results->Company as $element) {
+ if ($element->CompanyId == $siret)
+ return ($element);
+ }
- return (false);
- }
+ return (false);
+ }
- public function GetRapport($CompanyId, $DataSetType, $Language)
- {
- $this->CreditData = new CreditData($this->soapG, $CompanyId);
- $result = $this->CreditData->getMethode('OrderDataSet', array($DataSetType, $Language));
- $result = $this->CreditData->getMethode('RetrieveDataSet', array($result->Order->InternalOrderId));
- return ($result);
- }
+ public function GetRapport($CompanyId, $DataSetType, $Language)
+ {
+ $this->CreditData = new CreditData($this->soapG, $CompanyId);
+ $result = $this->CreditData->getMethode('OrderDataSet', array($DataSetType, $Language));
+ $result = $this->CreditData->getMethode('RetrieveDataSet', array($result->Order->InternalOrderId));
+ return ($result);
+ }
+ public function GetStartMonitoring($CompanyId, $CategorieName, $EventType, $PreferredStartDate, $PreferredEndDate, $Version, $LanguageCode)
+ {
+ $this->CreditData = new CreditData($this->soapG, $CompanyId);
+ $result = $this->CreditData->getMethode('StartMonitoring', array($CompanyId, $CategorieName, $EventType, $PreferredStartDate, $PreferredEndDate, $Version, $LanguageCode));
+ return ($result);
+ }
- public function ListeRapport($CompanyId)
- {
- $this->CreditData = new CreditData($this->soapG, $CompanyId);
- $result = $this->CreditData->getMethode('RetreiveOptions', array($CompanyId));
- return ($result);
- }
+ public function ListeRapport($CompanyId)
+ {
+ $this->CreditData = new CreditData($this->soapG, $CompanyId);
+ $result = $this->CreditData->getMethode('RetreiveOptions', array($CompanyId));
+ return ($result);
+ }
}
Class GiantIdentiteController extends GiantControllerLib
{
- protected $objet;
- protected $datas = array();
- protected $liste = array(
- 'CompanyId', 'Vat', 'CompanyName', 'CompanyStatus',
- 'CompanyAddress', 'TelephoneNumber', 'Telefax', 'WebAddress',
- 'EmailAddress', 'IncorporationDate', 'LegalForm', 'IsUltimateParent'
- );
+ protected $objet;
+ protected $datas = array();
+ protected $liste = array(
+ 'CompanyId', 'Vat', 'CompanyName', 'CompanyStatus',
+ 'CompanyAddress', 'TelephoneNumber', 'Telefax', 'WebAddress',
+ 'EmailAddress', 'IncorporationDate', 'LegalForm', 'IsUltimateParent'
+ );
protected $changingStatus = array('FINANCIAL.CREDIT_RECOMMENDATION_CHANGE' => '',
- 'GENERAL.ADDRESS_CHANGE' => '',
- 'GENERAL.COMPANY_NAME_CHANGE' => '',
- 'GENERAL.LEGALFORM_CHANGE' => '',
- 'GENERAL.ACQUISITION' => '',
- 'GENERAL.NEWS' => '',
- 'FINANCIAL.ANNUAL_ACCOUNT_FILED' => '',
- 'FINANCIAL.CAPITAL_CHANGE' => '',
- 'FINANCIAL.CREDIT_RECOMMENDATION_CHANGE' => '',
- 'EXCEPTION.BANKRUPTCY_OR_LIQUIDATION' => ''
+ 'GENERAL.ADDRESS_CHANGE' => '',
+ 'GENERAL.COMPANY_NAME_CHANGE' => '',
+ 'GENERAL.LEGALFORM_CHANGE' => '',
+ 'GENERAL.ACQUISITION' => '',
+ 'GENERAL.NEWS' => '',
+ 'FINANCIAL.ANNUAL_ACCOUNT_FILED' => '',
+ 'FINANCIAL.CAPITAL_CHANGE' => '',
+ 'FINANCIAL.CREDIT_RECOMMENDATION_CHANGE' => '',
+ 'EXCEPTION.BANKRUPTCY_OR_LIQUIDATION' => ''
);
- protected $FinancialSummary = array('Revenue', 'TotalEquity', 'WorkingCapital');
+ protected $FinancialSummary = array('Revenue', 'TotalEquity', 'WorkingCapital');
- public function __construct($objet)
- {
- $this->objet = $objet;
- }
+ public function __construct($objet)
+ {
+ $this->objet = $objet;
+ }
- public function ficheAction()
- {
- if(isset($this->objet->DataSet->Company)) {
- foreach($this->objet->DataSet->Company as $key => $valeur) {
- foreach ($this->liste as $element) {
- if ($element == $key) {
- if(!is_array($valeur)) {
- if(!empty($valeur)) {
- $this->datas['fiche'][$key] = $valeur;
- }
- } else {
- $this->datas['fiche'][$key] = parent::parcourTableau($valeur);
- }
- }
- }
- }
- }
- }
+ public function ficheAction()
+ {
+ if(isset($this->objet->DataSet->Company)) {
+ foreach($this->objet->DataSet->Company as $key => $valeur) {
+ foreach ($this->liste as $element) {
+ if ($element == $key) {
+ if(!is_array($valeur)) {
+ if(!empty($valeur)) {
+ $this->datas['fiche'][$key] = $valeur;
+ }
+ } else {
+ $this->datas['fiche'][$key] = parent::parcourTableau($valeur);
+ }
+ }
+ }
+ }
+ }
+ }
- public function chiffreAction()
- {
- foreach ($this->objet->FinancialSummary[0] as $key => $valeur) {
- foreach($this->FinancialSummary as $element) {
- if (!empty($valeur)) {
- $this->datas['chiffre'][$key] = $valeur->_;
- }
- }
- }
- }
+ public function chiffreAction()
+ {
+ foreach ($this->objet->FinancialSummary[0] as $key => $valeur) {
+ foreach($this->FinancialSummary as $element) {
+ if (!empty($valeur)) {
+ $this->datas['chiffre'][$key] = $valeur->_;
+ }
+ }
+ }
+ }
- public function secondairesAction()
- {
- foreach($this->objet->Branch as $key => $valeur) {
- if($key != 'BranchAddress') {
- if(!is_array($valeur))
- $this->datas['secondaires'][$key] = $valeur;
- else
- $this->datas['secondaires'][$key] = parent::parcourTableau($valeur);
+ public function secondairesAction()
+ {
+ foreach($this->objet->Branch as $key => $valeur) {
+ if($key != 'BranchAddress') {
+ if(!is_array($valeur))
+ $this->datas['secondaires'][$key] = $valeur;
+ else
+ $this->datas['secondaires'][$key] = parent::parcourTableau($valeur);
- } else
- $this->datas['secondaires'][$key] = $valeur[0];
- }
- }
+ } else
+ $this->datas['secondaires'][$key] = $valeur[0];
+ }
+ }
- public function pieceAction()
- {
- foreach($this->objet->Event as $key => $valeur) {
- $this->datas['piece'][$valeur->Source->code][$valeur->Date] = array($valeur->Description, $valeur->FreeText);
- }
- }
+ public function pieceAction()
+ {
+ foreach($this->objet->Event as $key => $valeur) {
+ $this->datas['piece'][$valeur->Source->code][$valeur->Date] = array($valeur->Description, $valeur->FreeText);
+ }
+ }
- public function getObjet($data)
- {
- return ($this->datas[$data]);
- }
+ public function getObjet($data)
+ {
+ return ($this->datas[$data]);
+ }
}
?>
diff --git a/library/Giant/Functions.lib.php b/library/Giant/Functions.lib.php
index 771063227..468c95610 100644
--- a/library/Giant/Functions.lib.php
+++ b/library/Giant/Functions.lib.php
@@ -70,7 +70,7 @@ Class GiantFunction
$array[$valeur[0]][] = $valeur[1];
}
}
- $html = 'Modifications au '.date('d/m/Y').' ';
+ //$html = 'Modifications au '.date('d/m/Y').' ';
$html .= '';
foreach($array as $name => $ar) {
$html .= ''.$name.' : ';
diff --git a/library/Giant/WSgiant.php b/library/Giant/WSgiant.php
index c25c999e2..f69a34e86 100644
--- a/library/Giant/WSgiant.php
+++ b/library/Giant/WSgiant.php
@@ -216,14 +216,15 @@ Class CreditData extends GiantFunction
return ($result);
}
- protected function StartMonitoring($CategorieName, $EventType, $PreferredStartDate, $PreferredEndDate, $Version = null, $LanguageCode = null)
+ protected function StartMonitoring($CompanyId, $CategorieName, $EventType, $PreferredStartDate, $PreferredEndDate, $Version, $LanguageCode)
{
$parametres = new stdClass();
- $parametres->CategorieName = $CategorieName;
+ $parametres->CompanyId = $CompanyId;
+ $parametres->CategoryName = $CategorieName;
$parametres->EventType = $EventType;
$parametres->PreferredStartDate = $PreferredStartDate;
$parametres->PreferredEndDate = $PreferredEndDate;
- $parametres->Version = $Version;
+ $parametres->MonitoringVersion = $Version;
$parametres->LanguageCode = $LanguageCode;
try {
$result = $this->soapG->StartMonitoring($parametres);
diff --git a/library/Giant/config.ini b/library/Giant/config.ini
index f43fb2475..5273c2e5d 100644
--- a/library/Giant/config.ini
+++ b/library/Giant/config.ini
@@ -14,7 +14,9 @@ prod.password = 'mZ0kXvQ03tPC1'
; Paramètres pour le webservice de test
test.search.wsdl = "http://giant-tst.graydon.nl/search/v1?wsdl"
-test.credit-data.wsdl = "https://services.giant-net.com/credit-data/v1?wsdl"
+;test.credit-data.wsdl = "https://services.giant-net.com/credit-data/v1?wsdl"
+test.credit-data.wsdl = "https://giant-tst.graydon.nl/credit-data/v1?wsdl"
+;test.credit-data.wsdl = "http://giant.sd.dev/services/wsdl/credit-data-service-provider-api-1.0.wsdl"
test.header.namespace = "http://services.giant-net.com/schema/services/shared/1.0";
test.header.serviceName = "ServiceHeader";
diff --git a/public/themes/default/scripts/giant.js b/public/themes/default/scripts/giant.js
index d3fca8d80..84fc9e93e 100644
--- a/public/themes/default/scripts/giant.js
+++ b/public/themes/default/scripts/giant.js
@@ -1,6 +1,26 @@
$(document).ready( function()
{
- $('.idpr').on('click', function(){
+ $('a.dial').on('click', function(e){
+ e.preventDefault();
+ var title = $(this).attr('title');
+ var href = $(this).attr('href');
+ var dlgOpts = {
+ bgiframe: true,
+ title: title,
+ width: 710,
+ height: 530,
+ modal: true,
+ open: function(event, ui) {
+ $(this).html('Chargement...');
+ $(this).load(href);
+ },
+ buttons: {'Fermer': function() { $(this).dialog('close'); }},
+ close: function() { $('#dial').remove(); }};
+ $('
').dialog(dlgOpts);
+ return false;
+ });
+
+ $('.idpr,.id_cr').on('click', function(){
//e.preventDefault();
var n = $(this).attr('id');
@@ -10,7 +30,6 @@ $(document).ready( function()
$('#p'+n).css('display', 'none');
}
});
-
$('.tooltip').each(function(){
var title = $(this).attr('title');
var width = $(this).attr('wdth');
@@ -22,22 +41,25 @@ $(document).ready( function()
position: { at: "bottom center", my: "top center" }
});
});
-
- $( "#radio" ).buttonset();
-
+ $(function() {
+ $( "#radio" ).buttonset();
+ $("#radio1").trigger('click');
+ });
$('.radio').on('click', function() {
$('.lang_img').fadeOut();
$.alink = this.value.toLowerCase();
$.alink_h = this.value;
- $(".idpr").attr("href","/giant/"+$.alink+"/Pays/"+location.pathname.match(/\/Pays\/([^\/]+)/)[1]+"/Type/"+$.alink_h+"/CompanyId/"+location.pathname.match(/\/CompanyId\/([^\/]+)/)[1]+"/Language/"+$('.lang0').text().substr($('.lang0').text().length - 2));
+ $(".id_cr").attr("href","/giant/"+$.alink+"/Pays/"+location.pathname.match(/\/Pays\/([^\/]+)/)[1]+"/Type/"+$.alink_h+"/CompanyId/"+location.pathname.match(/\/CompanyId\/([^\/]+)/)[1]+"/Language/"+$('.lang0').text().substr($('.lang0').text().length - 2));
$(".lang").attr("src","/themes/default/images/drapeaux/"+$('.lang0').text().substr($('.lang0').text().length - 2)+".png");
$(".lang_val").val($('.lang0').text().substr($('.lang0').text().length - 2));
$('.'+$.alink+'').fadeIn(500);
});
$('select').on('change', function() {
$('.lang_img').fadeOut();
- $(".idpr").attr("href","/giant/"+$.alink+"/Pays/"+location.pathname.match(/\/Pays\/([^\/]+)/)[1]+"/Type/"+$.alink_h+"/CompanyId/"+location.pathname.match(/\/CompanyId\/([^\/]+)/)[1]+"/Language/"+this.value);
+ $(".id_cr").attr("href","/giant/"+$.alink+"/Pays/"+location.pathname.match(/\/Pays\/([^\/]+)/)[1]+"/Type/"+$.alink_h+"/CompanyId/"+location.pathname.match(/\/CompanyId\/([^\/]+)/)[1]+"/Language/"+this.value);
$(".lang").attr("src","/themes/default/images/drapeaux/"+this.value+".png");
$('.'+$.alink+'').fadeIn(500);
- });
+ });
+
+
});
\ No newline at end of file
diff --git a/public/themes/default/scripts/giant_monitoring.js b/public/themes/default/scripts/giant_monitoring.js
new file mode 100644
index 000000000..08176b2a1
--- /dev/null
+++ b/public/themes/default/scripts/giant_monitoring.js
@@ -0,0 +1,43 @@
+function validate() {
+ $("[required]").each(function() {
+ if (!$(this).val()) {
+ $(this).addClass('brsr');
+ } else {
+ $(this).removeClass('brsr');
+ }
+ });
+};
+$('[required]').blur(function() {
+ validate();
+});
+$(document).ready(function() {
+ validate();
+
+ $(function() {
+ $("#datepicker").datepicker($.datepicker.regional["fr"]);
+ });
+ $(function() {
+ $("#datepicker1").datepicker($.datepicker.regional["fr"]);
+ });
+ $('#dial').dialog({
+ buttons : [ {
+ text : "Valider",
+ click : function() {
+ var values = $(this).find('form').serialize();
+ $.post('/giant/startmonitoring', values, function(data) {
+ $('#dial').html(data);
+
+ });
+
+ }
+ }, {
+ text : "Fermer",
+ click : function() {
+ if ($(".message p").text() == 'Cut-off mis à jour.') {
+ location.reload();
+ }
+ $(this).dialog('close');
+ }
+ } ]
+ });
+});
diff --git a/public/themes/default/scripts/motpasse.js b/public/themes/default/scripts/motpasse.js
new file mode 100644
index 000000000..acd056e8d
--- /dev/null
+++ b/public/themes/default/scripts/motpasse.js
@@ -0,0 +1,64 @@
+function fill() {
+ $("input#frm").each(function() {
+ var td_id = $(this).attr("name");
+ $("td#"+td_id).text($(this).val());
+ });
+}
+
+function validate() {
+ var allvals = true;
+ $("[required]").each(function() {
+ if(!$(this).val()) {
+ allvals = false;
+ $(this).addClass('brsr');
+ }
+ else { $(this).removeClass('brsr'); }
+ });
+ return allvals;
+}
+
+function isEmail(email) {
+ var emailval = true;
+ var regex = /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
+ if (!regex.test(email.val())) {
+ emailval = false;
+ $(email).addClass('brsr');
+ }
+ else {
+ $(email).removeClass('brsr');
+ }
+ return emailval;
+}
+
+$(document).ready(function(){
+ validate();
+ isEmail($('[name=email]'));
+});
+
+$('[required]').blur(function(){
+ validate();
+});
+
+$('#dlg').dialog({ buttons: [
+ { text: "Valider", click: function() {
+ fill();
+ $("[name='mailbody']").val($("#alwayshidden").html());
+ var values = $(this).find('form').serialize();
+ if (validate() && isEmail($('[name=email]'))) {
+ if ($('.loading').css('display')=='none') {
+ $('.loading').css('display', 'block');
+ $('.ui-dialog-content').css('overflow','hidden');
+ $(".ui-dialog-buttonpane button:contains('Valider')").button("disable");
+ }
+ else { $('.loading').css('display', 'none');}
+ $.post('/user/motpasse', values, function(data) {
+ $('#dlg').html(data);
+ $('pre').hide();
+ $('#htxt').height(50);
+ $('input#frm').attr("disabled", "disabled");
+ $(".ui-dialog-buttonpane button:contains('Valider')").hide();
+ });
+ }
+ }},
+ { text: "Annuler", click: function() { $(this).dialog('close'); }}
+] });
\ No newline at end of file
diff --git a/public/themes/default/scripts/scorecutoff.js b/public/themes/default/scripts/scorecutoff.js
index 1bc6ad237..c5894715f 100644
--- a/public/themes/default/scripts/scorecutoff.js
+++ b/public/themes/default/scripts/scorecutoff.js
@@ -39,7 +39,7 @@ $('#dialog').dialog({ buttons: [
}
}},
{ text: "Fermer", click: function() {
- if($(".message p").text()) { location.reload(); }
+ if($(".message p").text()=='Cut-off mis à jour.') { location.reload(); }
$(this).dialog('close');
}
}
diff --git a/public/themes/default/styles/giant.css b/public/themes/default/styles/giant.css
index b053a6c2d..769f70fba 100644
--- a/public/themes/default/styles/giant.css
+++ b/public/themes/default/styles/giant.css
@@ -270,4 +270,13 @@
float:right;
margin-left:3px;
+}
+.brsr {
+ border-style:solid;
+ border-width:1px;
+ border-color:red;
+}
+.all_select
+{
+ width: 140px;
}
\ No newline at end of file