1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206
| <?php
session_start (); // On initialise une session
require("../constantes.php");
if(! session_is_registered ( "GENERAL_SESSION" ))
{
header("location:ident.php");
}
require("../adm/gerebase.php");
//***********requete date certif*****************
OuvrirBase();
$selectdateCertifY="select distinct EXTRACT(YEAR FROM date_certif_entite) from resultat_v2 order by date_certif_entite desc";
$resdateCertif1= mysql_query($selectdateCertifY) or die ( mysql_error());
$resdateCertif2= mysql_query($selectdateCertifY) or die ( mysql_error());
$resdateCertif3= mysql_query($selectdateCertifY) or die ( mysql_error());
$resdateCertif4= mysql_query($selectdateCertifY) or die ( mysql_error());
FermerBase();
//************fin requete date certif************
?>
<html>
<head>
<title>MAILING</title>
</head>
<body>
<a name="haut"></a><div align="center">
<div style="width: 200px;float: right;"><a href="../deconnect.php">déconnexion</a></div><div style="width: 200px;float: left;"><a href="../index.php">Retour accueil</a></div>
<h2>GESTION DES ENVOIS DE MAILINGS</h2>
<?php
/*
if(empty($dep)){
Ouvrirbase();
$res = mysql_query('SELECT COUNT(*) AS total FROM resultat_v2') OR die(mysql_error());
$row = mysql_fetch_assoc($res);
print("Nombre total d'enregistrements dans la base de données = " . $row['total']."<br /><br />");
Fermerbase();
}*/
?>
Pour quel département et quel type d'établissement?
<form method="get" action="<?php $php_self ?>">
département <select name="dep">
<option value="">tous</option>
<?php
for($x=1;$x<100;$x++){
print("<option value=\"".str_pad($x,2, "0", STR_PAD_LEFT)."\"");
if($dep==$x)print("selected=\"selected\"");
print(">".str_pad($x,2, "0", STR_PAD_LEFT)."</option>\r\n");
}
?>
</select>
<?php
OuvrirBase();
$select_type="select distinct type_etablissement from resultat_v2";
$res_type=mysql_query($select_type) or die (mysql_error());
?>
type d'établissement <select name="type">
<option value="">Tous</option>
<?php
while($ligne=mysql_fetch_array($res_type)){
print("<option value=\"$ligne[0]\"");
if($ligne[0]==$type)print(" selected=\"selected\"");
print(">$ligne[0]</option>\r\n");
}
FermerBase();
?>
</select>
<br /><br />
<table width="450" border="1"><caption>Pour quel créneau de date de certification?<br /><span style="font-style: italic;">(cochez la case concernée et choisisez les mois et année)</span></caption>
<tr>
<td width="40%">inférieur au 1<sup>er</sup> jour de</td>
<td width="5%">
<input type="radio" name="Certif" value="1">
</td>
<td width="51%" align="center">
Année <select name="inferieur_an">
<?php
while($ligneDateCertifY=mysql_fetch_array($resdateCertif1)){
print("<option value=\"$ligneDateCertifY[0]\"");
if($ligneDateCertifY[0]==$type)print(" selected=\"selected\"");
print(">$ligneDateCertifY[0]</option>\r\n");
}
?>
</select>
Mois <select name="inferieur_mois">
<?php
for($x=1;$x<13;$x++){
print("<option value=\"".str_pad($x,2, "0", STR_PAD_LEFT)."\"");
if($dep==$x)print("selected=\"selected\"");
print(">".str_pad($x,2, "0", STR_PAD_LEFT)."</option>\r\n");
}
?>
</select>
</td>
</tr>
<tr>
<td width="40%">supérieur au 1<sup>er</sup> jour de</td>
<td width="5%">
<input type="radio" name="Certif" value="2">
</td>
<td width="51%" align="center">
Année <select name="superieur_an">
<?php
while($ligneDateCertifM=mysql_fetch_array($resdateCertif2)){
print("<option value=\"$ligneDateCertifM[0]\"");
if($ligneDateCertifM[0]==$type)print(" selected=\"selected\"");
print(">$ligneDateCertifM[0]</option>\r\n");
}
?>
</select>
Mois <select name="superieur_mois">
<?php
for($x=1;$x<13;$x++){
print("<option value=\"".str_pad($x,2, "0", STR_PAD_LEFT)."\"");
if($dep==$x)print("selected=\"selected\"");
print(">".str_pad($x,2, "0", STR_PAD_LEFT)."</option>\r\n");
}
?>
</select>
</td>
</tr>
<tr>
<td width="40%">compris entre le 1<sup>er</sup> jour de</td>
<td width="5%">
<input type="radio" name="Certif" value="3">
</td>
<td width="51%" align="center">
<span style="background-color: #ffffcc;">Année <select name="entre_an1">
<?php
while($ligneDateCertifX=mysql_fetch_array($resdateCertif3)){
print("<option value=\"$ligneDateCertifX[0]\"");
if($ligneDateCertifX[0]==$type)print(" selected=\"selected\"");
print(">$ligneDateCertifX[0]</option>\r\n");
}
?>
</select>
Mois <select name="entre_mois1">
<?php
for($x=1;$x<13;$x++){
print("<option value=\"".str_pad($x,2, "0", STR_PAD_LEFT)."\"");
if($dep==$x)print("selected=\"selected\"");
print(">".str_pad($x,2, "0", STR_PAD_LEFT)."</option>\r\n");
}
?>
</select></span>
<br />et le 1<sup>er</sup> jour de<br />
<span style="background-color: #ffffcc;">Année <select name="entre_an2">
<?php
while($ligneDateCertifZ=mysql_fetch_array($resdateCertif4)){
print("<option value=\"$ligneDateCertifZ[0]\"");
if($ligneDateCertifZ[0]==$type)print(" selected=\"selected\"");
print(">$ligneDateCertifZ[0]</option>\r\n");
}
?>
</select>
Mois <select name="entre_mois2">
<?php
for($x=1;$x<13;$x++){
print("<option value=\"".str_pad($x,2, "0", STR_PAD_LEFT)."\"");
if($dep==$x)print("selected=\"selected\"");
print(">".str_pad($x,2, "0", STR_PAD_LEFT)."</option>\r\n");
}
?>
</select></span>
</td>
</tr>
</table>
<br />
<br />
<table width="300" border="1"><caption>Pour quel destinataire?<br /><span style="font-style: italic;">cochez la(les) case(s) concernée(s)</span></caption>
<tr>
<td width="135">Directeur établissement</td>
<td width="49">
<div align="center">
<input type="checkbox" name="qui[]" value="DE">
</div>
</td>
</tr>
<tr>
<td width="135">Responsable RH</td>
<td width="49">
<div align="center">
<input type="checkbox" name="qui[]" value="RH">
</div>
</td>
</tr>
<tr>
<td width="135">Responsable Qualité</td>
<td width="49">
<div align="center">
<input type="checkbox" name="qui[]" value="RQ">
</div>
</td>
</tr>
<tr>
<td width="135">Directeur des Soins</td>
<td width="49">
<div align="center">
<input type="checkbox" name="qui[]" value="DS">
</div>
</td>
</tr>
</table>
<input type="hidden" name="verif" value="1" />
<br /><br /><input type="submit" value="Ok"><span style="color: red;font-weight: bold;">document en cours d'élaboration</span>
</form> |
Partager