Ancienne vue surveillance

This commit is contained in:
Michael RICOIS 2016-05-13 11:06:20 +02:00
parent fe3771da08
commit 5c2dc69e83
8 changed files with 378 additions and 0 deletions

View File

@ -0,0 +1,130 @@
<style>
form em { color:#FF0000;}
fieldset {border:0; margin:0; padding:0;}
fieldset legend{ padding:0 0 0 10px;}
.fieldgrp label{margin:0;}
.fieldgrp label span{font-weight:normal;}
.fieldgrp label abbr{color:#4B911C; font-size:120%; vertical-align:middle;}
.field {float:left; padding:0 10px 0 0;line-height:22px;_padding-top:3px;}
.field .longfield{width:215px;}
.field .longfield-select{width:220px;}
.field .smallfield{width:95px;}
.field .medfield{width:110px;}
.field input, .field select{ font-size:110%; margin:2px 0; }
.field input[type="radio"] { margin:0 5px 0 5px; }
div.submit{ margin-left:200px; padding-left:0px; margin-top:1em; }
div.submit p.submit-button{margin-top:0;}
div.submit p.details{font-size:85%;color:#666;margin:0;}
div.submit p.required-note{margin-top:1em;}
div.submit p.required-note span{color:#4B911C;_color:#666;font-size:170%;vertical-align:top;}
input.submit {border:none;}
</style>
<div id="survForm">
<?php if ( is_array($this->source) && count($this->source)==0 ) { ?>
Vous n'avez pas les droits nécessaire pour mettre en surveillance.
<script>
$('#dialogsurv').dialog({ buttons: [ {
text: "Quitter",
click: function() { $(this).dialog("close"); }
} ] });
</script>
<?php } else {?>
<form id="frmSurv" name="frmSurv" action="<?=$this->url(array(
'controller' => 'surveillance',
'action' => 'set'), 'default', true)?>" method="post">
<input name="siret" type="hidden" value="<?=$this->siret?>"/>
<?php if (is_array($this->source)) { ?>
<div class="fieldgrp">
<label>Types</label>
<div class="field">
<?php foreach($this->source as $s) { ?>
<input type="checkbox" name="source" value="<?=$s['id']?>"<?=$s['checked']?>/>&nbsp;<?=$s['txt']?><br/>
<?php } ?>
</div>
</div>
<?php } else { ?>
<input name="source" type="hidden" value="<?=$this->source?>"/>
<?php } ?>
<div class="fieldgrp">
<label class="StyleInfoLib">Votre référence</label>
<div class="field">
<input class="longfield" name="ref" type="text" value="<?=$this->ref?>" size="10"/></div>
</div>
<?php if (!is_array($this->source) && $this->source=='score') { ?>
<div class="fieldgrp">
<label class="StyleInfoLib">Votre encours (&euro;)</label>
<div class="field">
<input class="longfield" name="encours" type="text" value="<?=$this->encours?>" size="10"/></div>
</div>
<?php } ?>
<div class="fieldgrp">
<label class="StyleInfoLib">Adresse email du destinataire</label>
<div class="field">
<input class="longfield" name="email" type="text" value="<?=$this->email?>" size="100"/>
</div>
</div>
</form>
<script>
var windowhref = window.location.href;
$('#dialogsurv').dialog({ buttons: [
{ text: "Ok", click: function() { survSubmit(); } },
{ text: "Annuler", click: function() { $(this).dialog("close"); } }
]});
function survSubmit(){
$('#dialogsurv').dialog({buttons: []});
var action = $('#frmSurv').attr('action');
var siret = $('input[name=siret]').val();
var ref = $('input[name=ref]').val();
var encours = $('input[name=encours]').val();
var email = $('input[name=email]').val();
var source = [];
//Multiple source
$('input[type=checkbox][name=source]').each(function(){
if(this.checked){ source.push($(this).val()); }
});
//Unique source
if (source.length==0) {
source.push($('input[name=source]').val());
}
$('#frmSurv').replaceWith('<div id="frmSurv">Mise sous surveillance en cours...</div>');
if (source.length>0) {
var i = 0;
$.each( source, function( key, value ) {
$.post(action, {siret: siret, ref: ref, email: email, encours: encours, source: value}, function(data) {
$('#frmSurv').append('<br/>'+data);
}, 'text');
i++;
if (i == source.length) {
$('#frmSurv').append('<br/>Mise sous surveillance terminé.');
}
});
$('#dialogsurv').dialog({ buttons: [ {
text: "Fermer", click: function() { window.location.href = windowhref; }
} ]});
} else {
$('#frmSurv').replaceWith('<div id="frmSurv">Aucune source !</div>');
$('#dialogsurv').dialog({ buttons: [ {
text: "Fermer", click: function() { window.location.href = windowhref; }
} ]});
}
}
</script>
<?php } ?>
</div>

View File

@ -0,0 +1,51 @@
<style>
form { }
form em { color:#FF0000;}
fieldset {border:0; margin:0; padding:0;}
fieldset legend{ padding:0 0 0 10px;}
.fieldgrp{clear:both; width:100%; margin-bottom:.5em; overflow:hidden;}
.fieldgrp:after{content:"."; display:block; clear:both; visibility:hidden; line-height:0; height:0; }
.fieldgrp label{font-weight:bold; width:200px; clear:both; padding:0 10px 0 0;line-height:22px;_padding-top:3px; float:left; display:block; font-size:108%;}
.fieldgrp label span{font-weight:normal;}
.fieldgrp label abbr{color:#4B911C; font-size:120%; vertical-align:middle;}
.field {float:left; padding:0 10px 0 0;line-height:22px;_padding-top:3px;}
.field .longfield{width:215px;}
.field .longfield-select{width:220px;}
.field .smallfield{width:95px;}
.field .medfield{width:110px;}
.field input, .field select{ font-size:110%; margin:2px 0; }
.field input[type="radio"] { margin:0 5px 0 5px; }
div.submit{ margin-left:200px; padding-left:0px; margin-top:1em; }
div.submit p.submit-button{margin-top:0;}
div.submit p.details{font-size:85%;color:#666;margin:0;}
div.submit p.required-note{margin-top:1em;}
div.submit p.required-note span{color:#4B911C;_color:#666;font-size:170%;vertical-align:top;}
input.submit {border:none;}
</style>
<div id="survForm">
<form id="frmSurv" name="frmSurv" action="#" method="post">
<div class="fieldgrp">
<label class="StyleInfoLib">Votre référence</label>
<div class="field">
<input class="longfield" name="ref" type="text" value="" size="10"/></div>
</div>
<div class="fieldgrp">
<label class="StyleInfoLib">Votre encours (&euro;)</label>
<div class="field">
<input class="longfield" name="encours" type="text" value="" size="10"/></div>
</div>
<div class="fieldgrp">
<label class="StyleInfoLib">Adresse email du destinataire</label>
<div class="field">
<input class="longfield" name="email" type="text" value="<?=$this->email?>" size="20"/>
</div>
</div>
</form>
</div>

View File

@ -0,0 +1,113 @@
<div id="center">
<h1>Surveillance Fichier</h1>
<div class="paragraph">
<table>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Mon identifiant</td>
<td width="350" class="StyleInfoData"><i><?=$this->login?></i></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Mon identité</td>
<td width="350" class="StyleInfoData"><i><?=$this->nom?></i></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Afficher uniquement les annonces</td>
<td width="350" class="StyleInfoData">
<form name="form_filtre" action="<?=$this->url(array('controller'=>'surveillance', 'action'=>'fichier'))?>" method="GET" enctype="multipart/form-data">
<input type="hidden" name="page" value="survlisteann" />
<input type="hidden" name="nomFic" value="<?=$this->$nomFic?>" />
<select name="filtre" onchange="document.form_filtre.submit()">
<option value="-">-</option>
<?php foreach ( $this->selectFiltre as $key => $value ) {?>
<option value="<?=$key?>"<?=$value['select']?>><?=$value['lib']?></option>
<?php }?>
</select>
</form>
</td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Télécharger la liste en pdf</td>
<td width="350" class="StyleInfoData">
<?php
//On souhaite afficher 100 annonces par PDF
$nbPDF = ceil(count($this->annonces)/100);
for($i=0;$i<$nbPDF;$i++){ ?>
<a href="<?=$this->url(array('controller'=>'surveillance', 'action'=>'fichierpdf', 'q'=>$this->nomFic, 'page'=>$i+1, 'filtre'=>$this->filtre))?>"><?=$i+1?></a>
<?php if($i!=$nbPDF-1) print "-"; ?>
<?php } ?>
</td>
</tr>
</table>
</div>
<h2>Surveillance</h2>
<table>
<?php if(count($this->annonces)>0) { ?>
<?php foreach($this->annonces as $annonce){ ?>
<tr>
<td width="30">&nbsp;</td>
<td width="550" colspan="2" class="StyleInfoLib">
Entreprise : <?=$annonce['RaisonSociale'].' ('.$annonce['Siren']?>)
</td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoData">Site : <?=$annonce['SiteCnasea']?></td>
<td width="350" colspan="2" class="StyleInfoData">Référence : <?=$annonce['Ref']?></td>
</tr>
<?php if ($annonce['Bodacc']=='A' || $annonce['Bodacc']=='B' || $annonce['Bodacc']=='C') { ?>
<tr>
<td width="30">&nbsp;</td>
<td width="550" colspan="2" class="StyleInfoData">BODACC n&deg;<?=$annonce['Parution'].'&nbsp;'.$annonce['Bodacc'].' du '.$annonce['DatePar'];?>. <?=$annonce['Tribunal']?>.</td>
</tr>
<?php } elseif ($annonce['Bodacc']=='G') { ?>
<tr>
<td width="30">&nbsp;</td>
<td width="550" colspan="2" class="StyleInfoData">GREFFE du <?=$annonce['Tribunal'].' au '.$annonce['DatePar'];?>.</td>
</tr>
<?php } elseif ($annonce['Bodacc']=='P') { ?>
<tr>
<td width="30">&nbsp;</td>
<td width="550" colspan="2" class="StyleInfoData">RNCS du <?=$annonce['Tribunal'].' au '.$annonce['DatePar'];?>.</td>
</tr>
<?php } else { ?>
<tr>
<td width="30">&nbsp;</td>
<td width="550" colspan="2" class="StyleInfoData">Collecte SD du <?=$annonce['Tribunal'].' au '.$annonce['DatePar'];?>.</td>
</tr>
<?php } ?>
<tr>
<td width="30">&nbsp;</td>
<td width="550" colspan="2" class="StyleInfoLib"><b><?=$annonce['Even']?></b></td>
</tr>
<tr>
<td colspan="4">&nbsp;</td>
</tr>
<tr>
<td width="30">&nbsp;</td><td width="550" colspan="2"><code><?=$annonce['TexteAnn']?></code></td>
</tr>
<tr>
<td colspan="4">&nbsp;</td>
</tr>
<tr>
<td colspan="4"><hr width="100%"></td>
</tr>
<?php
} // Fin foreach
//Si pas d'annonces
} else {
?>
<tr>
<td width="30">&nbsp;</td>
<td width="550" colspan="2" class="StyleInfoLib">Aucune annonce</td>
</tr>
<?php
}
?>
</table>
</div>

View File

@ -0,0 +1,44 @@
<div id="center">
<h1>Surveillance Fichier</h1>
<div class="paragraph">
<table>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Mon identifiant</td>
<td width="350" class="StyleInfoData"><i><?=$this->login?></i></td>
</tr>
<tr>
<td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib">Mon identité</td>
<td width="350" class="StyleInfoData"><i><?=$this->nom?></i></td>
</tr>
</table>
</div>
<h2>Surveillance</h2>
<div class="paragraph">
<?php if (count($this->listeFichier)>0){ ?>
<table>
<?php foreach ($this->listeFichier as $infos) {?>
<tr>
<td width="30">&nbsp;</td>
<td class="lienNormal">
<?php if ($infos['dejaLu']) { echo '<b>'; }?>
Liste des annonces du <?=$infos['date']?>
au format <a href="<?=$this->url(array('controller'=>'surveillance', 'action'=>'fichier', 'nomFic'=>$infos['fichier'], 'get'=>'ok'))?>" target="_blank">CSV</a>
ou au format <a href="<?=$this->url(array('controller'=>'surveillance', 'action'=>'fichier', 'nomFic'=>$infos['fichier']))?>">HTML</a>
ou au format <a href="<?=$this->url(array('controller'=>'surveillance', 'action'=>'fichier', 'nomFic'=>$infos['fichier']))?>" target="_blank" title="<?=$infos['fichier']?>">PDF</a>
<?php if ($infos['dejaLu']) { echo '</b>'; }?>
</td>
</tr>
<? } ?>
</table>
<?php } else { ?>
<div>Aucun fichier disponible !</div>
<?php } ?>
</div>
</div>

View File

@ -0,0 +1,22 @@
<a class="dialogsurv" href="<?=$this->url(array(
'controller' => 'surveillance',
'action' => 'ajouter',
'source' => $this->dialogSource,
'siret' => $this->siret,
))?>" title="<?=$this->dialogTitre?> <?=$this->dialogSource?>">
<?=$this->dialogTexte?>
</a>
<?php
$cSource = 0;
if (count($this->surveillances)>0){
foreach ($this->surveillances as $item) {
$cSource++;
?>
<u tooltip="<?=$item['tooltipTexte']?>"><?=$item['sourceTexte']?></u>
<?php if ($cSource<count($this->surveillances)) { ?>, <?php } ?>
<?php
}
}
if (!empty($this->ref)) {?>
(<?=$this->ref?>)
<?php }?>

View File

@ -0,0 +1,5 @@
<p class="options">
<a href="<?=$this->url(array('module'=>'file', 'controller'=>'dl', 'action' => 'portefeuille'), 'default',
true)?>" id="dl">Exporter votre portefeuille au format CSV</a>
</p>
<div class="paragraph" id="dlMsg"></div>

View File

@ -0,0 +1 @@
<?=$this->msg?>

View File

@ -0,0 +1,12 @@
<p class="options">
<label>Extraire uniquement les surveillances de type</label>
<select name="source">
<option value="">toutes</option>
<?php foreach ($this->tabSource as $s) { ?>
<option value="<?=$s['value']?>"<?=$s['select']?>><?=$s['name']?></option>
<?php } ?>
</select>
<a href="<?=$this->url(array('module'=>'file', 'controller'=>'dl', 'action' => 'surveillance'),
'default', true)?>" id="dl">Ok</a>
</p>
<div class="paragraph" id="dlMsg"></div>