Merge from trunk

This commit is contained in:
Michael RICOIS 2013-07-30 14:10:48 +00:00
commit 2a5c56082f
134 changed files with 6860 additions and 3313 deletions

View File

@ -1011,28 +1011,30 @@ class DashboardController extends Zend_Controller_Action
$ws = new WsScores();
if ($request->isPost()){
$log = $request->getParam('log');
$service = $request->getParam('service');
$type = $request->getParam('type');
$priceUnit = $request->getParam('priceUnit');
$limit = $request->getParam('limit');
$date = $request->getParam('date');
$duree = $request->getParam('duree');
$doublon = $request->getParam('doublon');
$result = $ws->setClientTarif($idClient, $log, $service, $type, $priceUnit, $limit, $date, $duree, $doublon);
if(is_int($result)) {
$url = $this->view->url(array('controller'=>'dashboard','action'=>'tarifs','idClient'=>$idClient));
$this->redirect($url);
} else {
$this->view->assign('log', $log);
$this->view->assign('service', $service);
$this->view->assign('type', $type);
$this->view->assign('priceUnit', $priceUnit);
$this->view->assign('date', $date);
$this->view->assign('duree', $duree);
$this->view->assign('doublon', $doublon);
$this->view->assign('error', $result);
if ( $request->isXmlHttpRequest() ) {
$this->_helper->layout()->disableLayout();
if ( $request->isPost() ) {
$log = $request->getParam('log');
$service = $request->getParam('service');
$type = $request->getParam('type');
$priceUnit = $request->getParam('priceUnit');
$limit = $request->getParam('limit');
$date = $request->getParam('date');
$duree = $request->getParam('duree');
$doublon = $request->getParam('doublon');
$result = $ws->setClientTarif($idClient, $log, $service, $type, $priceUnit, $limit, $date, $duree, $doublon);
if(is_int($result)) {
//OK
} else {
$this->view->assign('log', $log);
$this->view->assign('service', $service);
$this->view->assign('type', $type);
$this->view->assign('priceUnit', $priceUnit);
$this->view->assign('date', $date);
$this->view->assign('duree', $duree);
$this->view->assign('doublon', $doublon);
$this->view->assign('error', $result);
}
}
}

View File

@ -15,14 +15,6 @@ class DirigeantController extends Zend_Controller_Action
require_once 'common/dates.php';
}
/**
* Forward
*/
public function indexAction()
{
$this->_forward('index', 'index');
}
/**
* Affichage de la liste des dirigeants
*/
@ -50,6 +42,8 @@ class DirigeantController extends Zend_Controller_Action
$this->view->assign('dirigeantsop', $href);
}
$this->view->assign('edition', $user->checkModeEdition());
$this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale());

View File

@ -108,6 +108,7 @@ class EvaluationController extends Zend_Controller_Action
$this->view->headScript()->appendFile('/themes/default/scripts/finance.js', 'text/javascript');
$user = new Scores_Utilisateur();
$wdate = new WDate();
if(!$user->checkPerm('INDISCORE2') && !$user->checkPerm('INDISCORE2P'))
$this->_forward('perms', 'error');
@ -166,7 +167,7 @@ class EvaluationController extends Zend_Controller_Action
$dInfo[$idRatio] = $valRatio['total_info'];
}
$tabResult[] = array(
'dateCloture' => WDate::dateT('Ymd','d/m/Y',$annee),
'dateCloture' => $wdate->dateT('Ymd','d/m/Y',$annee),
'duree' => $infosAnnee[$annee]->duree.' Mois',
'ratio' => $data,
'total' => $dataTotal,
@ -218,7 +219,7 @@ class EvaluationController extends Zend_Controller_Action
$dateRadiation = '';
if(isset($indiscore->DateRadiation) && $indiscore->DateRadiation!='' && $indiscore->DateRadiation!='0000-00-00')
$this->view->assign('dateRadiation', WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$indiscore->DateRadiation)));
$this->view->assign('dateRadiation', $wdate->dateT('Ymd', 'd/m/Y', str_replace('-','',$indiscore->DateRadiation)));
foreach($indiscore->scores as $name => $sc){
if($name == 'ConanH')
@ -861,7 +862,6 @@ class EvaluationController extends Zend_Controller_Action
$email = $request->getParam('email', '');
$infos = $ws->getEntrepriseValo($siren);
file_put_contents('test.log', print_r($infos,1));
require_once 'Scores/RapportComment.php';
$rapportComment = new RapportComment($siren, $this->id,

View File

@ -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,110 @@ 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->CompanyName = $this->getRequest()->getParam('CompanyName');
$this->view->action = $this->getRequest()->getParam('action');
$this->view->values = $this->getRequest()->getParams();
if ($this->getRequest()->isPost()) {
$giantController = new GiantControllerLib($this->getRequest()->getParam('CompanyId'));
$result = $giantController->startmonitoring($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->TestIndication,
$this->getRequest()->getParam('CompanyName')
);
$this->view->result = $result;
}
}
public function stopmonitoringAction()
{
$this->_helper->layout()->disableLayout();
$this->view->headLink()->appendStylesheet('/themes/default/styles/giant.css', 'all');
$this->view->CompanyId = $this->getRequest()->getParam('CompanyId');
$this->view->Pays = $this->getRequest()->getParam('Pays');
$this->view->InternalOrderId = $this->getRequest()->getParam('InternalOrderId');
$this->view->CompanyName = $this->getRequest()->getParam('CompanyName');
$this->view->action = $this->getRequest()->getParam('action');
$this->view->values = $this->getRequest()->getParams();
if ($this->getRequest()->isPost()) {
$giantController = new GiantControllerLib($this->getRequest()->getParam('CompanyId'));
$result = $giantController->stopmonitoring($this->getRequest()->getParam('CompanyId'),
$this->getRequest()->getParam('EndDate'),
$this->getRequest()->getParam('InternalOrderId'),
$this->getRequest()->getParam('Pays'),
$this->TestIndication
);
$this->view->result = $result;
}
}
public function updatemonitoringAction()
{
$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->CompanyName = $this->getRequest()->getParam('CompanyName');
$this->view->action = $this->getRequest()->getParam('action');
$this->view->values = $this->getRequest()->getParams();
if ($this->getRequest()->isPost()) {
$giantController = new GiantControllerLib($this->getRequest()->getParam('CompanyId'));
$result = $giantController->updatemonitoring($this->getRequest()->getParam('CompanyId'),
$this->getRequest()->getParam('InternalOrderId'),
$this->getRequest()->getParam('CategoryName'),
$this->getRequest()->getParam('EventType'),
$this->getRequest()->getParam('StartDate'),
$this->getRequest()->getParam('Version'),
$this->getRequest()->getParam('LanguageCode'),
$this->getRequest()->getParam('Pays'),
$this->TestIndication
);
$this->view->result = $result;
}
}
public function retrivemonitoringAction()
{
$this->view->headScript()->appendFile('/themes/default/scripts/giant_monitoring.js', 'text/javascript');
$this->view->CompanyId = $this->getRequest()->getParam('CompanyId');
$this->view->Pays = $this->getRequest()->getParam('Pays');
$this->view->CompanyName = $this->getRequest()->getParam('CompanyName');
$this->view->action = $this->getRequest()->getParam('action');
$this->view->values = $this->getRequest()->getParams();
$giantController = new GiantControllerLib($this->getRequest()->getParam('CompanyId'));
$result = $giantController->retrivemonitoring($this->getRequest()->getParam('CompanyId'),
$this->getRequest()->getParam('StartFrom'),
$this->getRequest()->getParam('InternalOrderId'),
$this->getRequest()->getParam('Pays'),
$this->TestIndication,
$this->getRequest()->getParam('monitor_type'),
$this->getRequest()->getParam('CompanyName')
);
$this->view->result = $result;
$merged =Array();
foreach ($result->MonitoringEvents->MonitoringEvent as $MonitoringEvent):
if ($merged[$MonitoringEvent->Company->Event[0]->EventCode]){
array_push($merged[$MonitoringEvent->Company->Event[0]->EventCode],$MonitoringEvent) ;
} else {
$merged[$MonitoringEvent->Company->Event[0]->EventCode][]=$MonitoringEvent;
}
endforeach;
$this->view->val = $merged;
}
}

View File

@ -621,7 +621,6 @@ class IdentiteController extends Zend_Controller_Action
//Get links
$infos = $ws->getLiensById($lienRef);
Zend_Registry::get('firebug')->info($infos);
} else {
$siren = substr($this->siret,0,9);
@ -1147,8 +1146,12 @@ class IdentiteController extends Zend_Controller_Action
public function facadeAction()
{
$request = $this->getRequest();
require_once 'Scores/Mappy.php';
$infos = $this->getRequest()->getParam('infos');
$infos = $request->getParam('infos');
$source = $request->getParam('source');
$mappy = new Mappy();
if ($mappy->villeCouverte($infos->Ville))
{
@ -1178,15 +1181,46 @@ class IdentiteController extends Zend_Controller_Action
}
else
{
require_once 'Scores/Google.php';
$google = new Google();
$googleKey = $google->getGoogleKey($_SERVER['SERVER_NAME']);
$this->view->assign('googleKey', $googleKey);
$this->view->assign('source', 'google');
$this->view->assign('infos', $infos);
}
}
public function streetviewAction()
{
$request = $this->getRequest();
if ( $request->isXmlHttpRequest() ) {
$this->_helper->layout()->disableLayout();
}
$lat = $request->getParam('lat', '');
$lon = $request->getParam('lon', '');
$num = $request->getParam('heading', 0);
$streetview = new Scores_Streetview();
if ( $lat != '' && $lon != '' ) {
$deg = $streetview->getNumDeg();
$nbImg = count($deg);
$pagePrec = $num-1;
if ($pagePrec<=0) {
$pagePrec = $nbImg-1;
}
$pageSuiv = $num+1;
if($pageSuiv>=$nbImg) {
$pageSuiv = 0;
}
$this->view->assign('pagePrec', $pagePrec);
$this->view->assign('pageSuiv', $pageSuiv);
$streetview->setLocationGeo( $lat, $lon );
$heading = $deg[$num];
$streetview->setHeading($heading);
//$streetview->setLocationTxt($adresse);
$this->view->assign('url', $streetview->urlImg());
}
$this->view->assign('lat', $lat);
$this->view->assign('lon', $lon);
}
public function groupesarboAction()
{
$this->_helper->layout()->disableLayout();

View File

@ -1,6 +1,7 @@
<?php
class SaisieController extends Zend_Controller_Action
{
protected $wDate;
/**
* Enter description here ...
@ -336,6 +337,7 @@ class SaisieController extends Zend_Controller_Action
require_once 'common/dates.php';
$ws = new WsScores();
$this->wDate = new WDate();
$countries = json_decode($ws->getCatalogCountry(),true);
if ($countries!==false) {
$lib = array();
@ -571,11 +573,10 @@ class SaisieController extends Zend_Controller_Action
$selectEvent = array(
'1100', '1101' , '1200', '1201', '1300', '1301', '1302', '1303', '1304', '1305', '1306',
'1307',
'1308', '1309', '1310', '1311', '1312', '1408', '1411', '1412', '1413', '1414', '1415',
'1511', '1502', '1503', '1512', '1600', '1601', '1999', '2102', '2100', '2202', '2206',
'2319', '2315', '2313', '2305', '2307', '2303', '2306', '2901', '5500', '6700', '1010',
'1050', '1055', '2203', '2204', '2210', '2212',
'1307', '1308', '1309', '1310', '1311', '1312', '1408', '1411', '1412', '1413', '1414',
'1415', '1511', '1502', '1506', '1503', '1512', '1600', '1601', '1999', '2102', '2100',
'2202', '2206', '2319', '2315', '2313', '2305', '2307', '2303', '2306', '2901', '5500',
'6700', '1010', '1050', '1055', '2203', '2204', '2210', '2212',
);
$eventM = new Application_Model_TabEvenements();
$sql = $eventM->select()
@ -909,15 +910,15 @@ class SaisieController extends Zend_Controller_Action
$saisie = array(
'source' => isset($_SESSION['source']) ? $_SESSION['source'] : $idanResult->source,
'dateParution' => isset($_SESSION['dateParution']) ? $_SESSION['dateParution'] :
WDate::dateT('Y-m-d', 'd/m/Y', substr($idanResult->dateSource,0,10)),
$this->wDate->dateT('Y-m-d', 'd/m/Y', substr($idanResult->dateSource,0,10)),
'numParution' => isset($_SESSION['numParution']) ? $_SESSION['numParution'] : '',
'dateJugement' => WDate::dateT('Y-m-d', 'd/m/Y', $idanResult->dateEffetFinP),
'dateJugement' => $this->wDate->dateT('Y-m-d', 'd/m/Y', $idanResult->dateEffetFinP),
'tribunal' => $idanResult->tribunal,
'even' => $idanResult->even->item,
'eventNum' => $eventLimit,
'comp' => $idanResult->complement,
'montant' => $idanResult->montant,
'dateFinPeriode' => WDate::dateT('Y-m-d', 'd/m/Y', $idanResult->dateJugement),
'dateFinPeriode' => $this->wDate->dateT('Y-m-d', 'd/m/Y', $idanResult->dateJugement),
);
$intervenants = array();
@ -1580,15 +1581,18 @@ class SaisieController extends Zend_Controller_Action
}
}
if ( $lienRef && $siren !== null ) {
if ( $lienRef !== null ) {
Zend_Registry::get('firebug')->info('lienRef:'.$lienRef);
$result = $ws->getLienRef($lienRef);
$rs = $result->RS;
if ( intval($result->siren)!=0 ) {
Zend_Registry::get('firebug')->info($result);
$rs = $result->raisonSociale;
//Override session session
if ( intval($result->siren) != 0 ) {
$siren = $result->siren;
$session = new SessionEntreprise($siren);
}
} else {
} elseif ($siren !== null) {
$session = new SessionEntreprise($siren);
$rs = $session->getRaisonSociale();
}
@ -1641,7 +1645,7 @@ class SaisieController extends Zend_Controller_Action
$this->view->assign('PDetention', $infos['PDetention']);
$this->view->assign('Pvote', $infos['Pvote']);
$this->view->assign('MajMin', $infos['MajMin']);
$this->view->assign('dateEffetLien', WDate::dateT('Y-m-d', 'd/m/Y', $infos['dateEffetLien']));
$this->view->assign('dateEffetLien', $this->wDate->dateT('Y-m-d', 'd/m/Y', $infos['dateEffetLien']));
}
//Mode = edit / add
@ -1669,7 +1673,7 @@ class SaisieController extends Zend_Controller_Action
$this->view->assign('PDetention', $infos['PDetention']);
$this->view->assign('Pvote', $infos['Pvote']);
$this->view->assign('MajMin', $infos['MajMin']);
$this->view->assign('dateEffetLien', WDate::dateT('Y-m-d', 'd/m/Y', $infos['dateEffetLien']));
$this->view->assign('dateEffetLien', $this->wDate->dateT('Y-m-d', 'd/m/Y', $infos['dateEffetLien']));
} else {
@ -1850,7 +1854,7 @@ class SaisieController extends Zend_Controller_Action
'nom' => strtoupper(trim($params['nom'])),
'prenom' => ucfirst(trim($params['prenom'])),
'nom_usage' => strtoupper(trim($params['nom_usage'])),
'naissance_date' => empty($params['naissance_date']) ? '' : WDate::dateT('d/m/Y','Ymd',$params['naissance_date']),
'naissance_date' => empty($params['naissance_date']) ? '' : $this->wDate->dateT('d/m/Y','Ymd',$params['naissance_date']),
'naissance_dept_pays' => $params['naissance_dept_pays'],
'naissance_lieu' => $params['naissance_lieu'],
'nat' => $params['nat'],
@ -1869,8 +1873,9 @@ class SaisieController extends Zend_Controller_Action
'dateSaisie' => date('YmdHis'),
'capital' => empty($params['capital']) ? '' : trim($params['capital']),
'deviseCapital' => empty($params['deviseCapital']) ? 'EUR' : $params['deviseCapital'],
'dateCapital' => empty($params['dateCapital']) ? '' : WDate::dateT('d/m/Y', 'Ymd', $params['dateCapital']),
'dateCapital' => empty($params['dateCapital']) ? '' : $this->wDate->dateT('d/m/Y', 'Ymd', $params['dateCapital']),
'nbActions' => empty($params['nbActions']) ? '' : $params['nbActions'],
'dateNbActions' => empty($params['dateNbActions']) ? '' : $this->wDate->dateT('d/m/Y', 'Ymd', $params['dateNbActions']),
'idLoc1Type' => $params['idLoc1Type'],
'idLoc1Num' => trim($params['idLoc1Num']),
'idLoc2Type' => $params['idLoc2Type'],
@ -1911,7 +1916,7 @@ class SaisieController extends Zend_Controller_Action
if ($params['mode']=='delete') {
$infos = array(
'actif' => 0,
'dateEffetLien' => empty($params['dateEffetLien']) ? date('Ymd') : WDate::dateT('d/m/Y', 'Ymd', $params['dateEffetLien']),
'dateEffetLien' => empty($params['dateEffetLien']) ? date('Ymd') : $this->wDate->dateT('d/m/Y', 'Ymd', $params['dateEffetLien']),
'motifUpdate' => empty($params['motifUpdate']) ? '' : $params['motifUpdate'],
);
} else {
@ -1931,7 +1936,7 @@ class SaisieController extends Zend_Controller_Action
'Pvote' => ($params['Pvote']=='') ? null : $params['Pvote'],
'MajMin' => $params['MajMin'],
'idPar' => $idPar,
'dateEffetLien' => empty($params['dateEffetLien']) ? date('Ymd') : WDate::dateT('d/m/Y', 'Ymd', $params['dateEffetLien']),
'dateEffetLien' => empty($params['dateEffetLien']) ? date('Ymd') : $this->wDate->dateT('d/m/Y', 'Ymd', $params['dateEffetLien']),
'motifUpdate' => empty($params['motifUpdate']) ? '' : $params['motifUpdate'],
);
}
@ -2002,7 +2007,7 @@ class SaisieController extends Zend_Controller_Action
'capital' => $identite->Bilan->Capital,
'deviseCapital' => 'EUR',
'dateCapital' => empty($identite->Bilan->Cloture) ? '' :
WDate::dateT('Ymd','d/m/Y',$identite->Bilan->Cloture),
$this->wDate->dateT('Ymd','d/m/Y',$identite->Bilan->Cloture),
'nbActions' => '',
'idLoc1Type' => '',
'idLoc1Num' => '',
@ -2052,7 +2057,7 @@ class SaisieController extends Zend_Controller_Action
if (!file_exists($path)) { mkdir($path); }
$date = WDate::dateT('d/m/Y', 'Ymd', $params['fileDate']);
$date = $this->wDate->dateT('d/m/Y', 'Ymd', $params['fileDate']);
$name = 'INTERNE-'.$params['idNum'].'-'.$params['fileType'].'-'.$date;
$n = $_FILES['fichier']['name'];
@ -2170,7 +2175,7 @@ class SaisieController extends Zend_Controller_Action
$this->view->assign('ape',$result->NafEnt);
$this->view->assign('capital',$result->Bilan->Capital);
$this->view->assign('deviseCapital', 'EUR');
$this->view->assign('dateCapital', Wdate::dateT('Ymd','d/m/Y',$result->Bilan->Cloture));
$this->view->assign('dateCapital', $this->wDate->dateT('Ymd','d/m/Y',$result->Bilan->Cloture));
$this->view->assign('bilDev', 'EUR');
$this->view->assign('bilMillesime', $result->Bilan->Millesime);
$this->view->assign('bilFL', $result->Bilan->CA);
@ -2228,7 +2233,7 @@ class SaisieController extends Zend_Controller_Action
case 'dateNbActions':
case 'naissance_date':
if (!empty($val) && $val!='0000-00-00')
$this->view->assign($key, WDate::dateT('Y-m-d', 'd/m/Y', $val));
$this->view->assign($key, $this->wDate->dateT('Y-m-d', 'd/m/Y', $val));
break;
default:
$this->view->assign($key, $val);
@ -2255,11 +2260,13 @@ class SaisieController extends Zend_Controller_Action
$lienref = $request->getParam('lienref');
$this->view->assign('lienref', $lienref);
$idLien = $request->getParam('idLien');
$this->view->assign('idLien', $idLien);
$ws = new WsScores();
//Save data
if ( $request->isPost() ){
$idLien = $request->getParam('idLien');
$id = $request->getParam('id');
$result = $ws->setLienChange($mode, $idLien, $id);
if (true === $result) {
@ -2290,9 +2297,10 @@ class SaisieController extends Zend_Controller_Action
{
$ws = new WsScores();
$user = new Scores_Utilisateur();
$request = $this->getRequest();
$siren = $request->getParam('siren');
$refresh = 0;
if ( $request->isXmlHttpRequest() ) {
$this->_helper->layout()->disableLayout();
@ -2317,22 +2325,29 @@ class SaisieController extends Zend_Controller_Action
}
}
// end checking values
if ($message == '') {
$message = $ws->setScoreCutoff($params['siren'], $params['encours']*1000, $params['scoreSolv'], $params['scoreDir'], $params['scoreConf'], $params['remarque']);
if (is_int($message)){
$message = "Cut-off mis à jour.";
$refresh = 1;
}
}
$this->view->assign('message', $message);
}
} else {
$this->view->assign('name', "Définir un Cut-off");
$this->view->assign('href', $this->view->url(array('controller'=>'saisie','action'=>'scorecutoff','siren'=>$siren)));
}
$getcutoff = json_decode($ws->getScoreCutoff($siren), true);
if(!$getcutoff) {
if(!$getcutoff) {
if ($request->getParam('delmessage', NULL)){
$message = $request->getParam('delmessage', NULL)."Aucun Cut-off est défini, merci de remplir toutes les valeurs";
$refresh = 1;
} else {
$message = "Aucun Cut-off est défini, merci de remplir toutes les valeurs";
}
$getcutoff = array(
'siren' => '',
'encours' => '',
@ -2344,9 +2359,33 @@ class SaisieController extends Zend_Controller_Action
'dateUpdate' => ''
);
}
$this->view->assign('getcutoff', $getcutoff);
$this->view->assign('siren', $siren);
$this->view->assign('typescore', $user->getTypeScore());
$this->view->assign('message', $message);
$this->view->assign('refresh', $refresh);
}
/**
* Supprimer Cut-off
*/
public function scorecutoffdelAction()
{
$ws = new WsScores();
$message = '';
$request = $this->getRequest();
$siren = $request->getParam('siren');
if ( $request->isXmlHttpRequest() ) {
$this->_helper->layout()->disableLayout();
if ( $request->isPost() && isset($siren)) {
$message = $ws->delScoreCutoff($siren);
if ($message){
$message = "Cut-off est supprimé.&nbsp;";
}
}
}
$this->_redirect('/saisie/scorecutoff/siren/'.$siren.'/delmessage/'.$message);
}
}

View File

@ -1,57 +1,10 @@
<?php
class UserController extends Zend_Controller_Action
{
/**
* Récupére les valeurs du profil depuis le webservice
* @param unknown_type $login
* @param unknown_type $password
*/
protected function updateProfil($login, $password)
{
Zend_Registry::get('firebug')->info('updateProfil');
$ws = new WsScores();
$utilisateur = new Scores_Utilisateur();
$InfosLogin = $ws->getInfosLogin($login, $_SERVER['REMOTE_ADDR']);
$identity = new stdClass;
$identity->username = $login;
$identity->password = $password;
$identity->email = $InfosLogin->result->email;
$identity->profil = $InfosLogin->result->profil;
$identity->pref = $InfosLogin->result->pref;
$identity->droits = $InfosLogin->result->droits;
$identity->droitsClients = $InfosLogin->result->droitsClients;
$identity->nom = $InfosLogin->result->nom;
$identity->prenom = $InfosLogin->result->prenom;
$identity->tel = $InfosLogin->result->tel;
$identity->fax = $InfosLogin->result->fax;
$identity->mobile = $InfosLogin->result->mobile;
$identity->id = $InfosLogin->result->id;
$identity->idClient = $InfosLogin->result->idClient;
$identity->reference = $InfosLogin->result->reference;
$identity->nbReponses = $InfosLogin->result->nbReponses;
$identity->typeScore = $InfosLogin->result->typeScore;
$identity->dateValidation = $InfosLogin->result->dateValidation;
$identity->nombreConnexions = $InfosLogin->result->nombreConnexions;
$identity->dateDerniereConnexion = $InfosLogin->result->dateDerniereConnexion;
$identity->dateDebutCompte = $InfosLogin->result->dateDebutCompte;
$identity->dateFinCompte = $InfosLogin->result->dateFinCompte;
$identity->ip = $_SERVER['REMOTE_ADDR'];
$identity->timeout = (!empty($InfosLogin->result->timeout)) ?
$InfosLogin->result->timeout : 1800;
$identity->time = time() + $identity->timeout;
$identity->modeEdition = false;
$identity->acceptationCGU = $InfosLogin->result->acceptationCGU;
$lang = in_array($InfosLogin->result->lang,array('fr','en')) ? $InfosLogin->result->lang : 'fr';
$identity->lang = $lang;
$identity->langtmp = $lang;
$identity->browser = $utilisateur->getBrowserInfo();
return $identity;
}
public function init()
{
require_once 'Scores/WsScores.php';
$this->view->headLink()->appendStylesheet('/themes/default/styles/user.css', 'all');
}
@ -103,7 +56,7 @@ class UserController extends Zend_Controller_Action
}
if ( in_array($options['profil'], array('Administrateur', 'SuperAdministrateur'))
&& !in_array('monprofil', $options['droits']) ) {
&& !in_array('monprofil', $options['droits']) ) {
$options['droits'][] = 'monprofil';
}
@ -135,7 +88,8 @@ class UserController extends Zend_Controller_Action
//Mise à jour du profil
if ($isProfilUpdated && $updateResult) {
$identity = $this->updateProfil($identity->username, $identity->password);
$InfosLogin = $ws->getInfosLogin($identity->username, $_SERVER['REMOTE_ADDR']);
$identity = $user->updateProfil($InfosLogin);
$auth->getStorage()->write($identity);
}
@ -229,6 +183,57 @@ class UserController extends Zend_Controller_Action
$this->view->assign('prefsLib', $prefsLib);
}
/**
* Display box to enter emails
* One main email and two secondary
* Email length 80 * 3 = 240
* 255 chars is the length to store emails (email1;email2;email3)
*/
public function emailsAction()
{
$this->_helper->layout()->disableLayout();
$nbEmails = 3;
$request = $this->getRequest();
$emails = $request->getParam('q');
if (null !== $emails) {
$emailList = explode(';', $emails);
if ( count($emailList)>0 ) {
$i = 1;
foreach ( $emailList as $email ) {
$this->view->assign('email'.$i, $email);
$i++;
}
}
}
}
/**
* Validate email
*/
public function emailvalidAction()
{
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$email = $request->getParam('q');
$valid = false;
if (null !== $email) {
$validateur = new Zend_Validate_EmailAddress();
$valid = $validateur->isValid($email);
}
$result = array(
'valid' => $valid,
);
$this->view->assign('result', $result);
}
/**
* Téléchargement de la consommation au format CSV
*/
@ -334,8 +339,7 @@ class UserController extends Zend_Controller_Action
*/
public function loginAction()
{
$this->view->inlineScript()
->appendFile('/libs/jquery/jquery-1.9.1.min.js')
$this->view->headScript()
->appendFile('/libs/jquery/jquery.infieldlabel.min.js');
//@todo : gestion des affichages particuliers pour les clients
@ -548,4 +552,91 @@ class UserController extends Zend_Controller_Action
echo "</pre>";
}
/**
* Sends email to the specific client, who requests for forgotten password
*/
public function motpasseAction()
{
$request = $this->getRequest();
$name = 'Identifiants oubliés ?';
$params = array(
'identifiant' => '',
'telephone' => '',
'email' => '',
'nom' => '',
'prenom' => '',
'fonction' => '',
'service' => '',
'rsociale' => '',
);
$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',
'service' => 'Service',
'rsociale' => 'Sociale',
);
foreach ($paramlist as $item => $val) {
if (!isset($params[$item])) {
$message .= "Champs $val vide !<br/>";
}
}
$validator = new Zend_Validate_EmailAddress();
if (isset($params['email'])){
if (!$validator->isValid($params['email'])) {
$message .="Adresse email invalide ! <br/>";
}
}
if ($message == '') {
$mailbody = '<style type="text/css">table {font-family:Arial, Helvetica, sans-serif; font-size: 12px; width: 550px; border: none;}table td{padding: 4px 8px;}</style>';
$mailbody .= "Demande d'envoi des identifiants.<br /><br />";
$mailbody .= "L'un de nos clients a égaré son(ses) identifiant(s).<br />";
$mailbody .= "Via notre lien -identifiants oubliés- il a effectué une demande de transmission de ces codes.<br />";
$mailbody .= "<p>A l'aide des informations ci-dessous, merci de retrouver ces codes et les lui envoyer par email.</p>";
$mailbody .= "<table><tr bgcolor='#eeeeee'><td width='200px'><strong>Identifiant :</strong></td><td>".$params['identifiant']."</td></tr>";
$mailbody .= "<tr><td><strong>Adresse email:</strong></td><td>".$params['email']."</td></tr>";
$mailbody .= "<tr bgcolor='#eeeeee'><td><strong>Numéro de téléphone direct:</strong></td><td>".$params['telephone']."</td></tr>";
$mailbody .= "<tr><td><strong>Nom:</strong></td><td>".$params['nom']."</td></tr>";
$mailbody .= "<tr bgcolor='#eeeeee'><td><strong>Prénom:</strong></td><td>".$params['prenom']."</td></tr>";
$mailbody .= "<tr><td><strong>Fonction:</strong></td><td>".$params['fonction']."</td></tr>";
$mailbody .= "<tr bgcolor='#eeeeee'><td><strong>Service:</strong></td><td>".$params['service']."</td></tr>";
$mailbody .= "<tr><td><strong>Raison Sociale:</strong></td><td>".$params['rsociale']."</td></tr></table>";
$mailbody .= "<p>Si les informations fournies ne permettent pas d'identifier correctement l'utilisateur, ";
$mailbody .= "merci d'émettre un message sur le mail communiquer en précisant que \"Les éléments confiés ne permettent pas d'identifier l'utilisateur ";
$mailbody .= "et par conséquence de vous délivrer les codes d'accès demandés\".<br />";
$mailbody .= "Aussi nous vous invitons à vous rapprocher de votre interlocuteur commercial habituel ";
$mailbody .= "ou de votre responsable suivi relations Scores & Décisions au sein de votre société.</p>";
require_once 'Scores/Mail.php';
$mail = new Mail();
$mail->setSubject("Demande d'envoi des identifiants");
$mail->setBodyHTML($mailbody);
$mail->setFrom('support');
$mail->addToKey('support');
$mail->setReplyTo($params['email']);
try {
$mail->send();
$this->view->assign('sendEmail' , true);
}
catch ( Zend_Mail_Transport_Exception $e ){
$message = $e->getMessage();
}
}
$this->view->assign('message', $message);
}
$this->view->assign('params', $params);
}
}

View File

@ -0,0 +1,60 @@
<?php
class WorldcheckController extends Zend_Controller_Action
{
protected $siret;
protected $id;
public function init()
{
require_once '/WorldCheck/WsWorldCheck.php';
}
/**
*
*/
public function indexAction()
{
$message = '';
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$param->dirNom = 'HOLLANDE'; //$request->getParam('dirNom');
$param->dirPrenom = ''; //$request->getParam('dirPrenom');
$param->dirNaissJJ = $request->getParam('dirNaissJJ');
$param->dirDateNaissMM = $request->getParam('dirDateNaissMM');
$param->dirDateNaissAAAA = $request->getParam('dirDateNaissAAAA');
$param->dirCpVille = $request->getParam('dirCpVille');
$data->customId1 = '1';
$data->customId2 = '2';
$data->name = $param->dirNom.' '.$param->dirPrenom;
$data->nameType = 'INDIVIDUAL';
$wc = new WsWorldCheck();
$nameIdentifier = $wc->getScreener($data);
$matchCount = new stdClass();
$matchCount = $wc->getDetailsName($nameIdentifier);
if ($matchCount->unresolvedMatchCount == 0)
{
$message = 'Aucun résultat.';
}
else
{
$message = 'Résultats de recherche';
$matches = $wc->getMatchesName($nameIdentifier, 'WATCHLIST', 0, $matchCount->unresolvedMatchCount);
}
$this->view->assign('message', $message);
$this->view->assign('param', $param);
$this->view->assign('matches', $matches);
$this->view->assign('nameIdentifier', $nameIdentifier);
}
public function matchresultAction()
{
}
}

Binary file not shown.

View File

