Correction suite à la mise en prod du 21/08/2009

This commit is contained in:
Michael RICOIS 2009-08-24 07:31:04 +00:00
commit 192b1586a2
7 changed files with 271 additions and 123 deletions

113
www/js/jquery.pngFix.js Normal file
View File

@ -0,0 +1,113 @@
/**
* --------------------------------------------------------------------
* jQuery-Plugin "pngFix"
* Version: 1.2, 09.03.2009
* by Andreas Eberhard, andreas.eberhard@gmail.com
* http://jquery.andreaseberhard.de/
*
* Copyright (c) 2007 Andreas Eberhard
* Licensed under GPL (http://www.opensource.org/licenses/gpl-license.php)
*
* Changelog:
* 09.03.2009 Version 1.2
* - Update for jQuery 1.3.x, removed @ from selectors
* 11.09.2007 Version 1.1
* - removed noConflict
* - added png-support for input type=image
* - 01.08.2007 CSS background-image support extension added by Scott Jehl, scott@filamentgroup.com, http://www.filamentgroup.com
* 31.05.2007 initial Version 1.0
* --------------------------------------------------------------------
* @example $(function(){$(document).pngFix();});
* @desc Fixes all PNG's in the document on document.ready
*
* jQuery(function(){jQuery(document).pngFix();});
* @desc Fixes all PNG's in the document on document.ready when using noConflict
*
* @example $(function(){$('div.examples').pngFix();});
* @desc Fixes all PNG's within div with class examples
*
* @example $(function(){$('div.examples').pngFix( { blankgif:'ext.gif' } );});
* @desc Fixes all PNG's within div with class examples, provides blank gif for input with png
* --------------------------------------------------------------------
*/
(function($) {
jQuery.fn.pngFix = function(settings) {
// Settings
settings = jQuery.extend({
blankgif: 'blank.gif'
}, settings);
var ie55 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4 && navigator.appVersion.indexOf("MSIE 5.5") != -1);
var ie6 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4 && navigator.appVersion.indexOf("MSIE 6.0") != -1);
if (jQuery.browser.msie && (ie55 || ie6)) {
//fix images with png-source
jQuery(this).find("img[src$=.png]").each(function() {
jQuery(this).attr('width',jQuery(this).width());
jQuery(this).attr('height',jQuery(this).height());
var prevStyle = '';
var strNewHTML = '';
var imgId = (jQuery(this).attr('id')) ? 'id="' + jQuery(this).attr('id') + '" ' : '';
var imgClass = (jQuery(this).attr('class')) ? 'class="' + jQuery(this).attr('class') + '" ' : '';
var imgTitle = (jQuery(this).attr('title')) ? 'title="' + jQuery(this).attr('title') + '" ' : '';
var imgAlt = (jQuery(this).attr('alt')) ? 'alt="' + jQuery(this).attr('alt') + '" ' : '';
var imgAlign = (jQuery(this).attr('align')) ? 'float:' + jQuery(this).attr('align') + ';' : '';
var imgHand = (jQuery(this).parent().attr('href')) ? 'cursor:hand;' : '';
if (this.style.border) {
prevStyle += 'border:'+this.style.border+';';
this.style.border = '';
}
if (this.style.padding) {
prevStyle += 'padding:'+this.style.padding+';';
this.style.padding = '';
}
if (this.style.margin) {
prevStyle += 'margin:'+this.style.margin+';';
this.style.margin = '';
}
var imgStyle = (this.style.cssText);
strNewHTML += '<span '+imgId+imgClass+imgTitle+imgAlt;
strNewHTML += 'style="position:relative;white-space:pre-line;display:inline-block;background:transparent;'+imgAlign+imgHand;
strNewHTML += 'width:' + jQuery(this).width() + 'px;' + 'height:' + jQuery(this).height() + 'px;';
strNewHTML += 'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader' + '(src=\'' + jQuery(this).attr('src') + '\', sizingMethod=\'scale\');';
strNewHTML += imgStyle+'"></span>';
if (prevStyle != ''){
strNewHTML = '<span style="position:relative;display:inline-block;'+prevStyle+imgHand+'width:' + jQuery(this).width() + 'px;' + 'height:' + jQuery(this).height() + 'px;'+'">' + strNewHTML + '</span>';
}
jQuery(this).hide();
jQuery(this).after(strNewHTML);
});
// fix css background pngs
jQuery(this).find("*").each(function(){
var bgIMG = jQuery(this).css('background-image');
if(bgIMG.indexOf(".png")!=-1){
var iebg = bgIMG.split('url("')[1].split('")')[0];
jQuery(this).css('background-image', 'none');
jQuery(this).get(0).runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + iebg + "',sizingMethod='scale')";
}
});
//fix input with png-source
jQuery(this).find("input[src$=.png]").each(function() {
var bgIMG = jQuery(this).attr('src');
jQuery(this).get(0).runtimeStyle.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader' + '(src=\'' + bgIMG + '\', sizingMethod=\'scale\');';
jQuery(this).attr('src', settings.blankgif)
});
}
return jQuery;
};
})(jQuery);

