234 lines
9.6 KiB
PHP
234 lines
9.6 KiB
PHP
<?php
|
|
header('Content-Type: text/html; charset=ISO-8859-1');
|
|
session_start();
|
|
if (!$_SESSION['connected'])
|
|
echo ('Vous devez être connecté afin de pouvoir utiliser cette fonctionnalité');
|
|
elseif (
|
|
$_SESSION['tabInfo']['login']<>'ylenaour' &&
|
|
$_SESSION['tabInfo']['login']<>'jmartory' &&
|
|
$_SESSION['tabInfo']['login']<>'bpanacionne' &&
|
|
$_SESSION['tabInfo']['login']<>'mheitz' &&
|
|
$_SESSION['tabInfo']['login']<>'mpurcarin' &&
|
|
$_SESSION['tabInfo']['login']<>'mcochet' &&
|
|
$_SESSION['tabInfo']['login']<>'aegasse' &&
|
|
$_SESSION['tabInfo']['login']<>'mricois'
|
|
)
|
|
{
|
|
echo ('Vous n\'avez pas les droits nécessaires pour utiliser cette fonctionnalité');
|
|
}
|
|
else {
|
|
|
|
$client = new SoapClient(null, array( 'trace' => 1,
|
|
'soap_version' => SOAP_1_1,
|
|
'location' => WEBSERVICE_URL,
|
|
'uri' => WEBSERVICE_URI,
|
|
'login' => $_SESSION['tabInfo']['login'],
|
|
'password' => $_SESSION['tabInfo']['password'],
|
|
// 'encoding' => 'UTF-8'
|
|
));
|
|
|
|
$tribunal = isset($_REQUEST['tribunal'])? $_REQUEST['tribunal'] : '';
|
|
|
|
//Les cours d'appel
|
|
$tmp=$client->getTribunaux(array('L'));
|
|
$coursAppel=$tmp['result'];
|
|
//$firephp->log($coursAppel, 'coursAppel');
|
|
//Les tribunaux
|
|
$tmp=$client->getTribunaux(array('C','I','G')); //
|
|
$tribunaux=$tmp['result'];
|
|
|
|
?>
|
|
<html>
|
|
<head>
|
|
<link rel="stylesheet" href="../css/saisie.css" type="text/css" media="screen" />
|
|
<script type="text/javascript" src="./js/jquery.form.js"></script>
|
|
<script type="text/javascript">
|
|
$('#frmCreateMandataires').submit(function() {
|
|
var options = {
|
|
target: '#message', // target element(s) to be updated with server response
|
|
beforeSubmit: showRequest, // pre-submit callback
|
|
success: showResponse // post-submit callback
|
|
|
|
// other available options:
|
|
//url: url // override for form's 'action' attribute
|
|
//type: type // 'get' or 'post', override for form's 'method' attribute
|
|
//dataType: null // 'xml', 'script', or 'json' (expected server response type)
|
|
//clearForm: true // clear all form fields after successful submit
|
|
//resetForm: true // reset the form after successful submit
|
|
|
|
// $.ajax options can be used here too, for example:
|
|
//timeout: 3000
|
|
};
|
|
|
|
// inside event callbacks 'this' is the DOM element so we first
|
|
// wrap it in a jQuery object and then invoke ajaxSubmit
|
|
$(this).ajaxSubmit(options);
|
|
|
|
// !!! Important !!!
|
|
// always return false to prevent standard browser submit and page navigation
|
|
return false;
|
|
});
|
|
|
|
//pre-submit callback
|
|
function showRequest(formData, jqForm, options) {
|
|
// formData is an array; here we use $.param to convert it to a string to display it
|
|
// but the form plugin does this for you automatically when it submits the data
|
|
var queryString = $.param(formData);
|
|
|
|
// jqForm is a jQuery object encapsulating the form element. To access the
|
|
// DOM element for the form do this:
|
|
// var formElement = jqForm[0];
|
|
|
|
alert('About to submit: \n\n' + queryString);
|
|
|
|
// here we could return false to prevent the form from being submitted;
|
|
// returning anything other than false will allow the form submit to continue
|
|
return true;
|
|
}
|
|
|
|
// post-submit callback
|
|
function showResponse(responseText, statusText) {
|
|
// for normal html responses, the first argument to the success callback
|
|
// is the XMLHttpRequest object's responseText property
|
|
|
|
// if the ajaxSubmit method was passed an Options Object with the dataType
|
|
// property set to 'xml' then the first argument to the success callback
|
|
// is the XMLHttpRequest object's responseXML property
|
|
|
|
// if the ajaxSubmit method was passed an Options Object with the dataType
|
|
// property set to 'json' then the first argument to the success callback
|
|
// is the json data object returned by the server
|
|
if(responseText==''){
|
|
//Le formulaire à été validé correctement
|
|
tb_remove(); //On efface la fenêtre
|
|
}else{
|
|
|
|
}
|
|
|
|
/* alert('status: ' + statusText + '\n\nresponseText: \n' + responseText +
|
|
'\n\nThe output div should have already been updated with the responseText.');
|
|
*/
|
|
}
|
|
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div id="message"></div>
|
|
|
|
<form id="frmCreateMandataires" name="mandataires" action="./pages_saisie/wsMandataire.php" method="post" enctype="multipart/form-data">
|
|
|
|
<input type="hidden" name="tabMandataires[id]" value="">
|
|
|
|
<label>Siren de la société Civile <em>*</em>:</label>
|
|
<input name="tabMandataires[sirenGrp]" type="text" value="<?=$_REQUEST['tabMandataires[sirenGrp]']?>" maxlength="9">
|
|
|
|
<label>Siren de la professions libérale :</label>
|
|
<input name="tabMandataires[sirenMand]" type="text" value="<?=$_REQUEST['tabMandataires[sirenMand]']?>" maxlength="9">
|
|
|
|
<label>Nom <em>*</em>:</label>
|
|
<input name="tabMandataires[Nom]" type="text" value="<?=$_REQUEST['tabMandataires[Nom]']?>" maxlength="81">
|
|
|
|
<label>Prenom :</label>
|
|
<input name="tabMandataires[Prenom]" type="text" value="<?=$_REQUEST['tabMandataires[Prenom]']?>" maxlength="21">
|
|
|
|
<label>Type d'intervenant <em>*</em>:</label>
|
|
<select name="tabMandataires[type]">
|
|
<option value="" >-</option>
|
|
<option value="A" <?=($_REQUEST['tabMandataires[type]']=='A' ? print 'selected' : '');?>>Administrateur</option>
|
|
<option value="H" <?=($_REQUEST['tabMandataires[type]']=='H' ? print 'selected' : '');?>>Huissier</option>
|
|
<option value="M" <?=($_REQUEST['tabMandataires[type]']=='M' ? print 'selected' : '');?>>Mandataire</option>
|
|
<option value="V" <?=($_REQUEST['tabMandataires[type]']=='V' ? print 'selected' : '');?>>Avocat</option>
|
|
<option value="N" <?=($_REQUEST['tabMandataires[type]']=='N' ? print 'selected' : '');?>>Notaire</option>
|
|
<option value="T" <?=($_REQUEST['tabMandataires[type]']=='T' ? print 'selected' : '');?>>Autre</option>
|
|
</select>
|
|
|
|
<label>Cours d'appel par defaut n°1 <em>*</em>:</label>
|
|
<select name="tabMandataires[coursAppel]">
|
|
<option value="">Choix de la cours d'appel</option>
|
|
<?php
|
|
foreach ($coursAppel as $key=>$value){
|
|
print '<option value="'.$key.'"';
|
|
print ($_REQUEST['tabMandataires[coursAppel]']==$key ? print ' selected' : '');
|
|
print '>'.$value.'</option>';
|
|
}
|
|
?>
|
|
</select>
|
|
|
|
<label>Cours d'appel par defaut n°2 :</label>
|
|
<select name="tabMandataires[coursAppel2]">
|
|
<option value="">Choix de la cours d'appel</option>
|
|
<?php
|
|
foreach ($coursAppel as $key=>$value){
|
|
print '<option value="'.$key.'"';
|
|
print ($_REQUEST['tabMandataires[coursAppel2]']==$key ? print ' selected' : '');
|
|
print '>'.$value.'</option>';
|
|
}
|
|
?>
|
|
</select>
|
|
|
|
<label>Libellé du tribunal <em>*</em>:</label>
|
|
<select name="tabMandataires[tribunal]">
|
|
<?php
|
|
foreach ($tribunaux as $code=>$lib) {
|
|
if (strlen($lib)>39) $lib=substr($lib,0,41).'...';
|
|
print '<option value="'.$code.'"';
|
|
if ($code==$tribunal || $_REQUEST['tabMandataires[tribunal]']==$code) echo ' selected';
|
|
echo ">$lib</option>";
|
|
}
|
|
?>
|
|
</select>
|
|
|
|
<label>Forme Juridique <em>*</em>:</label>
|
|
<select name="tabMandataires[Statut]">
|
|
<option value="0000" selected>-</option>
|
|
<option value="5499" <?=($_REQUEST['tabMandataires[Statut]']=='5499' ? print 'selected' : '');?>>SARL</option>
|
|
<option value="5498" <?=($_REQUEST['tabMandataires[Statut]']=='5498' ? print 'selected' : '');?>>EURL</option>
|
|
<option value="6598" <?=($_REQUEST['tabMandataires[Statut]']=='6598' ? print 'selected' : '');?>>EARL</option>
|
|
<option value="5699" <?=($_REQUEST['tabMandataires[Statut]']=='5699' ? print 'selected' : '');?>>SA</option>
|
|
<option value="5710" <?=($_REQUEST['tabMandataires[Statut]']=='5710' ? print 'selected' : '');?>>SAS</option>
|
|
<option value="5720" <?=($_REQUEST['tabMandataires[Statut]']=='5720' ? print 'selected' : '');?>>SASU</option>
|
|
<option value="5202" <?=($_REQUEST['tabMandataires[Statut]']=='5202' ? print 'selected' : '');?>>SNC</option>
|
|
<option value="6220" <?=($_REQUEST['tabMandataires[Statut]']=='6220' ? print 'selected' : '');?>>GIE</option>
|
|
<option value="6533" <?=($_REQUEST['tabMandataires[Statut]']=='6533' ? print 'selected' : '');?>>GAEC</option>
|
|
<option value="6540" <?=($_REQUEST['tabMandataires[Statut]']=='6540' ? print 'selected' : '');?>>SCI</option>
|
|
<option value="6585" <?=($_REQUEST['tabMandataires[Statut]']=='6585' ? print 'selected' : '');?>>SCP</option>
|
|
</select>
|
|
|
|
<label>Adresse <em>*</em>:</label>
|
|
<textarea name="tabMandataires[adresse]" type="text" value="<?=$_REQUEST['tabMandataires[adresse]']?>" maxlength="100">
|
|
</textarea>
|
|
|
|
<label>Complément adresse :</label>
|
|
<input name="tabMandataires[adresseComp]" type="text" value="<?=$_REQUEST['tabMandataires[adresseComp]']?>" maxlength="8">
|
|
|
|
<label>Code Postal <em>*</em>:</label>
|
|
<input name="tabMandataires[cp]" type="text" value="<?=$_REQUEST['tabMandataires[cp]']?>" maxlength="5">
|
|
|
|
<label>Ville ou commune <em>*</em>:</label>
|
|
<input name="tabMandataires[ville]" type="text" value="<?=$_REQUEST['tabMandataires[ville]']?>" maxlength="28">
|
|
|
|
<label>Téléphone <em>*</em>:</label>
|
|
<input name="tabMandataires[tel]" type="text" value="<?=$_REQUEST['tabMandataires[adresse]']?>" maxlength="16">
|
|
|
|
<label>Télécopie :</label>
|
|
<input name="tabMandataires[fax]" type="text" value="<?=$_REQUEST['tabMandataires[fax]']?>" maxlength="16">
|
|
|
|
<label>Email :</label>
|
|
<input name="tabMandataires[email]" type="text" value="<?=$_REQUEST['tabMandataires[email]']?>" maxlength="51">
|
|
|
|
<label>Web :</label>
|
|
<input name="tabMandataires[web]" type="text" value="<?=$_REQUEST['tabMandataires[web]']?>" maxlength="35">
|
|
|
|
<label>Informations diverses :</label>
|
|
<textarea name="tabMandataires[contact]" type="text" value="<?=$_REQUEST['tabMandataires[contact]']?>" maxlength="255">
|
|
</textarea>
|
|
|
|
<input type="submit" name="submit" value="Enregistrer">
|
|
|
|
</form>
|
|
<body>
|
|
</html>
|
|
<?php
|
|
}
|
|
?>
|