Commit 307b9cc6 authored by mbriand's avatar mbriand

nan mais faut pas rester tout seul, ca se fait pas ! (+bonus reindent)

parent 1893297c
......@@ -29,7 +29,7 @@ require_once($topdir . "include/entities/cotisation.inc.php");
$site = new site ();
if (!$site->user->is_in_group ("gestion_ae"))
$site->error_forbidden();
$site->error_forbidden("accueil");
if ( $_REQUEST["action"] == "pdf" )
{
......@@ -63,7 +63,7 @@ if ( $_REQUEST["action"] == "pdf" )
}
$site->start_page ("none", "Cartes AE");
$site->start_page ("accueil", "Cartes AE");
$cts = new contents("Cartes AE");
......
......@@ -31,9 +31,9 @@ require_once($topdir."include/cts/board.inc.php");
$site = new site ();
if ( !$site->user->is_in_group("moderateur_site") )
$site->error_forbidden();
$site->error_forbidden("accueil");
$site->start_page("none","Tâches courantes Com` AE");
$site->start_page("accueil","Tâches courantes Com` AE");
$cts = new contents("Tâches courantes de la Com` AE");
......
......@@ -30,9 +30,9 @@ require_once($topdir."include/cts/board.inc.php");
$site = new site ();
if ( !$site->user->is_in_group("compta_admin") )
$site->error_forbidden();
$site->error_forbidden("accueil");
$site->start_page("none","Tâches courantes des trésoriers AE");
$site->start_page("accueil","Tâches courantes des trésoriers AE");
$cts = new contents("Tâches courantes des trésoriers AE");
......
......@@ -40,7 +40,7 @@ require_once($topdir. "include/entities/partenariat_utl.inc.php");
$site = new site ();
if ( !$site->user->is_in_group("gestion_ae") )
$site->error_forbidden();
$site->error_forbidden("services");
if (date("m-d") < "02-15")
{
......@@ -71,7 +71,7 @@ $partenariats = array(1=> "Ce cotisant vient d'ouvrir un compte à la Société
2=> "Ce cotisant est à la SMEREB",
);
$site->start_page ("none", "Gestion des cotisations");
$site->start_page ("services", "Gestion des cotisations");
function add_search_form()
{
......@@ -231,7 +231,7 @@ elseif ( $_REQUEST["action"] == "savecotiz" )
if ( $user->id < 0 )
{
$site->error_not_found();
$site->error_not_found("services");
exit();
}
else
......@@ -449,7 +449,7 @@ elseif ( $_REQUEST["action"] == "searchstudent" )
$user->load_by_id($res['id_utl']);
if ( $user->id < 0 )
{
$site->error_not_found();
$site->error_not_found("services");
exit();
}
......@@ -595,7 +595,7 @@ elseif ( $_REQUEST["action"] == "newcotiz" )
$user->load_by_id($_REQUEST['id_utilisateur']);
if ( $user->id < 0 )
{
$site->error_not_found();
$site->error_not_found("services");
exit();
}
......
This diff is collapsed.
......@@ -30,9 +30,9 @@ require_once($topdir."include/cts/board.inc.php");
$site = new site ();
if ( !$site->user->is_in_group("gestion_ae") )
$site->error_forbidden("none","group","gestion_ae");
$site->error_forbidden("accueil","group","gestion_ae");
$site->start_page("none","Tâches courantes AE");
$site->start_page("accueil","Tâches courantes AE");
$cts = new contents("Tâches courantes AE");
......
......@@ -34,9 +34,9 @@ require_once($topdir."include/entities/files.inc.php");
$site = new site ();
if (!$site->user->is_in_group ("moderateur_site"))
$site->error_forbidden();
$site->error_forbidden("accueil");
$site->start_page ("none", "Modération des affiches");
$site->start_page ("services", "Modération des affiches");
/*suppression via la sqltable */
if ((isset($_REQUEST['id_affiche']))
......
......@@ -36,7 +36,7 @@ require_once($topdir."include/entities/folder.inc.php");
$site = new site ();
if ( !$site->user->is_in_group("moderateur_site") )
$site->error_forbidden();
$site->error_forbidden("fichiers");
if ( $_REQUEST["action"] == "foldermodere")
......@@ -80,7 +80,7 @@ elseif ( $_REQUEST["action"] == "filedelete")
}
}
$site->start_page("none","Modération des fichiers");
$site->start_page("fichiers","Modération des fichiers");
$cts = new contents("Modération");
$req = new requete($site->db,"SELECT d_folder.* " .
......
......@@ -33,7 +33,7 @@ require_once($topdir. "include/cts/planning.inc.php");
$site = new site ();
if ( !$site->user->is_in_group("gestion_ae") )
$site->error_forbidden();
$site->error_forbidden("accueil");
$emp = new emprunt ( $site->db, $site->dbrw );
$asso = new asso($site->db);
......
......@@ -35,9 +35,9 @@ require_once($topdir . "include/entities/lieu.inc.php");
$site = new site ();
if (!$site->user->is_in_group ("moderateur_site"))
$site->error_forbidden();
$site->error_forbidden("accueil");
$site->start_page ("none", "Modération des nouvelles");
$site->start_page ("accueil", "Modération des nouvelles");
/*suppression via la sqltable */
if ((isset($_REQUEST['id_nouvelle']))
......@@ -49,7 +49,7 @@ if ((isset($_REQUEST['id_nouvelle']))
$news->delete ();
$site->add_contents (new contents("Suppression",
"<p>Suppression eff&eacute;ctu&eacute;e avec succ&egrave;s</p>"));
"<p>Suppression eff&eacute;ctu&eacute;e avec succ&egrave;s</p>"));
}
/* moderation */
......@@ -66,7 +66,7 @@ if ((isset($_REQUEST['id_nws']))
$news->load_by_id ($id);
$news->delete ();
$site->add_contents (new contents("Suppression",
"<p>Suppression eff&eacute;ctu&eacute;e avec succ&egrave;s</p>"));
"<p>Suppression eff&eacute;ctu&eacute;e avec succ&egrave;s</p>"));
}
/* accepte en moderation */
if (isset($_REQUEST['accept']))
......@@ -77,25 +77,25 @@ if ((isset($_REQUEST['id_nws']))
$news->load_by_id($id);
$news->save_news(
$_REQUEST['id_asso'],
$_REQUEST['nws_title'],
$_REQUEST['nws_sum'],
$_REQUEST['nws_cts'],
true,$site->user->id,$_REQUEST['type'],$lieu->id,$news->id_canal);
$site->add_contents (new contents("Mod&eacute;ration",
"<p>Mod&eacute;ration eff&eacute;ctu&eacute;e avec succ&egrave;s</p>"));
if ( isset($_REQUEST["dfile"]))
{
$fl = new dfile($site->db,$site->dbrw);
foreach($_REQUEST["dfile"]as $id=>$chk)
{
$fl->load_by_id($id);
$fl->set_modere();
}
}
$_REQUEST['id_asso'],
$_REQUEST['nws_title'],
$_REQUEST['nws_sum'],
$_REQUEST['nws_cts'],
true,$site->user->id,$_REQUEST['type'],$lieu->id,$news->id_canal);
$site->add_contents (new contents("Mod&eacute;ration",
"<p>Mod&eacute;ration eff&eacute;ctu&eacute;e avec succ&egrave;s</p>"));
if ( isset($_REQUEST["dfile"]))
{
$fl = new dfile($site->db,$site->dbrw);
foreach($_REQUEST["dfile"]as $id=>$chk)
{
$fl->load_by_id($id);
$fl->set_modere();
}
}
}
}
......@@ -111,25 +111,25 @@ if (isset($_REQUEST['id_nouvelle']) &&
$news->load_by_id ($_REQUEST['id_nouvelle']);
$site->add_contents(new contents ("Aper&ccedil;u de la nouvelle :",
"<p>Dans le cadre ci-dessous, vous allez avoir un ".
"aper&ccedil;u de la nouvelle</p>"));
"<p>Dans le cadre ci-dessous, vous allez avoir un ".
"aper&ccedil;u de la nouvelle</p>"));
$site->add_contents ($news->get_contents ());
/* on affiche un formulaire d'edition */
$form = new form ("edit_nws",
"moderenews.php?id_nws=".$_REQUEST['id_nouvelle'].
"&action=mod",
true,
"post",
"Edition de \"".$news->titre."\"");
"moderenews.php?id_nws=".$_REQUEST['id_nouvelle'].
"&action=mod",
true,
"post",
"Edition de \"".$news->titre."\"");
$form->add_select_field ("type",
"Type de nouvelle", array( 3 => "Appel/concours",
"Type de nouvelle", array( 3 => "Appel/concours",
1 => "Évenement ponctuel",
2 => "Séance hebdomadaire",
0 => "Info/résultat")
,$news->type);
,$news->type);
$form->add_entity_select("id_asso", "Association concern&eacute;e", $site->db, "asso",$news->id_asso,true);
$form->add_entity_select("id_lieu", "Lieu", $site->db, "lieu",$news->id_lieu,true);
......@@ -143,21 +143,21 @@ if (isset($_REQUEST['id_nouvelle']) &&
/* contenu */
$form->add_text_area ("nws_cts","Contenu :",$news->contenu,80,10,true);
$matches=null;
preg_match_all("`\(\(dfile:\/\/([0-9]+)(\/thumb|\/preview)?\|(.*)\)\)`U",$news->contenu,$matches);
if ( count($matches[1]) )
{
$fl = new dfile($site->db);
foreach($matches[1] as $id)
{
$fl->load_by_id($id);
if ( !$fl->modere )
{
$form->add_checkbox("dfile|".$fl->id,"Accepter de m&ecirc;me l'image contenue dans la nouvelle : ".$fl->get_html_link(),true);
}
}
}
$matches=null;
preg_match_all("`\(\(dfile:\/\/([0-9]+)(\/thumb|\/preview)?\|(.*)\)\)`U",$news->contenu,$matches);
if ( count($matches[1]) )
{
$fl = new dfile($site->db);
foreach($matches[1] as $id)
{
$fl->load_by_id($id);
if ( !$fl->modere )
{
$form->add_checkbox("dfile|".$fl->id,"Accepter de m&ecirc;me l'image contenue dans la nouvelle : ".$fl->get_html_link(),true);
}
}
}
$form->add_submit("accept", "Accepter");
$form->add_submit("delete", "Supprimer");
......@@ -184,7 +184,7 @@ else
`utilisateurs`.`nom_utl`) AS `nom_utilisateur`
FROM `nvl_nouvelles`
LEFT JOIN `asso` ON
LEFT JOIN `asso` ON
`asso`.`id_asso` =
`nvl_nouvelles`.`id_asso`
INNER JOIN `utilisateurs` ON
......@@ -194,22 +194,22 @@ else
WHERE `modere_nvl`='0' ORDER BY `date_nvl`");
$modhelp = new contents("Mod&eacute;ration des nouvelles",
"<p>Sur cette page, vous pouvez mod&eacute;rer ".
"les nouvelles</p>");
"<p>Sur cette page, vous pouvez mod&eacute;rer ".
"les nouvelles</p>");
$tabl = new sqltable ("moderenews_list",
"Nouvelles en attente de mod&eacute;ration",
$req,
"moderenews.php",
"id_nouvelle",
array ("titre_nvl" => "Titre",
"nom_utilisateur" => "Auteur",
"date_nvl" => "Date"),
array ("edit" => "moderer",
"delete" => "supprimer"),
array (),
array ());
"Nouvelles en attente de mod&eacute;ration",
$req,
"moderenews.php",
"id_nouvelle",
array ("titre_nvl" => "Titre",
"nom_utilisateur" => "Auteur",
"date_nvl" => "Date"),
array ("edit" => "moderer",
"delete" => "supprimer"),
array (),
array ());
$modhelp->add ($tabl);
$site->add_contents ($modhelp);
......
......@@ -36,7 +36,7 @@ require_once($topdir. "include/cts/planning.inc.php");
$site = new site ();
if ( !$site->user->is_in_group("gestion_ae") && !$site->user->is_in_group("bdf-bureau") )
$site->error_forbidden();
$site->error_forbidden("services");
$sfilter='';
$filter='';
......@@ -124,7 +124,7 @@ elseif ( $_REQUEST["action"] == "info")
if (isset($_REQUEST["notes"]))
$resa->set_notes($_REQUEST["notes"]);
$site->start_page("none","Moderation des reservations de salle");
$site->start_page("services","Moderation des reservations de salle");
$cts = new contents("Reservation n°".$resa->id);
......@@ -174,7 +174,7 @@ elseif ( $_REQUEST["action"] == "info")
exit();
}
$site->start_page("none","Moderation des reservations de salle");
$site->start_page("services","Moderation des reservations de salle");
if($site->user->is_in_group("gestion_ae"))
......
......@@ -29,7 +29,7 @@ require_once($topdir . "include/entities/tag.inc.php");
$site = new site ();
if (!$site->user->is_in_group ("moderateur_site"))
$site->error_forbidden("none","group",8);
$site->error_forbidden("accueil","group",8);
if ( $_REQUEST["action"] == "modere" )
{
......@@ -50,7 +50,7 @@ elseif ( $_REQUEST["action"] == "delete" )
}
}
$site->start_page ("none", "Modération des tags");
$site->start_page ("accueil", "Modération des tags");
$cts = new contents("Modération des tags");
......@@ -58,14 +58,14 @@ $req = new requete($site->db,"SELECT * FROM tag WHERE modere_tag='0' ORDER BY no
$tbl = new sqltable ("moderetag_list",
"",
$req,
"moderetag.php",
"id_tag",
array ("nom_tag" => "Tag"),
array (),
array ("modere"=>"Accepter","delete" => "Refuser"),
array ());
"",
$req,
"moderetag.php",
"id_tag",
array ("nom_tag" => "Tag"),
array (),
array ("modere"=>"Accepter","delete" => "Refuser"),
array ());
$cts->add ($tbl);
$site->add_contents ($cts);
......
......@@ -33,10 +33,10 @@ $partenaires=array(1=>"Société Générale", 2=>"SMEREB");
$site = new site ();
if ( !$site->user->is_in_group("gestion_ae") )
$site->error_forbidden("none","group","gestion_ae");
$site->error_forbidden("services","group","gestion_ae");
$site->add_js("js/sqltable2.js");
$site->start_page("utl_partenariats","Partenariats en attente");
$site->start_page("services","Partenariats en attente");
$partenariat = new Partenariat($site->db, $site->dbrw);
if ($_REQUEST['action'] == "add")
......
......@@ -31,7 +31,7 @@ require_once($topdir."include/entities/files.inc.php");
$site = new site ();
if (!$site->user->is_in_group ("gestion_ae"))
$site->error_forbidden();
$site->error_forbidden("accueil");
if ($_REQUEST['action'] == "pdf")
{
......@@ -58,7 +58,7 @@ if ($_REQUEST['action'] == "pdf")
exit();
}
$site->start_page("none", "Génération d'un planning de la semaine");
$site->start_page("accueil", "Génération d'un planning de la semaine");
/* Deuxième formulaire : on choisit les évènements
*/
......
......@@ -37,10 +37,10 @@ require_once($topdir. "include/cts/sqltable.inc.php");
$site = new site ();
if (!$site->user->is_in_group ("moderateur_site"))
$site->error_forbidden();
$site->error_forbidden("accueil");
/* else */
$site->start_page ("none", "Gestion du site");
$site->start_page ("accueil", "Gestion du site");
/* objets graphiques de base */
......
......@@ -28,107 +28,107 @@ require_once($topdir. "include/entities/sondage.inc.php");
$site = new site ();
if (!$site->user->is_in_group ("moderateur_site"))
$site->error_forbidden();
$site->error_forbidden("accueil");
$site->start_page ("none", "Sondages");
$site->start_page ("accueil", "Sondages");
if (isset($_REQUEST["addsdn"]) && $_REQUEST["question"] && $_REQUEST["end_date"])
{
$cts = new contents("Sondage ajouté avec succès");
$nb=0;
foreach ( $_REQUEST["reponses"] as $rep )
if ( $rep ) $nb++;
if ( $nb > 1 )
{
$sdn = new sondage($site->db,$site->dbrw);
$sdn->new_sondage($_REQUEST["question"], $_REQUEST["end_date"]);
foreach ( $_REQUEST["reponses"] as $rep )
{
if ( $rep )
$sdn->add_reponse($rep);
}
$cts->add_paragraph("<img src=\"".$topdir."images/actions/done.png\">&nbsp;Le sondage \"".$sdn->question."\" a bien été ajouté.");
$site->add_contents($cts,true);
unset($_REQUEST["question"]);
unset($_REQUEST["reponses"]);
unset($_REQUEST["end_date"]);
}
$cts = new contents("Sondage ajouté avec succès");
$nb=0;
foreach ( $_REQUEST["reponses"] as $rep )
if ( $rep ) $nb++;
if ( $nb > 1 )
{
$sdn = new sondage($site->db,$site->dbrw);
$sdn->new_sondage($_REQUEST["question"], $_REQUEST["end_date"]);
foreach ( $_REQUEST["reponses"] as $rep )
{
if ( $rep )
$sdn->add_reponse($rep);
}
$cts->add_paragraph("<img src=\"".$topdir."images/actions/done.png\">&nbsp;Le sondage \"".$sdn->question."\" a bien été ajouté.");
$site->add_contents($cts,true);
unset($_REQUEST["question"]);
unset($_REQUEST["reponses"]);
unset($_REQUEST["end_date"]);
}
}
if (isset($_REQUEST["editsdn"]) && $_REQUEST["question"] && $_REQUEST["reponses"] && $_REQUEST["end_date"])
{
$nb=0;
foreach ( $_REQUEST["reponses"] as $rep )
if ( $rep ) $nb++;
if ( $nb > 1 )
{
$sdn = new sondage($site->db,$site->dbrw);
$sdn->load_lastest();
$sdn->update_sondage($_REQUEST["question"], $_REQUEST["total_reponses"] , $_REQUEST["date_sondage"], $_REQUEST["end_date"]);
foreach ( $_REQUEST["reponses"] as $num=>$rep)
{
if ( $rep )
$sdn->update_reponse($rep,$num);
else
$sdn->remove_reponse($num);
}
unset($_REQUEST["total_reponses"]);
unset($_REQUEST["question"]);
unset($_REQUEST["reponses"]);
unset($_REQUEST["end_date"]);
}
$nb=0;
foreach ( $_REQUEST["reponses"] as $rep )
if ( $rep ) $nb++;
if ( $nb > 1 )
{
$sdn = new sondage($site->db,$site->dbrw);
$sdn->load_lastest();
$sdn->update_sondage($_REQUEST["question"], $_REQUEST["total_reponses"] , $_REQUEST["date_sondage"], $_REQUEST["end_date"]);
foreach ( $_REQUEST["reponses"] as $num=>$rep)
{
if ( $rep )
$sdn->update_reponse($rep,$num);
else
$sdn->remove_reponse($num);
}
unset($_REQUEST["total_reponses"]);
unset($_REQUEST["question"]);
unset($_REQUEST["reponses"]);
unset($_REQUEST["end_date"]);
}
}
if (isset($_REQUEST["action"]) && $_REQUEST["action"]=="edit")
{
$sdn = new sondage($site->db,$site->dbrw);
$sdn->load_lastest();
if (!$sdn->is_lastest($_REQUEST['id_sondage']))
{
$cts = new contents("Erreur");
$cts->add_paragraph("<img src=\"".$topdir."images/actions/info.png\">&nbsp;&nbsp;L' édition de sondage n'est possible que sur le dernier sondage en vigueur.<br/><br/>Cliquez <a href=\"".$topdir."ae/sondage.php?id_sondage=$sdn->id&action=edit\">ici</a> pour éditer le dernier sondage");
$site->add_contents($cts,true);
}
else
{
$_REQUEST['question'] = $sdn->question;
$_REQUEST['end_date'] = $sdn->date_fin;
$_REQUEST['date_sondage'] = $sdn->date;
$_REQUEST['total_reponses'] = $sdn->total;
foreach ( $sdn->get_reponses() as $num=>$rep )
{
if ( $rep )
$_REQUEST['reponses'][$num]= $rep;
}
// Variable qui prend la valeur 1 pour une modif et 0 pour un ajout classique
$text_submit = 1;
}
$sdn = new sondage($site->db,$site->dbrw);
$sdn->load_lastest();
if (!$sdn->is_lastest($_REQUEST['id_sondage']))
{
$cts = new contents("Erreur");
$cts->add_paragraph("<img src=\"".$topdir."images/actions/info.png\">&nbsp;&nbsp;L' édition de sondage n'est possible que sur le dernier sondage en vigueur.<br/><br/>Cliquez <a href=\"".$topdir."ae/sondage.php?id_sondage=$sdn->id&action=edit\">ici</a> pour éditer le dernier sondage");
$site->add_contents($cts,true);
}
else
{
$_REQUEST['question'] = $sdn->question;
$_REQUEST['end_date'] = $sdn->date_fin;
$_REQUEST['date_sondage'] = $sdn->date;
$_REQUEST['total_reponses'] = $sdn->total;
foreach ( $sdn->get_reponses() as $num=>$rep )
{
if ( $rep )
$_REQUEST['reponses'][$num]= $rep;
}
// Variable qui prend la valeur 1 pour une modif et 0 pour un ajout classique
$text_submit = 1;
}
}
if ($text_submit || $_REQUEST['text_submit'])
$frm = new form ("nvsondage","sondage.php",false,"POST","Edition du dernier sondage <a href=\"".$topdir."ae/sondage.php\" style=\"background-image: url(./../images/page.png); background-repeat: no-repeat; background-position: 3px; background-color: white; float: right; font-size: 90%; border: 1px dashed black; padding: 3px; padding-left: 22px; margin-top: -7px;\">Nouveau Sondage</a>");
$frm = new form ("nvsondage","sondage.php",false,"POST","Edition du dernier sondage <a href=\"".$topdir."ae/sondage.php\" style=\"background-image: url(./../images/page.png); background-repeat: no-repeat; background-position: 3px; background-color: white; float: right; font-size: 90%; border: 1px dashed black; padding: 3px; padding-left: 22px; margin-top: -7px;\">Nouveau Sondage</a>");
else
$frm = new form ("nvsondage","sondage.php",false,"POST","Nouveau sondage");
$frm = new form ("nvsondage","sondage.php",false,"POST","Nouveau sondage");
/* Duree de validite d'un sondage = 15 jours par defaut */
$default_valid = time() + (15 * 24 * 60 * 60);
if ($_REQUEST["end_date"])
$frm->add_date_field("end_date", "Date de fin de validite : ",$_REQUEST["end_date"],true);
$frm->add_date_field("end_date", "Date de fin de validite : ",$_REQUEST["end_date"],true);
else
$frm->add_date_field("end_date", "Date de fin de validite : ",$default_valid,true);
$frm->add_date_field("end_date", "Date de fin de validite : ",$default_valid,true);
$frm->add_text_field("question", "Question",$_REQUEST["question"],true,80);
......@@ -136,26 +136,26 @@ $frm->add_info("Pour supprimer une réponse, il suffit de la laisser vide !");
if (isset($_REQUEST["reponses"]))
{
$n = 1;
foreach ( $_REQUEST["reponses"] as $num=>$rep )
{
if ( $rep )
{
$frm->add_text_field("reponses[$num]", "Reponse $n",$rep,false,80);
$n++;
}
}
if (isset($_REQUEST["newrep"]))
$frm->add_text_field("reponses[]", "Reponse $n","",false,80);
$n = 1;
foreach ( $_REQUEST["reponses"] as $num=>$rep )
{
if ( $rep )
{
$frm->add_text_field("reponses[$num]", "Reponse $n",$rep,false,80);
$n++;
}
}
if (isset($_REQUEST["newrep"]))
$frm->add_text_field("reponses[]", "Reponse $n","",false,80);
}
else
{
$frm->add_text_field("reponses[]", "Reponse 1","",true,80);
$frm->add_text_field("reponses[]", "Reponse 2","",false,80);
$frm->add_text_field("reponses[]", "Reponse 3","",false,80);
$frm->add_text_field("reponses[]", "Reponse 4","",false,80);
$frm->add_text_field("reponses[]", "Reponse 5","",false,80);
$frm->add_text_field("reponses[]", "Reponse 6","",false,80);
$frm->add_text_field("reponses[]", "Reponse 1","",true,80);
$frm->add_text_field("reponses[]", "Reponse 2","",false,80);
$frm->add_text_field("reponses[]", "Reponse 3","",false,80);
$frm->add_text_field("reponses[]", "Reponse 4","",false,80);
$frm->add_text_field("reponses[]", "Reponse 5","",false,80);
$frm->add_text_field("reponses[]", "Reponse 6","",false,80);
}
$frm->add_hidden("text_submit",$text_submit);
......@@ -165,22 +165,22 @@ $frm->add_hidden("total_reponses",$_REQUEST['total_reponses']);
$frm->add_submit("newrep","Reponse supplémentaire");
if ($text_submit || $_REQUEST['text_submit'])
$frm->add_submit("editsdn","Valider la modification");
$frm->add_submit("editsdn","Valider la modification");
else
$frm->add_submit("addsdn","Ajouter");
$frm->add_submit("addsdn","Ajouter");
$site->add_contents($frm);
$req = new requete($site->db, "SELECT * FROM `sdn_sondage` ORDER BY date_sondage DESC");
if ( $req->lines > 0 )