<?php
#########################################################################################
# Page d'information de Pnyx #
# Auteur : V. Blais #
# Création : 2008-06-12 #
# Modification : 2008-07-21 #
# #
# Pnyx - une application Web (PHP/MySQL) d'élections virtuelles conçue pour des élèves #
# du primaire et du secondaire, dans lequel ils sont amenés à faire des propositions #
# en ligne et voter pour leur favorite, sous la supervision d'un enseignant. #
# #
# Copyright (C) <2008 - 2009> #
# <Service national du RÉCIT de l'univers social de la Commission scolaire de la #
# Pointe-de-l'Île> #
# #
# This program is free software; you can redistribute it and/or modify it under the #
# terms of the GNU General Public License as published by the Free Software Foundation. #
# This program is distributed in the hope that it will be useful, but WITHOUT ANY #
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A #
# PARTICULAR PURPOSE. See the GNU General Public License for more details. #
# You should have received a copy of the GNU General Public License along with this #
# program as the file LICENSE.txt; if not, please see #
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. #
# #
# Service national du RÉCIT de l'univers social #
# http://www.recitus.qc.ca #
# Contact e-mail : steve-hide@address.com #
#########################################################################################
include_once("fckeditor/fckeditor.php");
require "entete_php.php";
#gen_variables_session();
#variables pour l'affichage graphique de la page
$requete_sql = "SELECT information, bouton2 FROM site_parametres";
$reponse_info = mysql_query($requete_sql);
$ligne_info = mysql_fetch_array($reponse_info);
$titre = $ligne_info['bouton2'];
require "entete.php";
if(isset($_POST['FCKeditor1'])){
mysql_query("UPDATE `site_parametres` SET `information` = '" . addslashes($_POST['FCKeditor1']) . "' WHERE `param_id` =1 LIMIT 1");
}
if(isset($_GET['edit'])){
?>
<form action="information.php" method="post" target="_self">
<?
if(file_exists('fckeditor/')){
$oFCKeditor = new FCKeditor('FCKeditor1') ;
$oFCKeditor->BasePath = 'fckeditor/' ;
$oFCKeditor->Value = $ligne_info['information'];
$oFCKeditor->Create() ;
}
else{
?>
<textarea name="FCKeditor1" cols="50" rows="10"><?= $ligne_info['information'] ?></textarea>
<?
}
?>
<br />
<input type="submit" value="Envoyer">
</form>
<?
}
else{
if($niveau == "admin"){
?>
<a href="information.php?edit=true" id="editer">Editer</a>
<br />
<br />
<?
}
echo $ligne_info['information'];
}
?>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<?
require "pied_page.php";
?>