@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Extranet2.4\n"
"POT-Creation-Date: 2013-06-07 17:45+0400\n"
"PO-Revision-Date: 2013-06-07 17:46+0400\n"
"PO-Revision-Date: 2013-06-17 16:55+0400\n"
"Last-Translator: \n"
"Language-Team: SND-A\n"
"Language: en\n"
@ -584,18 +584,18 @@ msgstr "IDENTIFICATION SHEET"
#: application/languages/totranslate.php:204
#: application/languages/totranslate.php:741
msgid "Numéro identifiant Siret"
msgstr ""
msgstr "Siret identifiaction number"
#: application/languages/totranslate.php:163
#: application/languages/totranslate.php:205
msgid "Numéro de TVA Intracom."
msgstr ""
msgstr "Intracom VAT number."
#: application/languages/totranslate.php:164
#: application/languages/totranslate.php:208
#: application/languages/totranslate.php:490
msgid "Numéro R.C."
msgstr ""
msgstr "R.C. number"
#: application/languages/totranslate.php:165
#: application/languages/totranslate.php:209
@ -691,11 +691,11 @@ msgstr "Activity of the establishment"
#: application/languages/totranslate.php:182
#: application/languages/totranslate.php:499
msgid "Anciens codes NAF"
msgstr ""
msgstr "Old codes NAF"
#: application/languages/totranslate.php:183
msgid "Codes NACE"
msgstr ""
msgstr "NACE codes"
#: application/languages/totranslate.php:184
#: application/languages/totranslate.php:501
@ -709,11 +709,11 @@ msgstr "Number of active establishments"
#: application/languages/totranslate.php:186
#: application/languages/totranslate.php:502
msgid "Capital"
msgstr ""
msgstr "Capital"
#: application/languages/totranslate.php:187
msgid "Chiffre d'affaires estimé"
msgstr ""
msgstr "Estimated turnover"
#: application/languages/totranslate.php:188
msgid "Principaux Dirigeants"
@ -745,11 +745,11 @@ msgstr "Show address on Google Map"
#: application/languages/totranslate.php:195
msgid "Code commune / Rivoli :"
msgstr ""
msgstr "Common Code / Rivoli :"
#: application/languages/totranslate.php:196
msgid "Iris :"
msgstr ""
msgstr "Iris :"
#: application/languages/totranslate.php:197
msgid "Code :"
@ -774,7 +774,7 @@ msgstr ""
#: application/languages/totranslate.php:203
msgid "FICHE PROCÉDURE COLLECTIVES"
msgstr ""
msgstr "GROUP PROCEDURE SHEET"
#: application/languages/totranslate.php:206
#: application/languages/totranslate.php:747
@ -785,7 +785,7 @@ msgstr "ISIN code"
#: application/languages/totranslate.php:440
#: application/languages/totranslate.php:920
msgid "Capitalisation"
msgstr ""
msgstr "Capitalisation"
#: application/languages/totranslate.php:213
msgid "Composition et répartition du capital social"
@ -793,7 +793,7 @@ msgstr ""
#: application/languages/totranslate.php:214
msgid "Information à vérifier dans les derniers statuts"
msgstr ""
msgstr "Information to be verified in the last status"
#: application/languages/totranslate.php:215
msgid "Diminution de capital"
@ -817,19 +817,19 @@ msgstr "Procedure types"
#: application/languages/totranslate.php:220
msgid "Potentiel de récupération et réalisation d'actifs"
msgstr ""
msgstr "Potential recovery and asset realization"
#: application/languages/totranslate.php:221
msgid "Dépôt des comptes annuels et des comptes consolidés"
msgstr ""
msgstr "Filing annual and consolidated accounts"
#: application/languages/totranslate.php:222
msgid "Dépôt des comptes annuels"
msgstr ""
msgstr "Filing annual accounts"
#: application/languages/totranslate.php:223
msgid "Dépôt des comptes consolidés"
msgstr ""
msgstr "Filing consolidated accounts"
#: application/languages/totranslate.php:224
msgid "Jugements de clôture"
@ -882,12 +882,12 @@ msgstr ""
#: application/languages/totranslate.php:240
msgid "LIENS INTER-ENTREPRISES"
msgstr ""
msgstr "INTER-COMPANY LINKS"
#: application/languages/totranslate.php:241
#: application/languages/totranslate.php:279
msgid "Organigramme du groupe"
msgstr ""
msgstr "Schema of the group"
#: application/languages/totranslate.php:242
msgid "Documents"
@ -903,7 +903,7 @@ msgstr "Link a document"
#: application/languages/totranslate.php:245
msgid "organigramme du groupe"
msgstr ""
msgstr "schema of the group"
#: application/languages/totranslate.php:246
msgid "Editer la fiche"
@ -1341,7 +1341,7 @@ msgstr ""
#: application/languages/totranslate.php:378
msgid "Constructions"
msgstr ""
msgstr "Constructions"
#: application/languages/totranslate.php:379
msgid "Instal. techniques, ..."
@ -1701,7 +1701,7 @@ msgstr ""
#: application/languages/totranslate.php:489
msgid "RAPPORT DE SYNTHESE"
msgstr ""
msgstr "SYNTHESIS REPORT"
#: application/languages/totranslate.php:500
msgid "Origine du fonds"
@ -1776,7 +1776,7 @@ msgstr "COMMENTS"
#: application/languages/totranslate.php:529
msgid "BILAN"
msgstr ""
msgstr "BALANCE"
#: application/languages/totranslate.php:530
msgid "Situation financière"
@ -1842,7 +1842,7 @@ msgstr ""
#: application/languages/totranslate.php:547
msgid "Encours demandé"
msgstr ""
msgstr "Asked outstanding"
#: application/languages/totranslate.php:548
msgid "Nombre d'échéances"
@ -1854,15 +1854,15 @@ msgstr ""
#: application/languages/totranslate.php:550
msgid "Favorable"
msgstr ""
msgstr "Favorable"
#: application/languages/totranslate.php:551
msgid "Défavorable"
msgstr ""
msgstr "Unfavorable"
#: application/languages/totranslate.php:552
msgid "Demandeur"
msgstr ""
msgstr "Applicant"
#: application/languages/totranslate.php:553
msgid "Votre profil"
@ -1890,19 +1890,19 @@ msgstr "Your Reference"
#: application/languages/totranslate.php:559
msgid "Service Achats"
msgstr ""
msgstr "Purchasing Service"
#: application/languages/totranslate.php:560
msgid "Commerce"
msgstr ""
msgstr "Commerce"
#: application/languages/totranslate.php:561
msgid "Recouvrement"
msgstr ""
msgstr "Recovery"
#: application/languages/totranslate.php:562
msgid "Contentieux"
msgstr ""
msgstr "Litigation"
#: application/languages/totranslate.php:563
msgid "Autre"
@ -1910,15 +1910,15 @@ msgstr "Other"
#: application/languages/totranslate.php:564
msgid "Enquête"
msgstr ""
msgstr "Investigation"
#: application/languages/totranslate.php:565
msgid "Type d'enquête"
msgstr ""
msgstr "Type of investigation"
#: application/languages/totranslate.php:566
msgid "Délais de livraison"
msgstr ""
msgstr "Delivery time"
#: application/languages/totranslate.php:567
msgid "Précisions sur la demande"
@ -1926,7 +1926,7 @@ msgstr ""
#: application/languages/totranslate.php:568
msgid "Ancienneté de la relation"
msgstr ""
msgstr "Length of relationship"
#: application/languages/totranslate.php:569
msgid "Impayées"
@ -1934,15 +1934,15 @@ msgstr "Unpaid"
#: application/languages/totranslate.php:570
msgid "Retard de paiement"
msgstr ""
msgstr "Late payment"
#: application/languages/totranslate.php:571
msgid "Litiges techniques ou commerciaux"
msgstr ""
msgstr "Technical or commercial disputes"
#: application/languages/totranslate.php:572
msgid "Observations ou questions spéciales"
msgstr ""
msgstr "Observations or special questions"
#: application/languages/totranslate.php:573
msgid "Envoyez"
@ -1962,11 +1962,11 @@ msgstr ""
#: application/languages/totranslate.php:577
msgid "encours inférieur à"
msgstr ""
msgstr "outstanding less than"
#: application/languages/totranslate.php:578
msgid "encours supérieur à"
msgstr ""
msgstr "outstanding more than"
#: application/languages/totranslate.php:579
msgid "Choisissez..."
@ -1974,19 +1974,19 @@ msgstr "Choose..."
#: application/languages/totranslate.php:580
msgid "Enquête sur un client (contrôl crédit)"
msgstr ""
msgstr "Investigation on a client (Control credit)"
#: application/languages/totranslate.php:581
msgid "Enquête sur un prospect (ouverture de compte)"
msgstr ""
msgstr "Investigation of a prospect (account opening)"
#: application/languages/totranslate.php:582
msgid "Enquête sur un fournisseur stratégique"
msgstr ""
msgstr "Investigation of a strategic supplier"
#: application/languages/totranslate.php:583
msgid "Enquête sur un fournisseur non stratégique"
msgstr ""
msgstr "Investigation of a non strategic supplier\""
#: application/languages/totranslate.php:584
msgid "Autre type d'enquête (Précisez...)"
@ -2019,7 +2019,7 @@ msgstr "Receive the original kbis by mail"
#: application/languages/totranslate.php:593
msgid "PRIVILÉGES & NANTISSEMENTS"
msgstr ""
msgstr "PRIVILEGES AND PLEDGES"
#: application/languages/totranslate.php:594
msgid ""
@ -2050,7 +2050,7 @@ msgstr ""
#: application/languages/totranslate.php:600
msgid "Déclarations de créances"
msgstr ""
msgstr "Statements of accounts"
#: application/languages/totranslate.php:603
msgid "PIÈCES OFFICIELLES"
@ -2066,11 +2066,11 @@ msgstr "Annual accounts"
#: application/languages/totranslate.php:606
msgid "Date de clôture"
msgstr ""
msgstr "Closing date"
#: application/languages/totranslate.php:607
msgid "Décisions"
msgstr ""
msgstr "Decisions"
#: application/languages/totranslate.php:608
msgid "Comptes millésime"
@ -2172,7 +2172,7 @@ msgstr "E-mail address"
#: application/languages/totranslate.php:641
msgid "Numéros de téléphone (Fixe, Fax, Mobile)"
msgstr ""
msgstr "Telephone numbers (Fixed, Fax, Mobile)"
#: application/languages/totranslate.php:642
msgid "Mot de passe"
@ -2320,11 +2320,11 @@ msgstr "Announces"
#: application/languages/totranslate.php:683
msgid "Insee"
msgstr ""
msgstr "Insee"
#: application/languages/totranslate.php:684
msgid "Bilans"
msgstr ""
msgstr "Balances"
#: application/languages/totranslate.php:685
msgid "Indiscore"
@ -2507,7 +2507,7 @@ msgstr ""
#: application/languages/totranslate.php:748
msgid "Activité déclarée de l'entreprise"
msgstr ""
msgstr "Declared business activity of the company"
#: application/languages/totranslate.php:749
msgid "Capital Montant"
@ -2583,7 +2583,7 @@ msgstr ""
#: application/languages/totranslate.php:772
msgid "en date du"
msgstr ""
msgstr "dated"
#: application/languages/totranslate.php:773
msgid "découpé en"
@ -2823,7 +2823,7 @@ msgstr ""
#: application/languages/totranslate.php:839
msgid "Tarif unitaire pour les indiscore"
msgstr ""
msgstr "Unit price for indiscore"
#: application/languages/totranslate.php:840
msgid "Accès Webservice"
@ -2847,7 +2847,7 @@ msgstr "Investigation by the image IparI"
#: application/languages/totranslate.php:845
msgid "Historique des annonces bodacc"
msgstr ""
msgstr "History of bodacc announces"
#: application/languages/totranslate.php:846
msgid "Investigation"
@ -2891,7 +2891,7 @@ msgstr "List of operational managers"
#: application/languages/totranslate.php:863
msgid "Export des Liasses au format XLS"
msgstr ""
msgstr "Export Bundles in in XLS format"
#: application/languages/totranslate.php:864
msgid "Saisie de bilan"
@ -3068,7 +3068,7 @@ msgstr "Mobile"
#: application/languages/totranslate.php:921
msgid "Forme juridique à l'INSEE: Autre SA à directoire (5699)"
msgstr ""
msgstr "Legal form to INSEE: Other SA Executive (5699)"
#: application/languages/totranslate.php:923
msgid "Belgium"

View File

@ -0,0 +1,13 @@
<?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
class Application_Model_MonitoringGiants extends Zend_Db_Table_Abstract
{
protected $_name = 'monitoring_giants';
}
?>

View File

@ -0,0 +1,11 @@
<?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
class Application_Model_RetriveGiants extends Zend_Db_Table_Abstract
{
protected $_name = 'retrive_giants';
}
?>

View File

@ -1,9 +1,6 @@
<div id="center">
<h1>Ajout d'un tarif</h1>
<?php if ($this->error) {?>
<?=$this->error?>
<?php }?>
<div class="paragraph">
<?php } else {?>
<form method="post" action="<?=$this->url(array('controller'=>'dashboard','action'=>'tarif'),null,true)?>">
<input type="hidden" name="idClient" value="<?=$this->idClient?>"/>
@ -45,7 +42,20 @@
</select>
<br/>
<input type="submit" name="submit" value="Ajouter" class="button"/>
</form>
</div>
</div>
<script>
var windowhref = window.location.href;
$('#dialog').dialog({ buttons: [
{ text: "Valider", click: function() { survSubmit(); } },
{ text: "Annuler", click: function() { $(this).dialog("close"); } }
]});
function survSubmit(){
$('#dialogsurv').dialog({buttons: []});
$('#dialogsurv').dialog({ buttons: [
{ text: "Fermer", click: function() { window.location.href = windowhref; $(this).dialog("close"); } }
]});
}
</script>
<?php }?>

View File

