Location: PHPKode > projects > Pnyx : des lections virtuelles! > pnyx1.0.1/aide.php
<?php
	
	#########################################################################################
	# Page d'aide du projet de Pnyx															#
	# Auteur : V. Blais																		#
	# Création : 2008-06-12																	#
	# Modification : 2008-08-19																#
	# 																						#
	# 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 aide, bouton3 FROM site_parametres";
	$reponse_aide = mysql_query($requete_sql);
	$ligne_aide = mysql_fetch_array($reponse_aide);
	
	$titre = $ligne_aide['bouton3'];
	
	require "entete.php";
	
	if(isset($_POST['FCKeditor1'])){
		mysql_query("UPDATE `site_parametres` SET `aide` = '" . addslashes($_POST['FCKeditor1']) . "' WHERE `param_id` =1 LIMIT 1");
	}
	
	$requete_sql = "SELECT aide FROM site_parametres";
	$reponse_aide = mysql_query($requete_sql);
	$ligne_aide = mysql_fetch_array($reponse_aide);
	
	if(isset($_GET['edit'])){
?>
 <form action="aide.php" method="post" target="_self">
<?
	if(file_exists('fckeditor/')){
		$oFCKeditor = new FCKeditor('FCKeditor1') ;
		$oFCKeditor->BasePath = 'fckeditor/' ;
		$oFCKeditor->Value = $ligne_aide['aide'];
		$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="aide.php?edit=true" id="editer">Editer</a>
    <br />
    <br />
<?
		}
	echo $ligne_aide['aide'];
	}
?>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<?
	require "pied_page.php";
?>
Return current item: Pnyx : des lections virtuelles!