nombreuses modifs : cf changelog 22 et 23 juin
This commit is contained in:
parent
c1de8d106c
commit
06a388283e
2
.gitignore
vendored
2
.gitignore
vendored
@ -2,3 +2,5 @@ variables.php
|
||||
admin/.htaccess
|
||||
admin/.htpasswd
|
||||
admin/logs_studs.txt
|
||||
framanav
|
||||
|
||||
|
15
CHANGELOG
15
CHANGELOG
@ -1,5 +1,20 @@
|
||||
Les dernières améliorations d'OpenSondage
|
||||
|
||||
Changelog des 22 et 23 juin (pyg@framasoft.net)
|
||||
- très nombreuses modifications CSS
|
||||
- ajout de buttons.css pour des boutons plus propres
|
||||
- ajout de print.css pour une impression sans la classe "corps"
|
||||
- refonte de la page d'accueil
|
||||
- ajout de la framanav
|
||||
- qq retouches dans les fichiers .po
|
||||
- date de destruction passée de 2j à 30j
|
||||
- ajout de l'adresse à transmettre
|
||||
- ajout d'un bouton imprimer
|
||||
- généralisation des stripslashes
|
||||
- fix d'un bug sur une requete (suppression). Reste la seconde partie : https://github.com/leblanc-simon/OpenSondage/issues/8
|
||||
- modification du titre en image
|
||||
- ajout de htmlspecialchars_decode avec param ENT_QUOTES pour l'envoi des emails
|
||||
|
||||
Changelog du 21 juin 2011 (pyg@framasoft.net)
|
||||
- très nombreuses modifications CSS
|
||||
- modification adminstuds.php : ajout de classes aux formulaires et ajout de stripslashes à l'affichage (TODO: à généraliser)
|
||||
|
@ -38,6 +38,7 @@
|
||||
//==========================================================================
|
||||
|
||||
|
||||
|
||||
session_start();
|
||||
|
||||
include_once('../variables.php');
|
||||
@ -59,10 +60,12 @@ echo '</head>'."\n";
|
||||
echo '<body>'."\n";
|
||||
|
||||
//Affichage des bandeaux et début du formulaire
|
||||
framanav();
|
||||
logo();
|
||||
bandeau_tete();
|
||||
bandeau_titre(_("Polls administrator"));
|
||||
sous_bandeau_admin();
|
||||
//print_r($_SESSION);
|
||||
|
||||
$sondage=$connect->Execute("select * from sondage");
|
||||
|
||||
@ -114,7 +117,7 @@ while($dsondage = $sondage->FetchNextObject(false)) {
|
||||
$user_studs=$connect->Execute( "select * from user_studs where id_sondage='$dsondage->id_sondage'");
|
||||
$nbuser=$user_studs->RecordCount();
|
||||
|
||||
echo '<tr align=center><td>'.$dsondage->id_sondage.'</td><td>'.$dsondage->format.'</td><td>'.$dsondage->titre.'</td><td>'.$dsondage->nom_admin.'</td>';
|
||||
echo '<tr align=center><td>'.$dsondage->id_sondage.'</td><td>'.$dsondage->format.'</td><td>'. stripslashes($dsondage->titre).'</td><td>'.stripslashes($dsondage->nom_admin).'</td>';
|
||||
|
||||
if (strtotime($dsondage->date_fin) > time()) {
|
||||
echo '<td>'.date("d/m/y",strtotime($dsondage->date_fin)).'</td>';
|
||||
@ -124,7 +127,7 @@ while($dsondage = $sondage->FetchNextObject(false)) {
|
||||
|
||||
echo'<td>'.$nbuser.'</td>'."\n";
|
||||
echo '<td><a href="../studs.php?sondage='.$dsondage->id_sondage.'">'. _("See the poll") .'</a></td>'."\n";
|
||||
echo '<td><a href="'.getUrlSondage($dsondage->id_sondage_admin, true).'">'. _("Change the poll") .'</a></td>'."\n";
|
||||
echo '<td><a href="/'.$dsondage->id_sondage_admin.'/admin">'. _("Change the poll") .'</a></td>'."\n";
|
||||
echo '<td><input type="submit" name="supprimersondage'.$i.'" value="'. _("Remove the poll") .'"></td>'."\n";
|
||||
|
||||
echo '</tr>'."\n";
|
||||
@ -135,6 +138,7 @@ echo '</table>'."\n";
|
||||
echo'</div>'."\n";
|
||||
// fin du formulaire et de la page web
|
||||
echo '</form>'."\n";
|
||||
echo '<div class="separateur"> </div>';
|
||||
echo '</body>'."\n";
|
||||
echo '</html>'."\n";
|
||||
|
||||
|
@ -78,10 +78,12 @@ if (preg_match(";[\w\d]{24};i", $numsondageadmin)) {
|
||||
if (!$sondage || $sondage->RecordCount() != 1){
|
||||
print_header(false);
|
||||
echo '<body>'."\n";
|
||||
|
||||
framanav();
|
||||
logo();
|
||||
bandeau_tete();
|
||||
bandeau_titre(_("Error!"));
|
||||
|
||||
|
||||
echo '<div class=corpscentre>'."\n";
|
||||
print "<H2>" . _("This poll doesn't exist !") . "</H2><br><br>"."\n";
|
||||
print "" . _("Back to the homepage of ") . " <a href=\"index.php\"> ".NOMAPPLICATION."</A>. "."\n";
|
||||
@ -183,12 +185,17 @@ $dsondage=$sondage->FetchObject(false);
|
||||
if (isset($_POST["ajoutsujet"]) || isset($_POST["ajoutsujet_x"])) {
|
||||
print_header(true);
|
||||
echo '<body>'."\n";
|
||||
framanav();
|
||||
logo();
|
||||
bandeau_tete();
|
||||
bandeau_titre(_("Make your polls"));
|
||||
sous_bandeau();
|
||||
|
||||
//on recupere les données et les sujets du sondage
|
||||
|
||||
echo '<div class="corps">'."\n";
|
||||
|
||||
|
||||
echo '<form name="formulaire" action="'.getUrlSondage($numsondageadmin, true).'" method="POST" onkeypress="javascript:process_keypress(event)">'."\n";
|
||||
|
||||
echo '<div class="corpscentre">'."\n";
|
||||
@ -258,6 +265,10 @@ if (isset($_POST["ajoutsujet"]) || isset($_POST["ajoutsujet_x"])) {
|
||||
echo '<br><br><br><br>'."\n";
|
||||
echo '</div>'."\n";
|
||||
|
||||
echo '</div>'."\n";
|
||||
echo '<div class="separateur"> </div>';
|
||||
|
||||
|
||||
bandeau_pied();
|
||||
|
||||
echo'</body>'."\n";
|
||||
@ -291,6 +302,7 @@ if (isset($_POST["confirmesuppression"]) || isset($_POST["confirmesuppression_x"
|
||||
//affichage de l'ecran de confirmation de suppression de sondage
|
||||
print_header();
|
||||
echo '<body>'."\n";
|
||||
framanav();
|
||||
logo();
|
||||
bandeau_tete();
|
||||
bandeau_titre(_("Make your polls"));
|
||||
@ -342,11 +354,15 @@ if(isset($_POST['ajoutcomment']) || isset($_POST['ajoutcomment_x'])) {
|
||||
// DEBUT DE L'AFFICHAGE DE LA PAGE HTML
|
||||
print_header(true);
|
||||
echo '<body>'."\n";
|
||||
framanav();
|
||||
logo();
|
||||
bandeau_tete();
|
||||
bandeau_titre(_("Make your polls"));
|
||||
sous_bandeau();
|
||||
|
||||
echo '<div class="corps">'."\n";
|
||||
|
||||
|
||||
echo '<div class="presentationdate"> '."\n";
|
||||
|
||||
//affichage du titre du sondage
|
||||
@ -354,14 +370,14 @@ $titre=str_replace("\\","",$dsondage->titre);
|
||||
echo '<H2>'.$titre.'</H2>'."\n";
|
||||
|
||||
//affichage du nom de l'auteur du sondage
|
||||
echo _("Initiator of the poll") .' : '.$dsondage->nom_admin.'<br>'."\n";
|
||||
echo _("Initiator of the poll") .' : '.stripslashes($dsondage->nom_admin).'<br>'."\n";
|
||||
|
||||
//affichage des commentaires du sondage
|
||||
if ($dsondage->commentaires){
|
||||
echo '<br>'. _("Comments") .' :<br>'."\n";
|
||||
$commentaires=$dsondage->commentaires;
|
||||
$commentaires=str_replace("\\","",$commentaires);
|
||||
echo nl2br($commentaires);
|
||||
echo stripslashes(nl2br($commentaires));
|
||||
echo '<br>'."\n";
|
||||
}
|
||||
echo '<br>'."\n";
|
||||
@ -698,6 +714,7 @@ if ($sondage !== false) {
|
||||
} else {
|
||||
print_header(false);
|
||||
echo '<body>'."\n";
|
||||
framanav();
|
||||
logo();
|
||||
bandeau_tete();
|
||||
bandeau_titre(_("Error!"));
|
||||
@ -706,6 +723,8 @@ if ($sondage !== false) {
|
||||
print "" . _("Back to the homepage of ") . " <a href=\"index.php\"> ".NOMAPPLICATION."</A>. "."\n";
|
||||
echo '<br><br><br><br>'."\n";
|
||||
echo '</div>'."\n";
|
||||
|
||||
|
||||
bandeau_pied();
|
||||
echo'</body>'."\n";
|
||||
echo '</html>'."\n";
|
||||
@ -871,7 +890,7 @@ if ($dsondage->format=="D"||$dsondage->format=="D+") {
|
||||
echo '<td></td>'."\n";
|
||||
|
||||
for ($i = 0; isset($toutsujet[$i]); $i++) {
|
||||
echo '<td class="sujet">'.$toutsujet[$i].'</td>'."\n";
|
||||
echo '<td class="sujet">'.stripslashes($toutsujet[$i]).'</td>'."\n";
|
||||
}
|
||||
|
||||
echo '<td class="sujet"><input type="image" name="ajoutsujet" src="images/add-16.png" alt="' . _('Add') . '"></td>'."\n";
|
||||
@ -891,7 +910,7 @@ while ($data = $user_studs->FetchNextObject(false)) {
|
||||
|
||||
//affichage du nom
|
||||
$nombase=str_replace("°","'",$data->nom);
|
||||
echo '<td class="nom">'.$nombase.'</td>'."\n";
|
||||
echo '<td class="nom">'.stripslashes($nombase).'</td>'."\n";
|
||||
|
||||
//si la ligne n'est pas a changer, on affiche les données
|
||||
if (!$testligneamodifier) {
|
||||
@ -1152,7 +1171,7 @@ if ($comment_user->RecordCount() != 0) {
|
||||
|
||||
$i = 0;
|
||||
while ( $dcomment=$comment_user->FetchNextObject(false)) {
|
||||
print "<input type=\"image\" name=\"suppressioncomment$i\" src=\"images/cancel.png\" alt=\"supprimer commentaires\"> $dcomment->usercomment : $dcomment->comment <br>";
|
||||
print "<input type=\"image\" name=\"suppressioncomment$i\" src=\"images/cancel.png\" alt=\"supprimer commentaires\"> ". stripslashes($dcomment->usercomment) ." : ".stripslashes($dcomment->comment) ." <br>";
|
||||
$i++;
|
||||
}
|
||||
|
||||
@ -1201,6 +1220,8 @@ echo '<br><br>'."\n";
|
||||
|
||||
//fin de la partie GESTION et beandeau de pied
|
||||
echo '</p>'."\n";
|
||||
echo '</div>';
|
||||
echo '<div class="separateur"> </div>';
|
||||
bandeau_pied_mobile();
|
||||
echo '</form>'."\n";
|
||||
echo '</body>'."\n";
|
||||
|
19
bandeaux.php
19
bandeaux.php
@ -40,6 +40,17 @@
|
||||
// pour get_server_name()
|
||||
include_once('fonctions.php');
|
||||
|
||||
function framanav()
|
||||
{
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT']."/framanav/nav.inc.html")) {
|
||||
echo "\n".'<!-- Framanav --> '."\n";;
|
||||
echo '<script src="/framanav/scripts/jquery.min.js" type="text/javascript"></script>'."\n";
|
||||
include_once($_SERVER['DOCUMENT_ROOT']."/framanav/nav.inc.html");
|
||||
echo '<!-- /Framanav --> '."\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//le logo
|
||||
function logo ()
|
||||
{
|
||||
@ -52,7 +63,7 @@ function logo ()
|
||||
#le bandeau principal
|
||||
function bandeau_tete()
|
||||
{
|
||||
echo '<div class="bandeau"><a href="/" title="Accueil Framadate"><span class="framamauve">Frama</span><span class="framorange">date</span></a></div>'."\n";
|
||||
echo '<div class="bandeau"><a href="/" title="Accueil Framadate"><img src="/images/logo-framadate.png" title="Accueil '.NOMAPPLICATION.'" alt="'.NOMAPPLICATION.'"></a></div>'."\n";
|
||||
}
|
||||
|
||||
|
||||
@ -95,13 +106,13 @@ function sous_bandeau()
|
||||
function sous_bandeau_admin()
|
||||
{
|
||||
echo '<div class="sousbandeau">' .
|
||||
'<a href="' . get_server_name() . 'index.php">'. _("Home") .'</a>';
|
||||
'<a class="button small gray" href="' . get_server_name() . 'index.php">'. _("Home") .'</a>';
|
||||
|
||||
if(is_readable('logs_studs.txt')) {
|
||||
echo '<a href="' . get_server_name() . 'logs_studs.txt">'. _("Logs") .'</a>';
|
||||
echo '<a class="button small gray" href="' . get_server_name() . 'logs_studs.txt">'. _("Logs") .'</a>';
|
||||
}
|
||||
|
||||
echo '<a href="' . get_server_name() . '../scripts/nettoyage_sondage.php">'. _("Cleaning") .'</a>' .
|
||||
echo '<a class="button small gray" href="' . get_server_name() . '../scripts/nettoyage_sondage.php">'. _("Cleaning") .'</a>' .
|
||||
'<span class="sousbandeau sousbandeaulangue">' .
|
||||
liste_lang() . '</span>'.
|
||||
'</div>'."\n";
|
||||
|
@ -56,6 +56,7 @@ if (issetAndNoEmpty('titre', $_SESSION) === false || issetAndNoEmpty('nom', $_SE
|
||||
echo '<link rel="stylesheet" type="text/css" href="style.css">'."\n";
|
||||
echo '</head>'."\n";
|
||||
echo '<body>'."\n";
|
||||
framanav();
|
||||
logo();
|
||||
bandeau_tete();
|
||||
bandeau_titre(_("Error!"));
|
||||
@ -137,6 +138,7 @@ if (issetAndNoEmpty('titre', $_SESSION) === false || issetAndNoEmpty('nom', $_SE
|
||||
|
||||
print_header();
|
||||
echo '<body>'."\n";
|
||||
framanav();
|
||||
|
||||
echo '<form name="formulaire" action="#bas" method="POST" onkeypress="javascript:process_keypress(event)">'."\n";
|
||||
logo();
|
||||
|
@ -57,6 +57,7 @@ if (!issetAndNoEmpty('nom', $_SESSION) && !issetAndNoEmpty('adresse', $_SESSION)
|
||||
echo '<link rel="stylesheet" type="text/css" href="style.css">'."\n";
|
||||
echo '</head>'."\n";
|
||||
echo '<body>'."\n";
|
||||
framanav();
|
||||
logo();
|
||||
bandeau_tete();
|
||||
bandeau_titre(_("Error!"));
|
||||
|
@ -98,6 +98,8 @@ if ((isset($_POST['envoiquestion']) || isset($_POST['envoiquestion_x'])) && isse
|
||||
echo '</head>'."\n";
|
||||
echo '<body>'."\n";
|
||||
|
||||
framanav();
|
||||
|
||||
//debut du formulaire
|
||||
echo '<form name=formulaire action="contacts.php" method="POST">'."\n";
|
||||
|
||||
|
@ -108,7 +108,7 @@ function ajouter_sondage()
|
||||
|
||||
$message = _("This is the message you have to send to the people you want to poll. \nNow, you have to send this message to everyone you want to poll.");
|
||||
$message .= "\n\n";
|
||||
$message .= stripslashes($_SESSION["nom"])." " . _("hast just created a poll called") . " : \"".stripslashes($_SESSION["titre"])."\".\n";
|
||||
$message .= stripslashes(htmlspecialchars_decode($_SESSION["nom"],ENT_QUOTES))." " . _("hast just created a poll called") . " : \"".stripslashes(htmlspecialchars_decode($_SESSION["titre"],ENT_QUOTES))."\".\n";
|
||||
$message .= _("Thanks for filling the poll at the link above") . " :\n\n%s\n\n" . _("Thanks for your confidence") . ",\n".NOMAPPLICATION;
|
||||
|
||||
$message_admin = _("This message should NOT be sended to the polled people. It is private for the poll's creator.\n\nYou can now modify it at the link above");
|
||||
@ -118,8 +118,8 @@ function ajouter_sondage()
|
||||
$message_admin = sprintf($message_admin, getUrlSondage($sondage_admin, true));
|
||||
|
||||
if (validateEmail($_SESSION['adresse'])) {
|
||||
mail ("$_SESSION[adresse]", "[".NOMAPPLICATION."][" . _("For sending to the polled users") . "] " . _("Poll") . " : ".stripslashes($_SESSION["titre"]), $message_admin, $headers);
|
||||
mail ("$_SESSION[adresse]", "[".NOMAPPLICATION."][" . _("Author's message") . "] " . _("Poll") . " : ".stripslashes($_SESSION["titre"]), $message, $headers);
|
||||
mail ("$_SESSION[adresse]", "[".NOMAPPLICATION."][" . _("For sending to the polled users") . "] " . _("Poll") . " : ".stripslashes(htmlspecialchars_decode($_SESSION["titre"],ENT_QUOTES)), $message_admin, $headers);
|
||||
mail ("$_SESSION[adresse]", "[".NOMAPPLICATION."][" . _("Author's message") . "] " . _("Poll") . " : ".stripslashes(htmlspecialchars_decode($_SESSION["titre"],ENT_QUOTES)), $message, $headers);
|
||||
}
|
||||
|
||||
$date=date('H:i:s d/m/Y:');
|
||||
|
BIN
favicon.ico
BIN
favicon.ico
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
BIN
images/logo-framadate.png
Normal file
BIN
images/logo-framadate.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.2 KiB |
BIN
images/logo-framadate.xcf
Normal file
BIN
images/logo-framadate.xcf
Normal file
Binary file not shown.
@ -56,6 +56,8 @@ echo '<link rel="stylesheet" type="text/css" href="style.css">'."\n";
|
||||
echo '</head>'."\n";
|
||||
echo '<body>'."\n";
|
||||
|
||||
framanav();
|
||||
|
||||
//debut du formulaire
|
||||
echo '<form name=formulaire action="infos_sondage.php" method="POST">'."\n";
|
||||
|
||||
|
@ -147,6 +147,8 @@ if (issetAndNoEmpty("poursuivre")){
|
||||
//affichage de la page
|
||||
print_header(true);
|
||||
echo '<body>'."\n";
|
||||
framanav();
|
||||
|
||||
//affichage des bandeaux de tete
|
||||
logo();
|
||||
bandeau_tete();
|
||||
|
@ -49,10 +49,13 @@ $sondage=$connect->Execute("select * from sondage");
|
||||
while ($dsondage=$sondage->FetchNextObject(false)) {
|
||||
if ($date_courante > strtotime($dsondage->date_fin)) {
|
||||
//destruction des données dans la base
|
||||
$connect->Execute('DELETE FROM sondage LEFT INNER JOIN sujet_studs ON sujet_studs.id_sondage = sondage.id_sondage '.
|
||||
|
||||
$req = 'DELETE FROM sondage LEFT INNER JOIN sujet_studs ON sujet_studs.id_sondage = sondage.id_sondage '.
|
||||
'LEFT INNER JOIN user_studs ON user_studs.id_sondage = sondage.id_sondage ' .
|
||||
'LEFT INNER JOIN comments ON comments.id_sondage = sondage.id_sondage ' .
|
||||
"WHERE id_sondage = '$dsondage->id_sondage' ");
|
||||
"WHERE id_sondage = '$dsondage->id_sondage'; ";
|
||||
echo $req;
|
||||
$connect->Execute($req);
|
||||
// ecriture des traces dans le fichier de logs
|
||||
error_log($date . " SUPPRESSION: $dsondage->id_sondage\t$dsondage->format\t$dsondage->nom_admin\t$dsondage->mail_admin\n", '../admin/logs_studs.txt');
|
||||
}
|
||||
|
@ -173,8 +173,8 @@ if (!is_error(NO_POLL) && (isset($_POST["boutonp"]) || isset($_POST["boutonp_x"]
|
||||
if ($dsondage->mailsonde || /* compatibility for non boolean DB */ $dsondage->mailsonde=="yes" || $dsondage->mailsonde=="true") {
|
||||
$headers="From: ".NOMAPPLICATION." <".ADRESSEMAILADMIN.">\r\nContent-Type: text/plain; charset=\"UTF-8\"\nContent-Transfer-Encoding: 8bit";
|
||||
mail ("$dsondage->mail_admin",
|
||||
"[".NOMAPPLICATION."] "._("Poll's participation")." : $dsondage->titre",
|
||||
"\"$nom\" ".
|
||||
"[".NOMAPPLICATION."] "._("Poll's participation")." : ".htmlspecialchars_decode($dsondage->titre, ENT_QUOTES).",".
|
||||
htmlspecialchars_decode("\"$nom\" ",ENT_QUOTES).
|
||||
_("has filled a line.\nYou can find your poll at the link") . " :\n\n".
|
||||
getUrlSondage($numsondage)." \n\n" .
|
||||
_("Thanks for your confidence.") . "\n". NOMAPPLICATION,
|
||||
@ -188,6 +188,7 @@ if (!is_error(NO_POLL) && (isset($_POST["boutonp"]) || isset($_POST["boutonp_x"]
|
||||
|
||||
print_header(true, $dsondage->titre);
|
||||
echo '<body>'."\n";
|
||||
framanav();
|
||||
logo();
|
||||
bandeau_tete();
|
||||
bandeau_titre(_("Make your polls"));
|
||||
|
11
style.css
11
style.css
@ -82,11 +82,12 @@ div.bandeau{
|
||||
font-size:42px;
|
||||
font-family:arial;
|
||||
padding:8px;
|
||||
height:50px;
|
||||
height:40px;
|
||||
position:static;
|
||||
top:6px;
|
||||
left:6px;
|
||||
right:6px;
|
||||
padding-top:35px;
|
||||
|
||||
}
|
||||
|
||||
@ -102,6 +103,7 @@ div.logo{
|
||||
margin-left: 0;
|
||||
margin-right:0;
|
||||
margin-bottom:auto;
|
||||
padding-top: 30px;
|
||||
}
|
||||
/*Sous bandeau avec bouton de navigation*/
|
||||
div.bandeautitre{
|
||||
@ -201,7 +203,7 @@ div.bandeaupiedmobile{
|
||||
*/
|
||||
span.sousbandeaulangue {
|
||||
margin-left:6px;
|
||||
margin-right:20px;
|
||||
margin-right:90px;
|
||||
float:right;
|
||||
}
|
||||
|
||||
@ -232,7 +234,6 @@ span.sousbandeaulangue {
|
||||
|
||||
div.corps table{
|
||||
font-size:12px;
|
||||
font-weight:bold;
|
||||
}
|
||||
div.corpscentre{
|
||||
font-size:12px;
|
||||
@ -556,7 +557,9 @@ li.error {
|
||||
.index_date .opacity, .index_sondage .opacity {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.button img {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.index_date img:hover, .index_sondage img:hover {
|
||||
opacity: 1;
|
||||
cursor: pointer;
|
||||
|
Loading…
Reference in New Issue
Block a user