@ -9,20 +9,21 @@
<?php if(count($this->contrats)>0) {?>
<style>
table {width:100%;}
table th {border:1px solid #cccccc; padding:2px;}
table td {border:1px solid #cccccc; padding:2px; height:16px;}
table th {border:1px solid #cccccc; padding:2px; text-align:center;}
table td {border:1px solid #cccccc; padding:2px; height:16px; text-align:center;}
</style>
<?php foreach ( $this->contrats as $contrat ) {?>
<div class="contrat">
<div>Du <span><?=$contrat->dateBegin?></span> au <span><?=$contrat->dateEnd?></span></div>
<div>Du <span class="date-begin"><?=$contrat->dateBegin?></span> au <span><?=$contrat->dateEnd?></span></div>
<br/>
<table>
<tr>
<th>Log</th>
<th>Element</th>
<th>Service</th>
<th>Type</th>
<th>Prix unitaire</th>
<th>Limit</th>
<th>Limite</th>
<th>Dédoublonnage</th>
</tr>
<?php foreach ($contrat->tarifs->item as $tarif ) {?>
@ -36,13 +37,17 @@ table td {border:1px solid #cccccc; padding:2px; height:16px;}
</tr>
<?php }?>
</table>
<br/>
<div style="line-height:16px;">
<a class="tarif-add" title="Ajouter un tarif" href="#">
<a class="tarif-add" title="Ajouter un tarif" href="<?=$this->url(array('controller'=>'dashboard','action'=>'tarif','date'=>$contrat->dateBegin))?>">
<img style="vertical-align:middle;" src="/themes/default/images/interfaces/ajouter.png" />Ajouter un tarif</a>
</div>
<br/>
</div>
<?php }?>
<hr/>
<?php } else {?>
Aucun tarif défini.
<?php }?>
@ -50,60 +55,48 @@ Aucun tarif défini.
</div>
</div>
<script src="/libs/editable/jquery.jeditable.js" type="text/javascript"></script>
<script>
var waitTarifAdd = false;
var services = "{'DEFAULT':'DEFAULT',<?php foreach($this->services as $i => $service) {?>'<?=$service->code?>':'<?=$service->label?>'<?php if($i<count($this->services)){?>,<?php } }?>}";
var logs = "{<?php foreach($this->logs as $i => $log) {?>'<?=$log->code?>':'<?=$log->desc?>'<?php if($i<count($this->logs)){?>,<?php } }?>}";
$('a.tarif-add').click(function(e){
e.preventDefault();
if (waitTarifAdd){
} else {
$(this).parents('div.contrat').find('table').append('<tr><td class="edit-log"></td><td class="edit-service"></td><td class="edit-type"></td><td class="edit-priceUnit"></td><td class="edit-limit"></td><td class="edit-doublon"></td></tr>');
$(this).html('Enregistrer');
waitTarifAdd = true;
}
e.preventDefault();
var title = "Ajout d'un tarif";
var href = $(this).attr('href');
var dialogOpts = {
bgiframe: true,
title: title,
width: 500,
height: 400,
modal: true,
open: function(event, ui) {
$(this).html('Chargement...');
$(this).load(href);
},
buttons: {
Annuler: function() { $(this).dialog('close'); }
},
close: function() { $('#dialog').remove(); }
};
$('<div id="dialog"></div>').dialog(dialogOpts);
});
$('a.contrat-add').click(function(e){
e.preventDefault();
e.preventDefault();
var title = "Ajout d'un contrat";
var href = $(this).attr('href');
var dialogOpts = {
bgiframe: true,
title: title,
width: 500,
height: 200,
modal: true,
open: function(event, ui) {
$(this).html('Chargement...');
$(this).load(href);
},
buttons: {
Annuler: function() { $(this).dialog('close'); }
},
close: function() { $('#dialog').remove(); }
};
$('<div id="dialog"></div>').dialog(dialogOpts);
});
$('td.edit-log').editable(function(value, settings){
}, {
data: logs,
type: 'select',
});
$('td.edit-service').editable(function(value, settings){
}, {
data: services,
type: 'select',
});
$('td.edit-type').editable(function(value, settings){
}, {
data: "{'Unitaire':'Unitaire','ForfaitLimit':'ForfaitLimit','ForfaitNoLimit':'ForfaitNoLimit'}",
type: 'select',
});
$('td.edit-priceUnit').editable(function(value, settings){
}, {
type: 'text',
});
$('td.edit-limit').editable(function(value, settings){
}, {
type: 'text',
});
$('td.edit-doublon').editable(function(value, settings){
}, {
data: "{'none':'none', 'jour':'jour', 'mois':'mois','period';'period'}",
type: 'select',
});
</script>

View File

@ -85,12 +85,21 @@ table.data td { border:1px solid #ccc; padding:5px; }
?>
né(e) à <?=$dir->NaissVille?> &nbsp;(<?=$dir->NaissDepPays?>)
<?php } ?>
<img src="/themes/default/images/worldcheck/wc.png" />
<?php } ?>
</td>
<td class="StyleInfoData" width="100" valign="top">
<?php if ($dir->Siren!='') {?>
<a title="Consulter la fiche identité" href="<?=$this->url(array('controller'=>'identite', 'action'=>'fiche', 'siret'=>$dir->Siren))?>">
<?=$this->SirenTexte($dir->Siren)?></a>
<?php if (empty($this->AutrePage) && $this->edition) {?>
<div style="line-height:16px;">
<a class="dialog" title="Ajouter un actionnaire" href="<?=$this->url(array('controller'=>'saisie','action'=>'lien','type'=>'actionnaire','mode'=>'add','siren'=>$this->siren,'createfiche'=>$dir->Siren),null,true)?>">
<img style="vertical-align:middle;" src="/themes/default/images/interfaces/ajouter.png" /></a>
</div>
<?php }?>
<?php }?>
</td>
</tr>
@ -107,7 +116,39 @@ table.data td { border:1px solid #ccc; padding:5px; }
<?php } ?>
</div>
<?php if (empty($this->AutrePage)):?>
<?php if (empty($this->AutrePage)) {?>
<?=$this->render('cgu.phtml', $this->cgu)?>
</div>
<?php endif;?>
<?php }?>
<?php if (empty($this->AutrePage)) {?>
</div>
<?php }?>
<?php if (empty($this->AutrePage) && $this->edition) {?>
<script>
$('a.dialog').on('click', function(){
var href = $(this).attr('href');
if (href!='#') {
var title = $(this).attr('title');
var dialogOpts = {
bgiframe: true,
title: title,
width: 650,
height: 600,
modal: true,
open: function(event, ui) {
$(this).html('Chargement...');
$(this).load(href);
},
buttons: {
Quitter: function() { $(this).dialog('close'); }
},
close: function() { $('#dialog').remove(); }
};
$('<div id="dialog"></div>').dialog(dialogOpts);
return false;
}
});
</script>
<?php }?>

View File

@ -135,9 +135,9 @@
<div class="stats gradiant_pic">
<ul>
<li>
<i><?=$this->indiscore->AnalyseConfor?></i>
<i><?=$this->indiscore->AnalyseConfor; ?></i>
<div class="blocdegrade clearfix">
<span class="textdegrade">Conformit&eacute;</span>
<span class="textdegrade">Conformit&eacute;&nbsp;<? if ($this->edition) { echo '('.$this->indiscore->ScoreConfor.')';}?></span>
<div class="imgdegrade"><img class="borderimg" src="/themes/default/images/indiscore/imgscores-<?=$this->FormatPct($this->indiscore->ScoreConfor)?>.png"/></div>
<div class="regle"><img src="/themes/default/images/indiscore/sgradiant2.png" /></div>
</div>
@ -151,7 +151,7 @@
<li>
<i><?=$this->indiscore->AnalyseDirigeance?></i>
<div class="blocdegrade clearfix">
<span class="textdegrade">Dirigeance</span>
<span class="textdegrade">Dirigeance&nbsp;<? if ($this->edition) { echo '('.$this->indiscore->ScoreDirigeance.')';}?></span>
<div class="imgdegrade"><img class="borderimg" src="/themes/default/images/indiscore/imgscores-<?=$this->FormatPct($this->indiscore->ScoreDirigeance)?>.png"/></div>
<div class="regle"><img src="/themes/default/images/indiscore/sgradiant2.png" /></div>
</div>
@ -165,7 +165,7 @@
<li>
<i>L'analyse de la solvabilit&eacute; est <?=$this->indiscore->AnalyseSolvabilite?></i>
<div class="blocdegrade clearfix">
<span class="textdegrade">Solvabilit&eacute;</span>
<span class="textdegrade">Solvabilit&eacute;&nbsp;<? if ($this->edition) { echo '('.$this->indiscore->Indiscore.')';}?></span>
<div class="imgdegrade"><img class="borderimg" src="/themes/default/images/indiscore/imgscores-<?php echo $this->FormatPct($this->indiscore->Indiscore);?>.png"/></div>
<div class="regle"><img src="/themes/default/images/indiscore/sgradiant2.png" /></div>
</div>

View File

@ -688,7 +688,7 @@
<tr>
<td>Production vendue services</td>
<td align="center">FG</td>
<td align="right"><?php echo $this->liasse['FG'];?>0</td>
<td align="right"><?php echo $this->liasse['FG'];?></td>
<td align="center">FH</td>
<td align="right"><?php echo $this->liasse['FH'];?></td>
<td align="center">FI</td>
@ -1774,14 +1774,14 @@
</tr>
<tr>
<td align="right" colspan="2"><b>TOTAL GENERAL (I+II+III)</b></td>
<td align="center">ON</td>
<td align="right"><?php echo $this->liasse['ON'];?></td>
<td align="center">OP</td>
<td align="right"><?php echo $this->liasse['OP'];?></td>
<td align="center">OQ</td>
<td align="right"><?php echo $this->liasse['OQ'];?></td>
<td align="center">OR</td>
<td align="right"><?php echo $this->liasse['OR'];?></td>
<td align="center">0N</td>
<td align="right"><?php echo $this->liasse['0N'];?></td>
<td align="center">0P</td>
<td align="right"><?php echo $this->liasse['0P'];?></td>
<td align="center">0Q</td>
<td align="right"><?php echo $this->liasse['0Q'];?></td>
<td align="center">0R</td>
<td align="right"><?php echo $this->liasse['0R'];?></td>
</tr>
</tbody>
</table>
@ -3370,8 +3370,8 @@ pour les entreprises placées sous le régime de l'article 39-1. 1 e bis Al. 2 d
<td colspan="10">Personnel extérieur à l'entreprise</td>
<td align="center">YU</td>
<td align="right"><?php echo $this->liasse['YU'];?></td>
<td align="center">YU</td>
<td align="right"><?php echo $this->liasse['YU'];?></td>
<td align="center">YU1</td>
<td align="right"><?php echo $this->liasse['YU1'];?></td>
</tr>
<tr>
<td colspan="10">Rémunérations d'intermédiaires et honoraires (hors rétrocessions)</td>

View File

@ -70,7 +70,7 @@
<td class="StyleInfoData lang_img <?=strtolower($rapport->DataSetType->_);?>">
<a id="r<?php echo $i?>" class="idpr" href="/giant/<?=strtolower($rapport->DataSetType->_)?>/Pays/<?=$this->Pays; ?>/Type/<?php echo $rapport->DataSetType->_?>/CompanyId/<?php echo $this->CompanyId;?>/Language/<?=$rapport->LanguageCodes->LanguageCode[0];?>" >Consulter le rapport en immédiat</a>
<a id="r<?php echo $i?>" class="idpr id_cr" href="/giant/<?=strtolower($rapport->DataSetType->_)?>/Pays/<?=$this->Pays; ?>/Type/<?php echo $rapport->DataSetType->_?>/CompanyId/<?php echo $this->CompanyId;?>/Language/<?=$rapport->LanguageCodes->LanguageCode[0];?>" >Consulter le rapport en immédiat</a>
<div id="pr<?php echo $i?>" class="hide" style="display:none;z-index: 1;margin-left: -340px;">
<center><img style="padding-top:30%" src="/themes/default/images/giant/19-1.gif" /></center>
</div>
@ -129,4 +129,34 @@
</table>
</div>
<?php endif;?>
<?php if(!empty($this->modification)): ?>
<h1>Liste des monitoring<img style="margin-top:4px;float:right" src="/themes/default/images/giant/expanded.gif" ></h1>
<div class='monitor_but'>
<a class="dial" title="Start Monitoring" href='/giant/startmonitoring/CompanyId/<?=$this->CompanyId?>/Pays/<?=$this->Pays?>/lang/<?=serialize($this->listeRapport->MonitoringOptions->MonitoringOption[0]->LanguageCodes->LanguageCode)?>/CompanyName/<?=str_replace(' ', '+', $this->raisonSociale)?>'>Start monitoring</a>
<a class="dial" title="Stop Monitoring" href='/giant/stopmonitoring/CompanyId/<?=$this->CompanyId?>/Pays/<?=$this->Pays?>/CompanyName/<?=str_replace(' ', '+', $this->raisonSociale)?>'>Stop monitoring</a>
<a class="dial" title="Update Monitoring" href='/giant/updatemonitoring/CompanyId/<?=$this->CompanyId?>/Pays/<?=$this->Pays?>/lang/<?=serialize($this->listeRapport->MonitoringOptions->MonitoringOption[0]->LanguageCodes->LanguageCode)?>/CompanyName/<?=str_replace(' ', '+', $this->raisonSociale)?>'>Update monitoring</a>
<a class="retr" title="Retrive Monitoring" href='/giant/retrivemonitoring/CompanyId/<?=$this->CompanyId?>/Pays/<?=$this->Pays?>/CompanyName/<?=str_replace(' ', '+', $this->raisonSociale)?>'>Retrive monitoring</a>
</div>
<br><br><br><br>
<div class="dialog-form" title="Create new user">
<form>
<fieldset>
<strong>Monitoring Type For: </strong><br />
<select name="EventType" class="mon_type">
<option value='Customer'>Customer</option>
<option value='Consumer'>Consumer</option>
<option value='Order'>Order</option>
</select><br /><br />
<strong>StartFrom: </strong><br />
<input type="text" name="StartFrom" value="" /> optional<br /><br />
<div class='int_order'><strong>InternalOrderId: </strong><br />
<input type="text" class='datepicker' name="InternalOrderId" value="32768032781"/> <br /><br /></div>
</fieldset>
</form>
</div>
<?php echo'<pre>';print_r($this->modification); ?>
<?php endif;?>
</div>

View File

@ -0,0 +1,545 @@
<?function emp_check($val){echo (empty($val))?'NC':$val;}
$wdate = new WDate();?>
<div id="center">
<div class='acord'>
<div id="accordion">
<h3>GENERAL.ADDRESS_CHANGE</h3>
<div>
<?php if(isset($this->val['GENERAL.ADDRESS_CHANGE'])):?>
<?foreach ($this->val['GENERAL.ADDRESS_CHANGE'] as $report):?>
<h2 class="radius">Données officielles</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>ProviderEventId</b></div> <div class="right_div"><?emp_check($report->ProviderEventId)?></div></div>
<div><div class="left_div"><b>InternalEventId</b></div> <div class="right_div"><?emp_check($report->InternalEventId)?></div></div>
<div><div class="left_div"><b>CompanyId </b></div> <div class="right_div"><?emp_check($report->Company->CompanyId)?></div></div>
<div><div class="left_div"><b>CompanyName </b></div> <div class="right_div"><?emp_check($report->Company->CompanyName[0]->_)?></div></div>
<div><div class="left_div"><b>EventCode </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->EventCode)?></div></div>
<div><div class="left_div"><b>Source </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Source->_)?></div></div>
<div><div class="left_div"><b>Description </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Description->_)?></div></div>
<div><div class="left_div"><b>FreeText </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->FreeText->_)?></div></div>
</div>
<br /><br />
<h2 class="radius">Données officielles</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>OldCompanyName</b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->CompanyName[0]->_)?></div></div>
<div><div class="left_div"><b>NewCompanyName</b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[1]->Company[0]->CompanyName[0]->_)?></div></div>
</div><br /><br />
<h2 class="radius">Old Address</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>Street</b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->CompanyAddress[0]->Street)?></div></div>
<div><div class="left_div"><b>HouseNumber</b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->CompanyAddress[0]->HouseNumber)?></div></div>
<div><div class="left_div"><b>PostCode </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->CompanyAddress[0]->PostCode)?></div></div>
<div><div class="left_div"><b>City </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->CompanyAddress[0]->City)?></div></div>
<div><div class="left_div"><b>Country </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->CompanyAddress[0]->Country)?></div></div>
</div><br /><br />
<h2 class="radius">New Address</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>Street</b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[1]->Company[0]->CompanyAddress[0]->Street)?></div></div>
<div><div class="left_div"><b>HouseNumber</b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[1]->Company[0]->CompanyAddress[0]->HouseNumber)?></div></div>
<div><div class="left_div"><b>PostCode </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[1]->Company[0]->CompanyAddress[0]->PostCode)?></div></div>
<div><div class="left_div"><b>City </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[1]->Company[0]->CompanyAddress[0]->City)?></div></div>
<div><div class="left_div"><b>Country </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[1]->Company[0]->CompanyAddress[0]->Country)?></div></div>
</div>
<hr style="border:1px dotted silver" />
<?endforeach;?>
<? else :?>
<div class="ui-state-error ui-corner-all">
<p><span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-alert"></span>
Aucun GENERAL.ADDRESS_CHANGE
</p>
</div>
<? endif; ?>
</div>
<h3>GENERAL.COMPANY_NAME_CHANGE</h3>
<div>
<?php if(isset($this->val['GENERAL.COMPANY_NAME_CHANGE'])):?>
<?foreach ($this->val['GENERAL.COMPANY_NAME_CHANGE'] as $report):?>
<h2 class="radius">Données officielles</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>ProviderEventId</b></div> <div class="right_div"><?emp_check($report->ProviderEventId)?></div></div>
<div><div class="left_div"><b>InternalEventId</b></div> <div class="right_div"><?emp_check($report->InternalEventId)?></div></div>
<div><div class="left_div"><b>CompanyId </b></div> <div class="right_div"><?emp_check($report->Company->CompanyId)?></div></div>
<div><div class="left_div"><b>CompanyName </b></div> <div class="right_div"><?emp_check($report->Company->CompanyName[0]->_)?></div></div>
<div><div class="left_div"><b>EventCode </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->EventCode)?></div></div>
<div><div class="left_div"><b>Source </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Source->_)?></div></div>
<div><div class="left_div"><b>Description </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Description->_)?></div></div>
<div><div class="left_div"><b>FreeText </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->FreeText->_)?></div></div>
</div>
<br /><br />
<h2 class="radius">Old Values</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>CompanyId </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->CompanyId)?></div></div>
<div><div class="left_div"><b>CompanyName </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->CompanyName[0]->_)?></div></div>
</div><br /><br />
<h2 class="radius">New Values</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>CompanyId </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[1]->Company[0]->CompanyId)?></div></div>
<div><div class="left_div"><b>CompanyName </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[1]->Company[0]->CompanyName[0]->_)?></div></div>
</div>
<hr style="border:1px dotted silver" />
<?endforeach;?>
<? else :?>
<div class="ui-state-error ui-corner-all">
<p><span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-alert"></span>
Aucun GENERAL.COMPANY_NAME_CHANGE
</p>
</div>
<? endif; ?>
</div>
<h3>GENERAL.LEGALFORM_CHANGE</h3>
<div>
<?php if(isset($this->val['GENERAL.LEGALFORM_CHANGE'])):?>
<?foreach ($this->val['GENERAL.LEGALFORM_CHANGE'] as $report):?>
<h2 class="radius">Données officielles</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>ProviderEventId</b></div> <div class="right_div"><?emp_check($report->ProviderEventId)?></div></div>
<div><div class="left_div"><b>InternalEventId</b></div> <div class="right_div"><?emp_check($report->InternalEventId)?></div></div>
<div><div class="left_div"><b>CompanyId </b></div> <div class="right_div"><?emp_check($report->Company->CompanyId)?></div></div>
<div><div class="left_div"><b>CompanyName </b></div> <div class="right_div"><?emp_check($report->Company->CompanyName[0]->_)?></div></div>
<div><div class="left_div"><b>EventCode </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->EventCode)?></div></div>
<div><div class="left_div"><b>Source </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Source->_)?></div></div>
<div><div class="left_div"><b>Description </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Description->_)?></div></div>
<div><div class="left_div"><b>FreeText </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->FreeText->_)?></div></div>
</div>
<br /><br />
<h2 class="radius">Old Values</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>CompanyId </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->CompanyId)?></div></div>
<div><div class="left_div"><b>CompanyName </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->CompanyName[0]->_)?></div></div>
</div><br /><br />
<h2 class="radius">New Values</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>CompanyId </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[1]->Company[0]->CompanyId)?></div></div>
<div><div class="left_div"><b>CompanyName </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[1]->Company[0]->CompanyName[0]->_)?></div></div>
</div><br /><br />
<h2 class="radius">Old LegalForm</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>CountryLegalForm </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->LegalForm[0]->CountryLegalForm->_)?></div></div>
<div><div class="left_div"><b>UnifiedLegalForm </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->LegalForm[0]->UnifiedLegalForm)?></div></div>
<div><div class="left_div"><b>FoundedAsLegalForm </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->LegalForm[0]->FoundedAsLegalForm->_)?></div></div>
<div><div class="left_div"><b>AddressLine </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->CompanyAddress[0]->FlexibleAddress->AddressLine[0])?></div></div>
<div><div class="left_div"><b>Country </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->LegalForm[0]->Country)?></div></div>
<div><div class="left_div"><b>IsSocial </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->LegalForm[0]->IsSocial)?></div></div>
<div><div class="left_div"><b>IsCivil </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->LegalForm[0]->IsCivil)?></div></div>
</div><br /><br />
<h2 class="radius">New LegalForm</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>CountryLegalForm </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[1]->Company[0]->LegalForm[0]->CountryLegalForm->_)?></div></div>
<div><div class="left_div"><b>UnifiedLegalForm </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[1]->Company[0]->LegalForm[0]->UnifiedLegalForm)?></div></div>
<div><div class="left_div"><b>FoundedAsLegalForm </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[1]->Company[0]->LegalForm[0]->FoundedAsLegalForm->_)?></div></div>
<div><div class="left_div"><b>AddressLine </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[1]->Company[0]->CompanyAddress[0]->FlexibleAddress->AddressLine[0])?></div></div>
<div><div class="left_div"><b>Country </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[1]->Company[0]->LegalForm[0]->Country)?></div></div>
<div><div class="left_div"><b>IsSocial </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[1]->Company[0]->LegalForm[0]->IsSocial)?></div></div>
<div><div class="left_div"><b>IsCivil </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[1]->Company[0]->LegalForm[0]->IsCivil)?></div></div>
</div>
<hr style="border:1px dotted silver" />
<?endforeach;?>
<? else :?>
<div class="ui-state-error ui-corner-all">
<p><span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-alert"></span>
Aucun GENERAL.LEGALFORM_CHANGE
</p>
</div>
<? endif; ?>
</div>
<h3>GENERAL.POSITION_CHANGE</h3>
<div>
<?php if(isset($this->val['GENERAL.POSITION_CHANGE'])):?>
<?foreach ($this->val['GENERAL.POSITION_CHANGE'] as $report):?>
<h2 class="radius">Données officielles</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>ProviderEventId</b></div> <div class="right_div"><?emp_check($report->ProviderEventId)?></div></div>
<div><div class="left_div"><b>InternalEventId</b></div> <div class="right_div"><?emp_check($report->InternalEventId)?></div></div>
<div><div class="left_div"><b>CompanyId </b></div> <div class="right_div"><?emp_check($report->Company->CompanyId)?></div></div>
<div><div class="left_div"><b>CompanyName </b></div> <div class="right_div"><?emp_check($report->Company->CompanyName[0]->_)?></div></div>
<div><div class="left_div"><b>EventCode </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->EventCode)?></div></div>
<div><div class="left_div"><b>Source </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Source->_)?></div></div>
<div><div class="left_div"><b>Description </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Description->_)?></div></div>
<div><div class="left_div"><b>FreeText </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->FreeText->_)?></div></div>
</div>
<br /><br />
<h2 class="radius">Old Values</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>CompanyId </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->CompanyId)?></div></div>
<div><div class="left_div"><b>CompanyName </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->CompanyName[0]->_)?></div></div>
</div><br /><br />
<h2 class="radius">New Values</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>CompanyId </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[1]->Company[0]->CompanyId)?></div></div>
<div><div class="left_div"><b>CompanyName </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[1]->Company[0]->CompanyName[0]->_)?></div></div>
</div><br /><br />
<h2 class="radius">Old Position</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>FirstName </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->Position[0]->Person->FirstName)?></div></div>
<div><div class="left_div"><b>LastName </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->Position[0]->Person->LastName)?></div></div>
<div><div class="left_div"><b>Initials </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->Position[0]->Person->Initials)?></div></div>
<div><div class="left_div"><b>Title </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->Position[0]->Person->Title)?></div></div>
<div><div class="left_div"><b>Position StartDate </b></div> <div class="right_div"><?emp_check($wdate->dateT('Ymd', 'd/m/Y', $report->Company->Event[0]->Value[0]->Company[0]->Position[0]->Period->StartDate->_))?></div></div>
<div><div class="left_div"><b>Position EndDate </b></div> <div class="right_div"><?emp_check($wdate->dateT('Ymd', 'd/m/Y', $report->Company->Event[0]->Value[0]->Company[0]->Position[0]->Period->EndDate->_))?></div></div>
<div><div class="left_div"><b>PositionChangeReason </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->Position[0]->PositionChangeReason)?></div></div>
<div><div class="left_div"><b>PositionTitle </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->Position[0]->PositionTitle->_)?></div></div>
<div><div class="left_div"><b>Type </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->Position[0]->Type)?></div></div>
</div><br /><br />
<h2 class="radius">New Position</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>FirstName </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[1]->Company[0]->Position[0]->Person->FirstName)?></div></div>
<div><div class="left_div"><b>LastName </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[1]->Company[0]->Position[0]->Person->LastName)?></div></div>
<div><div class="left_div"><b>Initials </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[1]->Company[0]->Position[0]->Person->Initials)?></div></div>
<div><div class="left_div"><b>Title </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[1]->Company[0]->Position[0]->Person->Title)?></div></div>
<div><div class="left_div"><b>Position StartDate </b></div> <div class="right_div"><?emp_check($wdate->dateT('Ymd', 'd/m/Y', $report->Company->Event[0]->Value[1]->Company[0]->Position[0]->Period->StartDate->_))?></div></div>
<div><div class="left_div"><b>Position EndDate </b></div> <div class="right_div"><?emp_check($wdate->dateT('Ymd', 'd/m/Y', $report->Company->Event[0]->Value[1]->Company[0]->Position[0]->Period->EndDate->_))?></div></div>
<div><div class="left_div"><b>PositionChangeReason </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[1]->Company[0]->Position[0]->PositionChangeReason)?></div></div>
<div><div class="left_div"><b>PositionTitle </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[1]->Company[0]->Position[0]->PositionTitle->_)?></div></div>
<div><div class="left_div"><b>Type </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[1]->Company[0]->Position[0]->Type)?></div></div>
</div><br /><br />
<hr style="border:1px dotted silver" />
<?endforeach;?>
<? else :?>
<div class="ui-state-error ui-corner-all">
<p><span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-alert"></span>
Aucun GENERAL.POSITION_CHANGE
</p>
</div>
<? endif; ?>
</div>
<h3>GENERAL.NEWS</h3>
<div>
<?php if(isset($this->val['GENERAL.NEWS'])):?>
<?foreach ($this->val['GENERAL.NEWS'] as $report):?>
<h2 class="radius">Données officielles</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>ProviderEventId</b></div> <div class="right_div"><?emp_check($report->ProviderEventId)?></div></div>
<div><div class="left_div"><b>InternalEventId</b></div> <div class="right_div"><?emp_check($report->InternalEventId)?></div></div>
<div><div class="left_div"><b>CompanyId </b></div> <div class="right_div"><?emp_check($report->Company->CompanyId)?></div></div>
<div><div class="left_div"><b>CompanyName </b></div> <div class="right_div"><?emp_check($report->Company->CompanyName[0]->_)?></div></div>
<div><div class="left_div"><b>EventCode </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->EventCode)?></div></div>
<div><div class="left_div"><b>Source </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Source->_)?></div></div>
<div><div class="left_div"><b>Description </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Description->_)?></div></div>
<div><div class="left_div"><b>FreeText </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->FreeText->_)?></div></div>
</div>
<br /><br />
<hr style="border:1px dotted silver" />
<?endforeach;?>
<? else :?>
<div class="ui-state-error ui-corner-all">
<p><span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-alert"></span>
Aucun GENERAL.NEWS
</p>
</div>
<? endif; ?>
</div>
<h3>GENERAL.MERGER</h3>
<div>
<?php if(isset($this->val['GENERAL.MERGER'])):?>
<?foreach ($this->val['GENERAL.MERGER'] as $report):?>
<div>
<h2 class="radius">Données officielles</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>ProviderEventId</b></div> <div class="right_div"><?emp_check($report->ProviderEventId)?></div></div>
<div><div class="left_div"><b>InternalEventId</b></div> <div class="right_div"><?emp_check($report->InternalEventId)?></div></div>
<div><div class="left_div"><b>CompanyId </b></div> <div class="right_div"><?emp_check($report->Company->CompanyId)?></div></div>
<div><div class="left_div"><b>CompanyName </b></div> <div class="right_div"><?emp_check($report->Company->CompanyName[0]->_)?></div></div>
<div><div class="left_div"><b>EventCode </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->EventCode)?></div></div>
<div><div class="left_div"><b>Source </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Source->_)?></div></div>
<div><div class="left_div"><b>Description </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Description->_)?></div></div>
<div><div class="left_div"><b>FreeText </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->FreeText->_)?></div></div>
</div>
<br /><br />
<h2 class="radius">Parameterized Description</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>ProviderEventId</b></div> <div class="right_div"><?emp_check($report->ProviderEventId)?></div></div>
<div><div class="left_div"><b>DescriptionElement </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->ParameterizedDescription->DescriptionElement->_)?></div></div>
<?foreach ($report->Company->Event[0]->ParameterizedDescription->Parameter as $Parameter):?>
<div><div class="left_div"><b>Parameter <?emp_check($Parameter->paramname)?></b></div> <div class="right_div"><?emp_check($Parameter->_)?></div></div>
<?endforeach;?>
</div>
<br /><br />
<h2 class="radius">Values</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>CompanyId </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->CompanyId)?></div></div>
<div><div class="left_div"><b>CompanyName </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->CompanyName[0]->_)?></div></div>
</div><br /><br />
<h2 class="radius">LegalForm</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>CountryLegalForm </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->LegalForm[0]->CountryLegalForm->_)?></div></div>
<div><div class="left_div"><b>UnifiedLegalForm </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->LegalForm[0]->UnifiedLegalForm)?></div></div>
<div><div class="left_div"><b>HouseNumber</b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->CompanyAddress[0]->HouseNumber)?></div></div>
<div><div class="left_div"><b>Street</b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->CompanyAddress[0]->Street)?></div></div>
<div><div class="left_div"><b>Country </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->LegalForm[0]->Country)?></div></div>
</div><br /><br />
<hr style="border:1px dotted silver" />
</div>
<?endforeach;?>
<? else :?>
<div class="ui-state-error ui-corner-all">
<p><span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-alert"></span>
Aucun GENERAL.MERGER
</p>
</div>
<? endif; ?>
</div>
<h3>GENERAL.SPLIT_UP</h3>
<div>
<?php if(isset($this->val['GENERAL.SPLIT_UP'])):?>
<?foreach ($this->val['GENERAL.SPLIT_UP'] as $report):?>
<h2 class="radius">Données officielles</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>ProviderEventId</b></div> <div class="right_div"><?emp_check($report->ProviderEventId)?></div></div>
<div><div class="left_div"><b>InternalEventId</b></div> <div class="right_div"><?emp_check($report->InternalEventId)?></div></div>
<div><div class="left_div"><b>CompanyId </b></div> <div class="right_div"><?emp_check($report->Company->CompanyId)?></div></div>
<div><div class="left_div"><b>CompanyName </b></div> <div class="right_div"><?emp_check($report->Company->CompanyName[0]->_)?></div></div>
<div><div class="left_div"><b>EventCode </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->EventCode)?></div></div>
<div><div class="left_div"><b>Source </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Source->_)?></div></div>
<div><div class="left_div"><b>Description </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Description->_)?></div></div>
<div><div class="left_div"><b>FreeText </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->FreeText->_)?></div></div>
</div>
<br /><br />
<h2 class="radius">Parameterized Description</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>ProviderEventId</b></div> <div class="right_div"><?emp_check($report->ProviderEventId)?></div></div>
<div><div class="left_div"><b>DescriptionElement </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->ParameterizedDescription->DescriptionElement->_)?></div></div>
<?foreach ($report->Company->Event[0]->ParameterizedDescription->Parameter as $Parameter):?>
<div><div class="left_div"><b>Parameter <?emp_check($Parameter->paramname)?></b></div> <div class="right_div"><?emp_check($Parameter->_)?></div></div>
<?endforeach;?>
</div>
<br /><br />
<h2 class="radius">Old Values</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>CompanyId </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->CompanyId)?></div></div>
<div><div class="left_div"><b>CompanyName </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->CompanyName[0]->_)?></div></div>
</div><br /><br />
<h2 class="radius">Old LegalForm</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>CountryLegalForm </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->LegalForm[0]->CountryLegalForm->_)?></div></div>
<div><div class="left_div"><b>UnifiedLegalForm </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->LegalForm[0]->UnifiedLegalForm)?></div></div>
<div><div class="left_div"><b>HouseNumber</b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->CompanyAddress[0]->HouseNumber)?></div></div>
<div><div class="left_div"><b>Street</b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->CompanyAddress[0]->Street)?></div></div>
<div><div class="left_div"><b>Country </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->LegalForm[0]->Country)?></div></div>
</div><br /><br />
<?foreach ($report->Company->Event[0]->Value[1]->Company as $Company):?>
<h2 class="radius">Values</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>CompanyId </b></div> <div class="right_div"><?emp_check($Company->CompanyId)?></div></div>
<div><div class="left_div"><b>CompanyName </b></div> <div class="right_div"><?emp_check($Company->CompanyName[0]->_)?></div></div>
</div><br /><br />
<h2 class="radius">LegalForm</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>CountryLegalForm </b></div> <div class="right_div"><?emp_check($Company->LegalForm[0]->CountryLegalForm->_)?></div></div>
<div><div class="left_div"><b>UnifiedLegalForm </b></div> <div class="right_div"><?emp_check($Company->LegalForm[0]->UnifiedLegalForm)?></div></div>
<div><div class="left_div"><b>HouseNumber</b></div> <div class="right_div"><?emp_check($Company->CompanyAddress[0]->HouseNumber)?></div></div>
<div><div class="left_div"><b>Street</b></div> <div class="right_div"><?emp_check($Company->CompanyAddress[0]->Street)?></div></div>
<div><div class="left_div"><b>Country </b></div> <div class="right_div"><?emp_check($Company->LegalForm[0]->Country)?></div></div>
</div><br /><br />
<?endforeach;?>
<hr style="border:1px dotted silver" />
<?endforeach;?>
<? else :?>
<div class="ui-state-error ui-corner-all">
<p><span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-alert"></span>
Aucun GENERAL.SPLIT_UP
</p>
</div>
<? endif; ?>
</div>
<h3>FINANCIAL.ANNUAL_ACCOUNT_AVAILABLE</h3>
<div>
<?php if(isset($this->val['FINANCIAL.ANNUAL_ACCOUNT_AVAILABLE'])):?>
<?foreach ($this->val['FINANCIAL.ANNUAL_ACCOUNT_AVAILABLE'] as $report):?>
<h2 class="radius">Données officielles</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>ProviderEventId</b></div> <div class="right_div"><?emp_check($report->ProviderEventId)?></div></div>
<div><div class="left_div"><b>InternalEventId</b></div> <div class="right_div"><?emp_check($report->InternalEventId)?></div></div>
<div><div class="left_div"><b>CompanyId </b></div> <div class="right_div"><?emp_check($report->Company->CompanyId)?></div></div>
<div><div class="left_div"><b>CompanyName </b></div> <div class="right_div"><?emp_check($report->Company->CompanyName[0]->_)?></div></div>
<div><div class="left_div"><b>EventCode </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->EventCode)?></div></div>
<div><div class="left_div"><b>Source </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Source->_)?></div></div>
<div><div class="left_div"><b>Description </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Description->_)?></div></div>
<div><div class="left_div"><b>FreeText </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->FreeText->_)?></div></div>
</div>
<br /><br />
<h2 class="radius">Parameterized Description</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>ProviderEventId</b></div> <div class="right_div"><?emp_check($report->ProviderEventId)?></div></div>
<div><div class="left_div"><b>DescriptionElement </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->ParameterizedDescription->DescriptionElement->_)?></div></div>
<?foreach ($report->Company->Event[0]->ParameterizedDescription->Parameter as $Parameter):?>
<div><div class="left_div"><b>Parameter</b></div> <div class="right_div"><?emp_check($Parameter->_)?></div></div>
<?endforeach;?>
</div>
<br /><br />
<hr style="border:1px dotted silver" />
<?endforeach;?>
<? else :?>
<div class="ui-state-error ui-corner-all">
<p><span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-alert"></span>
Aucun FINANCIAL.ANNUAL_ACCOUNT_AVAILABLE
</p>
</div>
<? endif; ?>
</div>
<h3>FINANCIAL.ANNUAL_ACCOUNT_FILED</h3>
<div>
<?php if(isset($this->val['FINANCIAL.ANNUAL_ACCOUNT_FILED'])):?>
<?foreach ($this->val['FINANCIAL.ANNUAL_ACCOUNT_FILED'] as $report):?>
<h2 class="radius">Données officielles</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>ProviderEventId</b></div> <div class="right_div"><?emp_check($report->ProviderEventId)?></div></div>
<div><div class="left_div"><b>InternalEventId</b></div> <div class="right_div"><?emp_check($report->InternalEventId)?></div></div>
<div><div class="left_div"><b>CompanyId </b></div> <div class="right_div"><?emp_check($report->Company->CompanyId)?></div></div>
<div><div class="left_div"><b>CompanyName </b></div> <div class="right_div"><?emp_check($report->Company->CompanyName[0]->_)?></div></div>
<div><div class="left_div"><b>EventCode </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->EventCode)?></div></div>
<div><div class="left_div"><b>Source </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Source->_)?></div></div>
<div><div class="left_div"><b>Description </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Description->_)?></div></div>
<div><div class="left_div"><b>FreeText </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->FreeText->_)?></div></div>
</div>
<br /><br />
<h2 class="radius">Parameterized Description</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>ProviderEventId</b></div> <div class="right_div"><?emp_check($report->ProviderEventId)?></div></div>
<div><div class="left_div"><b>DescriptionElement </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->ParameterizedDescription->DescriptionElement->_)?></div></div>
<?foreach ($report->Company->Event[0]->ParameterizedDescription->Parameter as $Parameter):?>
<div><div class="left_div"><b>Parameter</b></div> <div class="right_div"><?emp_check($Parameter->_)?></div></div>
<?endforeach;?>
</div>
<br /><br />
<hr style="border:1px dotted silver" /><br />
<?endforeach;?>
<? else :?>
<div class="ui-state-error ui-corner-all">
<p><span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-alert"></span>
Aucun FINANCIAL.ANNUAL_ACCOUNT_FILED
</p>
</div>
<? endif; ?>
</div>
<h3>FINANCIAL.CAPITAL_CHANGE</h3>
<div>
<?php if(isset($this->val['FINANCIAL.CAPITAL_CHANGE'])):?>
<?foreach ($this->val['FINANCIAL.CAPITAL_CHANGE'] as $report):?>
<h2 class="radius">Données officielles</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>ProviderEventId</b></div> <div class="right_div"><?emp_check($report->ProviderEventId)?></div></div>
<div><div class="left_div"><b>InternalEventId</b></div> <div class="right_div"><?emp_check($report->InternalEventId)?></div></div>
<div><div class="left_div"><b>CompanyId </b></div> <div class="right_div"><?emp_check($report->Company->CompanyId)?></div></div>
<div><div class="left_div"><b>CompanyName </b></div> <div class="right_div"><?emp_check($report->Company->CompanyName[0]->_)?></div></div>
<div><div class="left_div"><b>EventCode </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->EventCode)?></div></div>
<div><div class="left_div"><b>Source </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Source->_)?></div></div>
<div><div class="left_div"><b>Description </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Description->_)?></div></div>
<div><div class="left_div"><b>FreeText </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->FreeText->_)?></div></div>
</div>
<br /><br />
<h2 class="radius">Parameterized Description</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>ProviderEventId</b></div> <div class="right_div"><?emp_check($report->ProviderEventId)?></div></div>
<div><div class="left_div"><b>DescriptionElement </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->ParameterizedDescription->DescriptionElement->_)?></div></div>
<?foreach ($report->Company->Event[0]->ParameterizedDescription->Parameter as $Parameter):?>
<div><div class="left_div"><b>Parameter</b></div> <div class="right_div"><?emp_check($Parameter->_)?></div></div>
<?endforeach;?>
</div>
<br /><br />
<h2 class="radius">Old ShareCapital</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>AuthorizedCapital </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->ShareCapital->AuthorizedCapital->_)?></div></div>
<div><div class="left_div"><b>Currency </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->ShareCapital->AuthorizedCapital->currency)?></div></div>
</div><br /><br />
<h2 class="radius">New ShareCapital</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>AuthorizedCapital </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[1]->Company[0]->ShareCapital->AuthorizedCapital->_)?></div></div>
<div><div class="left_div"><b>Currency </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[1]->Company[0]->ShareCapital->AuthorizedCapital->currency)?></div></div>
</div><br /><br />
<hr style="border:1px dotted silver" /><br />
<?endforeach;?>
<? else :?>
<div class="ui-state-error ui-corner-all">
<p><span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-alert"></span>
Aucun FINANCIAL.CAPITAL_CHANGE
</p>
</div>
<? endif; ?>
</div>
<h3>FINANCIAL.CREDIT_RECOMMENDATION_CHANGE</h3>
<div>
<?php if(isset($this->val['FINANCIAL.CREDIT_RECOMMENDATION_CHANGE'])):?>
<?foreach ($this->val['FINANCIAL.CREDIT_RECOMMENDATION_CHANGE'] as $report):?>
<h2 class="radius">Données officielles</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>ProviderEventId</b></div> <div class="right_div"><?emp_check($report->ProviderEventId)?></div></div>
<div><div class="left_div"><b>InternalEventId</b></div> <div class="right_div"><?emp_check($report->InternalEventId)?></div></div>
<div><div class="left_div"><b>CompanyId </b></div> <div class="right_div"><?emp_check($report->Company->CompanyId)?></div></div>
<div><div class="left_div"><b>CompanyName </b></div> <div class="right_div"><?emp_check($report->Company->CompanyName[0]->_)?></div></div>
<div><div class="left_div"><b>EventCode </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->EventCode)?></div></div>
<div><div class="left_div"><b>Source </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Source->_)?></div></div>
<div><div class="left_div"><b>Description </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Description->_)?></div></div>
<div><div class="left_div"><b>FreeText </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->FreeText->_)?></div></div>
</div>
<br /><br />
<h2 class="radius">Old CreditRecommendation</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>RatingName </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->CreditRecommendation[0]->RiskClasses->CommonRiskClass->RatingName->_)?></div></div>
<div><div class="left_div"><b>RatingValue </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[0]->Company[0]->CreditRecommendation[0]->RiskClasses->CommonRiskClass->RatingValue)?></div></div>
</div><br /><br />
<h2 class="radius">New CreditRecommendation</h2><br /><br />
<div class="gen_div">
<div><div class="left_div"><b>RatingName </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[1]->Company[0]->CreditRecommendation[0]->RiskClasses->CommonRiskClass->RatingName->_)?></div></div>
<div><div class="left_div"><b>RatingValue </b></div> <div class="right_div"><?emp_check($report->Company->Event[0]->Value[1]->Company[0]->CreditRecommendation[0]->RiskClasses->CommonRiskClass->RatingValue)?></div></div>
</div><br /><br />
<hr style="border:1px dotted silver" /><br />
<?endforeach;?>
<? else :?>
<div class="ui-state-error ui-corner-all">
<p><span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-alert"></span>
Aucun FINANCIAL.CREDIT_RECOMMENDATION_CHANGE
</p>
</div>
<? endif; ?>
</div>
<h3>EXCEPTION.BANKRUPTCY_OR_LIQUIDATION</h3>
<div>
<?php if(isset($this->val['EXCEPTION.BANKRUPTCY_OR_LIQUIDATION'])):?>
<?foreach ($this->val['EXCEPTION.BANKRUPTCY_OR_LIQUIDATION'] as $report):?>
<pre><?print_r($report);?></pre>
<?endforeach;?>
<? else :?>
<div class="ui-state-error ui-corner-all">
<p><span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-alert"></span>
Aucun EXCEPTION.BANKRUPTCY_OR_LIQUIDATION
</p>
</div>
<? endif; ?>
</div>
<h3>EXCEPTION.DEBT_RESTRUCTURING</h3>
<div>
<?php if(isset($this->val['EXCEPTION.DEBT_RESTRUCTURING'])):?>
<?foreach ($this->val['EXCEPTION.DEBT_RESTRUCTURING'] as $report):?>
<pre><?print_r($report);?></pre>
<?endforeach;?>
<? else :?>
<div class="ui-state-error ui-corner-all">
<p><span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-alert"></span>
Aucun EXCEPTION.DEBT_RESTRUCTURING
</p>
</div>
<? endif; ?>
</div>
<h3>EXCEPTION.PROTEST_OR_NONPAYMENT</h3>
<div>
<?php if(isset($this->val['EXCEPTION.PROTEST_OR_NONPAYMENT'])):?>
<?foreach ($this->val['EXCEPTION.PROTEST_OR_NONPAYMENT'] as $report):?>
<pre><?print_r($report);?></pre>
<?endforeach;?>
<? else :?>
<div class="ui-state-error ui-corner-all">
<p><span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-alert"></span>
Aucun EXCEPTION.PROTEST_OR_NONPAYMENT
</p>
</div>
<? endif; ?>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,65 @@
<div id="center">
<form>
<input type="hidden" name="CompanyId" value="<?=$this->CompanyId?>" />
<input type="hidden" name="Pays" value="<?=$this->Pays?>" />
<input type="hidden" name="action" value="<?=$this->action?>" />
<input type="hidden" name="CompanyName" value="<?=$this->CompanyName?>" />
<p>
<strong>CompanyId: </strong><?=$this->CompanyId?><br /><br />
<strong>Company Name: </strong><?=$this->CompanyName?><br /><br />
<div style='width: 250px; float: left;'>
<strong>Category Name: </strong><br />
<select name="CategoryName" class="all_select">
<option value='All'>All</option>
<option value='CreditRecommendation'>CreditRecommendation</option>
</select><br /><br />
<strong>Event Type: </strong><br />
<select name="EventType" class="all_select">
<option value='EventOnly'>EventOnly</option>
<option value='EventWithData'>EventWithData</option>
</select><br /><br />
<strong>Language Code: </strong><br />
<select name="LanguageCode" class="all_select">
<?php foreach (unserialize($this->lang) as $key=>$language):?>
<option class="lang<?=$key;?>" value=<?=$language;?>><?=$language;?></option>
<?php endforeach;?>
</select><br /><br />
</div>
<div>
<strong>Preferred Start Date: </strong><br />
<input type="text" class='datepicker' name="StartDate" value=""/> optional<br /><br />
<strong>Preferred End Date: </strong><br />
<input type="text" class='datepicker' name="EndDate" value="" /> optional<br /><br />
<strong>Monitoring Version: </strong><br />
<input type="text" name="Version" value="1.0" required /><br /><br />
</div>
</p>
</form>
<div id="loading" class="hide_monitor" style="display:none;z-index: 1;">
<center><img style="padding-top:30%" src="/themes/default/images/giant/19-1.gif" /></center>
</div>
<?if ($this->result) :?>
<div class="gen_div">
<div class='monitor_resp radius'><div class="left_div"><b>InternalOrderId</b></div> <div class="right_div"><?=$this->result->Order->InternalOrderId?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>ConsumerId</b></div> <div class="right_div"><?=$this->result->Order->ConsumerId?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>CustomerId</b></div> <div class="right_div"><?=$this->result->Order->CustomerId?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>ProviderId</b></div> <div class="right_div"><?=$this->result->Order->ProviderId?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>CountryCode</b></div> <div class="right_div"><?=$this->result->Order->CountryCode?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>CompanyId</b></div> <div class="right_div"><?=$this->result->Order->CompanyId?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>OrderType</b></div> <div class="right_div"><?=$this->result->Order->OrderType?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>EventType</b></div> <div class="right_div"><?=$this->result->Order->EventType?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>CategoryName</b></div> <div class="right_div"><?=$this->result->Order->CategoryName?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>Version</b></div> <div class="right_div"><?=$this->result->Order->Version?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>LanguageCode</b></div> <div class="right_div"><?=$this->result->Order->LanguageCode?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>OrderStatus</b></div> <div class="right_div"><?=$this->result->Order->OrderStatus?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>OrderDateTime</b></div> <div class="right_div"><?=$this->result->Order->OrderDateTime?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>DateTimeCompleted</b></div> <div class="right_div"><?=$this->result->Order->DateTimeCompleted?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>PreferredStartDate</b></div> <div class="right_div"><?=$this->result->Order->PreferredStartDate?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>ActualStartDate</b></div> <div class="right_div"><?=$this->result->Order->ActualStartDate?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>PreferredEndDate</b></div> <div class="right_div"><?=$this->result->Order->PreferredEndDate?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>ActualEndDate</b></div> <div class="right_div"><?=$this->result->Order->ActualEndDate?></div></div>
</div>
<?endif?>
</div>
<script type="text/javascript" src="/themes/default/scripts/giant_monitoring.js" />

View File

@ -0,0 +1,45 @@
<div id="center">
<form>
<input type="hidden" name="CompanyId" value="<?=$this->CompanyId?>" />
<input type="hidden" name="Pays" value="<?=$this->Pays?>" />
<input type="hidden" name="action" value="<?=$this->action?>" />
<p>
<strong>CompanyId: </strong><?=$this->CompanyId?><br /><br />
<strong>Company Name: </strong><?=$this->CompanyName?><br /><br />
<div style='width: 250px; float: left;'>
<strong>Internal Order Id: </strong><br />
<input type="text" name="InternalOrderId" value="" required /><br /><br />
</div>
<div>
<strong>Preferred End Date: </strong><br />
<input type="text" class='datepicker' name="EndDate" value="" required /> optional<br /><br />
</div>
</p>
</form>
<div id="loading" class="hide_monitor" style="display:none;z-index: 1;">
<center><img style="padding-top:30%" src="/themes/default/images/giant/19-1.gif" /></center>
</div>
<?if ($this->result) :?>
<div class="gen_div">
<div class='monitor_resp radius'><div class="left_div"><b>InternalOrderId</b></div> <div class="right_div"><?=$this->result->Order->InternalOrderId?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>ConsumerId</b></div> <div class="right_div"><?=$this->result->Order->ConsumerId?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>CustomerId</b></div> <div class="right_div"><?=$this->result->Order->CustomerId?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>ProviderId</b></div> <div class="right_div"><?=$this->result->Order->ProviderId?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>CountryCode</b></div> <div class="right_div"><?=$this->result->Order->CountryCode?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>CompanyId</b></div> <div class="right_div"><?=$this->result->Order->CompanyId?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>OrderType</b></div> <div class="right_div"><?=$this->result->Order->OrderType?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>EventType</b></div> <div class="right_div"><?=$this->result->Order->EventType?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>CategoryName</b></div> <div class="right_div"><?=$this->result->Order->CategoryName?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>Version</b></div> <div class="right_div"><?=$this->result->Order->Version?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>LanguageCode</b></div> <div class="right_div"><?=$this->result->Order->LanguageCode?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>OrderStatus</b></div> <div class="right_div"><?=$this->result->Order->OrderStatus?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>OrderDateTime</b></div> <div class="right_div"><?=$this->result->Order->OrderDateTime?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>DateTimeCompleted</b></div> <div class="right_div"><?=$this->result->Order->DateTimeCompleted?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>ActualStartDate</b></div> <div class="right_div"><?=$this->result->Order->ActualStartDate?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>PreferredEndDate</b></div> <div class="right_div"><?=$this->result->Order->PreferredEndDate?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>ActualEndDate</b></div> <div class="right_div"><?=$this->result->Order->ActualEndDate?></div></div>
</div>
<?endif?>
</div>
<script type="text/javascript" src="/themes/default/scripts/giant_monitoring.js" />

View File

@ -0,0 +1,66 @@
<div id="center">
<form>
<input type="hidden" name="CompanyId" value="<?=$this->CompanyId?>" />
<input type="hidden" name="Pays" value="<?=$this->Pays?>" />
<input type="hidden" name="action" value="<?=$this->action?>" />
<p>
<strong>CompanyId: </strong><?=$this->CompanyId?><br /><br />
<strong>Company Name: </strong><?=$this->CompanyName?><br /><br />
<div style='width: 250px; float: left;'>
<strong>Internal Order Id: </strong><br />
<input type="text" name="InternalOrderId" value="" required /><br /><br />
<strong>New Category Name: </strong><br />
<select name="CategoryName" class="all_select">
<option value=''></option>
<option value='All'>All</option>
<option value='CreditRecommendation'>CreditRecommendation</option>
</select> optional<br /><br />
<strong>New Event Type: </strong><br />
<select name="EventType" class="all_select">
<option value=''></option>
<option value='EventOnly'>EventOnly</option>
<option value='EventWithData'>EventWithData</option>
</select> optional<br /><br />
</div>
<div>
<strong>Preferred Start Date: </strong><br />
<input type="text" class='datepicker' name="StartDate" value=""/> optional<br /><br />
<strong>New Monitoring Version: </strong><br />
<input type="text" name="Version" value="" /> optional<br /><br />
<strong>New Language Code: </strong><br />
<select name="LanguageCode" class="all_select">
<option value=''></option>
<?php foreach (unserialize($this->lang) as $key=>$language):?>
<option class="lang<?=$key;?>" value=<?=$language;?>><?=$language;?></option>
<?php endforeach;?>
</select> optional<br /><br />
</div>
</p>
</form>
<div id="loading" class="hide_monitor" style="display:none;z-index: 1;">
<center><img style="padding-top:30%" src="/themes/default/images/giant/19-1.gif" /></center>
</div>
<?if ($this->result) :?>
<div class="gen_div">
<div class='monitor_resp radius'><div class="left_div"><b>InternalOrderId</b></div> <div class="right_div"><?=$this->result->Order->InternalOrderId?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>ConsumerId</b></div> <div class="right_div"><?=$this->result->Order->ConsumerId?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>CustomerId</b></div> <div class="right_div"><?=$this->result->Order->CustomerId?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>ProviderId</b></div> <div class="right_div"><?=$this->result->Order->ProviderId?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>CountryCode</b></div> <div class="right_div"><?=$this->result->Order->CountryCode?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>CompanyId</b></div> <div class="right_div"><?=$this->result->Order->CompanyId?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>OrderType</b></div> <div class="right_div"><?=$this->result->Order->OrderType?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>EventType</b></div> <div class="right_div"><?=$this->result->Order->EventType?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>CategoryName</b></div> <div class="right_div"><?=$this->result->Order->CategoryName?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>Version</b></div> <div class="right_div"><?=$this->result->Order->Version?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>LanguageCode</b></div> <div class="right_div"><?=$this->result->Order->LanguageCode?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>OrderStatus</b></div> <div class="right_div"><?=$this->result->Order->OrderStatus?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>OrderDateTime</b></div> <div class="right_div"><?=$this->result->Order->OrderDateTime?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>DateTimeCompleted</b></div> <div class="right_div"><?=$this->result->Order->DateTimeCompleted?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>PreferredStartDate</b></div> <div class="right_div"><?=$this->result->Order->PreferredStartDate?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>ActualStartDate</b></div> <div class="right_div"><?=$this->result->Order->ActualStartDate?></div></div>
<div class='monitor_resp radius'><div class="left_div"><b>ActualEndDate</b></div> <div class="right_div"><?=$this->result->Order->ActualEndDate?></div></div>
</div>
<?endif?>
</div>
<script type="text/javascript" src="/themes/default/scripts/giant_monitoring.js" />

