Remove depencies of library common/dates : dateT

This commit is contained in:
Michael RICOIS 2013-10-31 15:17:28 +00:00
parent 35f9ccbd44
commit f0caaf2034

View File

@ -7,21 +7,14 @@
}
</style>
<h1>World-Check</h1>
<?php if (!$this->content) { ?>
<p><div style="margin-left:10px;">Aucune Information</div></div>
<?php
require_once 'common/dates.php';
$wdate = new WDate();
if (!$this->content)
{
?>
<p><div style='margin-left: 10px;'>Aucune Information</div></div>
<?php
}
else
{
} else {
$content = $this->content;
?>
<h2><?=$this->content[0]->names->name[0]->fullName;?>
<?php
<?php
if (strtolower($this->nameType)=='individual')
{
$day = $month = $year = '';
@ -54,7 +47,7 @@ if (strtolower($this->nameType)=='individual')
);
}
?>
<div style='float:right;'><a style="color:white;" href="<?=$this->url($param, null, true)?>">&nbsp;Search in Extranet&nbsp;&nbsp;</a></div>
<div style="float:right;"><a style="color:white;" href="<?=$this->url($param, null, true)?>">&nbsp;Search in Extranet&nbsp;&nbsp;</a></div>
</h2>
<div class="paragraph">
<table cellpadding=3>
@ -64,12 +57,12 @@ if (strtolower($this->nameType)=='individual')
<td class="StyleInfoData"><div class="wrap"><?=ucfirst(strtolower($content[0]->category));?></div></td>
</tr>
<?php } ?>
<?php
<?php
if (isset($content[0]->names->name)){?>
<tr>
<td class="StyleInfoLib" width="150">All names</td>
<td class="StyleInfoData"><div class="wrap">
<?php
<?php
foreach($content[0]->names->name as $name)
{
if (isset($name->fullName) && $name->fullName!='') {echo $name->fullName.'<br/>';}
@ -82,13 +75,14 @@ foreach($content[0]->names->name as $name)
<?php } ?>
<?php if (isset($content[0]->events->event) && ($content[0]->events->event[0]->day>0) && ($content[0]->events->event[0]->month>0) && ($content[0]->events->event[0]->year>0)) { ?>
<tr><td class="StyleInfoLib" width="150">Birthday</td>
<td class="StyleInfoData"><div class="wrap"><?=$wdate->dateT('Y-m-d', 'd/m/Y', $content[0]->events->event[0]->fullDate);?></div></td></tr>
<?php $date = new Zend_Date($content[0]->events->event[0]->fullDate, 'yyyy-MM-dd');?>
<td class="StyleInfoData"><div class="wrap"><?=$date->toString('dd/MM/yyyy')?></div></td></tr>
<?php } ?>
<?php if (isset($content[0]->events->event[0]->address->region)) { ?>
<tr><td class="StyleInfoLib" width="150">Birth place</td>
<td class="StyleInfoData"><div class="wrap"><?=$content[0]->events->event[0]->address->region;?></div></td></tr>
<?php } ?>
<?php
<?php
foreach($content[0]->details->detail as $detail)
{ ?>
<?php if (isset($detail->text)) { ?>
@ -102,9 +96,9 @@ if (isset($content[0]->addresses->address[0])){
?>
<tr><td class="StyleInfoLib" width="150">All Addresses</td>
<td class="StyleInfoData"><div class="wrap">
<?php
<?php
foreach($content[0]->addresses->address as $address) {
$fullAddress = array();
$fullAddress = array();
if (isset($address->city)) { $fullAddress[] = $address->city;}
if (isset($address->region)) { $fullAddress[] = $address->region;}
if (isset($address->country)) { $fullAddress[] = ucfirst(strtolower($address->country->name));}
@ -113,7 +107,7 @@ foreach($content[0]->addresses->address as $address) {
<?php unset($fullAddress); }?>
</div></td></tr>
<?php } ?>
<?php
<?php
if (isset($content[0]->actionDetails->actionDetail)){
foreach($content[0]->actionDetails->actionDetail as $actionDetail)
{?>
@ -123,7 +117,7 @@ if (isset($content[0]->actionDetails->actionDetail)){
<td class="StyleInfoData"><div class="wrap"><?=$actionDetail->source->name.' ('.$actionDetail->source->abbreviation.')';?></div></td></tr>
<?php }} ?>
<?php
<?php
foreach($content[0]->countryLinks->countryLink as $countryLink)
{ ?>
<?php if (isset($countryLink->countryText)) { ?>
@ -133,20 +127,20 @@ foreach($content[0]->countryLinks->countryLink as $countryLink)
</tr>
<?php } ?>
<?php } ?>
<?php
<?php
if (isset($content[0]->sources->sourceDetail)){
foreach($content[0]->sources->sourceDetail as $source)
{
{
if (isset($source->name) && $source->name!='') { ?>
<tr><td class="StyleInfoLib" width="150"><?=$source->ProviderSourceTypeDetail->category->name?></td>
<td class="StyleInfoData"><div class="wrap"><?=$source->ProviderSourceTypeDetail->category->description;?></div></td></tr>
<tr><td class="StyleInfoLib" width="150">Source</td>
<td class="StyleInfoData"><div class="wrap"><?=$source->name.' ('.$source->abbreviation.')';?></div></td></tr>
<?php }}} ?>
<?php
<?php
if (isset($content[0]->roles->role)){
foreach($content[0]->roles->role as $role)
{
{
if (isset($role->title) && $role->title!='') { ?>
<tr><td class="StyleInfoLib" width="150"><?=$role->type?></td>
<td class="StyleInfoData"><div class="wrap"><?=$role->title;?></div></td></tr>
@ -165,12 +159,12 @@ foreach($content[0]->roles->role as $role)
</table>
</div>
<?php
<?php
if (isset($content[0]->associates->associate)) {
foreach($content[0]->associates->associate as $associate)
{ ?>
<h2>
<?php
<?php
if ($associate->associatetype=='ASSOCIATE')
{
$dirType = 'INDIVIDUAL';
@ -240,10 +234,11 @@ $('img.wcheck').each(function(){
<?php if (isset($associate->targetEntity->events->event) && ($associate->targetEntity->events->event[0]->day>0) && ($associate->targetEntity->events->event[0]->month>0) && ($associate->targetEntity->events->event[0]->year>0)) { ?>
<tr>
<td class="StyleInfoLib" width="150">Birthday</td>
<td class="StyleInfoData"><div class="wrap"><?=$wdate->dateT('Y-m-d', 'd/m/Y', $associate->targetEntity->events->event[0]->fullDate);?></div></td>
<?php $date = new Zend_Date($associate->targetEntity->events->event[0]->fullDate, 'yyyy-MM-dd');?>
<td class="StyleInfoData"><div class="wrap"><?=$date->toString('dd/MM/yyyy')?></div></td>
</tr>
<?php } ?>
<?php
<?php
foreach($associate->targetEntity->details->detail as $detailAssoc)
{ ?>
<?php if (isset($detailAssoc->text)) { ?>
@ -259,7 +254,7 @@ foreach($associate->targetEntity->details->detail as $detailAssoc)
<?php
if (isset($associate->targetEntity->addresses->address[0])){
foreach($associate->targetEntity->addresses->address as $address) {
$fullAddress = array();
$fullAddress = array();
if (isset($address->city)) { $fullAddress[] = $address->city;}
if (isset($address->region)) { $fullAddress[] = $address->region;}
if (isset($address->country)) { $fullAddress[] = ucfirst(strtolower($address->country->name));}
@ -268,7 +263,7 @@ if (isset($address->country)) { $fullAddress[] = ucfirst(strtolower($address->co
<br/>
<?php unset($fullAddress); }}?>
</div></td></tr>
<?php
<?php
if (isset($associate->targetEntity->actionDetails->actionDetail)){
foreach($associate->targetEntity->actionDetails->actionDetail as $actionDetail)
{?>
@ -277,7 +272,7 @@ if (isset($associate->targetEntity->actionDetails->actionDetail)){
<tr><td class="StyleInfoLib" width="150">Source</td>
<td class="StyleInfoData"><div class="wrap"><?=$actionDetail->source->name.' ('.$actionDetail->source->abbreviation.')';?></div></td></tr>
<?php }} ?>
<?php
<?php
foreach($associate->targetEntity->countryLinks->countryLink as $countryLink)
{ ?>
<?php if (isset($countryLink->countryText)) { ?>
@ -287,20 +282,20 @@ foreach($associate->targetEntity->countryLinks->countryLink as $countryLink)
</tr>
<?php } ?>
<?php } ?>
<?php
<?php
if (isset($associate->targetEntity->sources->sourceDetail)){
foreach($associate->targetEntity->sources->sourceDetail as $source)
{
{
if (isset($source->name) && $source->name!='') { ?>
<tr><td class="StyleInfoLib" width="150"><?=$source->ProviderSourceTypeDetail->category->name?></td>
<td class="StyleInfoData"><div class="wrap"><?=$source->ProviderSourceTypeDetail->category->description;?></div></td></tr>
<tr><td class="StyleInfoLib" width="150">Source</td>
<td class="StyleInfoData"><div class="wrap"><?=$source->name.' ('.$source->abbreviation.')';?></div></td></tr>
<?php }}} ?>
<?php
<?php
if (isset($associate->targetEntity->roles->role)){
foreach($associate->targetEntity->roles->role as $role)
{
{
if (isset($role->title) && $role->title!='') { ?>
<tr><td class="StyleInfoLib" width="150"><?=$role->type?></td>
<td class="StyleInfoData"><div class="wrap"><?=$role->title;?></div></td></tr>