summaryrefslogtreecommitdiff
path: root/appli_3_alpha_old/app/include/je.inc.php
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic@pouzenc.fr>2018-06-30 11:17:01 +0200
committerLudovic Pouzenc <ludovic@pouzenc.fr>2018-06-30 11:17:01 +0200
commita25edc8edf23e652dbd529b8c42199ae559905a1 (patch)
treebdc47a31288343a8bd11310a021fdf0679eb503c /appli_3_alpha_old/app/include/je.inc.php
parent3fc908d3a1d0f6c9b1fca690561098541a73266e (diff)
download2007-AWOR-a25edc8edf23e652dbd529b8c42199ae559905a1.tar.gz
2007-AWOR-a25edc8edf23e652dbd529b8c42199ae559905a1.tar.bz2
2007-AWOR-a25edc8edf23e652dbd529b8c42199ae559905a1.zip
Version alpha_old6 2007-02-22+15:45:00 - 2007-03-12+13:59:02
Diffstat (limited to 'appli_3_alpha_old/app/include/je.inc.php')
-rw-r--r--appli_3_alpha_old/app/include/je.inc.php73
1 files changed, 68 insertions, 5 deletions
diff --git a/appli_3_alpha_old/app/include/je.inc.php b/appli_3_alpha_old/app/include/je.inc.php
index 6a3c98d..3c87753 100644
--- a/appli_3_alpha_old/app/include/je.inc.php
+++ b/appli_3_alpha_old/app/include/je.inc.php
@@ -36,6 +36,7 @@ require_once ('include/connect.inc.php');
{
return (mysql_insert_id());
}
+ return (false);
}
function list_modif($idL,$tabParticipant)
@@ -138,11 +139,11 @@ require_once ('include/connect.inc.php');
}
else
{
- $result = mysql_query("INSERT INTO Personne (courrielP,loginP) VALUES ('$persMail','$persMail')");
+ $result = mysql_query("INSERT INTO Personne (courrielP,loginP,nomP) VALUES ('$persMail','$persMail','$persMail')");
return (mysql_insert_id());
}
- return (0);
+ return (false);
}
@@ -165,7 +166,7 @@ require_once ('include/connect.inc.php');
echo "<a href=\"#\" onclick=\"loadid('poppersonne.php?idL=".$row['idL']."&amp;idP_orga=".$idP."','poppersonne',true);popon('poppersonne')\">";
echo $row['libelleL'];
echo "</a></td>\n";
- echo "</tr>\n";
+ echo "</tr>\n";
}
}
@@ -175,7 +176,69 @@ require_once ('include/connect.inc.php');
function traiter_formulaire_commentaire()
{
- echo $_SESSION['session_idP'];
-
+ if ($_GET['txtCommentaire'] != "")
+ {
+ require_once ('include/connect.inc.php');
+ if (isset($_GET['idR']))
+ {
+ $query="UPDATE Repondre SET commentaireReponse ='".$_GET['txtCommentaire']."' WHERE idR=".$_GET['idR']." AND idP=".$_SESSION['session_idP'];
+ $result = @mysql_query($query);
+ if ( ! $result || ( mysql_affected_rows() !== 1 ) )
+ {
+ $query="INSERT INTO Repondre(idR,idP,commentaireReponse) VALUES (".$_GET['idR'].", ".$_SESSION['session_idP'].", '".$_GET['txtCommentaire']."')";
+
+ $result = mysql_query($query);
+ if ( ! $result || ( mysql_affected_rows() !== 1 ))
+ {
+ echo $query;
+ echo "Erreur BD\n";
+ return;
+ }
+ }
+ }
+ }
+ else
+ {
+ $query="DELETE FROM Repondre WHERE idR=".$_GET['idR']." AND idP=".$_SESSION['session_idP'];
+ $result = mysql_query($query);
+ }
+ }
+
+ // Modifiée par Ludo pour les problèmes de vriables de session et pour d'autres détails :
+ // S'il n'y a pas de commentaire, on affiche le tableau vide
+ function generate_html_reunion_commentaires($idR)
+ {
+ $idP = $_SESSION['session_idP'];
+ echo '<table cellspacing="0" class="commentaires" summary="Liste des commentaires laissés pour les personnes conviées à cette réunion">';
+ echo '<thead>';
+ echo '<tr>';
+ echo "<th>Commentaires <a href=\"#\" onclick=\"loadid('popcommentaire.php?idR=".$idR."&amp;idP=".$idP."','popcommentaire',true);popon('popcommentaire');\">(Editer votre commentaire)</a></th>";
+ echo '</tr>';
+ echo '</thead>';
+ $requete = "SELECT P.nomP,P.prenomP,P.courrielP,R.commentaireReponse FROM Repondre R,Personne P WHERE P.idP = R.idP AND R.idR = '".$idR."'";
+ //echo "DEBUG : requete : $requete\n";
+ $resultat = mysql_query($requete);
+ if($resultat != false)
+ {
+ if(mysql_num_rows($resultat) > 0)
+ {
+ while($pers = mysql_fetch_array($resultat))
+ {
+ echo '<tr><td>';
+ if ($pers["nomP"] !== "" || $pers["prenomP"] !== "") echo $pers["nomP"] . " " . $pers["prenomP"]; else echo $row["courrielP"];
+ echo " : ".$pers["commentaireReponse"]."</td></tr>\n";
+
+ }
+ }
+ else
+ {
+ echo "<tr><td>Aucun commentaire pour le moment.</td></tr>\n";
+ }
}
+
+ echo '</table>';
+
+ }
+
+
?> \ No newline at end of file