View File

@ -1,70 +1,12 @@
<?php if ($this->source == 'google'):?>
<div id="infogeo_photo">
<div id="legende-photo" style="display: block;">
Cliché à l'approche de l'adresse postale.
</div>
<div>
<img id="pp-cb-thumb" src="http://cbk0.google.com/cbk?output=thumbnail&w=150&h=69&ll=<?=$this->infos->GeoLat.','.$this->infos->GeoLon?>" width="300px" height="128px" />
</div>
<?=$this->action('streetview', 'identite', null, array(
'lat' => $this->infos->GeoLat,
'lon' => $this->infos->GeoLon
));?>
</div>
<script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&key=<?=$this->googleKey?>"></script>
<script type="text/javascript">
function affichePhoto() {
<?php if ($this->infos->GeoPrecis < 7) {?>
var geoCoder = new GClientGeocoder;
geoCoder.getLocations("<?=$this->infos->AdresseNum.' '.
$this->infos->AdresseRue.' '.
$this->infos->CP.' '.
$this->infos->Ville?>", geoCodeCB);
<?php } else { ?>
var ll = new GLatLng(<?=$this->infos->GeoLat?>, <?=$this->infos->GeoLon?>);
doShowPanoData(ll);
<?php } ?>
}
function geoCodeCB(reponse) {
if (reponse &&
reponse.Status.code == 200 &&
reponse.Placemark.length == 1 &&
reponse.Placemark[0].AddressDetails.Accuracy > 5) {
var lat = reponse.Placemark[0].Point.coordinates[1];
var lon = reponse.Placemark[0].Point.coordinates[0];
var ll = new GLatLng(lat, lon);
doShowPanoData(ll);
}
}
function showPanoData(panoData) {
if (panoData.code != 200) {
return;
}
$('#pp-cb-thumb').replaceWith(
'<div id="pp-cb-thumb"><div class="left">' +
'<img src="http://maps.google.fr/cbk?output=tile&panoid=' +
panoData.location.panoId +
'&zoom=1&x=0&y=0&cb_client=maps_sv" />' +
'</div>' +
'<div class="right">' +
'<img src="http://maps.google.fr/cbk?output=tile&panoid=' +
panoData.location.panoId +
'&zoom=1&x=1&y=0&cb_client=maps_sv" />' +
'</div></div>');
$('#legende-photo' ).css('display','block');
$('#pp-cb-thumb' ).css('display','block');
}
function doShowPanoData(ll) {
var panoClient = new GStreetviewClient();
panoClient.getNearestPanorama(ll, showPanoData);
}
$(document).ready(function() {
if ($('#pp-cb-thumb').length) {
affichePhoto();
}
});
</script>
<?php elseif ($this->source == 'mappy'):?>
<div><img id="pp-cb-thumb" width="300px" /></div>
<script src="<?=$this->lienJs?>"></script>

View File

@ -15,6 +15,7 @@
<?php } else {?>
<?php if ( empty($this->AutrePage) ) {?>
<div class="paragraph" style="text-align:right;">
<?php if (!empty($this->dateDerMaj)) { ?>
<a class="datemaj" href="#">
@ -23,6 +24,13 @@
</a>
<?php }?>
</div>
<?php if ( !empty($this->surveillance) ) {?>
<div class="paragraph" style="clear:both;">
<?php echo $surveillances = $this->action('infos','surveillance', null, array('siret' => $this->siret))?>
</div>
<?php }?>
<?php }?>
<?php if ( empty($this->AutrePage) ) {?>
@ -101,7 +109,7 @@ echo $this->partial('identite/fiche-item.phtml', $this->dBlock['EffectifEtab']);
<?php if ( !empty($this->surveillance) ) {?>
<div class="paragraph" style="clear:both;">
<?=$this->action('infos','surveillance', null, array('siret' => $this->siret))?>
<?=$surveillances?>
</div>
<?php }?>

View File

@ -28,8 +28,8 @@
<?php }?>
</div>
<?php if($this->facade):?>
<?=$this->action('facade', 'identite', null, array('infos' => $this->infos));?>
<?php endif;?>
<?php if($this->facade):?>
<?=$this->action('facade', 'identite', null, array('infos' => $this->infos));?>
<?php endif;?>
</div>
</div>

View File

@ -127,7 +127,7 @@ Cette entreprise est une personne physique exerçant son activité en nom propre
<?php } else {?>
<?php if ($this->edition) {?>
<?php if (empty($this->AutrePage) && $this->edition) {?>
<?php if ($part == 'actionnaires') {?>
<div style="line-height:16px;">
<a class="dialog" title="Ajouter un actionnaire" href="<?=$this->url(array('controller'=>'saisie','action'=>'lien','type'=>'actionnaire','mode'=>'add','siren'=>$this->siren,'lienref'=>$this->lienref), null, true)?>">
@ -193,15 +193,15 @@ Cette entreprise est une personne physique exerçant son activité en nom propre
?>
</td>
<?php if ($this->edition) {?>
<?php if (empty($this->AutrePage) && $this->edition) {?>
<td width="150">
<a class="documentsLien" title="Documents associés" href="<?=$this->url(array('controller'=>'identite','action'=>'liendoc','id'=>$lien->id,'type'=>'Lien'), null, true)?>">+</a>
<?php if ($part == 'actionnaires') {?>
<a class="dialog" title="Fusionner/Déplacer actionnaire" href="<?=$this->url(array('controller'=>'saisie','action'=>'lienchange','mode'=>'moveact','lienref'=>$lien->idFiche), null, true)?>"><img src="/themes/default/images/interfaces/page_swap.png" /></a>
<a class="dialog" title="Fusionner/Déplacer actionnaire" href="<?=$this->url(array('controller'=>'saisie','action'=>'lienchange','mode'=>'moveact','idLien'=>$lien->id,'lienref'=>$lien->idFiche), null, true)?>"><img src="/themes/default/images/interfaces/page_swap.png" /></a>
<a class="dialog" title="Modifier actionnaire" href="<?=$this->url(array('controller'=>'saisie','action'=>'lien','type'=>'actionnaire','mode'=>'edit','siren'=>$this->siren,'idLien'=>$lien->id), null, true)?>"><img src="/themes/default/images/interfaces/editer.png" /></a>
<a class="dialog" title="Supprimer actionnaire" href="<?=$this->url(array('controller'=>'saisie','action'=>'lien','type'=>'actionnaire','mode'=>'delete','siren'=>$this->siren,'idLien'=>$lien->id), null, true)?>"><img src="/themes/default/images/interfaces/supprimer.png" /></a>
<?php } else {?>
<a class="dialog" title="Fusionner/Déplacer participation" href="<?=$this->url(array('controller'=>'saisie','action'=>'lienchange','mode'=>'movepar','lienref'=>$lien->idFiche), null, true)?>"><img src="/themes/default/images/interfaces/page_swap.png" /></a>
<a class="dialog" title="Fusionner/Déplacer participation" href="<?=$this->url(array('controller'=>'saisie','action'=>'lienchange','mode'=>'movepar','idLien'=>$lien->id,'lienref'=>$lien->idFiche), null, true)?>"><img src="/themes/default/images/interfaces/page_swap.png" /></a>
<a class="dialog" title="Modifier participation" href="<?=$this->url(array('controller'=>'saisie','action'=>'lien','type'=>'participation','mode'=>'edit','siren'=>$this->siren,'idLien'=>$lien->id), null, true)?>"><img src="/themes/default/images/interfaces/editer.png" /></a>
<a class="dialog" title="Supprimer participation" href="<?=$this->url(array('controller'=>'saisie','action'=>'lien','type'=>'participation','mode'=>'delete','siren'=>$this->siren,'idLien'=>$lien->id), null, true)?>"><img src="/themes/default/images/interfaces/supprimer.png" /></a>
<?php }?>
@ -260,7 +260,7 @@ Cette entreprise est une personne physique exerçant son activité en nom propre
), null, true);
echo 'Siren&nbsp;<a href="'.$href.'">'.$this->SirenTexte($lien->siren).'</a>';
}?>
<?php if ($this->edition && intval($lien->siren)!=0) {?>
<?php if (empty($this->AutrePage) && $this->edition && intval($lien->siren)!=0) {?>
<div style="line-height:16px;">
<a class="dialog" title="Ajouter une participation" href="<?=$this->url(array('controller'=>'saisie','action'=>'lien','type'=>'participation','mode'=>'add','siren'=>$this->siren,'lienref'=>$this->lienref,'createfiche'=>$lien->siren),null,true)?>">
<img style="vertical-align:middle;" src="/themes/default/images/interfaces/ajouter.png" /></a>
@ -281,11 +281,12 @@ Cette entreprise est une personne physique exerçant son activité en nom propre
</div>
<?php }?>
<?php if (empty($this->AutrePage)) {?>
<script>
$('td.lienfiche').each(function(){
$(this).qtip({
hide: { event: 'unfocus' },
show: { solo: true },
show: { solo: true, delay: 2000 },
content: { title: {button: true}, text: "Chargement...",
ajax: { url: '<?=$this->url(array('controller'=>'identite','action'=>'lienfiche'),null,true)?>/idFiche/'+$(this).attr('id') } },
position: { my: "bottom left", at: "top left" }
@ -335,4 +336,5 @@ $('a.dialog').on('click', function(){
}
});
<?php }?>
</script>
</script>
<?php }?>

View File

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

View File

@ -3,7 +3,6 @@
<head>
<?php echo $this->headMeta()?>
<?php echo $this->headTitle()?>
<?php echo $this->headStyle()?>
<?php echo $this->headLink()?>
<?php echo $this->headScript()?>
</head>

View File

@ -1799,14 +1799,14 @@
</tr>
<tr>
<td align="right" colspan="2"><b>TOTAL GENERAL (I+II+III)</b></td>
<td align="center">ON</td>
<td align="right"><?=$this->Editable('ON',$this->liasse['ON'],'poste');?></td>
<td align="center">OP</td>
<td align="right"><?=$this->Editable('OP',$this->liasse['OP'],'poste');?></td>
<td align="center">OQ</td>
<td align="right"><?=$this->Editable('OQ',$this->liasse['OQ'],'poste');?></td>
<td align="center">OR</td>
<td align="right"><?=$this->Editable('OR',$this->liasse['OR'],'poste');?></td>
<td align="center">0N</td>
<td align="right"><?=$this->Editable('0N',$this->liasse['0N'],'poste');?></td>
<td align="center">0P</td>
<td align="right"><?=$this->Editable('0P',$this->liasse['0P'],'poste');?></td>
<td align="center">0Q</td>
<td align="right"><?=$this->Editable('0Q',$this->liasse['0Q'],'poste');?></td>
<td align="center">0R</td>
<td align="right"><?=$this->Editable('0R',$this->liasse['0R'],'poste');?></td>
</tr>
</tbody>
</table>
@ -1825,7 +1825,7 @@
<td align="center" colspan="2"><b>amortissements dégressifs</b></td>
<td align="center" colspan="2"><b>amortissements exceptionnels</b></td>
<td align="center" colspan="3"><b>Dotations</b></td>
<td align="center" colspan="2"><b> Reprises</b></td>
<td align="center" colspan="2"><b>Reprises</b></td>
</tr>
<tr>
<td>Frais établi R&amp;D</td>
@ -3400,8 +3400,8 @@ pour les entreprises placées sous le régime de l'article 39-1. 1 e bis Al. 2 d
<td colspan="10">Personnel extérieur à l'entreprise</td>
<td align="center">YU</td>
<td align="right"><?=$this->Editable('YU',$this->liasse['YU'],'poste');?></td>
<td align="center">YU</td>
<td align="right"><?=$this->Editable('YU',$this->liasse['YU'],'poste');?></td>
<td align="center">YU1</td>
<td align="right"><?=$this->Editable('YU1',$this->liasse['YU1'],'poste');?></td>
</tr>
<tr>
<td colspan="10">Rémunérations d'intermédiaires et honoraires (hors rétrocessions)</td>

View File

@ -28,7 +28,10 @@ div#dialog .ui-widget-content { text-align:left; }
<?php if ($this->type=='actionnaire') {?>
<?php if ( $this->mode == 'add' ) {?>
<div class="fieldgrp">Saisie d'un actionnaire pour la société <?=$this->rs?> (<?=$this->siren?>)</div>
<div class="fieldgrp">Saisie d'un actionnaire pour la société <?=$this->rs?>
(<?php echo intval($this->siren)!=0 ? $this->siren : $this->id1 ; ?>)
</div>
<?php if ( $this->id2 ) {?>
<b>Fiche créée <?=$this->id2Nom?> (id = <?=$this->id2?>)</b>
@ -130,7 +133,8 @@ div#dialog .ui-widget-content { text-align:left; }
<?php if ($this->type=='participation') {?>
<?php if ( $this->mode == 'add' ) { ?>
<div class="fieldgrp">Saisie d'une participation pour la société <?=$this->rs?> (<?=$this->siren?>)</div>
<div class="fieldgrp">Saisie d'une participation pour la société <?=$this->rs?>
(<?php echo intval($this->siren)!=0 ? $this->siren : $this->id1 ; ?>)</div>
<?php if ( $this->id2 ) {?>
<b>Fiche créée <?=$this->id2Nom?> (id = <?=$this->id2?>)</b>

View File

@ -15,7 +15,7 @@ $('#dialog').dialog({ buttons: [{ text: "Fermer", click: function() {$(this).dia
<form name="lienchange" method="post" action="<?=$this->url(array('controller'=>'saisie', 'action'=>'lienchange'),null,true)?>">
<input type="hidden" name="idLien" value="<?=$this->lienref?>"/>
<input type="hidden" name="idLien" value="<?=$this->idLien?>"/>
<input type="hidden" name="mode" value="<?=$this->mode?>"/>
<?php if ($this->mode=='fusion') {?>

View File

@ -106,7 +106,7 @@ $('input.autocomplete').autocomplete({
select: function(event, ui) {
$('form[name=lien]').prepend('<input type="hidden" name="id2" value="'+ui.item.value+'"/>');
$('div#searchFiche').replaceWith('<b>Fiche sélectionnée '+ui.item.label+
' (id = <a style="text-decoration:underline;" target="_blank" href="<?=$this->url(array('controller'=>'identite', 'action'=>'liens'))?>/lienref/'+ui.item.value+
' (id = <a style="text-decoration:underline;" target="_blank" href="<?=$this->url(array('controller'=>'identite', 'action'=>'liens'), null, true)?>/lienref/'+ui.item.value+
'">'+ui.item.value+'</a>)</b>');
}
});

View File

@ -26,12 +26,6 @@ $('a.dialog').on('click', function(e){
<?php } else {?>
<style>
label {
text-align:left;
margin-right:0px;
width:13em;
}
select, input {
width:5em;
}
@ -70,17 +64,19 @@ $getcutoff = $this->getcutoff;
$wdate = new WDate();
?>
<?php if ($this->message!='') {?>
<div class='message'><p><?=$this->message; ?></p></div>
<div class='message'><p id='<?=$this->refresh ?>'><?=$this->message; ?></p></div>
<?php }?>
<?php if ($getcutoff['dateInsert']!='') { ?>
<div class="StyleInfoLib" style="float:left; margin-left:40em; margin-top:20px; width:170px">
<div>Date de création Cut-off</div>
<div>Date de mise à jour Cut-off</div>
</div>
<div class="StyleInfoData" style="float:left; margin-top:20px; ">
<div> <?=$wdate->dateT('Y-m-d', 'd/m/Y', $getcutoff['dateInsert']); ?></div>
<div id='dateInsert'> <?=$wdate->dateT('Y-m-d', 'd/m/Y', $getcutoff['dateInsert']); ?></div>
<div> <?=$wdate->dateT('Y-m-d', 'd/m/Y', $getcutoff['dateUpdate']); ?></div>
</div>
<?php } ?>
<div style="margin-top:5em">
<form>
@ -88,25 +84,25 @@ $wdate = new WDate();
<div>
<label>Encours</label>
<input type="text" name="encours" value="<?=$getcutoff['encours']/1000 ?>" required pattern="([0-9]{0,2})|([0-4]{1}[0-9]{0,2})|500" maxlength="3"/>
<input type="text" name="encours" value="<?php echo $getcutoff['encours']?$getcutoff['encours']/1000:''; ?>" required pattern="([0-9]{0,2})|([0-4]{1}[0-9]{0,2})|500" maxlength="3"/>
</div>
<div style="float:left">K€ (de 0 à 500 K€)</div>
<?php
$select = array('scoreSolv' => 'IndiScore', 'scoreDir' => 'Score dirigeance', 'scoreConf' => 'Score de conformité');
$select = array('scoreConf' => 'Score de conformité', 'scoreDir' => 'Score dirigeance', 'scoreSolv' => 'IndiScore');
foreach($select as $item => $val) {
?>
<div>
<label><?=$val?></label>
<select name="<?=$item ?>" required>
<option value=''>---</option>
<option value='' selected>---</option>
<?php
for($i=0; $i<=$this->typescore; $i++) {
$selected = '';
if ($i == $getcutoff[$item]) {
if (is_numeric($getcutoff[$item]) && $i == $getcutoff[$item]) {
$selected = 'selected';
}
echo '<option value="'.$i.'" '.$selected.'>'.$i.'</option>';
echo '<option value="'.$i.'" '.$selected.'>'.$i.'</option>';
}
?>
</select>
@ -121,54 +117,10 @@ foreach($select as $item => $val) {
</form>
</div>
<div id="confirm" title="Confirmation de suppression">Supprimer Cut-off ?</div>
<div class="loading"><center><img style="padding-top:25%" src="/themes/default/images/giant/19-1.gif" /></center></div>
<script>
function validate() {
var allvals = true;
$("[required]").each(function() {
if(!$(this).val()) {
allvals = false;
$(this).addClass('brsr');
}
else { $(this).removeClass('brsr'); }
});
if ($('[name=encours]').val()<0 || $('[name=encours]').val()>500 || !$('[name=encours]').val()){
allvals = false;
$('[name=encours]').addClass('brsr');
}
else { $('[name=encours]').removeClass('brsr'); }
return allvals;
}
$(document).ready(function(){
validate();
});
$('[required]').blur(function(){
validate();
});
$('#dialog').dialog({ buttons: [
{ text: "Valider", click: function() {
var values = $(this).find('form').serialize();
if (validate()) {
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('<?=$this->url(array('controller'=>'saisie','action'=>'scorecutoff'),null,true)?>', values, function(data) {
$('#dialog').html(data);
});
}
}},
{ text: "Fermer", click: function() {
if($(".message p").text()) { location.reload(); }
$(this).dialog('close');
}
}
] });
</script>
<script type="text/javascript" src="/themes/default/scripts/scorecutoff.js" />
<?php }?>

View File

@ -0,0 +1,67 @@
<style>
#bloc-addemail { display:none; }
</style>
<p>Modification des emails associés au compte</p>
<form>
<div>
<label>Adresse Email principal :</label><br/>
<input type="text" size="50" maxlength="80" name="email1" value="<?=$this->email1?>"/>
<span id="email1-response"></span>
</div>
<br/>
<a href="#" id="addemail">Ajouter des adresses emails secondaires</a>
<div id="bloc-addemail">
<label>Email 1 :</label><br/>
<input type="text" size="50" maxlength="80" name="email2" value="<?=$this->email2?>"/>
<span id="email2-response"></span>
<br/><br/>
<label>Email 2 :</label><br/>
<input type="text" size="50" maxlength="80" name="email3" value="<?=$this->email3?>"/>
<span id="email3-response"></span>
</div>
<div id="response"></div>
</form>
<script>
$('a#addemail').click(function(){
$display = $('div#bloc-addemail').css('display');
if ($display == 'block') {
$('div#bloc-addemail').css('display', 'none');
} else {
$('div#bloc-addemail').css('display', 'block');
}
});
$('#dialog').dialog({ buttons: [
{ text: "Valider", click: function() {
var flagAllValid = true;
var emails = [];
var source = ['email1', 'email2', 'email3'];
$.each( source, function( key, value ) {
var email = $('input[name='+value+']').val();
if (email!='') {
$.post('/user/emailvalid', {q: email}, function(data){
if(data.valid==false) {
flagAllValid = false;
$('#dialog span#'+value+'-response').html('<strong>Email invalide !</strong>');
}
}, 'json');
emails.push(email);
}
});
if(flagAllValid) {
$('input[name="frmOptions[email]"]').val(emails.join(';'));
$(this).dialog("close");
}
} },
{ text: "Quitter", click: function() { $(this).dialog("close"); } }
]});
</script>

View File

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

View File

@ -44,8 +44,45 @@ if ($this->action != 'new') {
<div class="infoTitle StyleInfoLib">Adresse e-mail</div>
<div class="infoData">
<input type="text" size="30" maxlength="80" name="frmOptions[email]" value="<?=$this->options->email?>"/>
<?php $emails = explode(';', $this->options->email); ?>
<?php foreach ( $emails as $email ) {?>
<span><?=$email?></span><br/>
<?php }?>
</div>
<div style="float:left;">
<button id="user-emails">Editer les emails</button>
<script>
$('button#user-emails').button({
icons: { primary: "ui-icon-pencil" },
text: false
}).click(function( event ) {
event.preventDefault();
var title = $(this).text();
var href = '/user/emails/q/'+$('input[name="frmOptions[email]"]').val();
var dialogOpts = {
bgiframe: true,
title: title,
width: 500,
height: 300,
modal: true,
open: function(event, ui) {
$(this).html('Chargement...');
$(this).load(href);
},
buttons: {
Quitter: function() { $(this).dialog('close'); }
},
close: function() { $('#dialog').remove(); }
};
$('<div id="dialog"></div>').dialog(dialogOpts);
return false;
});
</script>
</div>
<input type="hidden" name="frmOptions[email]" value="<?=$this->options->email?>"/>
<div class="infoTitle StyleInfoLib">
Num&eacute;ros de t&eacute;l&eacute;phone<br/><i>(Fixe, Fax, Mobile)</i>
@ -224,9 +261,7 @@ foreach ($this->prefsLib as $code => $lib) {
<?php }?>
</div>
<?php
if ( $this->options->idClient == 1 && !in_array('edition',$this->droits) ) {
?>
<?php if ( $this->options->idClient == 1 && !in_array('edition',$this->droits) ) { ?>
<h2>Mode spéciaux</h2>
<div class="infoTitle StyleInfoLib">Mode Edition</div>
<div class="infoData last">

View File

@ -1,9 +1,11 @@
<?php echo $this->doctype()?>
<html>
<head>
<?=$this->headMeta();?>
<?=$this->headTitle();?>
<link rel="shortcut icon" type="image/x-icon" href="<?='http://'.$_SERVER['SERVER_NAME']?>/favicon.ico" />
<?php echo $this->headMeta()?>
<?php echo $this->headTitle()?>
<?php echo $this->headLink()?>
<?php echo $this->headScript()?>
<link rel="shortcut icon" type="image/x-icon" href="<?='http://'.$_SERVER['SERVER_NAME']?>/favicon.ico" />
<style>
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, dialog, figure, footer, header, hgroup, nav, section {
border: 0 none;
@ -575,8 +577,6 @@ a.bookmarklet {
</style>
<!--[if IE 8]><style>input[type="checkbox"]{padding:0;}</style><![endif]-->
<?=$this->inlineScript()?>
<script>
$(document).ready(function(){
$("label").inFieldLabels();
@ -594,21 +594,47 @@ $(document).ready(function(){
<form method="post" action="<?=$this->url(array('controller'=>'user', 'action'=>'login'),null, true)?>">
<p style="text-align:center; color:red;"><span><?=$this->message?></span></p>
<fieldset>
<p class="infield">
<label for="user" class="infield">Identifiant</label>
<input type="text" name="login" id="user" value="" autofocus autocomplete="off" required />
</p>
<p class="infield">
<label for="password" class="infield">Mot de passe</label>
<input type="password" name="pass" id="password" value="" required />
</p>
<!-- <input type="checkbox" name="remember_login" value="1" id="remember_login" /><label for="remember_login">Remember</label> -->
<script>document.write('<input name="screenSize" type="hidden" value="'+ screen.width +'x'+screen.height + '">')</script>
<input type="submit" id="submit" class="login" value="Connexion" />
</fieldset>
<fieldset>
<p class="infield">
<label for="user" class="infield">Identifiant</label>
<input type="text" name="login" id="user" value="" autofocus autocomplete="off" required />
</p>
<p class="infield">
<label for="password" class="infield">Mot de passe</label>
<input type="password" name="pass" id="password" value="" required />
</p>
<!-- <input type="checkbox" name="remember_login" value="1" id="remember_login" /><label for="remember_login">Remember</label> -->
<script>document.write('<input name="screenSize" type="hidden" value="'+ screen.width +'x'+screen.height + '">');</script>
<input type="submit" id="submit" class="login" value="Connexion" />
</fieldset>
</form>
<div>
<a class="dlg" title="Identifiants oubliés ?" href="<?=$this->url(array('controller'=>'user', 'action'=>'motpasse'))?>">Identifiants oubliés ?</a>
<script>
$('a.dlg').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,
resizable: false,
open: function(event, ui) {
$(this).html('Chargement...');
$(this).load(href);
},
buttons: {'Fermer': function() { $(this).dialog('close'); }},
close: function() { $('#dlg').remove(); }};
$('<div id="dlg"></div>').dialog(dlgOpts);
return false;
});
</script>
</div>
</div>
<footer>

View File

@ -0,0 +1,197 @@
<style>
div#dlg input#frm {
border-radius:0;
font-size:95%;
margin:0;
padding:0em 0em 0em 0.2em;
background: none;
box-shadow: none;
width: 20em;
height:1.5em;
}
pre {
font-family: arial;
font-size:0.9em;
}
label#frm {
font-family: arial;
font-size:0.9em;
cursor: default;
clear: both;
float: left;
width: 20em;
margin-right: 1em;
text-align: right;
}
.brsr {
border-style:solid;
border-width:1px;
border-color:red;
}
.loading
{
background-color: silver;
height: 450px;
top: 0px;
left: 0px;
position: absolute;
width: 720px;
opacity: 0.3;
display:none;
z-index: 1;
}
.message {
font-size: 10px;
width: 98%;
background-color: #FFFFDD;
border: 1px solid #FCEFA1;
border-radius: 4px;
padding: 10px 15px 10px 15px;
}
#stl {
height:25px;
}
#htxt #ftxt {
width:400px;
}
</style>
<?php if ($this->sendEmail) {?>
<div class='message'><p id='<?=$this->bt_fermer;?>'>
Votre demande avec les informations suivantes a été envoyée. Nous vous contacterons prochainement.
</p></div>
<script>
$('#dlg').dialog({ buttons: [
{ text: "Fermer", click: function() { $(this).dialog('close'); }}
] });
</script>
<?php } else {?>
<?php if ($this->message!='') {?>
<div class='message'><p id='<?=$this->bt_fermer;?>'><?=$this->message; ?></p></div>
<?php }?>
<?php
$params = $this->params;
?>
<div id='htxt'>
<pre>
Pour recevoir votre mot de passe et/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.
</pre>
</div>
<div>
<form>
<div id="stl">
<label id="frm">Votre Identifiant :</label>
<input id="frm" type="text" name="identifiant" value="<?=$params['identifiant']; ?>"/>
</div>
<div id="stl">
<label id="frm">Votre Adresse email* :</label>
<input id="frm" type="text" name="email" value="<?=$params['email']; ?>" required />
</div>
<div id="stl">
<label id="frm">Votre Numéro de téléphone* :</label>
<input id="frm" type="text" name="telephone" value="<?=$params['telephone']; ?>" required/>
</div>
<div id="stl">
<label id="frm">Votre Nom* :</label>
<input id="frm" type="text" name="nom" value="<?=$params['nom']; ?>" required/>
</div>
<div id="stl">
<label id="frm">Votre Prénom* :</label>
<input id="frm" type="text" name="prenom" value="<?=$params['prenom']; ?>" required/>
</div>
<div id="stl">
<label id="frm">Votre Fonction* :</label>
<input id="frm" type="text" name="fonction" value="<?=$params['fonction']; ?>" required/>
</div>
<div id="stl">
<label id="frm">Votre Service* :</label>
<input id="frm" type="text" name="service" value="<?=$params['service']; ?>" required/>
</div>
<div id="stl">
<label id="frm">Raison Sociale* :</label>
<input id="frm" type="text" name="rsociale" value="<?=$params['rsociale']; ?>" required/>
</div>
</form>
</div>
<div id="ftxt">
<pre>
Ces informations sont destinées exclusivement au traitement de votre demande et à l'émission d'une réponse personnalisée.
</pre>
</div>
<div class="loading"><center><img style="padding-top:25%" src="/themes/default/images/giant/19-1.gif" /></center></div>
<script>
function validate() {
var allvals = true;
$('div#dlg input[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();
});
$('div#dlg input[required]').blur(function(){
if(!$(this).val()) { $(this).addClass('brsr'); }
else { $(this).removeClass('brsr'); }
});
$('#dlg').dialog({ buttons: [
{ text: "Valider", click: function() {
var values = $(this).find('form').serialize();
if (validate() && isEmail($('div#dlg input[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'); }}
] });
</script>
<?php }?>

View File

@ -0,0 +1,21 @@
<?php
print_r($this->message);
?>
<br/>
<?php
$result = array();
foreach ($this->matches->match as $key => $value)
{
echo '<p>'.$this->param->dirNom.' '.$this->param->dirPrenom.'</p>';
$result[$key] = $value;
echo 'Match Found by: '.$result[$key]->matchFoundBy.'<br/>';
echo 'Match Resolution: '.$result[$key]->matchResolution.'<br/>';
echo 'Match Risk: '.$result[$key]->matchRisk.'<br/>';
echo 'Match Score: '.$result[$key]->matchScore.'<br/>';
}
//print_r($this->params);
//print_r($this->nameIdentifier);
?>
<h1></h1>

View File

@ -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 = '';

View File

@ -105,9 +105,6 @@ class Application_Controller_Plugin_Theme extends Zend_Controller_Plugin_Abstrac
'identite-fichepc' => array(
'identite-fiche.js' => 'inline',
),
'identite-geo' => array(
'identite-geo.js' => 'file',
),
'identite-groupe' => array(
'identite-groupe.js' => 'inline',
),

View File

@ -177,6 +177,10 @@ class Liasse
'YY'=>'374',
'YZ'=>'378',
'YP'=>'376',
//@todo : Traiter N-1
);
$bilanRN=array();

View File

@ -37,6 +37,9 @@ class GenCourrier
->where('id = ?', $id);
$result = $commande->fetchRow($sql);
$typeDocument = 'kbis';
if ($result->type == 'M') {
$this->info->type = 'MAIL';
}
}
//Assignation des variables
$this->info->siren = $result->siren;
@ -181,6 +184,9 @@ class GenCourrier
$odf->setVars('sujet', $this->info->sujet, true, 'UTF-8');
$odf->setVars('societe', $this->info->societe, true, 'UTF-8');
$odf->setVars('montant', $this->info->montant, true, 'UTF-8');
if ($this->info->type == 'MAIL') {
$odf->setVars('bymail',"ou à votre convenance par mail à : support@scores-decisions.com");
}
$odf->saveToDisk($this->path.$file);
if (file_exists($this->path.$file) == true) {
@ -251,7 +257,7 @@ class GenCourrier
//Type de document demandé (actes ou bilans pour l'instant)
//[un Kbis / l'état d'endettement / la copie de jugement de XXX en date du XXX ]
$positionY = $pdf->GetY()+2;
$pdf->MultiCell(0, 5, "Je vous prie de nous faire parvenir $this->info->sujet concernant la société:", $border, 'L', 0, 1, '', $positionY, true);
$pdf->MultiCell(0, 5, "Nous vous prions de nous faire parvenir $this->info->sujet concernant la société:", $border, 'L', 0, 1, '', $positionY, true);
//Bloc société
$positionY = $pdf->GetY()+2;
@ -265,7 +271,7 @@ class GenCourrier
$positionY = $pdf->GetY()+2;
$pdf->MultiCell(0, 5,
"Veuillez nous renvoyer le(s) document(s) par retour à l'adresse suivante:",
$border, 'L', 0, 1, '', $positionY, true);
$border, 'L', 0, 1, '', $positionY, true);
//Bloc adresse s&d
$positionY = '';
@ -275,9 +281,16 @@ class GenCourrier
"78120 RAMBOUILLET" . "\n"
, $border, 'L', 0, 1, '', $positionY, true);
if ($this->info->type == 'MAIL') {
$positionY = $pdf->GetY()+2;
$pdf->MultiCell(0, 5,
"ou à votre convenance par mail à : support@scores-decisions.com",
$border, 'L', 0, 1, '', $positionY, true);
}
//Bloc formule politesse
$positionY = $pdf->GetY()+2;
$pdf->MultiCell(0, 5, "Dans l'attente de notre prochain échange, je vous prie de recevoir, Madame, Monsieur, l'expression de nos plus sincères salutations.", $border, 'L', 0, 1, '', $positionY, true);
$pdf->MultiCell(0, 5, "Dans l'attente de notre prochain échange, nous vous prions de recevoir, Madame, Monsieur, l'expression de nos plus sincères salutations.", $border, 'L', 0, 1, '', $positionY, true);
$file = $this->info->siren.'-'.$this->info->ref.'.pdf';
$pdf->Output($this->path.$file, 'F');

View File

@ -1,8 +1,8 @@
<?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
* and open the template in the editor.
*/
require_once 'Vendors/ChartDirector/phpchartdir.php';
require_once ('Giant/WSgiant.php');
require_once ('Scores/Cache.php');
@ -12,10 +12,10 @@ Class GiantControllerLib
{
private $pathImg;
public function __construct($companyId)
public function __construct($companyId)
{
$c = Zend_Registry::get('config');
$this->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,129 @@ Class GiantControllerLib
print_r($report_id);
echo'</pre>';
if(!$Commande->getCommandeExistToday($CommandeP->login, $CommandeP->date, $CommandeP->typeReport, $CommandeP->pays)) {
$Commande->setCommandes($CommandeP);
$Commande->setCommandes($CommandeP);
}*/
$Commande->setCommandes($CommandeP);
return ($id);
}
public function startmonitoring($CompanyId, $CategorieName, $EventType, $PreferredStartDate, $PreferredEndDate, $Version, $LanguageCode,$Pays,$TestIndication,$CompanyName)
{
$Utilisateur = new Scores_Utilisateur();
$Commande = new Commandes();
$CommandeP = new stdClass();
$CommandeP->login = $Utilisateur->getLogin();
$CommandeP->CompanyId = $CompanyId;
$CommandeP->CategorieName = $CategorieName;
$CommandeP->EventType = $EventType;
$CommandeP->Language = $LanguageCode;
$CommandeP->PreferredStartDate = $PreferredStartDate;
$CommandeP->PreferredEndDate = $PreferredEndDate;
$CommandeP->Version = $Version;
$CommandeP->Pays = $Pays;
$CommandeP->TestIndication = $TestIndication;
$CommandeP->CompanyName = $CompanyName;
if (!empty($PreferredStartDate)) {
$CommandeP->ActualStartDate = $PreferredStartDate;
} else {
$CommandeP->ActualStartDate = date("Y-m-d");
}
if (!empty($PreferredEndDate)) {
$CommandeP->ActualEndDate = $PreferredEndDate;
} else {
$CommandeP->ActualEndDate = date('Y-m-d', strtotime('+6 month'));
}
$rapport = new GiantRechercheController($Pays, $TestIndication);
$result = $rapport->GetStartMonitoring($CompanyId, $CategorieName, $EventType, $PreferredStartDate, $PreferredEndDate, $Version, $LanguageCode);
$CommandeP->InternalOrderId = $result->Order->InternalOrderId;
$Commande->setMonitoring($CommandeP);
return ($result);
}
public function stopmonitoring($CompanyId, $PreferredEndDate,$InternalOrderId,$Pays,$TestIndication)
{
$rapport = new GiantRechercheController($Pays, $TestIndication);
$result = $rapport->GetStopMonitoring($CompanyId, $PreferredEndDate,$InternalOrderId);
return ($result);
}
public function updatemonitoring($CompanyId, $InternalOrderId, $CategorieName, $EventType, $PreferredStartDate, $Version, $LanguageCode, $Pays,$TestIndication)
{
$rapport = new GiantRechercheController($Pays, $TestIndication);
$result = $rapport->GetUpdateMonitoring($CompanyId, $InternalOrderId, $CategorieName, $EventType, $PreferredStartDate, $Version, $LanguageCode);
return ($result);
}
public function retrivemonitoring($CompanyId, $StartFrom,$InternalOrderId,$Pays,$TestIndication,$EventType,$CompanyName)
{
$Utilisateur = new Scores_Utilisateur();
$Commande = new Commandes();
$CommandeP = new stdClass();
$CommandeP->login = $Utilisateur->getLogin();
$CommandeP->CompanyId = $CompanyId;
$CommandeP->CompanyName = $CompanyName;
$CommandeP->StartFrom = $StartFrom;
$CommandeP->Pays = $Pays;
$CommandeP->TestIndication = $TestIndication;
$CommandeP->Type = $EventType;
$CommandeP->InternalOrderId = $InternalOrderId;
$Commande->setRetrive($CommandeP);
$rapport = new GiantRechercheController($Pays, $TestIndication);
$result = $rapport->GetRetriveMonitoring($CompanyId, $StartFrom,$InternalOrderId,$EventType);
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 +184,237 @@ 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 = true;
$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 ListeRapport($CompanyId)
{
$this->CreditData = new CreditData($this->soapG, $CompanyId);
$result = $this->CreditData->getMethode('RetreiveOptions', array($CompanyId));
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 GetStopMonitoring($CompanyId, $PreferredEndDate, $InternalOrderId)
{
$this->CreditData = new CreditData($this->soapG, $CompanyId);
$result = $this->CreditData->getMethode('StopMonitoring', array($CompanyId, $PreferredEndDate, $InternalOrderId));
return ($result);
}
public function GetUpdateMonitoring($CompanyId, $InternalOrderId, $CategorieName, $EventType, $PreferredStartDate, $Version, $LanguageCode)
{
$this->CreditData = new CreditData($this->soapG, $CompanyId);
$result = $this->CreditData->getMethode('UpdateMonitoringOptions', array($CompanyId, $InternalOrderId, $CategorieName, $EventType, $PreferredStartDate, $Version, $LanguageCode));
return ($result);
}
public function GetRetriveMonitoring($CompanyId, $StartFrom, $InternalOrderId,$EventType)
{
$this->CreditData = new CreditData($this->soapG, $CompanyId);
$result = $this->CreditData->getMethode('RetrieveMonitoringEventsFor'.$EventType, array($CompanyId, $StartFrom, $InternalOrderId));
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]);
}
}
?>

View File

@ -70,7 +70,7 @@ Class GiantFunction
$array[$valeur[0]][] = $valeur[1];
}
}
$html = '<fieldset><legend><center><b>Modifications au '.date('d/m/Y').'</b></center></legend><br />';
//$html = '<fieldset><legend><center><b>Modifications au '.date('d/m/Y').'</b></center></legend><br />';
$html .= '<ol style="list-style:none">';
foreach($array as $name => $ar) {
$html .= '<li><b>'.$name.' :</b></li>';

View File

@ -24,6 +24,40 @@ Class Commandes
);
$commandes->insert($data);
}
public function setMonitoring($parametres)
{
$commandes = new Application_Model_MonitoringGiants();
$data = array( 'login' => $parametres->login,
'CompanyId' => $parametres->CompanyId,
'CompanyName' => $parametres->CompanyName,
'Category' => $parametres->CategorieName,
'EventType' => $parametres->EventType,
'Pays' => $parametres->Pays,
'Language' => $parametres->Language,
'PreferredStartDate' => $parametres->PreferredStartDate,
'PreferredEndDate' => $parametres->PreferredEndDate,
'Version' => $parametres->Version,
'TestIndication' => $parametres->TestIndication,
'ActualStartDate' => $parametres->ActualStartDate,
'ActualEndDate' => $parametres->ActualEndDate,
'InternalOrderId' => $parametres->InternalOrderId,
);
$commandes->insert($data);
}
public function setRetrive($parametres)
{
$commandes = new Application_Model_RetriveGiants();
$data = array( 'login' => $parametres->login,
'CompanyId' => $parametres->CompanyId,
'CompanyName' => $parametres->CompanyName,
'Pays' => $parametres->Pays,
'TestIndication' => $parametres->TestIndication,
'InternalOrderId' => $parametres->InternalOrderId,
'Type' => $parametres->Type,
'StartFrom' => $parametres->StartFrom,
);
$commandes->insert($data);
}
public function getCommandesByLogin($login)
{
$commandes = new Application_Model_CommandesGiants();

View File

@ -5,310 +5,329 @@ require_once ('Functions.lib.php');
define("DATA_SET_VERSION", '1.0');
class WSgiant extends Zend_Soap_Client
{
protected $wsService = array();
protected $header;
protected $wsService = array();
protected $header;
function __construct($parametres)
{
$this->wsService = new Zend_Config_Ini( realpath(dirname(__FILE__)).'/giant.ini' );
if($parametres InstanceOF stdClass)
self::init($parametres);
}
function __construct($parametres)
{
$this->wsService = new Zend_Config_Ini( realpath(dirname(__FILE__)).'/giant.ini' );
if($parametres InstanceOF stdClass)
self::init($parametres);
}
/**
* init
* @param unknown_type $parametres
*/
private function init($parametres)
{
$utilisateur = new Scores_Utilisateur();
$options = array(
'features' => SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS,
'soapVersion' => SOAP_1_1,
'login' => $this->wsService->options->login,
'password' => $this->wsService->options->password,
'compression' => SOAP_COMPRESSION_ACCEPT
);
/**
* init
* @param unknown_type $parametres
*/
private function init($parametres)
{
$utilisateur = new Scores_Utilisateur();
$options = array(
'features' => SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS,
'soapVersion' => SOAP_1_1,
'login' => $this->wsService->options->login,
'password' => $this->wsService->options->password,
'compression' => SOAP_COMPRESSION_ACCEPT
);
$this->setOptions($options);
$giantHeader = new stdClass();
$giantHeader->ConsumerId = $this->wsService->header->ConsumerId;
$giantHeader->CustomerId = $utilisateur->getLogin();
$giantHeader = new stdClass();
$giantHeader->ConsumerId = $this->wsService->header->ConsumerId;
$giantHeader->CustomerId = $utilisateur->getLogin();
$giantHeader->Provider = new stdClass();
$giantHeader->Provider->CountryCode = $parametres->CountryCode;
$giantHeader->Provider->ProviderId = $parametres->ProviderId;
$giantHeader->TimeStamp = time();
$giantHeader->TestIndication = $parametres->TestIndication;
$giantHeader->Provider = new stdClass();
$giantHeader->Provider->CountryCode = $parametres->CountryCode;
$giantHeader->Provider->ProviderId = $parametres->ProviderId;
$giantHeader->TimeStamp = time();
$giantHeader->TestIndication = $parametres->TestIndication;
$this->header = new SoapHeader(
$this->wsService->header->url,
$this->wsService->header->serviceName, $giantHeader
);
parent::addSoapInputHeader($this->header, true);
$this->header = new SoapHeader(
$this->wsService->header->url,
$this->wsService->header->serviceName, $giantHeader
);
parent::addSoapInputHeader($this->header, true);
}
}
/**
* getAllMethodesFromWsdl
* @param unknown_type $service
*/
public function getAllMethodesFromWsdl($service)
{
$this->setWsdl($this->wsService->$service->wsdl);
return ($this);
}
/**
* getAllMethodesFromWsdl
* @param unknown_type $service
*/
public function getAllMethodesFromWsdl($service)
{
$this->setWsdl($this->wsService->$service->wsdl);
return ($this);
}
}
Class Search extends GiantFunction
{
private $soapG;
protected $label;
protected $labelResults;
protected $query;
protected $methodes = array(
'search',
'advancedSearch'
);
private $soapG;
protected $label;
protected $labelResults;
protected $query;
protected $methodes = array(
'search',
'advancedSearch'
);
private $headerSearch;
private $headerSearch;
public function __construct($soap)
{
$this->soapG = $soap;
$this->label = new Zend_Config_Ini('Giant/Traductions/label.ini', 'search');
$this->labelResults = new Zend_Config_Ini('Giant/Traductions/results.ini', 'search');
$this->headerSearch = new stdClass();
$this->headerSearch->IncludePhoneticMatches = FALSE;
$this->headerSearch->IncludeSuggestions = FALSE;
$this->soapG->getAllMethodesFromWsdl('search');
}
public function __construct($soap)
{
$this->soapG = $soap;
$this->label = new Zend_Config_Ini('Giant/Traductions/label.ini', 'search');
$this->labelResults = new Zend_Config_Ini('Giant/Traductions/results.ini', 'search');
$this->headerSearch = new stdClass();
$this->headerSearch->IncludePhoneticMatches = FALSE;
$this->headerSearch->IncludeSuggestions = FALSE;
$this->soapG->getAllMethodesFromWsdl('search');
}
protected function search($paramatres, $page)
{
$this->query = $paramatres->Query;
$search = array_merge((array)$paramatres, (array)$this->headerSearch);
try {
$result = $this->soapG->search($search);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();}
return ($result);
}
protected function search($paramatres, $page)
{
$this->query = $paramatres->Query;
$search = array_merge((array)$paramatres, (array)$this->headerSearch);
try {
$result = $this->soapG->search($search);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return ($result);
}
public function advancedSearch($parametres, $page)
{
$advanced = array_merge((array)$parametres, (array)$this->headerSearch);
$this->query = $advanced['Query'];
try {
$result = $this->soapG->advancedSearch($advanced);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();}
return($result);
}
public function advancedSearch($parametres, $page)
{
$advanced = array_merge((array)$parametres, (array)$this->headerSearch);
$this->query = $advanced['Query'];
try {
$result = $this->soapG->advancedSearch($advanced);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return($result);
}
protected function Tier2Search($Query, $StartRow, $NumRows)
{
$parametres = new stdClass();
$parametres->Query = $Query;
$parametres->StartRow = $StartRow;
$parametres->NumRows = $NumRows;
try {
$this->soapG->Tier2Search($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();}
}
protected function Tier2Search($Query, $StartRow, $NumRows)
{
$parametres = new stdClass();
$parametres->Query = $Query;
$parametres->StartRow = $StartRow;
$parametres->NumRows = $NumRows;
try {
$this->soapG->Tier2Search($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
}
public function Tier2SearchMethods()
{
try {
$result = $this->soapG->Tier2SearchMethods();
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return ($result);
}
public function Tier2SearchMethods()
{
try {
$result = $this->soapG->Tier2SearchMethods();
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return ($result);
}
public function __destruct()
{
unset($this->soapG);
}
public function __destruct()
{
unset($this->soapG);
}
}
Class CreditData extends GiantFunction
{
private $soapG;
protected $companyId;
protected $methodes = array(
'RetreiveOptions', 'OrderDataSet',
'RetrieveOrderStatus', 'RetrieveDataSet',
'StartInvestigation', 'StartMonitoring',
'UpdateMonitoringOptions', 'StopMonitoring',
'RetrieveMonitoringEventsForOrder', 'RetrieveMonitoringEventsForCustomer',
'RetrieveMonitoringEventsForConsumer', 'Ping'
);
private $soapG;
protected $companyId;
protected $methodes = array(
'RetreiveOptions', 'OrderDataSet',
'RetrieveOrderStatus', 'RetrieveDataSet',
'StartInvestigation', 'StartMonitoring',
'UpdateMonitoringOptions', 'StopMonitoring',
'RetrieveMonitoringEventsForOrder', 'RetrieveMonitoringEventsForCustomer',
'RetrieveMonitoringEventsForConsumer', 'Ping'
);
public function __construct($soapG, $companyId)
{
$this->soapG = $soapG;
$this->companyId = $companyId;
$this->soapG->getAllMethodesFromWsdl('credit-data');
}
public function __construct($soapG, $companyId)
{
$this->soapG = $soapG;
$this->companyId = $companyId;
$this->soapG->getAllMethodesFromWsdl('credit-data');
}
protected function RetreiveOptions()
{
$parametres = new stdClass();
$parametres->CompanyId = $this->companyId;
try {
$result = $this->soapG->RetrieveOptions($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();}
protected function RetreiveOptions()
{
$parametres = new stdClass();
$parametres->CompanyId = $this->companyId;
try {
$result = $this->soapG->RetrieveOptions($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return ($result);
}
return ($result);
}
protected function OrderDataSet($DataSetType, $LanguageCode, $Version = null)
{
$parametres = new stdClass();
$parametres->CompanyId = $this->companyId;
$parametres->DataSetType = $DataSetType;
$parametres->DataSetVersion = DATA_SET_VERSION;
$parametres->LanguageCode = $LanguageCode;
try {
$result = $this->soapG->OrderDataSet($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();}
return ($result);
}
protected function OrderDataSet($DataSetType, $LanguageCode, $Version = null)
{
$parametres = new stdClass();
$parametres->CompanyId = $this->companyId;
$parametres->DataSetType = $DataSetType;
$parametres->DataSetVersion = DATA_SET_VERSION;
$parametres->LanguageCode = $LanguageCode;
try {
$result = $this->soapG->OrderDataSet($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return ($result);
}
protected function RetrieveOrderStatus($InternalOrderId)
{
$parametres = new stdClass();
$parametres->InternalOrderId = $InternalOrderId;
try {
$result = $this->soapG->RetrieveOrderStatus($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();}
return ($result);
}
protected function RetrieveOrderStatus($InternalOrderId)
{
$parametres = new stdClass();
$parametres->InternalOrderId = $InternalOrderId;
try {
$result = $this->soapG->RetrieveOrderStatus($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return ($result);
}
protected function RetrieveDataSet($InternalOrderId)
{
$parametres = new stdClass();
$parametres->InternalOrderId = $InternalOrderId;
try {
$result = $this->soapG->RetrieveDataSet($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();}
return ($result);
}
protected function RetrieveDataSet($InternalOrderId)
{
$parametres = new stdClass();
$parametres->InternalOrderId = $InternalOrderId;
try {
$result = $this->soapG->RetrieveDataSet($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return ($result);
}
protected function StartInvestigation($DataSetType, $ServiceLevelName, $Version = null, $LanguageCode = null)
{
$parametres = new stdClass();
$parametres->DataSetType = $DataSetType;
$parametres->ServiceLevelName = $ServiceLevelName;
$parametres->Version = $Version;
$parametres->LanguageCode = $LanguageCode;
try {
$result = $this->soapG->StartInvestigation($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();}
return ($result);
}
protected function StartInvestigation($DataSetType, $ServiceLevelName, $Version = null, $LanguageCode = null)
{
$parametres = new stdClass();
$parametres->DataSetType = $DataSetType;
$parametres->ServiceLevelName = $ServiceLevelName;
$parametres->Version = $Version;
$parametres->LanguageCode = $LanguageCode;
try {
$result = $this->soapG->StartInvestigation($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return ($result);
}
protected function StartMonitoring($CategorieName, $EventType, $PreferredStartDate, $PreferredEndDate, $Version = null, $LanguageCode = null)
{
$parametres = new stdClass();
$parametres->CategorieName = $CategorieName;
$parametres->EventType = $EventType;
$parametres->PreferredStartDate = $PreferredStartDate;
$parametres->PreferredEndDate = $PreferredEndDate;
$parametres->Version = $Version;
$parametres->LanguageCode = $LanguageCode;
try {
$result = $this->soapG->StartMonitoring($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();}
return ($result);
}
protected function StartMonitoring($CompanyId, $CategorieName, $EventType, $PreferredStartDate, $PreferredEndDate, $Version, $LanguageCode)
{
$parametres = new stdClass();
$parametres->CompanyId = $CompanyId;
$parametres->CategoryName = $CategorieName;
$parametres->EventType = $EventType;
if (!empty($PreferredStartDate)) {
$parametres->PreferredStartDate = $PreferredStartDate;
}
if (!empty($PreferredEndDate)) {
$parametres->PreferredEndDate = $PreferredEndDate;
}
$parametres->MonitoringVersion = $Version;
$parametres->LanguageCode = $LanguageCode;
try {
$result = $this->soapG->StartMonitoring($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return ($result);
}
protected function UpdateMonitoringOptions($InternalOrderId, $NewCategorieName, $NewEventType, $NewPreferredStartDate, $NewVersion = null, $NewLanguageCode = null)
{
$parametres = new stdClass();
$parametres->InternalOrderId = $InternalOrderId;
$parametres->NewCategorieName = $NewCategorieName;
$parametres->NewEventType = $NewEventType;
$parametres->NewPreferredStartDate = $NewPreferredStartDate;
$parametres->NewVersion = $NewVersion;
$parametres->NewLanguageCode = $NewLanguageCode;
try {
$result = $this->soapG->UpdateMonitoringOptions($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();}
return ($result);
}
protected function UpdateMonitoringOptions($CompanyId, $InternalOrderId, $CategorieName, $EventType, $PreferredStartDate, $Version, $LanguageCode)
{
$parametres = new stdClass();
$parametres->InternalOrderId = (float)$InternalOrderId;
if (!empty($CategorieName)) {$parametres->NewCategoryName = $CategorieName;}
if (!empty($EventType)) {$parametres->NewEventType = $EventType;}
if (!empty($PreferredStartDate)) {$parametres->PreferredStartDate = $PreferredStartDate;}
if (!empty($Version)) {$parametres->NewMonitoringVersion = $Version;}
if (!empty($LanguageCode)) {$parametres->NewLanguageCode = $LanguageCode;}
try {
$result = $this->soapG->UpdateMonitoringOptions($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return ($result);
}
protected function StopMonitoring($InternalOrderId, $PreferredEndDate)
{
$parametres = new stdClass();
$parametres->InternalOrderId = $InternalOrderId;
$parametres->PreferredEndDate = $PreferredEndDate;
try {
$result = $this->soapG->StopMonitoring($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();}
return ($result);
}
protected function StopMonitoring($CompanyId, $PreferredEndDate, $InternalOrderId)
{
$parametres = new stdClass();
$parametres->CompanyId = $CompanyId;
$parametres->PreferredEndDate = $PreferredEndDate;
$parametres->InternalOrderId = (float)$InternalOrderId;
try {
$result = $this->soapG->StopMonitoring($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return ($result);
}
protected function RetrieveMonitoringEventsForOrder($InternalOrderId, $StartFrom)
{
$parametres = new stdClass();
$parametres->InternalOrderId = $InternalOrderId;
$parametres->StartFrom = $StartFrom;
try {
$result = $this->soapG->RetrieveMonitoringEventsForOrder($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();}
return ($result);
}
protected function RetrieveMonitoringEventsForOrder($CompanyId, $StartFrom,$InternalOrderId)
{
$parametres = new stdClass();
$parametres->InternalOrderId = (float)$InternalOrderId;
if (!empty($StartFrom)) {$parametres->StartFrom = $StartFrom;}
try {
$result = $this->soapG->RetrieveMonitoringEventsForOrder($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return ($result);
}
protected function RetrieveMonitoringEventsForCustomer($StartFrom)
{
$parametres = new stdClass();
$parametres->StartFrom = $StartFrom;
try {
$result = $this->soapG->RetrieveMonitoringEventsForCustomer($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return ($result);
}
protected function RetrieveMonitoringEventsForCustomer($CompanyId, $StartFrom)
{
$parametres = new stdClass();
if (!empty($StartFrom)) {$parametres->StartFrom = $StartFrom;}
try {
$result = $this->soapG->RetrieveMonitoringEventsForCustomer($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return ($result);
}
protected function RetrieveMonitoringEventsForConsumer($StartFrom)
{
$parametres = new stdClass();
$parametres->StartFrom = $StartFrom;
try {
$result = $this->soapG->RetrieveMonitoringEventsForConsumer($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();}
return ($result);
}
protected function RetrieveMonitoringEventsForConsumer($CompanyId, $StartFrom)
{
$parametres = new stdClass();
if (!empty($StartFrom)) {$parametres->StartFrom = $StartFrom;}
try {
$result = $this->soapG->RetrieveMonitoringEventsForConsumer($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return ($result);
}
protected function Ping($Type)
{
$parametres = new stdClass();
$parametres->Type = $Type;
try {
$result = $this->soapG->Ping($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return ($result);
}
protected function Ping($Type)
{
$parametres = new stdClass();
$parametres->Type = $Type;
try {
$result = $this->soapG->Ping($parametres);
} catch (SoapFault $soapFault) {
echo 'Erreur Soap : '.$soapFault->getMessage();
}
return ($result);
}
public function __destruct()
{
unset($this->soapG);
}
public function __destruct()
{
unset($this->soapG);
}
}

View File

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

View File

@ -13,9 +13,9 @@ soap_version = SOAP_1_1
[search]
;wsdl = "https://services.giant-net.com/search/v1?wsdl"
;wsdl = "http://194.150.14.129/search/v1?wsdl"
wsdl = "http://services-acc.giant-net.com/search/v1?wsdl"
wsdl = "https://services-acc.giant-net.com/search/v1?wsdl"
[credit-data]
wsdl = "http://services-acc.giant-net.com/credit-data/v1?wsdl"
wsdl = "https://services-acc.giant-net.com/credit-data/v1?wsdl"
;wsdl = "http://194.150.14.129/credit-data/v1?wsdl"
;wsdl = "https://services.giant-net.com/credit-data/v1?wsdl"
;wsdl = "http://giant.sd.dev/services/wsdl/credit-data-service-provider-api-1.0.wsdl"

View File

@ -1047,34 +1047,35 @@ class IdentiteEntreprise
public function getEffectifLabel()
{
return 'Effectif de l\'entreprise';
}
public function getEffectifTitre()
{
$title = '';
if (!empty($this->identite->Bilan->Effectif)) {
$title .= $this->identite->Bilan->Effectif.' salarié(s)';
}
if (!empty($this->identite->Bilan->Cloture)) {
$title .= ' au '.WDate::dateT('Ymd', 'd/m/Y',$this->identite->Bilan->Cloture);
}
return $title;
return "Effectif de l'entreprise";
}
public function getEffectifTexte()
{
$data = '';
if (empty($this->identite->Effectif)
|| ($this->identite->Effectif == 'N/C' || $this->identite->Effectif == 0)
&& !empty($this->identite->Bilan->Effectif)) {
$data.= 'N/C';
} else if ($this->identite->Effectif != 'N/C' && $this->identite->Effectif != 0) {
if ($this->identite->Effectif != 'N/C' && $this->identite->Effectif != 0) {
$data.= number_format(intval($this->identite->Effectif), null, null, ' ').' salarié(s)';
$data.= empty($this->identite->AnneeEffEn) || $this->identite->AnneeEffEn=='0000' ?
'' : ' en '.$this->identite->AnneeEffEn;
} else {
'' : ' en '.$this->identite->AnneeEffEn;
}
if (!empty($this->identite->Bilan->Effectif)) {
if ( !empty($data) ) {
$data.= "<br/>";
}
$data.= $this->identite->Bilan->Effectif.' salarié(s) au bilan';
if (!empty($this->identite->Bilan->Cloture)) {
$data.= " cloturé le ".WDate::dateT('Ymd', 'd/m/Y',$this->identite->Bilan->Cloture);
}
}
if ( empty($data) ) {
$data.= 'N/C';
}
return $data;
}

View File

@ -11,11 +11,19 @@ class Mail
{
$c = Zend_Registry::get('config');
$this->config = $c->profil->mail;
$cnfg = array('auth' => 'login',
'username' => $this->config->username,
'password' => $this->config->password);
$this->mail = new Zend_Mail();
if ($this->config->method == 'smtp') {
$tr = new Zend_Mail_Transport_Smtp($this->config->smtp_host);
$this->mail->setDefaultTransport($tr);
} elseif ($this->config->method == 'smtpauth') {
$tr = new Zend_Mail_Transport_Smtp($this->config->smtp_host, $cnfg);
$this->mail->setDefaultTransport($tr);
} else {
$tr = new Zend_Mail_Transport_Sendmail();
$this->mail->setDefaultTransport($tr);
@ -32,6 +40,15 @@ class Mail
$this->mail->setFrom($email, ucfirst($configKey));
}
/**
* Set Reply-To address
* @param string $email
*/
public function setReplyTo($email)
{
$this->mail->setReplyTo($email);
}
/**
* Champ To en fonction de la clé de configuration
* @param string $configKey

View File

@ -0,0 +1,98 @@
<?php
/**
* Image de 640x640 max
* Heading 0 à 360
* 0, 45, 90, 135, 180, 225, 270, 315
* Récup de chaque image enregistré SIRET-DEG
*/
class Scores_Streetview
{
protected $url = 'http://maps.googleapis.com/maps/api/streetview?';
//Max size 640x640
protected $size = '640x640';
//GPS ou Adresse
protected $location = null;
//Defaut 90, Max 120, represents zoom, with smaller numbers indicating a higher level of zoom
protected $fov = 90;
//(default is 0) Specifies the up or down angle of the camera relative to the Street View vehicle
protected $pitch = 0;
//(optional) identifies your application for quota purposes
protected $key = null;
protected $sensor = 'false';
// Indicates the compass heading of the camera (0 to 360)
protected $heading = 0;
protected $nbImage = 8;
protected $extension = 'jpg';
public function __construct()
{
$this->size = '320x320';
}
public function setLocationGeo($lattitude, $longitude)
{
$this->location = $lattitude.','.$longitude;
}
public function setLocationTxt($adresse){}
public function setHeading($num)
{
$this->heading = $num;
}
public function getNumDeg()
{
$mark = array();
$deg = 360/$this->nbImage;
$i=$calc=0;
while ($calc<360) {
$mark[$i] = $calc;
$calc+=$deg;
$i++;
}
return $mark;
}
public function urlImg()
{
$url = '';
$params = array( 'size', 'location', 'fov', 'pitch', 'sensor', 'heading' );
foreach ($params as $param) {
if ( $this->{$param} !== null ) {
$url.= '&'.$param.'='. $this->{$param};
}
}
return $this->url . substr($url,1);
}
public function getImg()
{
require_once 'common/curl.php';
$page = getUrl($this->url, '', '', '', false);
if ( !in_array($page['code'], array(400, 408, 403)) ) {
$filename = $this->siret.'-'.$this->heading . '.' . $this->extension;
$body = $page['body'];
file_put_contents($this->path . DIRECTORY_SEPARATOR . $filename, $body);
}
}
public function pathImg()
{
$filename = $this->siret.'-'.$this->heading . '.' . $this->extension;
return $this->path . DIRECTORY_SEPARATOR . $filename;
}
}

View File

@ -1,6 +1,10 @@
<?php
class Scores_Utilisateur
{
/**
* Identity
* @var stdClass
*/
protected $identity = null;
public function __construct()
@ -11,6 +15,50 @@ class Scores_Utilisateur
}
}
/**
* Récupére les valeurs du profil depuis le webservice
* @param stdClass $InfosLogin
* @return stdClass
*/
protected function updateProfil($InfosLogin)
{
$identity = new stdClass;
$identity->username = $login;
$identity->password = $password;
$identity->email = $InfosLogin->result->email;
$identity->profil = $InfosLogin->result->profil;
$identity->pref = $InfosLogin->result->pref;
$identity->droits = $InfosLogin->result->droits;
$identity->droitsClients = $InfosLogin->result->droitsClients;
$identity->nom = $InfosLogin->result->nom;
$identity->prenom = $InfosLogin->result->prenom;
$identity->tel = $InfosLogin->result->tel;
$identity->fax = $InfosLogin->result->fax;
$identity->mobile = $InfosLogin->result->mobile;
$identity->id = $InfosLogin->result->id;
$identity->idClient = $InfosLogin->result->idClient;
$identity->reference = $InfosLogin->result->reference;
$identity->nbReponses = $InfosLogin->result->nbReponses;
$identity->typeScore = $InfosLogin->result->typeScore;
$identity->dateValidation = $InfosLogin->result->dateValidation;
$identity->nombreConnexions = $InfosLogin->result->nombreConnexions;
$identity->dateDerniereConnexion = $InfosLogin->result->dateDerniereConnexion;
$identity->dateDebutCompte = $InfosLogin->result->dateDebutCompte;
$identity->dateFinCompte = $InfosLogin->result->dateFinCompte;
$identity->ip = $_SERVER['REMOTE_ADDR'];
$identity->timeout = (!empty($InfosLogin->result->timeout)) ?
$InfosLogin->result->timeout : 1800;
$identity->time = time() + $identity->timeout;
$identity->modeEdition = false;
$identity->acceptationCGU = $InfosLogin->result->acceptationCGU;
$lang = in_array($InfosLogin->result->lang,array('fr','en')) ? $InfosLogin->result->lang : 'fr';
$identity->lang = $lang;
$identity->langtmp = $lang;
$identity->browser = $this->getBrowserInfo();
return $identity;
}
/**
* Check if user is log in
* @return boolean

View File

@ -321,6 +321,25 @@ class WsScores
return $fault->faultstring;
}
}
/**
* Delete Score Cut Off
* @param string $siren
* @return boolean
*/
public function delScoreCutoff($siren)
{
$params = new stdClass();
$params->siren = $siren;
$client = $this->loadClient('saisie');
try {
$reponse = $client->delScoreCutoff($params); //change name when webservice is ready
return $reponse->delScoreCutoffResult; //change name when webservice is ready
} catch (SoapFault $fault) {
Zend_Registry::get('firebug')->info($fault->faultcode.':'.$fault->faultstring);
return $fault->faultstring;
}
}
public function searchLogin($idClient, $query)
{

View File

@ -0,0 +1,935 @@
<?php
class WsWorldCheck
{
protected $webservices = array();
protected $cacheEnable = false;
protected $cacheWrite = false;
protected $wcData = array();
public function __construct()
{
$c = Zend_Registry::get('config');
$location = ($c->profil->webservice->location == 'production') ? 'production' : 'pilot';
$cWC = new Zend_Config_Ini('/Worldcheck/webservicesWC.ini', $location);
$config = $cWC->toArray();
$this->webservices = $config['webservices'];
$configWC = new Zend_Config_Ini('/Worldcheck/applicationWC.ini');
$data = $configWC->toArray();
$this->wcData = $data['worldcheck'];
}
/**
* loadClientWC
* @param string $webservice
* @return SOAP client with Header
*/
protected function loadClientWC($webservice)
{
$wsdl = $this->webservices[$webservice]['wsdl'];
$options['soap_version'] = SOAP_1_1;
$options['features'] = SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS;
$options['compression'] = SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | SOAP_COMPRESSION_DEFLATE;
$options['style'] = SOAP_DOCUMENT;
$options['use'] = SOAP_LITERAL;
$options['trace'] = true;
$options['encoding'] = 'utf-8';
$client = false;
$header = $this->headerWC();
try {
$client = new SoapClient($wsdl, $options);
$client->__setSoapHeaders($header);
} catch (Exception $e) {
throw new Exception('Application Error');
}
return $client;
}
/**
* Create security Header for WorldCheck
* @return SoapHeader
*/
protected function headerWC()
{
$headerPart = '<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">';
$headerPart .= '<wsse:UsernameToken wsu:Id="UsernameToken-19" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">';
$headerPart .= '<wsse:Username>'.$this->wcData['username'].'</wsse:Username>';
$headerPart .= '<wsse:Password Type="'.$this->wcData['passwordType'].'">'.$this->wcData['password'].'</wsse:Password>';
$headerPart .= '</wsse:UsernameToken></wsse:Security>';
$headerVar = new SoapVar($headerPart, XSD_ANYXML);
$header = new SoapHeader($this->wcData['namespace'], $this->wcData['securityType'], $headerVar, true);
return $header;
}
//**** SCREENER WSDL ****//
/**
* getScreener
* @param object $data
* @return NameIdentifier
*/
public function getScreener($data)
{
$params = new stdClass();
$params->screenRequest = $data;
$params->screenRequest->groupIdentifier = $this->wcData['groupIdentifier'];
$params->screenRequest->assigneeIdentifier = $this->wcData['assigneeIdentifier'];
$client = $this->loadClientWC('screener');
try {
return $client->screen($params)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
//**** CONTENT WSDL ****//
/**
* getContentSources
* @return Content Sources
*/
public function getContentSources()
{
$client = $this->loadClientWC('content');
try {
return $client->getContentSources()->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
/**
* getDetails
* @param string matchIdentifier
* @return object content
*/
public function getDetailsContent($matchIdentifier)
{
$client = $this->loadClientWC('content');
$param = new stdClass();
$param->matchIdentifier = $matchIdentifier;
try {
return $client->getDetails($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
/**
* getSummaries
* @param object
* @return object content
*/
public function getSummaries($data)
{
$client = $this->loadClientWC('content');
$param = new stdClass();
$param->matchIdentifier = $data->matchIdentifier;
$param->matchType = $data->matchType; // value must be watchlist
$param->start = $data->start;
$param->limit = $data->limit;
try {
return $client->getSummaries($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
/**
* getSummariesForMatch
* @param string matchIdentifier
* @return object content
*/
public function getSummariesForMatch($matchIdentifier)
{
$client = $this->loadClientWC('content');
$param = new stdClass();
$param->matchIdentifier = $matchIdentifier;
try {
return $client->getSummariesForMatch($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
/**
* getTitles
* @param object
* @return object content
*/
public function getTitles($data)
{
$client = $this->loadClientWC('content');
$param = new stdClass();
$param->matchIdentifier = $data->matchIdentifier;
$param->matchType = $data->matchType; // value must be watchlist
$param->start = $data->start;
$param->limit = $data->limit;
try {
return $client->getTitles($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
/**
* getTitlesForMatch
* @param string matchIdentifier
* @return object content
*/
public function getTitlesForMatch($matchIdentifier)
{
$client = $this->loadClientWC('content');
$param = new stdClass();
$param->matchIdentifier = $matchIdentifier;
try {
return $client->getTitlesForMatch($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
//**** USER WSDL ****//
/**
* change My Password
* @param string new password
* @return boolean
*/
public function changeMyPassword($newPassword)
{
$client = $this->loadClientWC('user');
$param = new stdClass();
$param->newPassword = $newPassword;
try {
return $client->changeMyPassword($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
/**
* reset Password
* @param string username
* @return new password
*/
public function resetPassword($username)
{
$client = $this->loadClientWC('user');
$param = new stdClass();
$param->username = $username;
try {
return $client->resetPassword($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
/**
* get Usernames
* @param string userIdentifier
* @return object userNames
*/
public function getUserNames($userIdentifier)
{
$client = $this->loadClientWC('user');
$param = new stdClass();
$param->userIdentifierList->userIdentifiers->userIdentifier = $userIdentifier;
try {
return $client->getUserNames($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
//**** PREFERENCE WSDL ****//
/**
* getAllGroupConfingVariables
* @param string groupIdentifier
* @return object preference
*/
public function getAllGroupConfingVariables($groupIdentifier)
{
$client = $this->loadClientWC('preference');
$param = new stdClass();
$param->groupIdentifier = $groupIdentifier;
try {
return $client->getAllGroupConfingVariables($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
/**
* getGroupConfigVariable
* @param string groupIdentifier
* @return object preferenceValues
*/
public function getGroupConfigVariable($groupIdentifier, $groupConfigVariableType)
{
$client = $this->loadClientWC('preference');
$param = new stdClass();
$param->groupIdentifier = $groupIdentifier;
$param->groupConfigVariableType = $groupConfigVariableType;
try {
return $client->getGroupConfigVariable($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
/**
* getGroupConfigVariables
* @param string groupIdentifier
* @param string groupConfigVariableType
* @return object preferenceValues
*/
public function getGroupConfigVariables($groupIdentifier, $groupConfigVariableType)
{
$client = $this->loadClientWC('preference');
$param = new stdClass();
$param->groupIdentifier = $groupIdentifier;
$param->groupConfigVariableTypeSet->groupConfigVariableTypes->groupConfigVariableType = $groupConfigVariableType;
try {
return $client->getGroupConfigVariables($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
//**** STOREDNAME WSDL ****//
/**
* getStoredNameModel
* @param string groupIdentifier
* @return object
*/
public function getStoredNameModel($groupIdentifier)
{
$client = $this->loadClientWC('storedName');
$param = new stdClass();
$param->groupIdentifier = $groupIdentifier;
try {
return $client->getStoredNameModel($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
/**
* getStoredNameModelForAllGroups
* @return object
*/
public function getStoredNameModelForAllGroups()
{
$client = $this->loadClientWC('storedName');
try {
return $client->getStoredNameModelForAllGroups()->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
/**
* getStoredNameModelGroups
* @return object
*/
public function getStoredNameModelGroups()
{
$client = $this->loadClientWC('storedName');
try {
return $client->getStoredNameModelGroups()->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
/**
* getUserFilters
* @return object
*/
public function getUserFilters()
{
$client = $this->loadClientWC('storedName');
try {
return $client->getUserFilters()->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
//**** NAME WSDL ****//
/**
* addNote
* @param string nameIdentifier
* @param string note
* @return string [success]
*/
public function addNoteName($nameIdentifier, $note)
{
$client = $this->loadClientWC('name');
$param = new stdClass();
$param->nameIdentifierList->nameIdentifiers->nameIdentifier = $nameIdentifier;
$param->note = $note;
try {
return $client->addNote($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
/**
* archive
* @param string nameIdentifier
* @return string [success]
*/
public function archive($nameIdentifier)
{
$client = $this->loadClientWC('name');
$param = new stdClass();
$param->nameIdentifierList->nameIdentifiers->nameIdentifier = $nameIdentifier;
try {
return $client->archive($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
/**
* delete
* @param string nameIdentifier
* @return string [success]
*/
public function delete($nameIdentifier)
{
$client = $this->loadClientWC('name');
$param = new stdClass();
$param->nameIdentifierList->nameIdentifiers->nameIdentifier = $nameIdentifier;
try {
return $client->delete($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
/**
* assign
* @param string nameIdentifier
* @param string assigneeIdentifier
* @return string [success]
*/
public function assign($nameIdentifier, $assigneeIdentifier)
{
$client = $this->loadClientWC('name');
$param = new stdClass();
$param->nameIdentifierList->nameIdentifiers->nameIdentifier = $nameIdentifier;
$param->assigneeIdentifier = $assigneeIdentifier;
try {
return $client->assign($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
/**
* unassign
* @param string nameIdentifier
* @return string [success]
*/
public function unassign($nameIdentifier)
{
$client = $this->loadClientWC('name');
$param = new stdClass();
$param->nameIdentifierList->nameIdentifiers->nameIdentifier = $nameIdentifier;
try {
return $client->unassign($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
/**
* changeOwner
* @param string nameIdentifier
* @param string ownerIdentifier
* @return object
*/
public function changeOwner($nameIdentifier, $ownerIdentifier)
{
$client = $this->loadClientWC('name');
$param = new stdClass();
$param->nameIdentifierList->nameIdentifiers->nameIdentifier = $nameIdentifier;
$param->ownerIdentifier = $ownerIdentifier;
try {
return $client->changeOwner($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
/**
* getDetailsName
* @param string nameIdentifier
* @return object
*/
public function getDetailsName($nameIdentifier)
{
$client = $this->loadClientWC('name');
$param = new stdClass();
$param->nameIdentifier = $nameIdentifier;
try {
return $client->getDetails($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
/**
* getMatches
* @param string nameIdentifier
* @param string matchType
* @param int start
* @param int limit
* @return object
*/
public function getMatchesName($nameIdentifier, $matchType, $start, $limit)
{
$client = $this->loadClientWC('name');
$param = new stdClass();
$param->nameIdentifier = $nameIdentifier;
$param->matchType = $matchType;
$param->start = $start;
$param->limit = $limit;
try {
return $client->getMatches($param)->return->matches;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
/**
* getSelectableAssignees
* @param string groupIdentifier
* @return object
*/
public function getSelectableAssignees($groupIdentifier)
{
$client = $this->loadClientWC('name');
$param = new stdClass();
$param->groupIdentifier = $groupIdentifier;
try {
return $client->getSelectableAssignees($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
/**
* getSelectableGroups
* @return object
*/
public function getSelectableGroups()
{
$client = $this->loadClientWC('name');
try {
return $client->getSelectableGroups()->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
/**
* getSelectableOwners
* @return object
*/
public function getSelectableOwners($groupIdentifier, $nameSystemStatus)
{
$client = $this->loadClientWC('name');
$param = new stdClass();
$param->groupIdentifier = $groupIdentifier;
$param->nameSystemStatus = $nameSystemStatus;
try {
return $client->getSelectableOwners($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
/**
* saveForOngoingScreening
* @param string nameIdentifier
* @param string ownerIdentifier
* @return object
*/
public function saveForOngoingScreening($nameIdentifier)
{
$client = $this->loadClientWC('name');
$param = new stdClass();
$param->nameIdentifierList->nameIdentifiers->nameIdentifier = $nameIdentifier;
try {
return $client->saveForOngoingScreening($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
//**** MATCH WSDL ****//
/**
* acknoledge
* @param string matchIdentifier
* @param string note
* @return object
*/
public function acknoledge($matchIdentifier, $note)
{
$client = $this->loadClientWC('match');
$param = new stdClass();
$param->matchIdentifierList->matchIdentifiers->matchIdentifier = $matchIdentifier;
$param->note = $note;
try {
return $client->acknoledge($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
/**
* addNote
* @param string matchIdentifier
* @param string note
* @return object
*/
public function addNote($matchIdentifier, $note)
{
$client = $this->loadClientWC('match');
$param = new stdClass();
$param->matchIdentifierList = new stdClass();
$param->matchIdentifierList->matchIdentifiers = new stdClass();
$param->matchIdentifierList->matchIdentifiers->matchIdentifier = $matchIdentifier;
$param->note = $note;
try {
return $client->addNote($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
/**
* getDetailsMatch
* @param string matchIdentifier
* @return object
*/
public function getDetailsMatch($matchIdentifier)
{
$client = $this->loadClientWC('match');
$param = new stdClass();
$param->matchIdentifier = $matchIdentifier;
try {
return $client->getDetails($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
/**
* getNewUpdatedNameModel
* @param string groupIdentifier
* @return object
*/
public function getNewUpdatedNameModel($groupIdentifier)
{
$client = $this->loadClientWC('match');
$param = new stdClass();
$param->groupIdentifier = $groupIdentifier;
try {
return $client->getNewUpdatedNameModel($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
/**
* getNewUpdatedNameModelForAllGroups
* @return object
*/
public function getNewUpdatedNameModelForAllGroups()
{
$client = $this->loadClientWC('match');
try {
return $client->getNewUpdatedNameModelForAllGroups()->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
/**
* getNewUpdatedNameModelGroups
* @return object
*/
public function getNewUpdatedNameModelGroups()
{
$client = $this->loadClientWC('match');
try {
return $client->getNewUpdatedNameModelGroups()->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
/**
* getNewUpdatedNames
* @param object $data
* @return object
*/
public function getNewUpdatedNames($data)
{
$client = $this->loadClientWC('match');
$param = new stdClass();
//to be continued
try {
return $client->getNewUpdatedNames($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
/**
* resolve
* @param object $data
* @return object
*/
public function resolve($data)
{
$client = $this->loadClientWC('match');
$param = new stdClass();
$param->matchIdentifierList->matchIdentifiers->matchIdentifier = $data->matchIdentifier;
$param->matchRisk = $data->matchRisk;
$param->matchStatus = $data->matchStatus;
$param->note = $data->note;
try {
return $client->resolve($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
return false;
}
}
}
}

View File

@ -0,0 +1,7 @@
worldcheck.username = ylenaour@scores-decisions.com
worldcheck.password = accelus
worldcheck.passwordType = http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText
worldcheck.namespace = http://screening.complinet.com/
worldcheck.securityType = Security
worldcheck.groupIdentifier = cng_so_64
worldcheck.assigneeIdentifier = cnu_so_77

View File

@ -0,0 +1,25 @@
[pilot]
webservices.actionLog.wsdl = "https://screeningpilot.accelus.com/pilot-v1/actionLog?wsdl"
webservices.batch.wsdl = "https://screeningpilot.accelus.com/pilot-v1/batch?wsdl"
webservices.name.wsdl = "https://screeningpilot.accelus.com/pilot-v1/name?wsdl"
webservices.screener.wsdl = "https://screeningpilot.accelus.com/pilot-v1/screener?wsdl"
webservices.storedName.wsdl = "https://screeningpilot.accelus.com/pilot-v1/storedName?wsdl"
webservices.content.wsdl = "https://screeningpilot.accelus.com/pilot-v1/content?wsdl"
webservices.group.wsdl = "https://screeningpilot.accelus.com/pilot-v1/group?wsdl"
webservices.preference.wsdl = "https://screeningpilot.accelus.com/pilot-v1/preference?wsdl"
webservices.role.wsdl = "https://screeningpilot.accelus.com/pilot-v1/role?wsdl"
webservices.user.wsdl = "https://screeningpilot.accelus.com/pilot-v1/user?wsdl"
webservices.match.wsdl = "https://screeningpilot.accelus.com/pilot-v1/match?wsdl"
[production]
webservices.actionLog.wsdl = "https://screening.complinet.com/soap/v1/actionLog?wsdl"
webservices.batch.wsdl = "https://screening.complinet.com/soap/v1/batch?wsdl"
webservices.name.wsdl = "https://screening.complinet.com/soap/v1/name?wsdl"
webservices.screener.wsdl = "https://screening.complinet.com/soap/v1/screener?wsdl"
webservices.storedName.wsdl = "https://screening.complinet.com/soap/v1/storedName?wsdl"
webservices.content.wsdl = "https://screening.complinet.com/soap/v1/content?wsdl"
webservices.group.wsdl = "https://screening.complinet.com/soap/v1/group?wsdl"
webservices.preference.wsdl = "https://screening.complinet.com/soap/v1/preference?wsdl"
webservices.role.wsdl = "https://screening.complinet.com/soap/v1/role?wsdl"
webservices.user.wsdl = "https://screening.complinet.com/soap/v1/user?wsdl"
webservices.match.wsdl = "https://screening.complinet.com/soap/v1/match?wsdl"

View File

@ -17,7 +17,7 @@
* @subpackage Parse_Amf0
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Serializer.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id: Serializer.php 25179 2012-12-22 21:29:30Z rob $
*/
/** Zend_Amf_Constants */
@ -127,7 +127,7 @@ class Zend_Amf_Parse_Amf0_Serializer extends Zend_Amf_Parse_Serializer
case (is_bool($data)):
$markerType = Zend_Amf_Constants::AMF0_BOOLEAN;
break;
case (is_string($data) && (strlen($data) > 65536)):
case (is_string($data) && (($this->_mbStringFunctionsOverloaded ? mb_strlen($data, '8bit') : strlen($data)) > 65536)):
$markerType = Zend_Amf_Constants::AMF0_LONGSTRING;
break;
case (is_string($data)):

View File

@ -17,7 +17,7 @@
* @subpackage Parse_Amf3
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Serializer.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id: Serializer.php 25179 2012-12-22 21:29:30Z rob $
*/
/** Zend_Amf_Constants */
@ -215,7 +215,7 @@ class Zend_Amf_Parse_Amf3_Serializer extends Zend_Amf_Parse_Serializer
* @return Zend_Amf_Parse_Amf3_Serializer
*/
protected function writeBinaryString(&$string){
$ref = strlen($string) << 1 | 0x01;
$ref = ($this->_mbStringFunctionsOverloaded ? mb_strlen($string, '8bit') : strlen($string)) << 1 | 0x01;
$this->writeInteger($ref);
$this->_stream->writeBytes($string);
@ -230,7 +230,7 @@ class Zend_Amf_Parse_Amf3_Serializer extends Zend_Amf_Parse_Serializer
*/
public function writeString(&$string)
{
$len = strlen($string);
$len = $this->_mbStringFunctionsOverloaded ? mb_strlen($string, '8bit') : strlen($string);
if(!$len){
$this->writeInteger(0x01);
return $this;

View File

@ -17,7 +17,7 @@
* @subpackage Parse
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Serializer.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id: Serializer.php 25179 2012-12-22 21:29:30Z rob $
*/
/**
@ -37,6 +37,13 @@ abstract class Zend_Amf_Parse_Serializer
*/
protected $_stream;
/**
* str* functions overloaded using mbstring.func_overload
*
* @var bool
*/
protected $mbStringFunctionsOverloaded;
/**
* Constructor
*
@ -46,6 +53,7 @@ abstract class Zend_Amf_Parse_Serializer
public function __construct(Zend_Amf_Parse_OutputStream $stream)
{
$this->_stream = $stream;
$this->_mbStringFunctionsOverloaded = function_exists('mb_strlen') && (ini_get('mbstring.func_overload') !== '') && ((int)ini_get('mbstring.func_overload') & 2);
}
/**

View File

@ -17,7 +17,7 @@
* @subpackage Util
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: BinaryStream.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id: BinaryStream.php 25241 2013-01-22 11:07:36Z frosch $
*/
/**
@ -50,6 +50,11 @@ class Zend_Amf_Util_BinaryStream
*/
protected $_needle;
/**
* @var bool str* functions overloaded using mbstring.func_overload?
*/
protected $_mbStringFunctionsOverloaded;
/**
* Constructor
*
@ -69,7 +74,8 @@ class Zend_Amf_Util_BinaryStream
$this->_stream = $stream;
$this->_needle = 0;
$this->_streamLength = strlen($stream);
$this->_mbStringFunctionsOverloaded = function_exists('mb_strlen') && (ini_get('mbstring.func_overload') !== '') && ((int)ini_get('mbstring.func_overload') & 2);
$this->_streamLength = $this->_mbStringFunctionsOverloaded ? mb_strlen($stream, '8bit') : strlen($stream);
$this->_bigEndian = (pack('l', 1) === "\x00\x00\x00\x01");
}
@ -97,7 +103,7 @@ class Zend_Amf_Util_BinaryStream
require_once 'Zend/Amf/Exception.php';
throw new Zend_Amf_Exception('Buffer underrun at needle position: ' . $this->_needle . ' while requesting length: ' . $length);
}
$bytes = substr($this->_stream, $this->_needle, $length);
$bytes = $this->_mbStringFunctionsOverloaded ? mb_substr($this->_stream, $this->_needle, $length, '8bit') : substr($this->_stream, $this->_needle, $length);
$this->_needle+= $length;
return $bytes;
}
@ -120,12 +126,18 @@ class Zend_Amf_Util_BinaryStream
* Reads a signed byte
*
* @return int Value is in the range of -128 to 127.
* @throws Zend_Amf_Exception
*/
public function readByte()
{
if (($this->_needle + 1) > $this->_streamLength) {
require_once 'Zend/Amf/Exception.php';
throw new Zend_Amf_Exception('Buffer underrun at needle position: ' . $this->_needle . ' while requesting length: ' . $length);
throw new Zend_Amf_Exception(
'Buffer underrun at needle position: '
. $this->_needle
. ' while requesting length: '
. $this->_streamLength
);
}
return ord($this->_stream{$this->_needle++});
@ -184,7 +196,7 @@ class Zend_Amf_Util_BinaryStream
*/
public function writeUtf($stream)
{
$this->writeInt(strlen($stream));
$this->writeInt($this->_mbStringFunctionsOverloaded ? mb_strlen($stream, '8bit') : strlen($stream));
$this->_stream.= $stream;
return $this;
}
@ -209,7 +221,7 @@ class Zend_Amf_Util_BinaryStream
*/
public function writeLongUtf($stream)
{
$this->writeLong(strlen($stream));
$this->writeLong($this->_mbStringFunctionsOverloaded ? mb_strlen($stream, '8bit') : strlen($stream));
$this->_stream.= $stream;
}
@ -255,7 +267,7 @@ class Zend_Amf_Util_BinaryStream
*/
public function readDouble()
{
$bytes = substr($this->_stream, $this->_needle, 8);
$bytes = $this->_mbStringFunctionsOverloaded ? mb_substr($this->_stream, $this->_needle, 8, '8bit') : substr($this->_stream, $this->_needle, 8);
$this->_needle+= 8;
if (!$this->_bigEndian) {

View File

@ -16,7 +16,7 @@
* @package Zend_Config
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Yaml.php 24807 2012-05-15 12:10:42Z adamlundrigan $
* @version $Id: Yaml.php 25169 2012-12-22 12:23:11Z rob $
*/
/**
@ -375,6 +375,8 @@ class Zend_Config_Yaml extends Zend_Config
$value = true;
} elseif (preg_match('/^(f(alse)?|off|n(o)?)$/i', $value)) {
$value = false;
} elseif (strcasecmp($value, 'null') === 0) {
$value = null;
} elseif (!self::$_ignoreConstants) {
// test for constants
$value = self::_replaceConstants($value);

View File

@ -16,7 +16,7 @@
* @package Zend_Controller
* @subpackage Router
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @version $Id: Chain.php 25071 2012-11-06 19:07:27Z rob $
* @version $Id: Chain.php 25249 2013-02-06 09:54:24Z frosch $
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
@ -39,7 +39,8 @@ class Zend_Controller_Router_Route_Chain extends Zend_Controller_Router_Route_Ab
/**
* Instantiates route based on passed Zend_Config structure
*
* @param Zend_Config $config Configuration object
* @param Zend_Config $config Configuration object
* @return Zend_Controller_Router_Route_Chain
*/
public static function getInstance(Zend_Config $config)
{
@ -68,14 +69,16 @@ class Zend_Controller_Router_Route_Chain extends Zend_Controller_Router_Route_Ab
* Assigns and returns an array of defaults on a successful match.
*
* @param Zend_Controller_Request_Http $request Request to get the path info from
* @param null $partial
* @return array|false An array of assigned values or a false on a mismatch
*/
public function match($request, $partial = null)
{
$path = trim($request->getPathInfo(), self::URI_DELIMITER);
$subPath = $path;
$values = array();
$numRoutes = count($this->_routes);
$path = trim($request->getPathInfo(), self::URI_DELIMITER);
$subPath = $path;
$values = array();
$numRoutes = count($this->_routes);
$matchedPath = null;
foreach ($this->_routes as $key => $route) {
if ($key > 0
@ -127,7 +130,9 @@ class Zend_Controller_Router_Route_Chain extends Zend_Controller_Router_Route_Ab
/**
* Assembles a URL path defined by this route
*
* @param array $data An array of variable and value pairs used as parameters
* @param array $data An array of variable and value pairs used as parameters
* @param bool $reset
* @param bool $encode
* @return string Route path with user submitted parameters
*/
public function assemble($data = array(), $reset = false, $encode = false)
@ -170,5 +175,42 @@ class Zend_Controller_Router_Route_Chain extends Zend_Controller_Router_Route_Ab
}
}
}
/**
* Return a single parameter of route's defaults
*
* @param string $name Array key of the parameter
* @return string Previously set default
*/
public function getDefault($name)
{
$default = null;
foreach ($this->_routes as $route) {
if (method_exists($route, 'getDefault')) {
$current = $route->getDefault($name);
if (null !== $current) {
$default = $current;
}
}
}
}
return $default;
}
/**
* Return an array of defaults
*
* @return array Route defaults
*/
public function getDefaults()
{
$defaults = array();
foreach ($this->_routes as $route) {
if (method_exists($route, 'getDefaults')) {
$defaults = array_merge($defaults, $route->getDefaults());
}
}
return $defaults;
}
}

View File

@ -17,7 +17,7 @@
* @subpackage Adapter
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Abstract.php 24666 2012-02-27 02:17:19Z adamlundrigan $
* @version $Id: Abstract.php 25229 2013-01-18 08:17:21Z frosch $
*/
@ -156,6 +156,7 @@ abstract class Zend_Db_Adapter_Abstract
* persistent => (boolean) Whether to use a persistent connection or not, defaults to false
* protocol => (string) The network protocol, defaults to TCPIP
* caseFolding => (int) style of case-alteration used for identifiers
* socket => (string) The socket or named pipe that should be used
*
* @param array|Zend_Config $config An array or instance of Zend_Config having configuration data
* @throws Zend_Db_Adapter_Exception

View File

@ -17,7 +17,7 @@
* @subpackage Adapter
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Mysqli.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id: Mysqli.php 25229 2013-01-18 08:17:21Z frosch $
*/
@ -297,6 +297,12 @@ class Zend_Db_Adapter_Mysqli extends Zend_Db_Adapter_Abstract
$port = null;
}
if (isset($this->_config['socket'])) {
$socket = $this->_config['socket'];
} else {
$socket = null;
}
$this->_connection = mysqli_init();
if(!empty($this->_config['driver_options'])) {
@ -320,7 +326,8 @@ class Zend_Db_Adapter_Mysqli extends Zend_Db_Adapter_Abstract
$this->_config['username'],
$this->_config['password'],
$this->_config['dbname'],
$port
$port,
$socket
);
if ($_isConnected === false || mysqli_connect_errno()) {

View File

@ -261,8 +261,8 @@ abstract class Zend_Feed_Abstract extends Zend_Feed_Element implements Iterator,
* Import a feed from a string
*
* Protects against XXE attack vectors.
*
* @param string $feed
*
* @param string $feed
* @return string
* @throws Zend_Feed_Exception on detection of an XXE vector
*/
@ -270,7 +270,7 @@ abstract class Zend_Feed_Abstract extends Zend_Feed_Element implements Iterator,
{
// Load the feed as an XML DOMDocument object
$libxml_errflag = libxml_use_internal_errors(true);
//$libxml_entity_loader = libxml_disable_entity_loader(true);
$libxml_entity_loader = libxml_disable_entity_loader(true);
$doc = new DOMDocument;
if (trim($feed) == '') {
require_once 'Zend/Feed/Exception.php';
@ -278,7 +278,7 @@ abstract class Zend_Feed_Abstract extends Zend_Feed_Element implements Iterator,
. ' is an Empty string or comes from an empty HTTP response');
}
$status = $doc->loadXML($feed);
//libxml_disable_entity_loader($libxml_entity_loader);
libxml_disable_entity_loader($libxml_entity_loader);
libxml_use_internal_errors($libxml_errflag);
if (!$status) {

View File

@ -16,7 +16,7 @@
* @package Zend_Feed_Reader
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Reader.php 25103 2012-11-07 20:29:29Z rob $
* @version $Id: Reader.php 25275 2013-03-06 09:55:33Z frosch $
*/
/**
@ -443,7 +443,9 @@ class Zend_Feed_Reader
* Detect the feed type of the provided feed
*
* @param Zend_Feed_Abstract|DOMDocument|string $feed
* @param bool $specOnly
* @return string
* @throws Zend_Feed_Exception
*/
public static function detectType($feed, $specOnly = false)
{

View File

@ -16,7 +16,7 @@
* @package Zend_Feed_Reader
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: EntryAbstract.php 25024 2012-07-30 15:08:15Z rob $
* @version $Id: EntryAbstract.php 25275 2013-03-06 09:55:33Z frosch $
*/
/**
@ -72,9 +72,9 @@ abstract class Zend_Feed_Reader_EntryAbstract
/**
* Constructor
*
* @param DOMElement $entry
* @param int $entryKey
* @param string $type
* @param DOMElement $entry
* @param int $entryKey
* @param string|null $type
* @return void
*/
public function __construct(DOMElement $entry, $entryKey, $type = null)
@ -85,7 +85,9 @@ abstract class Zend_Feed_Reader_EntryAbstract
if ($type !== null) {
$this->_data['type'] = $type;
} else {
$this->_data['type'] = Zend_Feed_Reader::detectType($feed);
$this->_data['type'] = Zend_Feed_Reader::detectType(
$this->_domDocument
);
}
$this->_loadExtensions();
}
@ -212,8 +214,10 @@ abstract class Zend_Feed_Reader_EntryAbstract
}
}
require_once 'Zend/Feed/Exception.php';
throw new Zend_Feed_Exception('Method: ' . $method
. 'does not exist and could not be located on a registered Extension');
throw new Zend_Feed_Exception(
'Method: ' . $method
. 'does not exist and could not be located on a registered Extension'
);
}
/**

View File

@ -28,7 +28,7 @@ require_once 'Zend/Validate/Interface.php';
* @package Zend_Form
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Form.php 25117 2012-11-08 19:28:39Z rob $
* @version $Id: Form.php 25223 2013-01-17 14:44:54Z frosch $
*/
class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
{
@ -353,6 +353,11 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
unset($options['attribs']);
}
if (isset($options['subForms'])) {
$this->addSubForms($options['subForms']);
unset($options['subForms']);
}
$forbidden = array(
'Options', 'Config', 'PluginLoader', 'SubForms', 'Translator',
'Attrib', 'Default',
@ -1022,7 +1027,9 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
if (is_string($element)) {
if (null === $name) {
require_once 'Zend/Form/Exception.php';
throw new Zend_Form_Exception('Elements specified by string must have an accompanying name');
throw new Zend_Form_Exception(
'Elements specified by string must have an accompanying name'
);
}
$this->_elements[$name] = $this->createElement($element, $name, $options);
@ -1033,6 +1040,12 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
$prefixPaths = array_merge($prefixPaths, $this->_elementPrefixPaths);
}
if (is_array($this->_elementDecorators)
&& 0 == count($element->getDecorators())
) {
$element->setDecorators($this->_elementDecorators);
}
if (null === $name) {
$name = $element->getName();
}
@ -1041,7 +1054,9 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
$this->_elements[$name]->addPrefixPaths($prefixPaths);
} else {
require_once 'Zend/Form/Exception.php';
throw new Zend_Form_Exception('Element must be specified by string or Zend_Form_Element instance');
throw new Zend_Form_Exception(
'Element must be specified by string or Zend_Form_Element instance'
);
}
$this->_order[$name] = $this->_elements[$name]->getOrder();
@ -1640,7 +1655,7 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
public function addSubForms(array $subForms)
{
foreach ($subForms as $key => $spec) {
$name= (string) $key;
$name = (string) $key;
if ($spec instanceof Zend_Form) {
$this->addSubForm($spec, $name);
continue;
@ -1654,6 +1669,10 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
continue;
case (1 <= $argc):
$subForm = array_shift($spec);
if (!$subForm instanceof Zend_Form) {
$subForm = new Zend_Form_SubForm($subForm);
}
case (2 <= $argc):
$name = array_shift($spec);
case (3 <= $argc):
@ -2460,9 +2479,20 @@ class Zend_Form implements Iterator, Countable, Zend_Validate_Interface
/**
* Are there errors in the form?
*
* @deprecated since 1.11.1 - use hasErrors() instead
* @return bool
*/
public function isErrors()
{
return $this->hasErrors();
}
/**
* Are there errors in the form?
*
* @return bool
*/
public function hasErrors()
{
return $this->_errorsExist;
}

View File

@ -32,7 +32,7 @@ require_once 'Zend/Form/Decorator/Abstract.php';
* @subpackage Decorator
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Errors.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id: Errors.php 25253 2013-02-12 14:09:16Z frosch $
*/
class Zend_Form_Decorator_Errors extends Zend_Form_Decorator_Abstract
{
@ -50,7 +50,15 @@ class Zend_Form_Decorator_Errors extends Zend_Form_Decorator_Abstract
return $content;
}
$errors = $element->getMessages();
// Get error messages
if ($element instanceof Zend_Form
&& null !== $element->getElementsBelongTo()
) {
$errors = $element->getMessages(null, true);
} else {
$errors = $element->getMessages();
}
if (empty($errors)) {
return $content;
}

View File

@ -34,7 +34,7 @@ require_once 'Zend/Form/Decorator/Abstract.php';
* @subpackage Decorator
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: FormErrors.php 24869 2012-06-02 02:09:54Z adamlundrigan $
* @version $Id: FormErrors.php 25257 2013-02-13 16:47:18Z frosch $
*/
class Zend_Form_Decorator_FormErrors extends Zend_Form_Decorator_Abstract
{
@ -457,6 +457,11 @@ class Zend_Form_Decorator_FormErrors extends Zend_Form_Decorator_Abstract
$label = $element->getLabel();
if (empty($label)) {
$label = $element->getName();
// Translate element name
if (null !== ($translator = $element->getTranslator())) {
$label = $translator->translate($label);
}
}
if ($this->getEscape()) {

View File

@ -42,7 +42,7 @@ require_once 'Zend/Form/Decorator/Abstract.php';
* @subpackage Decorator
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Label.php 24846 2012-05-31 19:12:45Z rob $
* @version $Id: Label.php 25243 2013-01-22 12:07:26Z frosch $
*/
class Zend_Form_Decorator_Label extends Zend_Form_Decorator_Abstract
{
@ -308,10 +308,6 @@ class Zend_Form_Decorator_Label extends Zend_Form_Decorator_Abstract
return '';
}
if (null !== ($translator = $element->getTranslator())) {
$label = $translator->translate($label);
}
$optPrefix = $this->getOptPrefix();
$optSuffix = $this->getOptSuffix();
$reqPrefix = $this->getReqPrefix();

View File

@ -39,7 +39,7 @@ require_once 'Zend/Form/Decorator/Abstract.php';
* @subpackage Decorator
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: ViewHelper.php 24873 2012-06-02 02:54:34Z adamlundrigan $
* @version $Id: ViewHelper.php 25189 2013-01-08 08:32:43Z frosch $
*/
class Zend_Form_Decorator_ViewHelper extends Zend_Form_Decorator_Abstract
{
@ -196,7 +196,8 @@ class Zend_Form_Decorator_ViewHelper extends Zend_Form_Decorator_Abstract
if ($element instanceof $type) {
if (stristr($type, 'button')) {
$element->content = $element->getLabel();
return null;
return $element->getValue();
}
return $element->getLabel();
}

View File

@ -38,7 +38,7 @@ require_once 'Zend/Validate/Abstract.php';
* @subpackage Element
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Element.php 25075 2012-11-06 19:44:47Z rob $
* @version $Id: Element.php 25173 2012-12-22 20:05:32Z rob $
*/
class Zend_Form_Element implements Zend_Validate_Interface
{
@ -2242,14 +2242,14 @@ class Zend_Form_Element implements Zend_Validate_Interface
if (null !== $translator) {
$message = $translator->translate($message);
}
if (($this->isArray() || is_array($value))
&& !empty($value)
) {
if ($this->isArray() || is_array($value)) {
$aggregateMessages = array();
foreach ($value as $val) {
$aggregateMessages[] = str_replace('%value%', $val, $message);
}
$messages[$key] = implode($this->getErrorMessageSeparator(), $aggregateMessages);
if (count($aggregateMessages)) {
$messages[$key] = implode($this->getErrorMessageSeparator(), $aggregateMessages);
}
} else {
$messages[$key] = str_replace('%value%', $value, $message);
}

View File

@ -30,7 +30,7 @@ require_once 'Zend/Form/Element/Submit.php';
* @subpackage Element
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Button.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id: Button.php 25189 2013-01-08 08:32:43Z frosch $
*/
class Zend_Form_Element_Button extends Zend_Form_Element_Submit
{
@ -39,4 +39,18 @@ class Zend_Form_Element_Button extends Zend_Form_Element_Submit
* @var string
*/
public $helper = 'formButton';
/**
* Validate element value (pseudo)
*
* There is no need to reset the value
*
* @param mixed $value Is always ignored
* @param mixed $context Is always ignored
* @return boolean Returns always TRUE
*/
public function isValid($value, $context = null)
{
return true;
}
}

View File

@ -29,7 +29,7 @@ require_once 'Zend/Form/Element/Xhtml.php';
* @subpackage Element
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: File.php 24848 2012-05-31 19:28:48Z rob $
* @version $Id: File.php 25225 2013-01-17 15:59:16Z frosch $
*/
class Zend_Form_Element_File extends Zend_Form_Element_Xhtml
{
@ -431,7 +431,7 @@ class Zend_Form_Element_File extends Zend_Form_Element_Xhtml
} else {
$adapter->setOptions(array('ignoreNoFile' => false), $this->getName());
if ($this->autoInsertNotEmptyValidator() && !$this->getValidator('NotEmpty')) {
$this->addValidator = array('validator' => 'NotEmpty', 'breakChainOnFailure' => true);
$this->addValidator('NotEmpty', true);
}
}

View File

@ -0,0 +1,64 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Form
* @subpackage Element
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
/** Zend_Form_Element_Xhtml */
require_once 'Zend/Form/Element/Xhtml.php';
/**
* Element to show an HTML note
*
* @category Zend
* @package Zend_Form
* @subpackage Element
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/
class Zend_Form_Element_Note extends Zend_Form_Element_Xhtml
{
/**
* Default form view helper to use for rendering
*
* @var string
*/
public $helper = 'formNote';
/**
* Ignore flag (used when retrieving values at form level)
*
* @var bool
*/
protected $_ignore = true;
/**
* Validate element value (pseudo)
*
* There is no need to reset the value
*
* @param mixed $value Is always ignored
* @param mixed $context Is always ignored
* @return boolean Returns always TRUE
*/
public function isValid($value, $context = null)
{
return true;
}
}

View File

@ -30,10 +30,16 @@ require_once 'Zend/Form/Element/Multi.php';
* @subpackage Element
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Select.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id: Select.php 25183 2013-01-07 17:38:54Z frosch $
*/
class Zend_Form_Element_Select extends Zend_Form_Element_Multi
{
/**
* 'multiple' attribute
* @var string
*/
public $multiple = false;
/**
* Use formSelect view helper by default
* @var string

View File

@ -18,7 +18,7 @@
* @subpackage App
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: App.php 25063 2012-11-03 14:06:07Z rob $
* @version $Id: App.php 25259 2013-02-13 17:38:12Z frosch $
*/
/**
@ -724,14 +724,14 @@ class Zend_Gdata_App
* @param string $uri
* @param Zend_Http_Client $client The client used for communication
* @param string $className The class which is used as the return type
* @param bool $useObjectMapping Enable/disable the use of XML to object mapping.
* @throws Zend_Gdata_App_Exception
* @return string|Zend_Gdata_App_Feed Returns string only if the object
* mapping has been disabled explicitly
* by passing false to the
* useObjectMapping() function.
* @return string|Zend_Gdata_App_Feed Returns string only if the fourth
* parameter ($useObjectMapping) is set
* to false.
*/
public static function import($uri, $client = null,
$className='Zend_Gdata_App_Feed')
$className='Zend_Gdata_App_Feed', $useObjectMapping = true)
{
$app = new Zend_Gdata_App($client);
$requestData = $app->prepareRequest('GET', $uri);
@ -739,7 +739,7 @@ class Zend_Gdata_App
$requestData['method'], $requestData['url']);
$feedContent = $response->getBody();
if (!$this->_useObjectMapping) {
if (false === $useObjectMapping) {
return $feedContent;
}
$feed = self::importString($feedContent, $className);

View File

@ -18,7 +18,7 @@
* @subpackage YouTube
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: VideoQuery.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id: VideoQuery.php 25185 2013-01-08 08:07:08Z frosch $
*/
/**
@ -92,7 +92,7 @@ class Zend_Gdata_YouTube_VideoQuery extends Zend_Gdata_Query
'Video ID must be set for feed of type: ' . $feedType);
} else {
$this->_url = Zend_Gdata_YouTube::VIDEO_URI . '/' . $videoId .
'responses';
'/responses';
}
break;
case 'comments':
@ -102,7 +102,7 @@ class Zend_Gdata_YouTube_VideoQuery extends Zend_Gdata_Query
'Video ID must be set for feed of type: ' . $feedType);
} else {
$this->_url = Zend_Gdata_YouTube::VIDEO_URI . '/' .
$videoId . 'comments';
$videoId . '/comments';
if ($entry !== null) {
$this->_url .= '/' . $entry;
}

View File

@ -16,7 +16,7 @@
* @category Zend
* @package Zend_Http
* @subpackage Client_Adapter
* @version $Id: Proxy.php 24818 2012-05-28 18:49:53Z rob $
* @version $Id: Proxy.php 25273 2013-03-06 08:02:21Z frosch $
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
@ -66,7 +66,7 @@ class Zend_Http_Client_Adapter_Proxy extends Zend_Http_Client_Adapter_Socket
'proxy_user' => '',
'proxy_pass' => '',
'proxy_auth' => Zend_Http_Client::AUTH_BASIC,
'persistent' => false
'persistent' => false,
);
/**
@ -96,7 +96,7 @@ class Zend_Http_Client_Adapter_Proxy extends Zend_Http_Client_Adapter_Socket
public function connect($host, $port = 80, $secure = false)
{
// If no proxy is set, fall back to Socket adapter
if (! $this->config['proxy_host']) {
if (!$this->config['proxy_host']) {
return parent::connect($host, $port, $secure);
}
@ -122,24 +122,35 @@ class Zend_Http_Client_Adapter_Proxy extends Zend_Http_Client_Adapter_Socket
* @param array $headers
* @param string $body
* @return string Request as string
* @throws Zend_Http_Client_Adapter_Exception
*/
public function write($method, $uri, $http_ver = '1.1', $headers = array(), $body = '')
public function write(
$method, $uri, $http_ver = '1.1', $headers = array(), $body = ''
)
{
// If no proxy is set, fall back to default Socket adapter
if (! $this->config['proxy_host']) return parent::write($method, $uri, $http_ver, $headers, $body);
if (!$this->config['proxy_host']) {
return parent::write($method, $uri, $http_ver, $headers, $body);
}
// Make sure we're properly connected
if (! $this->socket) {
if (!$this->socket) {
require_once 'Zend/Http/Client/Adapter/Exception.php';
throw new Zend_Http_Client_Adapter_Exception("Trying to write but we are not connected");
throw new Zend_Http_Client_Adapter_Exception(
'Trying to write but we are not connected'
);
}
$host = $this->config['proxy_host'];
$port = $this->config['proxy_port'];
if ($this->connected_to[0] != "tcp://$host" || $this->connected_to[1] != $port) {
if ($this->connected_to[0] != "tcp://$host"
|| $this->connected_to[1] != $port
) {
require_once 'Zend/Http/Client/Adapter/Exception.php';
throw new Zend_Http_Client_Adapter_Exception("Trying to write but we are connected to the wrong proxy server");
throw new Zend_Http_Client_Adapter_Exception(
'Trying to write but we are connected to the wrong proxy server'
);
}
// Add Proxy-Authorization header
@ -147,21 +158,27 @@ class Zend_Http_Client_Adapter_Proxy extends Zend_Http_Client_Adapter_Socket
// Check to see if one already exists
$hasProxyAuthHeader = false;
foreach ($headers as $k => $v) {
if ($k == 'proxy-authorization' || preg_match("/^proxy-authorization:/i", $v) ) {
if ((string) $k == 'proxy-authorization'
|| preg_match("/^proxy-authorization:/i", $v)
) {
$hasProxyAuthHeader = true;
break;
}
}
if (!$hasProxyAuthHeader) {
$headers[] = 'Proxy-authorization: ' . Zend_Http_Client::encodeAuthHeader(
$this->config['proxy_user'], $this->config['proxy_pass'], $this->config['proxy_auth']
);
$headers[] = 'Proxy-authorization: '
. Zend_Http_Client::encodeAuthHeader(
$this->config['proxy_user'],
$this->config['proxy_pass'], $this->config['proxy_auth']
);
}
}
// if we are proxying HTTPS, preform CONNECT handshake with the proxy
if ($uri->getScheme() == 'https' && (! $this->negotiated)) {
$this->connectHandshake($uri->getHost(), $uri->getPort(), $http_ver, $headers);
if ($uri->getScheme() == 'https' && (!$this->negotiated)) {
$this->connectHandshake(
$uri->getHost(), $uri->getPort(), $http_ver, $headers
);
$this->negotiated = true;
}
@ -193,15 +210,19 @@ class Zend_Http_Client_Adapter_Proxy extends Zend_Http_Client_Adapter_Socket
}
// Send the request
if (! @fwrite($this->socket, $request)) {
if (!@fwrite($this->socket, $request)) {
require_once 'Zend/Http/Client/Adapter/Exception.php';
throw new Zend_Http_Client_Adapter_Exception("Error writing request to proxy server");
throw new Zend_Http_Client_Adapter_Exception(
'Error writing request to proxy server'
);
}
if(is_resource($body)) {
if(stream_copy_to_stream($body, $this->socket) == 0) {
require_once 'Zend/Http/Client/Adapter/Exception.php';
throw new Zend_Http_Client_Adapter_Exception('Error writing request to server');
throw new Zend_Http_Client_Adapter_Exception(
'Error writing request to server'
);
}
}
@ -215,20 +236,26 @@ class Zend_Http_Client_Adapter_Proxy extends Zend_Http_Client_Adapter_Socket
* @param integer $port
* @param string $http_ver
* @param array $headers
* @return void
* @throws Zend_Http_Client_Adapter_Exception
*/
protected function connectHandshake($host, $port = 443, $http_ver = '1.1', array &$headers = array())
protected function connectHandshake(
$host, $port = 443, $http_ver = '1.1', array &$headers = array()
)
{
$request = "CONNECT $host:$port HTTP/$http_ver\r\n" .
"Host: " . $this->config['proxy_host'] . "\r\n";
// Process provided headers, including important ones to CONNECT request
foreach ( $headers as $k=>$v ) {
switch ( strtolower(substr($v,0,strpos($v,':'))) ) {
foreach ($headers as $k => $v) {
switch (strtolower(substr($v,0,strpos($v,':')))) {
case 'proxy-authorization':
// break intentionally omitted
case 'user-agent':
$request .= $v . "\r\n";
break;
default:
break;
}
@ -239,9 +266,11 @@ class Zend_Http_Client_Adapter_Proxy extends Zend_Http_Client_Adapter_Socket
$this->connectHandshakeRequest = $request;
// Send the request
if (! @fwrite($this->socket, $request)) {
if (!@fwrite($this->socket, $request)) {
require_once 'Zend/Http/Client/Adapter/Exception.php';
throw new Zend_Http_Client_Adapter_Exception("Error writing request to proxy server");
throw new Zend_Http_Client_Adapter_Exception(
'Error writing request to proxy server'
);
}
// Read response headers only
@ -251,14 +280,18 @@ class Zend_Http_Client_Adapter_Proxy extends Zend_Http_Client_Adapter_Socket
$gotStatus = $gotStatus || (strpos($line, 'HTTP') !== false);
if ($gotStatus) {
$response .= $line;
if (!chop($line)) break;
if (!chop($line)) {
break;
}
}
}
// Check that the response from the proxy is 200
if (Zend_Http_Response::extractCode($response) != 200) {
require_once 'Zend/Http/Client/Adapter/Exception.php';
throw new Zend_Http_Client_Adapter_Exception("Unable to connect to HTTPS proxy. Server response: " . $response);
throw new Zend_Http_Client_Adapter_Exception(
'Unable to connect to HTTPS proxy. Server response: ' . $response
);
}
// If all is good, switch socket to secure mode. We have to fall back
@ -273,13 +306,17 @@ class Zend_Http_Client_Adapter_Proxy extends Zend_Http_Client_Adapter_Socket
$success = false;
foreach($modes as $mode) {
$success = stream_socket_enable_crypto($this->socket, true, $mode);
if ($success) break;
if ($success) {
break;
}
}
if (! $success) {
require_once 'Zend/Http/Client/Adapter/Exception.php';
throw new Zend_Http_Client_Adapter_Exception("Unable to connect to" .
" HTTPS server through proxy: could not negotiate secure connection.");
if (!$success) {
require_once 'Zend/Http/Client/Adapter/Exception.php';
throw new Zend_Http_Client_Adapter_Exception(
'Unable to connect to HTTPS server through proxy: could not '
. 'negotiate secure connection.'
);
}
}
@ -299,6 +336,8 @@ class Zend_Http_Client_Adapter_Proxy extends Zend_Http_Client_Adapter_Socket
*/
public function __destruct()
{
if ($this->socket) $this->close();
if ($this->socket) {
$this->close();
}
}
}

View File

@ -16,7 +16,7 @@
* @package Zend_Layout
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Layout.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id: Layout.php 25263 2013-02-18 11:48:02Z frosch $
*/
/**
@ -174,12 +174,12 @@ class Zend_Layout
{
if (null === self::$_mvcInstance) {
self::$_mvcInstance = new self($options, true);
}
if (is_string($options)) {
self::$_mvcInstance->setLayoutPath($options);
} elseif (is_array($options) || $options instanceof Zend_Config) {
self::$_mvcInstance->setOptions($options);
} else {
if (is_string($options)) {
self::$_mvcInstance->setLayoutPath($options);
} elseif (is_array($options) || $options instanceof Zend_Config) {
self::$_mvcInstance->setOptions($options);
}
}
return self::$_mvcInstance;

View File

@ -17,7 +17,7 @@
* @subpackage Writer
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Db.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id: Db.php 25247 2013-02-01 17:49:40Z frosch $
*/
/** Zend_Log_Writer_Abstract */
@ -29,7 +29,7 @@ require_once 'Zend/Log/Writer/Abstract.php';
* @subpackage Writer
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Db.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id: Db.php 25247 2013-02-01 17:49:40Z frosch $
*/
class Zend_Log_Writer_Db extends Zend_Log_Writer_Abstract
{
@ -38,21 +38,21 @@ class Zend_Log_Writer_Db extends Zend_Log_Writer_Abstract
*
* @var Zend_Db_Adapter
*/
private $_db;
protected $_db;
/**
* Name of the log table in the database
*
* @var string
*/
private $_table;
protected $_table;
/**
* Relates database columns names to log data field keys.
*
* @var null|array
*/
private $_columnMap;
protected $_columnMap;
/**
* Class constructor
@ -136,7 +136,9 @@ class Zend_Log_Writer_Db extends Zend_Log_Writer_Abstract
} else {
$dataToInsert = array();
foreach ($this->_columnMap as $columnName => $fieldKey) {
$dataToInsert[$columnName] = $event[$fieldKey];
if (isset($event[$fieldKey])) {
$dataToInsert[$columnName] = $event[$fieldKey];
}
}
}

View File

@ -1,570 +0,0 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Markup
* @subpackage Parser
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Textile.php 24593 2012-01-05 20:35:02Z matthew $
*/
/**
* @see Zend_Markup_TokenList
*/
require_once 'Zend/Markup/TokenList.php';
/**
* @see Zend_Markup_Parser_ParserInterface
*/
require_once 'Zend/Markup/Parser/ParserInterface.php';
/**
* @category Zend
* @package Zend_Markup
* @subpackage Parser
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Markup_Parser_Textile implements Zend_Markup_Parser_ParserInterface
{
const STATE_SCAN = 0;
const STATE_NEW_PARAGRAPH = 1;
const STATE_NEWLINE = 2;
const MATCH_ATTR_CLASSID = '\((?<attr_class>[a-zA-Z0-9_]+)?(?:\#(?<attr_id>[a-zA-Z0-9_]+))?\)';
const MATCH_ATTR_STYLE = "\{(?<attr_style>[^\}\n]+)\}";
const MATCH_ATTR_LANG = '\[(?<attr_lang>[a-zA-Z_]+)\]';
const MATCH_ATTR_ALIGN = '(?<attr_align>\<\>?|\>|=)';
/**
* Token tree
*
* @var Zend_Markup_TokenList
*/
protected $_tree;
/**
* Current token
*
* @var Zend_Markup_Token
*/
protected $_current;
/**
* Source to tokenize
*
* @var string
*/
protected $_value = '';
/**
* Length of the value
*
* @var int
*/
protected $_valueLen = 0;
/**
* Current pointer
*
* @var int
*/
protected $_pointer = 0;
/**
* The buffer
*
* @var string
*/
protected $_buffer = '';
/**
* Simple tag translation
*
* @var array
*/
protected $_simpleTags = array(
'*' => 'strong',
'**' => 'bold',
'_' => 'emphasized',
'__' => 'italic',
'??' => 'citation',
'-' => 'deleted',
'+' => 'insert',
'^' => 'superscript',
'~' => 'subscript',
'%' => 'span',
// these are a little more complicated
'@' => 'code',
'!' => 'img',
);
/**
* Token array
*
* @var array
*/
protected $_tokens = array();
/**
* Prepare the parsing of a Textile string, the real parsing is done in {@link _parse()}
*
* @param string $value
*
* @return array
*/
public function parse($value)
{
if (!is_string($value)) {
/**
* @see Zend_Markup_Parser_Exception
*/
require_once 'Zend/Markup/Parser/Exception.php';
throw new Zend_Markup_Parser_Exception('Value to parse should be a string.');
}
if (empty($value)) {
/**
* @see Zend_Markup_Parser_Exception
*/
require_once 'Zend/Markup/Parser/Exception.php';
throw new Zend_Markup_Parser_Exception('Value to parse cannot be left empty.');
}
// first make we only have LF newlines, also trim the value
$this->_value = str_replace(array("\r\n", "\r"), "\n", $value);
$this->_value = trim($this->_value);
// initialize variables and tokenize
$this->_valueLen = iconv_strlen($this->_value, 'UTF-8');
$this->_pointer = 0;
$this->_buffer = '';
$this->_temp = array();
$this->_tokens = array();
$this->_tokenize();
// create the tree
$this->_tree = new Zend_Markup_TokenList();
$this->_current = new Zend_Markup_Token('', Zend_Markup_Token::TYPE_NONE, 'Zend_Markup_Root');
$this->_tree->addChild($this->_current);
$this->_createTree();
return $this->_tree;
}
/**
* Tokenize a textile string
*
* @return array
*/
protected function _tokenize()
{
$state = self::STATE_NEW_PARAGRAPH;
$attrsMatch = implode('|', array(
self::MATCH_ATTR_CLASSID,
self::MATCH_ATTR_STYLE,
self::MATCH_ATTR_LANG,
self::MATCH_ATTR_ALIGN
));
$paragraph = '';
while ($this->_pointer < $this->_valueLen) {
switch ($state) {
case self::STATE_SCAN:
$matches = array(); //[^\n*_?+~%@!-]
$acronym = '(?<acronym>[A-Z]{2,})\((?<title>[^\)]+)\)';
$regex = '#\G(?<text>.*?)(?:'
. "(?:(?<nl_paragraph>\n{2,})|(?<nl_break>\n))|"
. '(?<tag>'
. "(?<name>\*{1,2}|_{1,2}|\?{2}|\-|\+|\~|\^|%|@|!|$|{$acronym}"
. '|":(?<url>[^\s]+)|")'
. "(?:{$attrsMatch})*)"
. ')#si';
preg_match($regex, $this->_value, $matches, null, $this->_pointer);
$this->_pointer += strlen($matches[0]);
if (!empty($matches['text'])) {
$this->_buffer .= $matches['text'];
}
// first add the buffer
if (!empty($this->_buffer)) {
$this->_tokens[] = array(
'tag' => $this->_buffer,
'type' => Zend_Markup_Token::TYPE_NONE
);
$this->_buffer = '';
}
if (!empty($matches['nl_paragraph'])) {
$this->_temp = array(
'tag' => $matches['nl_paragraph'],
'name' => 'p',
'type' => Zend_Markup_Token::TYPE_TAG,
'attributes' => array()
);
$state = self::STATE_NEW_PARAGRAPH;
} elseif (!empty($matches['nl_break'])) {
$this->_tokens[] = array(
'tag' => $matches['nl_break'],
'name' => 'break',
'type' => Zend_Markup_Token::TYPE_TAG,
'attributes' => array()
);
$state = self::STATE_NEWLINE;
} elseif (!empty($matches['tag'])) {
if (isset($this->_simpleTags[$matches['name']])) {
// now add the new token
$this->_tokens[] = array(
'tag' => $matches['tag'],
'type' => Zend_Markup_Token::TYPE_TAG,
'name' => $this->_simpleTags[$matches['name']],
'attributes' => $this->_extractAttributes($matches)
);
} else {
$attributes = $this->_extractAttributes($matches);
if ($matches['tag'][0] == '"') {
$name = 'url';
if (isset($matches['url'])) {
$attributes['url'] = $matches['url'];
}
$this->_tokens[] = array(
'tag' => $matches['tag'],
'type' => Zend_Markup_Token::TYPE_TAG,
'name' => $name,
'attributes' => $attributes
);
} else {
$name = 'acronym';
$this->_tokens[] = array(
'tag' => '',
'type' => Zend_Markup_Token::TYPE_TAG,
'name' => 'acronym',
'attributes' => array(
'title' => $matches['title']
)
);
$this->_tokens[] = array(
'tag' => $matches['acronym'],
'type' => Zend_Markup_Token::TYPE_NONE
);
$this->_tokens[] = array(
'tag' => '(' . $matches['title'] . ')',
'type' => Zend_Markup_Token::TYPE_TAG,
'name' => 'acronym',
'attributes' => array()
);
}
}
$state = self::STATE_SCAN;
}
break;
case self::STATE_NEW_PARAGRAPH:
if (empty($this->_temp)) {
$this->_temp = array(
'tag' => '',
'name' => 'p',
'type' => Zend_Markup_Token::TYPE_TAG,
'attributes' => array()
);
} else {
$this->_tokens[] = array(
'tag' => "\n",
'name' => 'p',
'type' => Zend_Markup_Token::TYPE_TAG,
'attributes' => array()
);
$this->_temp['tag'] = substr($this->_temp['tag'], 1);
}
$matches = array(); //[^\n*_?+~%@!-] (\()? [^()]+ (?(1)\))
$regex = "#\G(?<name>(h[1-6]|p)|(?:\#|\*))(?:{$attrsMatch})*(?(2)\.\s|\s)#i";
if (!preg_match($regex, $this->_value, $matches, null, $this->_pointer)) {
$this->_tokens[] = $this->_temp;
$state = self::STATE_SCAN;
break;
}
$this->_pointer += strlen($matches[0]);
if ($matches['name'] == 'p') {
$this->_temp['tag'] .= $matches[0];
$this->_temp['attributes'] = $this->_extractAttributes($matches);
$this->_tokens[] = $this->_temp;
$this->_temp = array();
} else {
$this->_tokens[] = $this->_temp;
$this->_temp = array();
$name = $matches['name'];
$attributes = $this->_extractAttributes($matches);
if ($name == '#') {
$name = 'list';
$attributes['list'] = 'decimal';
} elseif ($name == '*') {
$name = 'list';
}
$this->_tokens[] = array(
'tag' => $matches[0],
'name' => $name,
'type' => Zend_Markup_Token::TYPE_TAG,
'attributes' => $attributes
);
}
$state = self::STATE_SCAN;
break;
case self::STATE_NEWLINE:
$matches = array(); //[^\n*_?+~%@!-]
$regex = "#\G(?<name>(h[1-6])|(?:\#|\*))(?:{$attrsMatch})*(?(2)\.\s|\s)#si";
if (!preg_match($regex, $this->_value, $matches, null, $this->_pointer)) {
$state = self::STATE_SCAN;
break;
}
$this->_pointer += strlen($matches[0]);
$name = $matches['name'];
$attributes = $this->_extractAttributes($matches);
if ($name == '#') {
$name = 'list';
$attributes['list'] = 'decimal';
} elseif ($name == '*') {
$name = 'list';
}
$this->_tokens[] = array(
'tag' => $matches[0],
'name' => $name,
'type' => Zend_Markup_Token::TYPE_TAG,
'attributes' => $attributes
);
break;
}
}
}
/**
* Create a tree from the tokenized text
*
* @return void
*/
protected function _createTree()
{
$inside = true;
foreach ($this->_tokens as $key => $token) {
// first check if the token is a stopper
if ($this->_isStopper($token, $this->_current)) {
if ($this->_current->getName() == 'li') {
// list items are handled differently
if (isset($this->_tokens[$key + 1])
&& ($this->_tokens[$key + 1]['type'] == Zend_Markup_Token::TYPE_TAG)
&& ($this->_tokens[$key + 1]['name'] == 'list')
) {
// the next item is a correct tag
$this->_current->setStopper($token['tag']);
$this->_current = $this->_current->getParent();
} else {
// close the list
$this->_current->setStopper($token['tag']);
$this->_current = $this->_current->getParent()->getParent();
// go up in the tree until we found the end
while ($this->_isStopper($token, $this->_current)) {
$this->_current->setStopper($token['tag']);
$this->_current = $this->_current->getParent();
}
}
} else {
// go up in the tree until we found the end of stoppers
while ($this->_isStopper($token, $this->_current)) {
$this->_current->setStopper($token['tag']);
if (!empty($token['attributes'])) {
foreach ($token['attributes'] as $name => $value) {
$this->_current->addAttribute($name, $value);
}
}
$this->_current = $this->_current->getParent();
}
}
$inside = true;
} elseif (($token['type'] == Zend_Markup_Token::TYPE_TAG) && $inside) {
if ($token['name'] == 'break') {
// add the newline and continue parsing
$this->_current->addChild(new Zend_Markup_Token(
$token['tag'],
Zend_Markup_Token::TYPE_NONE,
'',
array(),
$this->_current
));
} else {
// handle a list item
if ($token['name'] == 'list') {
$attributes = array();
if (isset($token['attributes']['list'])) {
$attributes['list'] = $token['attributes']['list'];
unset($token['attributes']['list']);
}
if ($this->_current->getName() != 'list') {
// the list isn't started yet, create it
$child = new Zend_Markup_Token(
'',
Zend_Markup_Token::TYPE_TAG,
'list',
$attributes,
$this->_current
);
$this->_current->addChild($child);
$this->_current = $child;
}
$token['name'] = 'li';
} elseif (($token['name'] == 'img') || ($token['name'] == 'url')) {
$inside = false;
}
// add the token
$child = new Zend_Markup_Token(
$token['tag'],
Zend_Markup_Token::TYPE_TAG,
$token['name'],
$token['attributes'],
$this->_current
);
$this->_current->addChild($child);
$this->_current = $child;
}
} else {
// simply add the token as text
$this->_current->addChild(new Zend_Markup_Token(
$token['tag'],
Zend_Markup_Token::TYPE_NONE,
'',
array(),
$this->_current
));
}
}
}
/**
* Check if a tag is a stopper
*
* @param array $token
* @param Zend_Markup_Token $current
*
* @return bool
*/
protected function _isStopper(array $token, Zend_Markup_Token $current)
{
switch ($current->getName()) {
case 'h1':
case 'h2':
case 'h3':
case 'h4':
case 'h5':
case 'h6':
case 'list':
case 'li':
if (($token['type'] == Zend_Markup_Token::TYPE_TAG)
&& (($token['name'] == 'break') || ($token['name'] == 'p'))
) {
return true;
}
break;
case 'break':
return false;
break;
default:
if (($token['type'] == Zend_Markup_Token::TYPE_TAG) && ($token['name'] == $current->getName())) {
return true;
}
break;
}
return false;
}
/**
* Extract the attributes
*
* @param array $matches
*
* @return array
*/
protected function _extractAttributes(array $matches)
{
$attributes = array();
if (!empty($matches['attr_class'])) {
$attributes['class'] = $matches['attr_class'];
}
if (!empty($matches['attr_id'])) {
$attributes['id'] = $matches['attr_id'];
}
if (!empty($matches['attr_style'])) {
$attributes['style'] = $matches['attr_style'];
}
if (!empty($matches['attr_lang'])) {
$attributes['lang'] = $matches['attr_lang'];
}
if (!empty($matches['attr_align'])) {
switch ($matches['attr_align']) {
case '=':
$attributes['align'] = 'center';
break;
case '>':
$attributes['align'] = 'right';
break;
case '<>':
$attributes['align'] = 'justify';
break;
default:
case '<':
$attributes['align'] = 'left';
break;
}
}
return $attributes;
}
}

View File

@ -16,7 +16,7 @@
* @package Zend_Measure
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Length.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id: Length.php 25199 2013-01-09 11:56:38Z frosch $
*/
/**
@ -361,7 +361,7 @@ class Zend_Measure_Length extends Zend_Measure_Abstract
'ALEN_DANISH' => array('0.6277', 'alen'),
'ALEN' => array('0.6', 'alen'),
'ALEN_SWEDISH' => array('0.5938', 'alen'),
'ANGSTROM' => array('1.0e-10', ''),
'ANGSTROM' => array('1.0e-10', 'Å'),
'ARMS' => array('0.7', 'arms'),
'ARPENT_CANADIAN' => array('58.47', 'arpent'),
'ARPENT' => array('58.471308', 'arpent'),
@ -373,11 +373,11 @@ class Zend_Measure_Length extends Zend_Measure_Abstract
'BAMBOO' => array('3.2', 'bamboo'),
'BARLEYCORN' => array('0.0085', 'barleycorn'),
'BEE_SPACE' => array('0.0065', 'bee space'),
'BICRON' => array('1.0e-12', '<EFBFBD><EFBFBD>'),
'BICRON' => array('1.0e-12', 'µµ'),
'BLOCK_US_EAST' => array('80.4672', 'block'),
'BLOCK_US_WEST' => array('100.584', 'block'),
'BLOCK_US_SOUTH' => array('160.9344', 'block'),
'BOHR' => array('52.918e-12', 'a<EFBFBD>'),
'BOHR' => array('52.918e-12', 'a'),
'BRACCIO' => array('0.7', 'braccio'),
'BRAZA_ARGENTINA' => array('1.733', 'braza'),
'BRAZA' => array('1.67', 'braza'),
@ -415,8 +415,8 @@ class Zend_Measure_Length extends Zend_Measure_Abstract
'DIGIT' => array('0.019', 'digit'),
'DIRAA' => array('0.58', ''),
'DONG' => array(array('' => '7','/' => '300'), 'dong'),
'DOUZIEME_WATCH' => array('0.000188', 'douzi<EFBFBD>me'),
'DOUZIEME' => array('0.00017638888889', 'douzi<EFBFBD>me'),
'DOUZIEME_WATCH' => array('0.000188', 'douzième'),
'DOUZIEME' => array('0.00017638888889', 'douzième'),
'DRA_IRAQ' => array('0.745', 'dra'),
'DRA' => array('0.7112', 'dra'),
'EL' => array('0.69', 'el'),
@ -533,10 +533,10 @@ class Zend_Measure_Length extends Zend_Measure_Abstract
'METRE' => array('1', 'm'),
'METRIC_MILE' => array('1500', 'metric mile'),
'METRIC_MILE_US' => array('1600', 'metric mile'),
'MICROINCH' => array('2.54e-08', '<EFBFBD>in'),
'MICROMETER' => array('0.000001', '<EFBFBD>m'),
'MICROMICRON' => array('1.0e-12', '<EFBFBD><EFBFBD>'),
'MICRON' => array('0.000001', '<EFBFBD>'),
'MICROINCH' => array('2.54e-08', 'µin'),
'MICROMETER' => array('0.000001', 'µm'),
'MICROMICRON' => array('1.0e-12', 'µµ'),
'MICRON' => array('0.000001', 'µm'),
'MIGLIO' => array('1488.6', 'miglio'),
'MIIL' => array('7500', 'miil'),
'MIIL_DENMARK' => array('7532.5', 'miil'),
@ -560,7 +560,7 @@ class Zend_Measure_Length extends Zend_Measure_Abstract
'MILLE' => array('1949', 'mille'),
'MILLIARE' => array('0.001478', 'milliare'),
'MILLIMETER' => array('0.001', 'mm'),
'MILLIMICRON' => array('1.0e-9', 'm<EFBFBD>'),
'MILLIMICRON' => array('1.0e-9', 'mµ'),
'MKONO' => array('0.4572', 'mkono'),
'MOOT' => array('0.0762', 'moot'),
'MYRIAMETER' => array('10000', 'mym'),
@ -578,7 +578,7 @@ class Zend_Measure_Length extends Zend_Measure_Abstract
'PARASANG' => array('6000', 'parasang'),
'PARIS_FOOT' => array('0.3248406', 'paris foot'),
'PARSEC' => array('3.0856776e+16', 'pc'),
'PE' => array('0.33324', 'p<EFBFBD>'),
'PE' => array('0.33324', 'pé'),
'PEARL' => array('0.001757299', 'pearl'),
'PERCH' => array('5.0292', 'perch'),
'PERCH_IRELAND' => array('6.4008', 'perch'),

View File

@ -16,7 +16,7 @@
* @package Zend_Navigation
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Container.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id: Container.php 25237 2013-01-22 08:32:38Z frosch $
*/
/**
@ -274,45 +274,138 @@ abstract class Zend_Navigation_Container implements RecursiveIterator, Countable
}
/**
* Returns a child page matching $property == $value, or null if not found
* Returns a child page matching $property == $value or
* preg_match($value, $property), or null if not found
*
* @param string $property name of property to match against
* @param mixed $value value to match property against
* @param string $property name of property to match against
* @param mixed $value value to match property against
* @param bool $useRegex [optional] if true PHP's preg_match
* is used. Default is false.
* @return Zend_Navigation_Page|null matching page or null
*/
public function findOneBy($property, $value)
{
$iterator = new RecursiveIteratorIterator($this,
RecursiveIteratorIterator::SELF_FIRST);
public function findOneBy($property, $value, $useRegex = false)
{
$iterator = new RecursiveIteratorIterator(
$this,
RecursiveIteratorIterator::SELF_FIRST
);
foreach ($iterator as $page) {
if ($page->get($property) == $value) {
return $page;
$pageProperty = $page->get($property);
// Rel and rev
if (is_array($pageProperty)) {
foreach ($pageProperty as $item) {
if (is_array($item)) {
// Use regex?
if (true === $useRegex) {
foreach ($item as $item2) {
if (0 !== preg_match($value, $item2)) {
return $page;
}
}
} else {
if (in_array($value, $item)) {
return $page;
}
}
} else {
// Use regex?
if (true === $useRegex) {
if (0 !== preg_match($value, $item)) {
return $page;
}
} else {
if ($item == $value) {
return $page;
}
}
}
}
continue;
}
// Use regex?
if (true === $useRegex) {
if (preg_match($value, $pageProperty)) {
return $page;
}
} else {
if ($pageProperty == $value) {
return $page;
}
}
}
return null;
}
/**
* Returns all child pages matching $property == $value, or an empty array
* if no pages are found
* Returns all child pages matching $property == $value or
* preg_match($value, $property), or an empty array if no pages are found
*
* @param string $property name of property to match against
* @param mixed $value value to match property against
* @param bool $useRegex [optional] if true PHP's preg_match is used.
* Default is false.
* @return array array containing only Zend_Navigation_Page
* instances
*/
public function findAllBy($property, $value)
{
public function findAllBy($property, $value, $useRegex = false)
{
$found = array();
$iterator = new RecursiveIteratorIterator($this,
RecursiveIteratorIterator::SELF_FIRST);
$iterator = new RecursiveIteratorIterator(
$this,
RecursiveIteratorIterator::SELF_FIRST
);
foreach ($iterator as $page) {
if ($page->get($property) == $value) {
$found[] = $page;
$pageProperty = $page->get($property);
// Rel and rev
if (is_array($pageProperty)) {
foreach ($pageProperty as $item) {
if (is_array($item)) {
// Use regex?
if (true === $useRegex) {
foreach ($item as $item2) {
if (0 !== preg_match($value, $item2)) {
$found[] = $page;
}
}
} else {
if (in_array($value, $item)) {
$found[] = $page;
}
}
} else {
// Use regex?
if (true === $useRegex) {
if (0 !== preg_match($value, $item)) {
$found[] = $page;
}
} else {
if ($item == $value) {
$found[] = $page;
}
}
}
}
continue;
}
// Use regex?
if (true === $useRegex) {
if (0 !== preg_match($value, $pageProperty)) {
$found[] = $page;
}
} else {
if ($pageProperty == $value) {
$found[] = $page;
}
}
}
@ -320,7 +413,8 @@ abstract class Zend_Navigation_Container implements RecursiveIterator, Countable
}
/**
* Returns page(s) matching $property == $value
* Returns page(s) matching $property == $value or
* preg_match($value, $property)
*
* @param string $property name of property to match against
* @param mixed $value value to match property against
@ -330,14 +424,16 @@ abstract class Zend_Navigation_Container implements RecursiveIterator, Countable
* matching pages are found. If false, null will
* be returned if no matching page is found.
* Default is false.
* @param bool $useRegex [optional] if true PHP's preg_match is used.
* Default is false.
* @return Zend_Navigation_Page|null matching page or null
*/
public function findBy($property, $value, $all = false)
public function findBy($property, $value, $all = false, $useRegex = false)
{
if ($all) {
return $this->findAllBy($property, $value);
return $this->findAllBy($property, $value, $useRegex);
} else {
return $this->findOneBy($property, $value);
return $this->findOneBy($property, $value, $useRegex);
}
}
@ -346,27 +442,33 @@ abstract class Zend_Navigation_Container implements RecursiveIterator, Countable
*
* Examples of finder calls:
* <code>
* // METHOD // SAME AS
* $nav->findByLabel('foo'); // $nav->findOneBy('label', 'foo');
* $nav->findOneByLabel('foo'); // $nav->findOneBy('label', 'foo');
* $nav->findAllByClass('foo'); // $nav->findAllBy('class', 'foo');
* // METHOD // SAME AS
* $nav->findByLabel('foo'); // $nav->findOneBy('label', 'foo');
* $nav->findByLabel('/foo/', true); // $nav->findBy('label', '/foo/', true);
* $nav->findOneByLabel('foo'); // $nav->findOneBy('label', 'foo');
* $nav->findAllByClass('foo'); // $nav->findAllBy('class', 'foo');
* </code>
*
* @param string $method method name
* @param array $arguments method arguments
* @throws Zend_Navigation_Exception if method does not exist
* @param string $method method name
* @param array $arguments method arguments
* @return mixed Zend_Navigation|array|null matching page, array of pages
* or null
* @throws Zend_Navigation_Exception if method does not exist
*/
public function __call($method, $arguments)
{
if (@preg_match('/(find(?:One|All)?By)(.+)/', $method, $match)) {
return $this->{$match[1]}($match[2], $arguments[0]);
return $this->{$match[1]}($match[2], $arguments[0], !empty($arguments[1]));
}
require_once 'Zend/Navigation/Exception.php';
throw new Zend_Navigation_Exception(sprintf(
throw new Zend_Navigation_Exception(
sprintf(
'Bad method call: Unknown method %s::%s',
get_class($this),
$method));
$method
)
);
}
/**

View File

@ -17,7 +17,7 @@
* @subpackage Page
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Mvc.php 24964 2012-06-15 14:37:43Z adamlundrigan $
* @version $Id: Mvc.php 25213 2013-01-11 08:19:09Z frosch $
*/
/**
@ -198,7 +198,7 @@ class Zend_Navigation_Page_Mvc extends Zend_Navigation_Page
}
foreach($myParams as $key => $value) {
if($value == null) {
if(null === $value) {
unset($myParams[$key]);
}
}

View File

@ -16,7 +16,7 @@
* @package Zend_Oauth
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Oauth.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id: Oauth.php 25167 2012-12-19 16:28:01Z matthew $
*/
/** Zend_Http_Client */
@ -38,6 +38,7 @@ class Zend_Oauth
const PUT = 'PUT';
const DELETE = 'DELETE';
const HEAD = 'HEAD';
const OPTIONS = 'OPTIONS';
/**
* Singleton instance if required of the HTTP client

View File

@ -16,7 +16,7 @@
* @package Zend_Oauth
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Client.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id: Client.php 25167 2012-12-19 16:28:01Z matthew $
*/
/** Zend_Oauth */
@ -196,10 +196,12 @@ class Zend_Oauth_Client extends Zend_Http_Client
$this->setRequestMethod(self::POST);
} elseif($method == self::PUT) {
$this->setRequestMethod(self::PUT);
} elseif($method == self::DELETE) {
} elseif($method == self::DELETE) {
$this->setRequestMethod(self::DELETE);
} elseif($method == self::HEAD) {
} elseif($method == self::HEAD) {
$this->setRequestMethod(self::HEAD);
} elseif($method == self::OPTIONS) {
$this->setRequestMethod(self::OPTIONS);
}
return parent::setMethod($method);
}

View File

@ -16,7 +16,7 @@
* @package Zend_Oauth
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Config.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id: Config.php 25167 2012-12-19 16:28:01Z matthew $
*/
/** Zend_Oauth */
@ -581,6 +581,7 @@ class Zend_Oauth_Config implements Zend_Oauth_Config_ConfigInterface
Zend_Oauth::POST,
Zend_Oauth::PUT,
Zend_Oauth::DELETE,
Zend_Oauth::OPTIONS,
))
) {
require_once 'Zend/Oauth/Exception.php';

View File

@ -17,7 +17,7 @@
* @subpackage FileParser
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: OpenType.php 25137 2012-11-16 17:07:52Z rob $
* @version $Id: OpenType.php 25197 2013-01-09 11:32:22Z frosch $
*/
/** Zend_Pdf_FileParser_Font */
@ -584,7 +584,7 @@ abstract class Zend_Pdf_FileParser_Font_OpenType extends Zend_Pdf_FileParser_Fon
$this->isEmbeddable = false;
} elseif ($this->isBitSet(2, $embeddingFlags)
|| $this->isBitSet(3, $embeddingFlags)
|| $this->isBitSet(4)
|| $this->isBitSet(4, $embeddingFlags)
) {
/* One of:
* Restricted License embedding (0x0002)

View File

@ -356,6 +356,14 @@ abstract class Zend_Service_Rackspace_Abstract
*/
public function authenticate()
{
if (empty($this->user)) {
/**
* @see Zend_Service_Rackspace_Exception
*/
require_once 'Zend/Service/Rackspace/Exception.php';
throw new Zend_Service_Rackspace_Exception("User has not been set");
}
$headers = array (
self::AUTHUSER_HEADER => $this->user,
self::AUTHKEY_HEADER => $this->key
@ -376,4 +384,4 @@ abstract class Zend_Service_Rackspace_Abstract
$this->errorCode = $result->getStatus();
return false;
}
}
}

View File

@ -1006,7 +1006,7 @@ class Zend_Service_Rackspace_Servers extends Zend_Service_Rackspace_Abstract
case '200' :
case '203' : // break intentionally omitted
$backup = json_decode($result->getBody(),true);
return $image['backupSchedule'];
return $backup['backupSchedule'];
case '503' :
$this->errorMsg= self::ERROR_SERVICE_UNAVAILABLE;
break;

View File

@ -17,7 +17,7 @@
* @subpackage SlideShare
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: SlideShare.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id: SlideShare.php 25283 2013-03-09 10:07:13Z frosch $
*/
/**
@ -49,7 +49,6 @@ require_once 'Zend/Service/SlideShare/SlideShow.php';
*/
class Zend_Service_SlideShare
{
/**
* Web service result code mapping
*/
@ -71,17 +70,17 @@ class Zend_Service_SlideShare
/**
* Slide share Web service communication URIs
*/
const SERVICE_UPLOAD_URI = 'http://www.slideshare.net/api/1/upload_slideshow';
const SERVICE_GET_SHOW_URI = 'http://www.slideshare.net/api/1/get_slideshow';
const SERVICE_GET_SHOW_BY_USER_URI = 'http://www.slideshare.net/api/1/get_slideshow_by_user';
const SERVICE_GET_SHOW_BY_TAG_URI = 'http://www.slideshare.net/api/1/get_slideshow_by_tag';
const SERVICE_GET_SHOW_BY_GROUP_URI = 'http://www.slideshare.net/api/1/get_slideshows_from_group';
const SERVICE_UPLOAD_URI = 'https://www.slideshare.net/api/2/upload_slideshow';
const SERVICE_GET_SHOW_URI = 'https://www.slideshare.net/api/2/get_slideshow';
const SERVICE_GET_SHOW_BY_USER_URI = 'https://www.slideshare.net/api/2/get_slideshows_by_user';
const SERVICE_GET_SHOW_BY_TAG_URI = 'https://www.slideshare.net/api/2/get_slideshows_by_tag';
const SERVICE_GET_SHOW_BY_GROUP_URI = 'https://www.slideshare.net/api/2/get_slideshows_by_group';
/**
* The MIME type of Slideshow files
*
*/
const POWERPOINT_MIME_TYPE = "application/vnd.ms-powerpoint";
const POWERPOINT_MIME_TYPE = "application/vnd.ms-powerpoint";
/**
* The API key to use in requests
@ -147,15 +146,20 @@ class Zend_Service_SlideShare
public function getHttpClient()
{
if(!($this->_httpclient instanceof Zend_Http_Client)) {
if (!($this->_httpclient instanceof Zend_Http_Client)) {
$client = new Zend_Http_Client();
$client->setConfig(array('maxredirects' => 2,
'timeout' => 5));
$client->setConfig(
array(
'maxredirects' => 2,
'timeout' => 5
)
);
$this->setHttpClient($client);
}
$this->_httpclient->resetParameters();
return $this->_httpclient;
}
@ -181,10 +185,16 @@ class Zend_Service_SlideShare
public function getCacheObject()
{
if(!($this->_cacheobject instanceof Zend_Cache_Core)) {
$cache = Zend_Cache::factory('Core', 'File', array('lifetime' => 43200,
'automatic_serialization' => true),
array('cache_dir' => '/tmp'));
if (!($this->_cacheobject instanceof Zend_Cache_Core)) {
$cache = Zend_Cache::factory(
'Core',
'File',
array(
'lifetime' => 43200,
'automatic_serialization' => true
),
array('cache_dir' => '/tmp')
);
$this->setCacheObject($cache);
}
@ -283,17 +293,19 @@ class Zend_Service_SlideShare
/**
* The Constructor
*
* @param string $apikey The API key
* @param string $apikey The API key
* @param string $sharedSecret The shared secret
* @param string $username The username
* @param string $password The password
* @param string $username The username
* @param string $password The password
*/
public function __construct($apikey, $sharedSecret, $username = null, $password = null)
public function __construct(
$apikey, $sharedSecret, $username = null, $password = null
)
{
$this->setApiKey($apikey)
->setSharedSecret($sharedSecret)
->setUserName($username)
->setPassword($password);
->setSharedSecret($sharedSecret)
->setUserName($username)
->setPassword($password);
$this->_httpclient = new Zend_Http_Client();
}
@ -301,41 +313,47 @@ class Zend_Service_SlideShare
/**
* Uploads the specified Slide show the the server
*
* @param Zend_Service_SlideShare_SlideShow $ss The slide show object representing the slide show to upload
* @param boolean $make_src_public Determines if the the slide show's source file is public or not upon upload
* @param Zend_Service_SlideShare_SlideShow $ss The slide show object representing the slide show to upload
* @param boolean $makeSrcPublic Determines if the the slide show's source file is public or not upon upload
* @return Zend_Service_SlideShare_SlideShow The passed Slide show object, with the new assigned ID provided
* @throws Zend_Service_SlideShare_Exception
*/
public function uploadSlideShow(Zend_Service_SlideShare_SlideShow $ss, $make_src_public = true)
public function uploadSlideShow(
Zend_Service_SlideShare_SlideShow $ss, $makeSrcPublic = true
)
{
$timestamp = time();
$params = array('api_key' => $this->getApiKey(),
'ts' => $timestamp,
'hash' => sha1($this->getSharedSecret().$timestamp),
'username' => $this->getUserName(),
'password' => $this->getPassword(),
'slideshow_title' => $ss->getTitle());
$params = array(
'api_key' => $this->getApiKey(),
'ts' => $timestamp,
'hash' => sha1($this->getSharedSecret() . $timestamp),
'username' => $this->getUserName(),
'password' => $this->getPassword(),
'slideshow_title' => $ss->getTitle()
);
$description = $ss->getDescription();
$tags = $ss->getTags();
$tags = $ss->getTags();
$filename = $ss->getFilename();
if(!file_exists($filename) || !is_readable($filename)) {
if (!file_exists($filename) || !is_readable($filename)) {
require_once 'Zend/Service/SlideShare/Exception.php';
throw new Zend_Service_SlideShare_Exception("Specified Slideshow for upload not found or unreadable");
throw new Zend_Service_SlideShare_Exception(
'Specified Slideshow for upload not found or unreadable'
);
}
if(!empty($description)) {
if (!empty($description)) {
$params['slideshow_description'] = $description;
} else {
$params['slideshow_description'] = "";
}
if(!empty($tags)) {
if (!empty($tags)) {
$tmp = array();
foreach($tags as $tag) {
foreach ($tags as $tag) {
$tmp[] = "\"$tag\"";
}
$params['slideshow_tags'] = implode(' ', $tmp);
@ -343,7 +361,6 @@ class Zend_Service_SlideShare
$params['slideshow_tags'] = "";
}
$client = $this->getHttpClient();
$client->setUri(self::SERVICE_UPLOAD_URI);
$client->setParameterPost($params);
@ -352,23 +369,29 @@ class Zend_Service_SlideShare
require_once 'Zend/Http/Client/Exception.php';
try {
$response = $client->request('POST');
} catch(Zend_Http_Client_Exception $e) {
} catch (Zend_Http_Client_Exception $e) {
require_once 'Zend/Service/SlideShare/Exception.php';
throw new Zend_Service_SlideShare_Exception("Service Request Failed: {$e->getMessage()}", 0, $e);
throw new Zend_Service_SlideShare_Exception(
"Service Request Failed: {$e->getMessage()}", 0, $e
);
}
$sxe = simplexml_load_string($response->getBody());
if($sxe->getName() == "SlideShareServiceError") {
if ($sxe->getName() == "SlideShareServiceError") {
$message = (string)$sxe->Message[0];
list($code, $error_str) = explode(':', $message);
require_once 'Zend/Service/SlideShare/Exception.php';
throw new Zend_Service_SlideShare_Exception(trim($error_str), $code);
throw new Zend_Service_SlideShare_Exception(trim(
$error_str
), $code);
}
if(!$sxe->getName() == "SlideShowUploaded") {
if (!$sxe->getName() == "SlideShowUploaded") {
require_once 'Zend/Service/SlideShare/Exception.php';
throw new Zend_Service_SlideShare_Exception("Unknown XML Respons Received");
throw new Zend_Service_SlideShare_Exception(
'Unknown XML Respons Received'
);
}
$ss->setId((int)(string)$sxe->SlideShowID);
@ -381,21 +404,24 @@ class Zend_Service_SlideShare
*
* @param int $ss_id The slide show ID
* @return Zend_Service_SlideShare_SlideShow the Slideshow object
* @throws Zend_Service_SlideShare_Exception
*/
public function getSlideShow($ss_id)
{
$timestamp = time();
$params = array('api_key' => $this->getApiKey(),
'ts' => $timestamp,
'hash' => sha1($this->getSharedSecret().$timestamp),
'slideshow_id' => $ss_id);
$params = array(
'api_key' => $this->getApiKey(),
'ts' => $timestamp,
'hash' => sha1($this->getSharedSecret() . $timestamp),
'slideshow_id' => $ss_id
);
$cache = $this->getCacheObject();
$cache_key = md5("__zendslideshare_cache_$ss_id");
if(!$retval = $cache->load($cache_key)) {
if (!$retval = $cache->load($cache_key)) {
$client = $this->getHttpClient();
$client->setUri(self::SERVICE_GET_SHOW_URI);
@ -404,26 +430,31 @@ class Zend_Service_SlideShare
require_once 'Zend/Http/Client/Exception.php';
try {
$response = $client->request('POST');
} catch(Zend_Http_Client_Exception $e) {
} catch (Zend_Http_Client_Exception $e) {
require_once 'Zend/Service/SlideShare/Exception.php';
throw new Zend_Service_SlideShare_Exception("Service Request Failed: {$e->getMessage()}", 0, $e);
throw new Zend_Service_SlideShare_Exception(
"Service Request Failed: {$e->getMessage()}", 0, $e
);
}
$sxe = simplexml_load_string($response->getBody());
if($sxe->getName() == "SlideShareServiceError") {
if ($sxe->getName() == "SlideShareServiceError") {
$message = (string)$sxe->Message[0];
list($code, $error_str) = explode(':', $message);
require_once 'Zend/Service/SlideShare/Exception.php';
throw new Zend_Service_SlideShare_Exception(trim($error_str), $code);
throw new Zend_Service_SlideShare_Exception(trim(
$error_str
), $code);
}
if(!$sxe->getName() == 'Slideshows') {
if (!($sxe->getName() == 'Slideshow')) {
require_once 'Zend/Service/SlideShare/Exception.php';
throw new Zend_Service_SlideShare_Exception('Unknown XML Repsonse Received');
throw new Zend_Service_SlideShare_Exception(
'Unknown XML Repsonse Received'
);
}
$retval = $this->_slideShowNodeToObject(clone $sxe->Slideshow[0]);
$retval = $this->_slideShowNodeToObject(clone $sxe);
$cache->save($retval, $cache_key);
}
@ -439,9 +470,13 @@ class Zend_Service_SlideShare
* @param int $limit The maximum number of slide shows to retrieve
* @return array An array of Zend_Service_SlideShare_SlideShow objects
*/
public function getSlideShowsByUsername($username, $offset = null, $limit = null)
public function getSlideShowsByUsername(
$username, $offset = null, $limit = null
)
{
return $this->_getSlideShowsByType('username_for', $username, $offset, $limit);
return $this->_getSlideShowsByType(
'username_for', $username, $offset, $limit
);
}
/**
@ -455,9 +490,9 @@ class Zend_Service_SlideShare
public function getSlideShowsByTag($tag, $offset = null, $limit = null)
{
if(is_array($tag)) {
if (is_array($tag)) {
$tmp = array();
foreach($tag as $t) {
foreach ($tag as $t) {
$tmp[] = "\"$t\"";
}
@ -484,33 +519,35 @@ class Zend_Service_SlideShare
* Retrieves Zend_Service_SlideShare_SlideShow object arrays based on the type of
* list desired
*
* @param string $key The type of slide show object to retrieve
* @param string $value The specific search query for the slide show type to look up
* @param int $offset The offset of the list to start retrieving from
* @param int $limit The maximum number of slide shows to retrieve
* @param string $key The type of slide show object to retrieve
* @param string $value The specific search query for the slide show type to look up
* @param int $offset The offset of the list to start retrieving from
* @param int $limit The maximum number of slide shows to retrieve
* @return array An array of Zend_Service_SlideShare_SlideShow objects
* @throws Zend_Service_SlideShare_Exception
*/
protected function _getSlideShowsByType($key, $value, $offset = null, $limit = null)
{
$key = strtolower($key);
switch($key) {
switch ($key) {
case 'username_for':
$responseTag = 'User';
$queryUri = self::SERVICE_GET_SHOW_BY_USER_URI;
$queryUri = self::SERVICE_GET_SHOW_BY_USER_URI;
break;
case 'group_name':
$responseTag = 'Group';
$queryUri = self::SERVICE_GET_SHOW_BY_GROUP_URI;
$queryUri = self::SERVICE_GET_SHOW_BY_GROUP_URI;
break;
case 'tag':
$responseTag = 'Tag';
$queryUri = self::SERVICE_GET_SHOW_BY_TAG_URI;
$queryUri = self::SERVICE_GET_SHOW_BY_TAG_URI;
break;
default:
require_once 'Zend/Service/SlideShare/Exception.php';
throw new Zend_Service_SlideShare_Exception("Invalid SlideShare Query");
throw new Zend_Service_SlideShare_Exception(
'Invalid SlideShare Query'
);
}
$timestamp = time();
@ -520,11 +557,11 @@ class Zend_Service_SlideShare
'hash' => sha1($this->getSharedSecret().$timestamp),
$key => $value);
if($offset !== null) {
if ($offset !== null) {
$params['offset'] = (int)$offset;
}
if($limit !== null) {
if ($limit !== null) {
$params['limit'] = (int)$limit;
}
@ -532,8 +569,7 @@ class Zend_Service_SlideShare
$cache_key = md5($key.$value.$offset.$limit);
if(!$retval = $cache->load($cache_key)) {
if (!$retval = $cache->load($cache_key)) {
$client = $this->getHttpClient();
$client->setUri($queryUri);
@ -542,29 +578,35 @@ class Zend_Service_SlideShare
require_once 'Zend/Http/Client/Exception.php';
try {
$response = $client->request('POST');
} catch(Zend_Http_Client_Exception $e) {
} catch (Zend_Http_Client_Exception $e) {
require_once 'Zend/Service/SlideShare/Exception.php';
throw new Zend_Service_SlideShare_Exception("Service Request Failed: {$e->getMessage()}", 0, $e);
throw new Zend_Service_SlideShare_Exception(
"Service Request Failed: {$e->getMessage()}", 0, $e
);
}
$sxe = simplexml_load_string($response->getBody());
if($sxe->getName() == "SlideShareServiceError") {
if ($sxe->getName() == "SlideShareServiceError") {
$message = (string)$sxe->Message[0];
list($code, $error_str) = explode(':', $message);
require_once 'Zend/Service/SlideShare/Exception.php';
throw new Zend_Service_SlideShare_Exception(trim($error_str), $code);
throw new Zend_Service_SlideShare_Exception(
trim($error_str), $code
);
}
if(!$sxe->getName() == $responseTag) {
if (!$sxe->getName() == $responseTag) {
require_once 'Zend/Service/SlideShare/Exception.php';
throw new Zend_Service_SlideShare_Exception('Unknown or Invalid XML Repsonse Received');
throw new Zend_Service_SlideShare_Exception(
'Unknown or Invalid XML Repsonse Received'
);
}
$retval = array();
foreach($sxe->children() as $node) {
if($node->getName() == 'Slideshow') {
foreach ($sxe->children() as $node) {
if ($node->getName() == 'Slideshow') {
$retval[] = $this->_slideShowNodeToObject($node);
}
}
@ -581,12 +623,12 @@ class Zend_Service_SlideShare
*
* @param SimpleXMLElement $node The input XML from the slideshare.net service
* @return Zend_Service_SlideShare_SlideShow The resulting object
* @throws Zend_Service_SlideShare_Exception
*/
protected function _slideShowNodeToObject(SimpleXMLElement $node)
{
if($node->getName() == 'Slideshow') {
$ss = new Zend_Service_SlideShare_SlideShow();
$ss->setId((string)$node->ID);
@ -597,9 +639,8 @@ class Zend_Service_SlideShare
$ss->setStatus((string)$node->Status);
$ss->setStatusDescription((string)$node->StatusDescription);
foreach(explode(",", (string)$node->Tags) as $tag) {
if(!in_array($tag, $ss->getTags())) {
foreach (explode(",", (string)$node->Tags) as $tag) {
if (!in_array($tag, $ss->getTags())) {
$ss->addTag($tag);
}
}
@ -610,10 +651,11 @@ class Zend_Service_SlideShare
$ss->setTranscript((string)$node->Transcript);
return $ss;
}
require_once 'Zend/Service/SlideShare/Exception.php';
throw new Zend_Service_SlideShare_Exception("Was not provided the expected XML Node for processing");
throw new Zend_Service_SlideShare_Exception(
'Was not provided the expected XML Node for processing'
);
}
}

View File

@ -17,7 +17,7 @@
* @subpackage SlideShare
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: SlideShow.php 24593 2012-01-05 20:35:02Z matthew $
* @version $Id: SlideShow.php 25283 2013-03-09 10:07:13Z frosch $
*/
@ -33,7 +33,6 @@
*/
class Zend_Service_SlideShare_SlideShow
{
/**
* Status constant mapping for web service
*
@ -328,7 +327,7 @@ class Zend_Service_SlideShare_SlideShow
/**
* Sets the description for the Slide show
*
* @param strign $desc The description of the slide show
* @param string $desc The description of the slide show
* @return Zend_Service_SlideShare_SlideShow
*/
public function setDescription($desc)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,179 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Service
* @subpackage Twitter
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/
/**
* @see Zend_Http_Response
*/
require_once 'Zend/Http/Response.php';
/**
* @see Zend_Json
*/
require_once 'Zend/Json.php';
/**
* Representation of a response from Twitter.
*
* Provides:
*
* - method for testing if we have a successful call
* - method for retrieving errors, if any
* - method for retrieving the raw JSON
* - method for retrieving the decoded response
* - proxying to elements of the decoded response via property overloading
*
* @category Zend
* @package Zend_Service
* @subpackage Twitter
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Service_Twitter_Response
{
/**
* @var Zend_Http_Response
*/
protected $httpResponse;
/**
* @var array|stdClass
*/
protected $jsonBody;
/**
* @var string
*/
protected $rawBody;
/**
* Constructor
*
* Assigns the HTTP response to a property, as well as the body
* representation. It then attempts to decode the body as JSON.
*
* @param Zend_Http_Response $httpResponse
* @throws Zend_Service_Twitter_Exception if unable to decode JSON response
*/
public function __construct(Zend_Http_Response $httpResponse)
{
$this->httpResponse = $httpResponse;
$this->rawBody = $httpResponse->getBody();
try {
$jsonBody = Zend_Json::decode($this->rawBody, Zend_Json::TYPE_OBJECT);
$this->jsonBody = $jsonBody;
} catch (Zend_Json_Exception $e) {
require_once 'Zend/Service/Twitter/Exception.php';
throw new Zend_Service_Twitter_Exception(sprintf(
'Unable to decode response from twitter: %s',
$e->getMessage()
), 0, $e);
}
}
/**
* Property overloading to JSON elements
*
* If a named property exists within the JSON response returned,
* proxies to it. Otherwise, returns null.
*
* @param string $name
* @return mixed
*/
public function __get($name)
{
if (null === $this->jsonBody) {
return null;
}
if (!isset($this->jsonBody->{$name})) {
return null;
}
return $this->jsonBody->{$name};
}
/**
* Was the request successful?
*
* @return bool
*/
public function isSuccess()
{
return $this->httpResponse->isSuccessful();
}
/**
* Did an error occur in the request?
*
* @return bool
*/
public function isError()
{
return !$this->httpResponse->isSuccessful();
}
/**
* Retrieve the errors.
*
* Twitter _should_ return a standard error object, which contains an
* "errors" property pointing to an array of errors. This method will
* return that array if present, and raise an exception if not detected.
*
* If the response was successful, an empty array is returned.
*
* @return array
* @throws Exception\DomainException if unable to detect structure of error response
*/
public function getErrors()
{
if (!$this->isError()) {
return array();
}
if (null === $this->jsonBody
|| !isset($this->jsonBody->errors)
) {
require_once 'Zend/Service/Twitter/Exception.php';
throw new Zend_Service_Twitter_Exception(
'Either no JSON response received, or JSON error response is malformed; cannot return errors'
);
}
return $this->jsonBody->errors;
}
/**
* Retrieve the raw response body
*
* @return string
*/
public function getRawResponse()
{
return $this->rawBody;
}
/**
* Retun the decoded response body
*
* @return array|stdClass
*/
public function toValue()
{
return $this->jsonBody;
}
}

View File

@ -1,167 +0,0 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Service
* @subpackage Twitter
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Search.php 24593 2012-01-05 20:35:02Z matthew $
*/
/**
* @see Zend_Http_Client
*/
require_once 'Zend/Rest/Client.php';
/**
* @see Zend_Json
*/
require_once 'Zend/Json.php';
/**
* @see Zend_Feed
*/
require_once 'Zend/Feed.php';
/**
* @category Zend
* @package Zend_Service
* @subpackage Twitter
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_Service_Twitter_Search extends Zend_Rest_Client
{
/**
* Return Type
* @var String
*/
protected $_responseType = 'json';
/**
* Response Format Types
* @var array
*/
protected $_responseTypes = array(
'atom',
'json'
);
/**
* Uri Compoent
*
* @var Zend_Uri_Http
*/
protected $_uri;
/**
* Constructor
*
* @param string $returnType
* @return void
*/
public function __construct($responseType = 'json')
{
$this->setResponseType($responseType);
$this->setUri("http://search.twitter.com");
$this->setHeaders('Accept-Charset', 'ISO-8859-1,utf-8');
}
/**
* set responseType
*
* @param string $responseType
* @throws Zend_Service_Twitter_Exception
* @return Zend_Service_Twitter_Search
*/
public function setResponseType($responseType = 'json')
{
if(!in_array($responseType, $this->_responseTypes, TRUE)) {
require_once 'Zend/Service/Twitter/Exception.php';
throw new Zend_Service_Twitter_Exception('Invalid Response Type');
}
$this->_responseType = $responseType;
return $this;
}
/**
* Retrieve responseType
*
* @return string
*/
public function getResponseType()
{
return $this->_responseType;
}
/**
* Get the current twitter trends. Currnetly only supports json as the return.
*
* @throws Zend_Http_Client_Exception
* @return array
*/
public function trends()
{
$response = $this->restGet('/trends.json');
return Zend_Json::decode($response->getBody());
}
/**
* Performs a Twitter search query.
*
* @throws Zend_Http_Client_Exception
*/
public function search($query, array $params = array())
{
$_query = array();
$_query['q'] = $query;
foreach($params as $key=>$param) {
switch($key) {
case 'geocode':
case 'lang':
case 'since_id':
$_query[$key] = $param;
break;
case 'rpp':
$_query[$key] = (intval($param) > 100) ? 100 : intval($param);
break;
case 'page':
$_query[$key] = intval($param);
break;
case 'show_user':
$_query[$key] = 'true';
}
}
$response = $this->restGet('/search.' . $this->_responseType, $_query);
switch($this->_responseType) {
case 'json':
return Zend_Json::decode($response->getBody());
break;
case 'atom':
return Zend_Feed::importString($response->getBody());
break;
}
return ;
}
}

Some files were not shown because too many files have changed in this diff Show More