|
Fiche identité simplifié
|
Accès à la fiche identité approfondie :
ServiceSpeed == 'Normal' &&
$product->Type == 'Investigation' &&
$product->Level == 4) {
$tabReport[$countProducts] = 'Normal';
$tabProducts[$countProducts]['identifier'] =
$product->CompanyProductIdentifier;
$tabProducts[$countProducts]['DaysFrom'] = $product->DaysFrom;
$tabProducts[$countProducts]['DaysTo'] = $product->DaysTo;
$countProducts++;
}
// Rapport en mode Superflash
if ($product->ServiceSpeed == 'Superflash' &&
$product->Type == 'Investigation' &&
$product->Level == 4) {
$tabReport[] = 'Superflash';
$tabProducts[$countProducts]['identifier'] =
$product->CompanyProductIdentifier;
if (isset($product->DaysFrom) == true) {
$tabProducts[$countProducts]['DaysFrom'] = $product->DaysFrom;
}
$tabProducts[$countProducts]['DaysTo'] = $product->DaysTo;
$countProducts++;
}
// Rapport disponible avec mise à jour
if ($product->ServiceSpeed == 'ImmediateWithUpdate' &&
$product->Type == 'Database' &&
$product->Level == 3) {
require_once 'mail/mail.php';
sendMail('Rapport International',
"ImmediateWithUpdate disponible\n" .
"Identifiant : ".$identifier,
array('email' => 'contact@scores-decisions.com',
'name' => 'Serveur SD-13408'),
array(0 => array('email' => EMAIL_SUPPORTDEV,
'name' => 'Support'), ));
//Don't display ImmediateWithUpdate
/*
$mimetype = FALSE;
if (is_array($product->MimeTypes->MimeType)){
if (in_array('xml', $product->MimeTypes->MimeType)){$mimetype = TRUE;}
}else{
if ($product->MimeTypes->MimeType == 'xml' ){$mimetype = TRUE;}
}
if ($mimetype == TRUE ){
$tabReport[] = 'ImmediateWithUpdate';
$tabProducts[$countProducts]['identifier'] = $product->CompanyProductIdentifier;
$tabProducts[$countProducts]['DaysFrom'] = $product->DaysFrom;
$tabProducts[$countProducts]['DaysTo'] = $product->DaysTo;
$countProducts++;
}
*/
}
//Rapport disponible en ligne
if ($product->ServiceSpeed == 'Immediate' && $product->Type == 'Database' && $product->Level == 3 )
{
$mimetype = FALSE;
if (!is_array($product->MimeTypes->MimeType)){ $productMimeTypes = array($product->MimeTypes->MimeType); }
else{ $productMimeTypes = $product->MimeTypes->MimeType; }
foreach( reportFormat() as $format )
{
if (in_array($format, $product->MimeTypes->MimeType))
{
$mimetype = TRUE;
break;
}
else
{
require_once 'mail/mail.php';
sendMail(
'Rapport International',
"Rapport international disponible dans un autre format que le XML\n" .
"Identifiant : ".$identifier,
array(
'email'=>'contact@scores-decisions.com',
'name'=>'Serveur SD-13408'),
array(
0 => array(
'email'=>EMAIL_SUPPORTDEV,
'name'=>'Support'),
)
);
}
}
if ($mimetype == TRUE )
{
$tabReport[] = 'Immediate';
$tabProducts[$countProducts]['identifier'] = $product->CompanyProductIdentifier;
$tabProducts[$countProducts]['format'] = $format;
$countProducts++;
}
}
} // Fin boucle d'affichage des produits
// --------------------------------------------------------------------------- //
// Affichage des differents rapports
// --------------------------------------------------------------------------- //
if (count($tabReport) == 0) {
print '(Aucun rapport disponible pour cette société)';
} else {
// Récupération des tarifs propre au pays
setDbConn('graydon');
$tabPaysPrix = Doctrine_Query::create()
->from('Price p')
->leftJoin('p.Country c')
->where('c.graydon_country = ?', $pays)
->fetchArray();
foreach (array('normal' => 'normal',
'superflash' => 'rapide',
'immediate' => 'immédiat') as $mode_en => $mode_fr) {
print '
';
if (in_array(ucfirst($mode_en), $tabReport) == false) {
print 'Rapport en mode '.$mode_fr.' indisponible';
continue;
}
$key = array_search(ucfirst($mode_en), $tabReport);
$pidentifier = $tabProducts[$key]['identifier'];
// Verification des droits
if (preg_match('/\binternational\b/i', $_SESSION['tabInfo']['droits'])) {
print ''.
'Commander le rapport en mode '.$mode_fr.'';
} else {
print 'Vous n\'avez pas les droits nécessaires'.
' pour commander un rapport international';
}
if ($mode_fr != 'immédiat') {
$daysFrom = (isset($tabProducts[$key]['DaysFrom']) == true) ?
$tabProducts[$key]['DaysFrom'] : '';
$daysTo = $tabProducts[$key]['DaysTo'];
print ' (Délais : '.$daysFrom.' à '.$daysTo.' Jours'.
', Tarif : '.$tabPaysPrix[0][$mode_en].' €)';
}
}
}
?>
|