summaryrefslogtreecommitdiff
path: root/appli_3_alpha_old/popcreneau.php
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic@pouzenc.fr>2018-06-30 10:05:02 +0200
committerLudovic Pouzenc <ludovic@pouzenc.fr>2018-06-30 10:05:02 +0200
commit71b503f07007346eda3d1da71d4a64f31f13d846 (patch)
tree3d1aaa880857eb05e7e9c1f2d75f309507dd9c07 /appli_3_alpha_old/popcreneau.php
parent756f0fa75c7d8e18188dffdfbdd4416651dca9fe (diff)
download2007-AWOR-71b503f07007346eda3d1da71d4a64f31f13d846.tar.gz
2007-AWOR-71b503f07007346eda3d1da71d4a64f31f13d846.tar.bz2
2007-AWOR-71b503f07007346eda3d1da71d4a64f31f13d846.zip
Prmère version alpha 2007-02-03+09:07:04 - 2007-02-06+12:19:50
Diffstat (limited to 'appli_3_alpha_old/popcreneau.php')
-rw-r--r--appli_3_alpha_old/popcreneau.php90
1 files changed, 90 insertions, 0 deletions
diff --git a/appli_3_alpha_old/popcreneau.php b/appli_3_alpha_old/popcreneau.php
new file mode 100644
index 0000000..484594b
--- /dev/null
+++ b/appli_3_alpha_old/popcreneau.php
@@ -0,0 +1,90 @@
+<?php
+function generate_html_div_popcreneau($idR)
+{
+ require_once ('include/connect.inc.php');
+ ?>
+ <h2>Cr&eacute;neaux de la r&eacute;union </h2>
+ <div class="popup_contenu">
+ <form id="formcreneau" method="get" action="" onsubmit="return dataListe('creneaux','dataCreneaux');">
+ <table>
+ <tr>
+ <td>Cr&eacute;er un cr&eacute;neau </td>
+ <td>&nbsp;</td>
+ <td>Cr&eacute;neaux</td>
+ </tr>
+ <tr>
+ <td>Date&nbsp;:&nbsp;
+ <select name="day">
+ <?php
+ for ($i=1;$i<=31;$i++) {$i = "0$i"; $i = substr($i,-2); echo "<option value=\"$i\">$i</option>"; }
+ ?>
+ </select>/
+ <select name="month">
+ <?php
+ for ($i=1;$i<=12;$i++) {$i = "0$i"; $i = substr($i,-2); echo "<option value=\"$i\">$i</option>"; }
+ ?>
+ </select>/
+ <select name="year">
+ <?php
+ for ($i=date('Y');$i<=((int)date('Y')+4);$i++) echo "<option value=\"$i\">$i</option>";
+ ?>
+ </select><br />D&eacute;but&nbsp;: &nbsp;
+ <select name="hourStart">
+ <?php
+ for ($i=0;$i<=23;$i++) {$i = "0$i"; $i = substr($i,-2); echo "<option value=\"$i\">$i</option>"; }
+ ?>
+ </select>:
+ <select name="minuteStart">
+ <?php
+ for ($i=0;$i<=59;$i++) {$i = "0$i"; $i = substr($i,-2); echo "<option value=\"$i\">$i</option>"; }
+ ?>
+ </select><br />Fin&nbsp;:&nbsp;
+ <select name="hourEnd">
+ <?php
+ for ($i=0;$i<=23;$i++) {$i = "0$i"; $i = substr($i,-2); echo "<option value=\"$i\">$i</option>"; }
+ ?>
+ </select>:
+ <select name="minuteEnd">
+ <?php
+ for ($i=0;$i<=59;$i++) {$i = "0$i"; $i = substr($i,-2); echo "<option value=\"$i\">$i</option>"; }
+ ?>
+ </select></td>
+ <td><input name="AjouterCreneau" type="button" value="Ajouter" onclick="addcreneau(this.form);"/><br/><br/>
+ <input name="supprimerCreneau" type="button" value="Retirer" onclick="removecreneau(this.form);"/></td>
+ <td><select name="creneaux" size="10" id="creneaux">
+ <?php
+ $result = mysql_query("SELECT UNIX_TIMESTAMP(dateHeure),duree FROM Creneau WHERE idR=".$idR);
+ if (mysql_num_rows($result)>0)
+ {
+ for($i=0;$i<mysql_num_rows($result);$i++)
+ {
+ $row = mysql_fetch_array($result);
+ $date_deb =$row[0];
+ $date_fin = $date_deb + 60 * $row[1];
+ echo '<option value="'.date('Hi',$date_deb).'.'.date('Hi',$date_fin).'.'.date('d.m.Y',$date_deb).'">' . date('H:i',$date_deb) . ' -&gt; ' . date('H:i',$date_fin) . ' ' . date('d/m/Y',$date_deb);
+ }
+ }
+ ?>
+ </select></td></tr></table><br/>
+ <input type="hidden" name="idR" value="<?php echo $idR;?>" />
+ <input type="hidden" name="action" value="valider_creneau" />
+ <input type="submit" value="Valider" /><input type="button" value="Fermer" onclick="popoff('popcreneau')"/>
+ </form>
+ </div>
+<?php
+}
+
+if (isset($_GET['idR']))
+{
+ generate_html_div_popcreneau($_GET['idR']);
+}
+else
+{
+ echo '<div class="popup_contenu">';
+ echo 'Erreur - pas d\'identifiant de r&eacute;union !';
+ echo '<form id="formcreneau" method="get" action="">';
+ echo '<input type="button" value="Fermer" onclick="popoff(\'popcreneau\')"/>';
+ echo '</form>';
+ echo '</div>';
+}
+?>