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 @@ +
+
+ + +

+CompanyId: CompanyId?>

+ +LanguageCode:
+

+CategoryName:
+

+EventType:
+

+PreferredStartDate:
+ optional

+PreferredEndDate:
+ optional

+MonitoringVersion:
+

+

+
+'; print_r($this->values);print_r($this->result);?> +
+ - +
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) {?> + +name?> + + + + + + +message!='') {?> +

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.
+
+
+ +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+ + + +Chers S&D collègues,
+J'ai oublié mon identifiant et(ou) mot de passe de site web scores-decisions.com.
+S'il vous plaît envoyez-moi encore une fois l'identifiant et(ou) le mot de passe qui me permettra d'avoir un accès au site. +

Ci-dessous, trouvez les informations enregistrées sur mon identité:

+ + + + + + + + +
Identifiant :
Adresse email:
Numéro de téléphone direct:
Nom:
Prénom:
Fonction:
Raison Sociale:
+

Veuillez agréer, chers collègues, l'assurance de mes sentiments respectueux.

+
+ + + +
+
+ +
+
+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.
+
+
+ +
+ +