View File

@ -0,0 +1,11 @@
/**
* --------------------------------------------------------------------
* jQuery-Plugin "pngFix"
* Version: 1.1, 11.09.2007
* by Andreas Eberhard, andreas.eberhard@gmail.com
* http://jquery.andreaseberhard.de/
*
* Copyright (c) 2007 Andreas Eberhard
* Licensed under GPL (http://www.opensource.org/licenses/gpl-license.php)
*/
eval(function(p,a,c,k,e,r){e=function(c){return(c<62?'':e(parseInt(c/62)))+((c=c%62)>35?String.fromCharCode(c+29):c.toString(36))};if('0'.replace(0,e)==0){while(c--)r[e(c)]=k[c];k=[function(e){return r[e]||e}];e=function(){return'([237-9n-zA-Z]|1\\w)'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(s(m){3.fn.pngFix=s(c){c=3.extend({P:\'blank.gif\'},c);8 e=(o.Q=="t R S"&&T(o.u)==4&&o.u.A("U 5.5")!=-1);8 f=(o.Q=="t R S"&&T(o.u)==4&&o.u.A("U 6.0")!=-1);p(3.browser.msie&&(e||f)){3(2).B("img[n$=.C]").D(s(){3(2).7(\'q\',3(2).q());3(2).7(\'r\',3(2).r());8 a=\'\';8 b=\'\';8 g=(3(2).7(\'E\'))?\'E="\'+3(2).7(\'E\')+\'" \':\'\';8 h=(3(2).7(\'F\'))?\'F="\'+3(2).7(\'F\')+\'" \':\'\';8 i=(3(2).7(\'G\'))?\'G="\'+3(2).7(\'G\')+\'" \':\'\';8 j=(3(2).7(\'H\'))?\'H="\'+3(2).7(\'H\')+\'" \':\'\';8 k=(3(2).7(\'V\'))?\'float:\'+3(2).7(\'V\')+\';\':\'\';8 d=(3(2).parent().7(\'href\'))?\'cursor:hand;\':\'\';p(2.9.v){a+=\'v:\'+2.9.v+\';\';2.9.v=\'\'}p(2.9.w){a+=\'w:\'+2.9.w+\';\';2.9.w=\'\'}p(2.9.x){a+=\'x:\'+2.9.x+\';\';2.9.x=\'\'}8 l=(2.9.cssText);b+=\'<y \'+g+h+i+j;b+=\'9="W:X;white-space:pre-line;Y:Z-10;I:transparent;\'+k+d;b+=\'q:\'+3(2).q()+\'z;r:\'+3(2).r()+\'z;\';b+=\'J:K:L.t.M(n=\\\'\'+3(2).7(\'n\')+\'\\\', N=\\\'O\\\');\';b+=l+\'"></y>\';p(a!=\'\'){b=\'<y 9="W:X;Y:Z-10;\'+a+d+\'q:\'+3(2).q()+\'z;r:\'+3(2).r()+\'z;">\'+b+\'</y>\'}3(2).hide();3(2).after(b)});3(2).B("*").D(s(){8 a=3(2).11(\'I-12\');p(a.A(".C")!=-1){8 b=a.13(\'url("\')[1].13(\'")\')[0];3(2).11(\'I-12\',\'none\');3(2).14(0).15.J="K:L.t.M(n=\'"+b+"\',N=\'O\')"}});3(2).B("input[n$=.C]").D(s(){8 a=3(2).7(\'n\');3(2).14(0).15.J=\'K:L.t.M(n=\\\'\'+a+\'\\\', N=\\\'O\\\');\';3(2).7(\'n\',c.P)})}return 3}})(3);',[],68,'||this|jQuery||||attr|var|style||||||||||||||src|navigator|if|width|height|function|Microsoft|appVersion|border|padding|margin|span|px|indexOf|find|png|each|id|class|title|alt|background|filter|progid|DXImageTransform|AlphaImageLoader|sizingMethod|scale|blankgif|appName|Internet|Explorer|parseInt|MSIE|align|position|relative|display|inline|block|css|image|split|get|runtimeStyle'.split('|'),0,{}))

View File

@ -62,13 +62,17 @@ $(document).ready(function(){
var date;
var url;
var details;
var dl = false;
$.ajaxSetup({timeout: 4000 });
//$.ajaxSetup({timeout: 4000 })
$('.submitmois').each(function (){
$(this).change(function (){
date = $(this).val();
$(this).val('-');
$('#submitmois').click(function(){
//On disable tout les champs
$('input[name=details]').attr('disabled', true);
$('select[name=mois]').attr('disabled', true);
//Valeur de la date
date = $('select[name=mois]').val();
//Vérification
if(date!='' && date!='-'){
login = $('input[name=utilisateur]').val();
details = $('input[name=details]').attr('checked')?true:false;
@ -76,12 +80,14 @@ $(document).ready(function(){
holdTheInterval = setInterval(checkFile, 4000);
}
});
});
function checkFile(){
essai++;
if(essai>nbEssai){
essai = 0;
updateInfo('Le temps maximum d\'attente a été atteint. Merci de rééssayez.');
$('input[name=details]').removeAttr('disabled');
$('select[name=mois]').removeAttr('disabled');
}else if(essai==1){
$('#message').text('Patientez pendant la construction du fichier ('+essai+')...');
$.post( 'pages/ajax/conso.php',
@ -98,6 +104,8 @@ $(document).ready(function(){
function updateInfo(data){
$('#message').html(data);
clearInterval(holdTheInterval);
$('input[name=details]').removeAttr('disabled');
$('select[name=mois]').removeAttr('disabled');
essai = 0;
}
});
@ -129,6 +137,7 @@ $(document).ready(function(){
}
?>
</select>
<a href="#" id="submitmois">Ok</a>
</td>
</tr>
<tr><td width="580" colspan="5" class="StyleInfoLib" >&nbsp;</td></tr>

View File

@ -38,8 +38,16 @@ if($start==1){
//Récupération du nom du fichier
$tableau = explode('/',$url);
$file = $tableau[sizeof($tableau)-1];
//Suppression du fichier si le temps de cache est dépassé
if( file_exists(PATH_DATA.'/conso/'.$file) && filemtime(PATH_DATA.'/conso/'.$file) > mktime(date("H")+4, date("i"), date("s"), date("m"), date("d"), date("Y")) )
{
unlink(PATH_DATA.'/conso/'.$file);
}
//Récupération du fichier sur le serveur
if (!file_exists(PATH_DATA.'/conso/'.$file)){
if ( !file_exists(PATH_DATA.'/conso/'.$file))
{
$firephp->info('Démarage recupération du fichier');
//On check si le fichier est présent sur l'url
(isset($_REQUEST['url']) && url!='')? $url=$_REQUEST['url']: '';
@ -56,6 +64,7 @@ if($start==1){
$return = 'FALSE';
}
}
//Le fichier existe sur l'extranet, etc....
if (file_exists(PATH_DATA.'/conso/'.$file) && filesize(PATH_DATA.'/conso/'.$file)>0)
{

View File

@ -108,16 +108,32 @@ if ($histo)
<?php
foreach ($dirs as $i=>$dir)
{
$societe = str_replace('&amp;#160;',' ', $dir['Societe']);
$nom = str_replace('&amp;#160;',' ', $dir['Societe'].' '.$dir['Nom'].' '.$dir['Prenom']);
if(isset($dir['Civilite']) && $dir['Civilite']!=''){$nom = $dir['Civilite'].'. '.$nom;}
?>
<tr>
<td class="StyleInfoData" width="120"><?php print $dir['Titre'];?></td>
<td class="StyleInfoData" width="200">
<p>
<?php
if($societe != ''){
?>
<a href="/?page=recherche&vue=list&formR[type]=ent&formR[raisonSociale]=<?php print $societe;?>" title="Recherche à partir de la raison sociale">
<?php print $societe;?>
</a>
<?php
}
?>
&nbsp;
<?php
if($nom != ''){
?>
<a href="/?page=recherche&vue=list&formR[type]=dir&formR[dirNom]=<?php print $dir['Nom'];?>&formR[dirPrenom]=<?php print $dir['Prenom'];?>&formR[dirDateNaissJJ]=<?php print substr($dir['NaissDate'],0,2);?>&formR[dirDateNaissMM]=<?php print substr($dir['NaissDate'],3,2);?>&formR[dirDateNaissAAAA]=<?php print substr($dir['NaissDate'],6,4);?>" title="Recherche à partir du nom du dirigeant">
<?php print $nom;?>
</a>
<?php
}
?>
</p>
</td>
<td class="StyleInfoData" width="230"><?

View File

@ -237,8 +237,9 @@ if (isset($etab['AutreId']) && $etab['AutreId']!='' && (!$flafNewRC || substr($
if(isset($etab['DateRadiation']) && $etab['DateRadiation']!='' && $etab['DateRadiation']!='0000-00-00'){
$dateRadiation = WDate::dateT('Ymd', 'd/m/Y', str_replace('-','',$etab['DateRadiation']));
}
$firephp->log($etab['SituationJuridique'], 'SituationJuridique');
if ($etab['SituationJuridique']=='P')
if ( $etab['SituationJuridique']=='P' || $etab['SituationJuridique'][0]=='R' || $_SESSION['tabInfo']['mode_edition']==1)
{
?>
<tr>
@ -246,56 +247,39 @@ if (isset($etab['AutreId']) && $etab['AutreId']!='' && (!$flafNewRC || substr($
<td width="200" class="StyleInfoLib">Situation juridique</td>
<td width="350" class="StyleInfoData">
<?php
if ($etab['SituationJuridique']=='P'){
}
//Procédure collective
if ($etab['SituationJuridique']=='P')
{
?>
<a href="./?page=annonces&siret=<?=$etab['Siret']?>&idEntreprise=<?=$idEntreprise?>">
<font color="red"><b>En proc&eacute;dure collective</b></font>
</a>
<?php if($dateRadiation!=''){ ?><br/>Radié du RCS le <?php print $dateRadiation; } ?>
<?php
}else{
}/*else{
if($dateRadiation!=''){ ?>Radié du RCS le <?php print $dateRadiation; }
}
?>
<?php
if ($_SESSION['tabInfo']['mode_edition']==1)
{
?>
<a href="./?page=saisie&siret=<?=$etab['Siret']?>&idEntreprise=<?=$idEntreprise?>">(Edition)</a>
<?php
}
?>
</td>
</tr>
<?php
}
elseif( ($etab['SituationJuridique']!='P' && $etab['SituationJuridique']!='') || $_SESSION['tabInfo']['mode_edition']==1 )
{
?>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Situation juridique</td>
<td width="350" class="StyleInfoData">
<?php
}*/
//Radiation
if($etab['SituationJuridique']=='RR')
{
?> Radié du RCS <?php if($dateRadiation!=''){ ?> le <?php print $dateRadiation; }
}elseif($etab['SituationJuridique']=='RP'){
?> Radiation publiée <?php if($dateRadiation!=''){ ?> le <?php print $dateRadiation; }
}
?>
<?php
if ($_SESSION['tabInfo']['mode_edition']==1)
{
?>
<a href="./?page=saisie&siret=<?=$etab['Siret']?>&idEntreprise=<?=$idEntreprise?>">(Edition)</a>
<?php
}
if ( $etab['SituationJuridique']=='P' || $etab['SituationJuridique'][0]!='R' || $_SESSION['tabInfo']['mode_edition']==1)
{
?>
</td>
</tr>
<?
}
<?php
} // Fin Situation juridique
?>
</table>

View File

@ -41,9 +41,11 @@ $nbAffichage = 100;
try{
$result = $client->getSurveillances(0, $source, true, $position, $nbAffichage, $triws);
$listSurveillance = $result['results']['reponses'];
/*
print '<!--';
print_r($listSurveillance);
print '-->';
*/
$nbReponses = $result['results']['nbReponses'];
$nbSurveillances = $result['results']['nbReponsesTotal'];
@ -68,13 +70,12 @@ $listTrier = $fonctionTri($listSurveillance);
#surveillance th {border:1px solid; padding:5px 15px 5px 2px;}
#surveillance td {border:1px solid; text-align:center; padding:2px; }
#surveillance .aleft {text-align:left;}
#surveillance .action {clear:both; font:normal 1em Arial, Verdana, Sans-serif; letter-spacing:1px; line-height: 1em;}
#surveillance .action {clear:both; margin:0; padding:0; font:normal 1em Arial, Verdana, Sans-serif; letter-spacing:1px; line-height: 1em;}
#surveillance td p {line-height:16px;}
#surveillance .action p {display:block; float:left; line-height:16px; margin:0;}
#surveillance .action a {display:block; float:right;}
#surveillance .action a.margin {margin-right:32px;}
#surveillance .action img {vertical-align:middle;}
#surveillance #type {width:110px;}
#surveillance #type {width:120px;}
#info {margin:5px 5px 5px 30px; font:normal 1em Arial, Verdana, Sans-serif; letter-spacing:1px; line-height: 1em;}
#info td {padding-right:10px;}
table.tablesorter thead tr .header { background-image:url(./img/bg.gif); background-repeat:no-repeat; background-position:center right; cursor:pointer; }
@ -86,14 +87,16 @@ p.options {margin-left:10px; margin-top:5px;}
<link rel="stylesheet" href="./css/thickbox.css" type="text/css" />
<script type="text/javascript" src="./js/thickbox.js"></script>
<script type="text/javascript" src="./js/jquery.tablesorter.js"></script>
<script type="text/javascript" src="./js/jquery.pngFix.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$(document).pngFix();
<?php
if($source == ''){
?>
$("#surveillance").tablesorter({
headers: {
2: { sorter: false},
2: { sorter: false },
3: { sorter: false },
4: { sorter: false },
5: { sorter: false }
@ -214,11 +217,12 @@ Il est ensuite possible de trier les surveillances affich
<?php
//Si vue=defaut alors on affiche les entités avec toutes leurs surveillances
if($vue=='default'){
foreach($listTrier as $item){
foreach($listTrier as $item)
{
?>
<tr>
<td class="aleft"><a href="./?page=identite&siret=<?php print $item['siren']; ?>"><?php print $item['siren']; ?></a></td>
<td width="120"><?php print $item['rs']; ?><br/><i><?php print $item['cp'].' '.$item['ville']; ?></i></td>
<td width="110"><?php print $item['rs']; ?><br/><i><?php print $item['cp'].' '.$item['ville']; ?></i></td>
<td>
<?php
foreach($tabSource as $source){
@ -240,9 +244,9 @@ foreach($listTrier as $item){
?>
<div id="a<?php print $item['siren'];?>" class="action">
<p><?php print ucfirst($source);?></p>
<a class="thickbox" href="./pages/ajax_surveillance.php?q=ajouter&siren=<?php print $item['siren']; ?>&source=<?php print $source;?>" title="Ajouter la surveillance <?php print $source;?>"><img src="./img/interface/ajouter.png"/></a>
<a class="thickbox" href="./pages/ajax_surveillance.php?q=ajouter&siren=<?php print $item['siren']; ?>&source=<?php print $source;?>&ref=<?php print $surveillance['ref'];?>&email=<?php print $surveillance['email'];?>" title="Editer la surveillance <?php print $source;?>"><img src="./img/interface/editer.png"/></a>
<a href="./?page=surveillance&action=supprimer&siren=<?php print $item['siren']; ?>&ref=<?php print $surveillance['ref']; ?>&source=<?php print $source;?>&email=<?php print $surveillance['email']; ?>&idEntreprise=<?=$idEntreprise?>&siret=<?=$siret?>" title="Supprimer la surveillance <?php print $source.' '.$surveillance['email'];?>"><img src="./img/interface/supprimer.png"/></a>
<a class="thickbox" href="./pages/ajax_surveillance.php?q=ajouter&siren=<?php print $item['siren']; ?>&source=<?php print $source;?>" title="Ajouter la surveillance <?php print $source;?>"><img src="./img/interface/ajouter.png"/></a>
</div>
<?php
}
@ -250,7 +254,7 @@ foreach($listTrier as $item){
?>
<div id="a<?php print $item['siren'];?>" class="action">
<p><?php print ucfirst($source);?></p>
<a class="margin thickbox" href="./pages/ajax_surveillance.php?q=ajouter&siren=<?php print $item['siren']; ?>&source=<?php print $source;?>" title="Ajouter la surveillance <?php print $item['source'];?>"><img src="./img/interface/ajouter.png"/></a>
<a class="thickbox" href="./pages/ajax_surveillance.php?q=ajouter&siren=<?php print $item['siren']; ?>&source=<?php print $source;?>" title="Ajouter la surveillance <?php print $item['source'];?>"><img src="./img/interface/ajouter.png"/></a>
</div>
<?php
}
@ -287,7 +291,9 @@ foreach($listTrier as $item){
<?php
}
//si vue=source alors on a forcément qu'une seul source donc 1 ligne par surveillance d'entité
}elseif($vue=='source'){
}
elseif($vue=='source')
{
foreach($listTrier as $item){
?>
<tr>