2011-11-22 09:23:48 +00:00

637 lines
19 KiB
PHTML

<style type="text/css">
.close {
display: none;
}
.open {
display: block;
}
.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;
margin-left: 30px;
width: 180px;
clear: both;
padding: 0 10px 0 0;
line-height: 22px;
_padding-top: 3px;
float: left;
display: block;
font-size: 108%;
}
.field {
width: 320px;
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 {
clear: both;
text-align: center;
}
</style>
<script type="text/javascript">
$(document).ready(function(){
$('.menu-close').click(function(){
$('div.blockh2').css('display','none');
$(this).next('div.blockh2').css('display','block');
});
$('a#addIp').click(function(e){
e.preventDefault();
var text = $('div.formip').html();
var title = $(this).html();
var dialogOpts = {
bgiframe: true,
title: title,
width: 250,
height: 130,
modal: true,
open: function(event, ui) { $(this).html(text); },
buttons: {
'Ajouter' : function() {
var select1 = $('#formip input[name=ip0]').val()+'.'+
$('#formip input[name=ip1]').val()+'.'+
$('#formip input[name=ip2]').val()+'.'+
$('#formip input[name=ip3]').val();
var select2 = $('#formip input[name=ip4]').val()+'.'+
$('#formip input[name=ip5]').val()+'.'+
$('#formip input[name=ip6]').val()+'.'+
$('#formip input[name=ip7]').val();
VerifIp = new RegExp('^([0-9]{1,3}\.){3}[0-9]{1,3}$');
if ( (VerifIp.test(select1) && VerifIp.test(select2)) || (VerifIp.test(select1) && select2=='...') ){
var txt = $('input[name=filtres_ip]').val();
if (select2=='...'){
select = select1;
} else {
select = select1+'-'+select2;
}
(txt.length>0) ? txt = txt+';'+select : txt = select;
var concat = '';
var liste = txt.split(';');
for (item in liste){
concat = concat+liste[item]+' [<a href="#" class="deleteIP" id="'+liste[item]+'">Suppression</a>]<br/>';
}
$('input[name=filtres_ip]').val(txt);
$('#listeip').html(concat);
}
$(this).dialog('close');
},
'Fermer': function() { $(this).dialog('close'); }
},
close: function() { $('div#formip').remove(); }
};
$('<div id="formip"></div>').dialog(dialogOpts);
return false;
});
$('body').delegate('.deleteIP', 'click', function(e){
e.preventDefault();
var select = $(this).attr('id');
var txt = '';
var concat = '';
var strListe = $('input[name=filtres_ip]').val();
strListe = strListe.substring(0, strListe.length-1);
var liste = strListe.split(';');
for (item in liste){
if (liste[item]!=select){
(txt.length>0) ? txt = txt+';'+liste[item] : txt = liste[item];
concat = concat+liste[item]+' [<a href="#" class="deleteIP" id="'+liste[item]+'">Suppression</a>]<br/>';
}
}
$('input[name=filtres_ip]').val(txt);
$('#listeip').html(concat);
});
$('input.checkskin[type=checkbox]').checkbox();
});
</script>
<div id="center">
<h1><?=$this->titre?></h1>
<div class="formip" style="display: none;">
<input type="text" maxlength="3" size="3" name="ip0" />&nbsp;.&nbsp;
<input type="text" maxlength="3" size="3" name="ip1" />&nbsp;.&nbsp;
<input type="text" maxlength="3" size="3" name="ip2" />&nbsp;.&nbsp;
<input type="text" maxlength="3" size="3" name="ip3" /> -
<input type="text" maxlength="3" size="3" name="ip4" />&nbsp;.&nbsp;
<input type="text" maxlength="3" size="3" name="ip5" />&nbsp;.&nbsp;
<input type="text" maxlength="3" size="3" name="ip6" />&nbsp;.&nbsp;
<input type="text" maxlength="3" size="3" name="ip7" />
</div>
<form name="client" method="post"
action="<?=$this->url(array('controller'=>'dashboard', 'action'=>'clientsave'), null, true)?>">
<input type="hidden" name="action" value="client" /> <input
type="hidden" name="idClient" value="<?php echo $this->idClient?>" />
<h2 class="menu-close">Identification</h2>
<div class="blockh2 close">
<div class="fieldgrp">
<label>Nom</label>
<div class="field">
<input name="nom" type="text"
value="<?php echo isset($this->InfosClient) ? $this->InfosClient->nom : '';?>" />
</div>
</div>
<div class="fieldgrp">
<label>Siren</label>
<div class="field">
<input name="siren" type="text"
value="<?php echo isset($this->InfosClient) ? $this->InfosClient->siren : '';?>" />
<a href="#">Obtention Raison sociale</a>
</div>
</div>
<div class="fieldgrp">
<label>Nic du siège</label>
<div class="field">
<input name="nic" type="text"
value="<?php echo isset($this->InfosClient) ? $this->InfosClient->nic : '';?>" />
</div>
</div>
<div class="fieldgrp">
<label>Racine des identifiants</label>
<div class="field">
<input name="racineLogin" type="text"
value="<?php echo isset($this->InfosClient) ? $this->InfosClient->racineLogin: '';?>" />
</div>
</div>
<div class="fieldgrp">
<label>Test</label>
<div class="field">
<select name="test">
<option value="Oui"
<?php if ($this->InfosClient->test=='Oui') echo 'selected';?>>Oui</option>
<option value="Non"
<?php if ($this->InfosClient->test=='Non') echo 'selected';?>>Non</option>
</select>
</div>
</div>
<div class="fieldgrp">
<label>Actif</label>
<div class="field">
<select name="actif">
<option value="Oui"
<?php if ($this->InfosClient->actif=='Oui') echo 'selected';?>>Oui</option>
<option value="Non"
<?php if ($this->InfosClient->actif=='Non') echo 'selected';?>>Non</option>
</select>
</div>
</div>
<div class="fieldgrp">
<label>Date de signature</label>
<div class="field">
<input name="dateSignature" type="text"
value="<?php echo isset($this->InfosClient) ? $this->InfosClient->dateSignature : '';?>" />
(AAAA-MM-YY)
</div>
</div>
<div class="fieldgrp">
<label>Type de contrat</label>
<div class="field">
<select name="typeContrat">
<option value="Contrat"
<?php if ($this->InfosClient->typeContrat=='Contrat') echo 'selected';?>>Contrat</option>
<option value="Marché"
<?php if ($this->InfosClient->typeContrat=='Marché') echo 'selected';?>>Marché</option>
</select>
</div>
</div>
<div class="fieldgrp">
<label>Commercial S&amp;D</label>
<div class="field">
<input name="respComSD" type="text"
value="<?php echo isset($this->InfosClient) ? $this->InfosClient->respComSD : '';?>"
disabled />
</div>
</div>
<div class="fieldgrp">
<label>Nom de l'apporteur d'affaire</label>
<div class="field">
<input name="apporteurAffaire" type="text"
value="<?php echo isset($this->InfosClient) ? $this->InfosClient->apporteurAffaire: '';?>" />
</div>
</div>
<div class="fieldgrp">
<label>Type d'accès</label>
<div class="field">
<select name="typeAcces">
<option value="userPassword"
<?php if ($this->InfosClient->typeAcces=='userPassword') echo 'selected';?>>userPassword</option>
<option value="userPasswordIP"
<?php if ($this->InfosClient->typeAcces=='userPasswordIP') echo 'selected';?>>userPasswordIP</option>
<option value="IP"
<?php if ($this->InfosClient->typeAcces=='IP') echo 'selected';?>>IP</option>
</select>
</div>
</div>
<div class="fieldgrp">
<label>Remarques / Observations</label>
<div class="field">
<textarea name="remarque">
<?php echo isset($this->InfosClient) ? $this->InfosClient->remarque : '';?></textarea>
</div>
</div>
</div>
<h2 class="menu-close">Facturation</h2>
<div class="blockh2 close">
<div class="fieldgrp">
<label>N° de TVA</label>
<div class="field">
<input name="tva" type="text"
value="<?php echo isset($this->InfosClient) ? $this->InfosClient->tva : '';?>" />
</div>
</div>
<div class="fieldgrp">
<label>Compte client rattaché</label>
<div class="field">
<input name="xxxx" type="text" value="" />
</div>
</div>
<div class="fieldgrp">
<label>Editer la facture automatiquement</label>
<div class="field">
<select name="editerFacture">
<option value="Oui"
<?php if ($this->InfosClient->editerFacture=='Oui') echo 'selected';?>>Oui</option>
<option value="Non"
<?php if ($this->InfosClient->editerFacture=='Non') echo 'selected';?>>Non</option>
</select>
</div>
</div>
<div class="fieldgrp">
<label>Editer le détail de la facture</label>
<div class="field">
<select name="fact_detail">
<option value="Oui"
<?php if ($this->InfosClient->editerFacture=='Oui') echo 'selected';?>>Oui</option>
<option value="Non"
<?php if ($this->InfosClient->fact_detail=='Non') echo 'selected';?>>Non</option>
</select>
</div>
</div>
<div class="fieldgrp">
<label>Nom du destinataire de la facture</label>
<div class="field">
<input name="fac_dest" type="text"
value="<?php echo isset($this->InfosClient) ? $this->InfosClient->fac_dest : '';?>" />
</div>
</div>
<div class="fieldgrp">
<label>Adresse1</label>
<div class="field">
<input name="fac_adr1" type="text"
value="<?php echo isset($this->InfosClient) ? $this->InfosClient->fac_adr1 : '';?>" />
</div>
</div>
<div class="fieldgrp">
<label>Adresse2</label>
<div class="field">
<input name="fac_adr2" type="text"
value="<?php echo isset($this->InfosClient) ? $this->InfosClient->fac_adr2 : '';?>" />
</div>
</div>
<div class="fieldgrp">
<label>Adresse3</label>
<div class="field">
<input name="fac_adr3" type="text"
value="<?php echo isset($this->InfosClient) ? $this->InfosClient->fac_adr3 : '';?>" />
</div>
</div>
<div class="fieldgrp">
<label>Email</label>
<div class="field">
<input name="fac_email" type="text"
value="<?php echo isset($this->InfosClient) ? $this->InfosClient->fac_email : '';?>" />
</div>
</div>
<div class="fieldgrp">
<label>Téléphone</label>
<div class="field">
<input name="fac_tel" type="text"
value="<?php echo isset($this->InfosClient) ? $this->InfosClient->fac_tel : '';?>" />
</div>
</div>
<div class="fieldgrp">
<label>RIB joint à la facture</label>
<div class="field">
<select name="fact_rib">
<option value="BPOSTALE"
<?php if ($this->InfosClient->fact_rib=='BPOSTALE') echo 'selected';?>>BPOSTALE</option>
<option value="CCOOP"
<?php if ($this->InfosClient->fact_rib=='CCOOP') echo 'selected';?>>CCOOP</option>
<option value="CDNORD"
<?php if ($this->InfosClient->fact_rib=='CDNORD') echo 'selected';?>>CDNORD</option>
</select>
</div>
</div>
</div>
<h2 class="menu-close">Livraison : Informations sur le destinataire de
la livraison</h2>
<div class="blockh2 close">
<div class="fieldgrp">
<label>Nom</label>
<div class="field">
<input name="liv_dest" type="text"
value="<?php echo isset($this->InfosClient) ? $this->InfosClient->liv_dest : '';?>" />
</div>
</div>
<div class="fieldgrp">
<label>Adresse1</label>
<div class="field">
<input name="liv_adr1" type="text"
value="<?php echo isset($this->InfosClient) ? $this->InfosClient->liv_adr1 : '';?>" />
</div>
</div>
<div class="fieldgrp">
<label>Adresse2</label>
<div class="field">
<input name="liv_adr2" type="text"
value="<?php echo isset($this->InfosClient) ? $this->InfosClient->liv_adr2 : '';?>" />
</div>
</div>
<div class="fieldgrp">
<label>Adresse3</label>
<div class="field">
<input name="liv_adr3" type="text"
value="<?php echo isset($this->InfosClient) ? $this->InfosClient->liv_adr3 : '';?>" />
</div>
</div>
<div class="fieldgrp">
<label>Email</label>
<div class="field">
<input name="liv_email" type="text"
value="<?php echo isset($this->InfosClient) ? $this->InfosClient->liv_email : '';?>" />
</div>
</div>
<div class="fieldgrp">
<label>Téléphone</label>
<div class="field">
<input name="liv_tel" type="text"
value="<?php echo isset($this->InfosClient) ? $this->InfosClient->liv_tel : '';?>" />
</div>
</div>
</div>
<h2 class="menu-close">Paramétrage</h2>
<div class="blockh2 close">
<div class="fieldgrp">
<label>IndiScore</label>
<div class="field">
<select name="typeScore">
<option value="100"
<?php if ($this->InfosClient->typeScore=='100') echo 'selected';?>>100</option>
<option value="20"
<?php if ($this->InfosClient->typeScore=='20') echo 'selected';?>>20</option>
</select>
</div>
</div>
<div class="fieldgrp">
<label>Liste des adresses IP</label>
<div class="field">
<?php
$text_ip = '';
$filtres_ip = '';
if (isset($this->InfosClient) && !empty($this->InfosClient->filtres_ip)){
$ips = explode(';',$this->InfosClient->filtres_ip);
foreach ($ips as $ip){
$filtres_ip.= $ip.';';
$text_ip.= $ip.' [<a href="#" class="deleteIP" id="'.$ip.'">Suppression</a>]<br/>';
}
}
?>
<input type="hidden" name="filtres_ip"
value="<?php echo $filtres_ip?>"> <span id="listeip">
<?php
if (!empty($text_ip)){
echo $text_ip;
} else {
echo "Aucune IPs.";
}
?> </span> <br /> <a href="#" id="addIp">Ajouter une adresse IP</a>
</div>
</div>
<div class="fieldgrp">
<label>Listes des Droits</label>
<div class="field">
<?php
$listedroits = explode(' ', $this->InfosClient->droits);
foreach($this->wsdroits as $droit) {
foreach ($listedroits as $item) {
$check = '';
if (strtolower($item)==strtolower($droit->code)) {
$check = ' checked';
break;
}
}
?>
<input class="checkskin" type="checkbox" name="droits[]" value="<?=strtolower($droit->code)?>"<?=$check?>/>
<?=$droit->desc?><br/>
<?php
}
?>
</div>
</div>
<div class="fieldgrp">
<label>Timeout</label>
<div class="field">
<input type="text" name="timeout"
value="<?php echo isset($this->InfosClient) ? $this->InfosClient->timeout : '1600';?>" />
</div>
</div>
</div>
<h2 class="menu-close">Tarification</h2>
<div class="blockh2 close">
<div class="fieldgrp">
<label>forfaitExtranetPeriode</label>
<div class="field">
<select name="forfaitExtranetPeriode">
<option value="Mensuel"
<?php if ($this->InfosClient->forfaitExtranetPeriode=='Mensuel') echo 'selected';?>>Mensuel</option>
<option value="Trimestriel"
<?php if ($this->InfosClient->forfaitExtranetPeriode=='Trimestriel') echo 'selected';?>>Trimestriel</option>
<option value="Semestriel"
<?php if ($this->InfosClient->forfaitExtranetPeriode=='Semestriel') echo 'selected';?>>Semestriel</option>
<option value="Annuel"
<?php if ($this->InfosClient->forfaitExtranetPeriode=='Annuel') echo 'selected';?>>Annuel</option>
</select>
</div>
</div>
<div class="fieldgrp">
<label>forfaitExtranetMontant</label>
<div class="field">
<input type="text" name="forfaitExtranetMontant"
value="<?php echo isset($this->InfosClient) ? $this->InfosClient->forfaitExtranetMontant : '';?>" />
</div>
</div>
<div class="fieldgrp">
<label>reconductionAuto</label>
<div class="field">
<select name="reconductionAuto">
<option value="Oui"
<?php if ($this->InfosClient->reconductionAuto=='Oui') echo 'selected';?>>Oui</option>
<option value="Non"
<?php if ($this->InfosClient->reconductionAuto=='Non') echo 'selected';?>>Non</option>
</select>
</div>
</div>
<div class="fieldgrp">
<label>Nombre de pièces officielles inclues dans le forfait client</label>
<div class="field">
<input type="text" name="forfaitPiecesNb"
value="<?php echo isset($this->InfosClient) ? $this->InfosClient->forfaitPiecesNb : '';?>" />
</div>
</div>
<div class="fieldgrp">
<label>Montant du forfait des pièces officielles</label>
<div class="field">
<input type="text" name="forfaitPiecesMt"
value="<?php echo isset($this->InfosClient) ? $this->InfosClient->forfaitPiecesMt : '';?>" />
</div>
</div>
<div class="fieldgrp">
<label>Tarif unitaire en cas de dépassement</label>
<div class="field">
<input type="text" name="forfaitPiecesDep"
value="<?php echo isset($this->InfosClient) ? $this->InfosClient->forfaitPiecesDep : '';?>" />
</div>
</div>
<div class="fieldgrp">
<label>Nombre d'investigations inclues dans le forfait client</label>
<div class="field">
<input type="text" name="forfaitInvestigNb"
value="<?php echo isset($this->InfosClient) ? $this->InfosClient->forfaitInvestigNb : '';?>" />
</div>
</div>
<div class="fieldgrp">
<label>Montant du forfait des investigations</label>
<div class="field">
<input type="text" name="forfaitInvestigMt"
value="<?php echo isset($this->InfosClient) ? $this->InfosClient->forfaitInvestigMt : '';?>" />
</div>
</div>
<div class="fieldgrp">
<label>Tarif unitaire pour les indiscore</label>
<div class="field">
<input type="text" name="tarifIndiscore"
value="<?php echo isset($this->InfosClient) ? $this->InfosClient->tarifIndiscore : '';?>" />
</div>
</div>
</div>
<h2 class="menu-close">Divers</h2>
<div class="blockh2 close">
<div class="fieldgrp">
<label>Accès Webservice</label>
<div class="field">
<input type="text" name="accesWS"
value="<?php echo isset($this->InfosClient) ? $this->InfosClient->accesWS : '';?>" />
</div>
</div>
<div class="fieldgrp">
<label>Intersud - Login</label>
<div class="field">
<input type="text" name="InterSudLogin"
value="<?php echo isset($this->InfosClient) ? $this->InfosClient->InterSudLogin : '';?>" />
</div>
</div>
<div class="fieldgrp">
<label>Intersud - Mot de passe</label>
<div class="field">
<input type="text" name="InterSudPass"
value="<?php echo isset($this->InfosClient) ? $this->InfosClient->InterSudPass : '';?>" />
</div>
</div>
</div>
<div class="submit">
<p class="submit-button">
<input type="submit" class="button"
value="<?php echo $this->submitValue?>" />
</p>
</div>
</form>
</div>