Subversion Repositories Applications.papyrus

Compare Revisions

Ignore whitespace Rev 1986 → Rev 1987

/tags/v5.0-ouadji/papyrus/applications/afficheur/afficheur.php
New file
0,0 → 1,384
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This library is free software; you can redistribute it and/or |
// | modify it under the terms of the GNU Lesser General Public |
// | License as published by the Free Software Foundation; either |
// | version 2.1 of the License, or (at your option) any later version. |
// | |
// | This library 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 |
// | Lesser General Public License for more details. |
// | |
// | You should have received a copy of the GNU Lesser General Public |
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: afficheur.php,v 1.14 2007-06-26 15:38:39 jp_milcent Exp $
/**
* Application réalisant l'affichage du contenu stocké dans Papyrus.
*
* Récupère le dernier contenu lié à un menu et le retourne.
*
*@package Afficheur
//Auteur original :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
//Autres auteurs :
*@author Alexandre GRANIER <alexandrel@tela-botanica.org>
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.14 $ $Date: 2007-06-26 15:38:39 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTÊTE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/** Inclusion du fichier de configuration de cette application.*/
require_once GEN_CHEMIN_PAP.'applications/afficheur/configuration/affi_configuration.inc.php';
// Inclusion de la bibliothèque PEAR Text_Wiki réalisées par Papyrus.
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/** Fonction afficherContenuTete() - Fonction appelé par le gestionnaire Papyrus.
*
* Elle retourne l'entête de l'application..
*
* @return string du code XHTML correspondant à la zone d'entête de l'application.
*/
function afficherContenuTete()
{
return '';
}
 
function afficherContenuCorps() {
$retour = '';
$db = $GLOBALS['_AFFICHEUR']['objet_pear_db'];
$id_or = GEN_rechercheMenuCode($db, GEN_rechercheMenuIdentifiant($db, $GLOBALS['_AFFICHEUR']['menu_courant_id']));
 
$ligne_contenu = GEN_rechercheContenu($db, $id_or);
$contenu = $ligne_contenu->gmc_contenu;
// Inclusion de la bibliothèque Text_Wiki_Papyrus effectuées par Papyrus précédement
// Les actions Text_Wiki_Papyrus sont gérées par Papyrus
// Nous regardons si nous avons à faire à un texte sous format Wikini ou XHTML
if (($ligne_contenu->gmc_ce_type_contenu == 1)||(substr($ligne_contenu->gmc_ce_type_contenu,-1)== 1)) {
$retour = $contenu;
} elseif (($ligne_contenu->gmc_ce_type_contenu == 2) || (substr($ligne_contenu->gmc_ce_type_contenu,-1)== 2)){
include_once AFFI_CHEMIN_BIBLIOTHEQUE_API.'text/wiki_wikini/Wikini.class.php';
// Création d'un objet Text_Wikini :
$wikini =& new Text_Wikini();
// Pour éviter de remplacer les caractères spéciaux du XHTML:
$wikini->setFormatConf('Xhtml', 'translate', false);
// Configuration de la règle Freelink :
$wikini->setRenderConf('Xhtml', 'freelink', 'pages', null);
$wikini->setRenderConf('Xhtml', 'freelink', 'view_url', AFFI_URL_PAPYRUS);
// Configuration de la règle Interwiki :
$wikini->setRenderConf('Xhtml', 'interwiki', 'sites', $GLOBALS['_AFFICHEUR']['interwiki_sites']);
// Application des règles de Wikini :
$retour = $wikini->transform($contenu, 'Xhtml');
}
//----------------------------------------------------------------------------
// Renvoie du contenu de la page
return $retour;
}
 
 
/** Fonction afficherContenuCorps() - Fonction appelé par le gestionnaire Papyrus.
*
* Elle retourne le contenu stocké dans Papyrus pour le menu courant demandé.
*
* @return string du code XHTML correspondant au contenu du menu demandé.
*/
function afficherContenuCorpsOld()
{
//----------------------------------------------------------------------------
// Initialisation des variable
$retour = '';
$id_langue = $GLOBALS['_GEN_commun']['i18n'];
if (isset($id_langue) && ($id_langue!='')) {
$langue_test=$id_langue;
} else {
$langue_test=GEN_I18N_ID_DEFAUT;
}
 
//-------------------------------------------------------------------------------------------------------------------
// Récupération des informations du contenu concerné.
$ligne_menu = GEN_lireInfoMenu($GLOBALS['_AFFICHEUR']['objet_pear_db'], $GLOBALS['_AFFICHEUR']['menu_courant_id'], DB_FETCHMODE_ASSOC);
if ($ligne_menu == false) {
die('ERREUR Papyrus Administrateur de Menus: impossible de lire les infos du menu.<br />'.
'Idenitifiant du menu n° : '. $GLOBALS['_AFFICHEUR']['objet_pear_db'] .'<br />'.
'Ligne n° : '. __LINE__ .'<br />'.
'Fichier n° : '. __FILE__ .'<br />');
}
 
// Comment ca marche ?
// Historiquement, le code menu est associé au contenu
// Depuis le passage au multilinguisme : ce comportement est conservé mais :
// Tout nouveau contenu, contient également l'information code gm_id_menu, enfoui dans le
// type contenu.
// Récupération identifiant du menu en cours
$requete = 'SELECT gm_id_menu, gm_code_num '.
'FROM gen_menu '.
'WHERE gm_code_num = '.$ligne_menu['gm_code_num'].' '.
'AND gm_ce_i18n = "'.$langue_test.'" ';
 
$resultat = $GLOBALS['_AFFICHEUR']['objet_pear_db']->query($requete);
(DB::isError($resultat)) ? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '';
if ( $resultat->numRows() > 0 ) {
$ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT);
}
else {
// Recherche defaut :
 
$requete = 'SELECT gm_id_menu, gm_code_num '.
'FROM gen_menu '.
'WHERE gm_code_num = '.$ligne_menu['gm_code_num'].' ';
'AND gm_ce_i18n = "'.GEN_I18N_ID_DEFAUT.'" ';
 
$resultat = $GLOBALS['_AFFICHEUR']['objet_pear_db']->query($requete);
 
(DB::isError($resultat)) ? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '';
$ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT);
if ($langue_test!=GEN_I18N_ID_DEFAUT) {
$requete_defaut = 'SELECT gmr_id_menu_02 as gm_id_menu , ' . $ligne->gm_code_num . ' as gm_code_num '.
'FROM gen_menu_relation '.
'WHERE '.$ligne->gm_id_menu. ' = gmr_id_menu_01 ' .
'AND gmr_id_valeur = 105 ';// 105 Traduction par defaut
$resultat_defaut = $GLOBALS['_AFFICHEUR']['objet_pear_db']->query($requete_defaut);
(DB::isError($resultat_defaut)) ? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat_defaut->getMessage(), $requete_defaut))
: '';
if ($resultat_defaut->numRows() > 0) {
$ligne=$resultat_defaut->fetchRow(DB_FETCHMODE_OBJECT);
}
}
}
 
// Cas historique : ce menu n'a jamais été traduit.
$requete = 'SELECT gmc_contenu , gmc_ce_type_contenu '.
'FROM gen_menu_contenu '.
'WHERE gmc_ce_menu = '.$ligne->gm_id_menu.' '.
'AND gmc_ce_type_contenu in (1,2) '.
'AND gmc_bool_dernier = 1';
$resultat = $GLOBALS['_AFFICHEUR']['objet_pear_db']->query($requete);
(DB::isError($resultat)) ? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '';
// Rien trouvé ? : Migration multilinguisme ou pas encore de contenu
if ( $resultat->numRows() == 0 ) {
// Migration multilinguisme
$requete = 'SELECT gmc_contenu , gmc_ce_type_contenu '.
'FROM gen_menu_contenu '.
'WHERE gmc_ce_menu = '.$ligne_menu['gm_code_num'].' '.
'AND truncate((gmc_ce_type_contenu/10),0) = '. $ligne->gm_id_menu . ' '.
'AND gmc_bool_dernier = 1';
$resultat = $GLOBALS['_AFFICHEUR']['objet_pear_db']->query($requete);
(DB::isError($resultat)) ? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '';
// Pas de contenu, tentative de recuperation du contenu se
if ( $resultat->numRows() == 0 ) {
$requete = 'SELECT gmr_id_menu_02 as gm_id_menu , ' . $ligne->gm_code_num . ' as gm_code_num '.
'FROM gen_menu_relation '.
'WHERE '.$ligne->gm_id_menu. ' = gmr_id_menu_01 ' .
'AND gmr_id_valeur = 105 ';// 105 Traduction par defaut
$resultat = $GLOBALS['_AFFICHEUR']['objet_pear_db']->query($requete);
(DB::isError($resultat)) ? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete))
: '';
 
$requete = 'SELECT gmc_contenu , gmc_ce_type_contenu '.
'FROM gen_menu_contenu, gen_menu_relation '.
'WHERE truncate((gmc_ce_type_contenu/10),0) = gmr_id_menu_01 '.
'AND '.$ligne->gm_id_menu.' = gmr_id_menu_02 '.
'AND gmr_id_valeur = 2 '.
'AND gmc_bool_dernier = 1';
 
$resultat = $GLOBALS['_AFFICHEUR']['objet_pear_db']->query($requete);
(DB::isError($resultat)) ? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '';
 
/*
$requete = 'SELECT gmr_id_menu_02 as gm_id_menu , ' . $ligne->gm_code_num . ' as gm_code_num '.
'FROM gen_menu_relation '.
'WHERE '.$ligne->gm_id_menu. ' = gmr_id_menu_01 ' .
'AND gmr_id_valeur = 105 ';// 105 Traduction par defaut
$resultat = $GLOBALS['_AFFICHEUR']['objet_pear_db']->query($requete);
print_r ($requete);
(DB::isError($resultat)) ? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete))
: '';
*/
}
// Toujours rien ?
if ( $resultat->numRows() == 0 ) {
$requete = 'SELECT gmc_contenu , gmc_ce_type_contenu '.
'FROM gen_menu_contenu '.
'WHERE gmc_ce_menu = '.$ligne->gm_code_num.' '.
'AND gmc_ce_type_contenu in (1,2) '.
'AND gmc_bool_dernier = 1';
$resultat = $GLOBALS['_AFFICHEUR']['objet_pear_db']->query($requete);
(DB::isError($resultat)) ? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '';
}
}
$ligne_contenu = $resultat->fetchRow(DB_FETCHMODE_OBJECT);
$contenu = $ligne_contenu->gmc_contenu;
// Inclusion de la bibliothèque Text_Wiki_Papyrus effectuées par Papyrus précédement
// Les actions Text_Wiki_Papyrus sont gérées par Papyrus
// Nous regardons si nous avons à faire à un texte sous format Wikini ou XHTML
if (($ligne_contenu->gmc_ce_type_contenu == 1)||(substr($ligne_contenu->gmc_ce_type_contenu,-1)== 1)) {
$retour = $contenu;
} elseif (($ligne_contenu->gmc_ce_type_contenu == 2) || (substr($ligne_contenu->gmc_ce_type_contenu,-1)== 2)){
include_once AFFI_CHEMIN_BIBLIOTHEQUE_API.'text/wiki_wikini/Wikini.class.php';
// Création d'un objet Text_Wikini :
$wikini =& new Text_Wikini();
// Pour éviter de remplacer les caractères spéciaux du XHTML:
$wikini->setFormatConf('Xhtml', 'translate', false);
// Configuration de la règle Freelink :
$wikini->setRenderConf('Xhtml', 'freelink', 'pages', null);
$wikini->setRenderConf('Xhtml', 'freelink', 'view_url', AFFI_URL_PAPYRUS);
// Configuration de la règle Interwiki :
$wikini->setRenderConf('Xhtml', 'interwiki', 'sites', $GLOBALS['_AFFICHEUR']['interwiki_sites']);
// Application des règles de Wikini :
$retour = $wikini->transform($contenu, 'Xhtml');
}
 
// +---------------------------------------------------------------------------------------------------------------+
// Nous regardons si nous voulons surligner ou pas des mots
if (isset($_GET['var_recherche'])) {
$tab_mots = explode(' ', rawurldecode($_GET['var_recherche']));
foreach ($tab_mots as $mot) {
if (strlen($mot) >= 2) {
$regexp = '/(>[^<]*)('.$mot.'\b)/Uis';
$retour = preg_replace($regexp, '$1<span class="surlignage">$2</span>', $retour);
}
}
}
 
//----------------------------------------------------------------------------
// Renvoie du contenu de la page
return $retour;
}
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
 
 
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.13 2006-11-21 18:52:20 jp_milcent
* Ajout de la possibilité de surligner des mots.
*
* Revision 1.12 2006/11/21 15:50:05 jp_milcent
* Ajout du surlignage des mots passé dans la query string via la variable var_recherche.
*
* Revision 1.11 2006/10/16 15:49:07 ddelon
* Refactorisation code mulitlinguisme et gestion menu invisibles
*
* Revision 1.10 2006/06/29 15:12:26 ddelon
* Multilinguisme : contenu par defaut
*
* Revision 1.9 2006/03/27 10:50:24 ddelon
* Still some pb
*
* Revision 1.7 2006/03/13 21:00:20 ddelon
* Suppression messages d'erreur multilinguisme
*
* Revision 1.6 2006/03/02 10:49:49 ddelon
* Fusion branche multilinguisme dans branche principale
*
* Revision 1.5.2.3 2006/03/02 00:22:23 ddelon
* bug afficheur multilinguisme
*
* Revision 1.5.2.2 2006/03/01 23:51:07 ddelon
* bug afficheur multilinguisme
*
* Revision 1.5.2.1 2006/02/28 14:02:11 ddelon
* Finition multilinguisme
*
* Revision 1.5 2005/04/21 16:46:17 jpm
* Gestion via Papyrus du XHTML.
*
* Revision 1.4 2005/02/22 18:25:13 jpm
* Déplacement d'un message d'alerte en cas d'erreur sql.
*
* Revision 1.3 2004/12/07 12:24:30 jpm
* Changement chemin d'accés à l'api Text/Wiki...
*
* Revision 1.2 2004/11/26 13:10:05 jpm
* Utilisation des actions Papyrus et implémentation de la syntaxe Wikini.
*
* Revision 1.1 2004/06/16 14:35:26 jpm
* Changement de nom de Génésia en Papyrus.
* Changement de l'arborescence.
*
* Revision 1.12 2004/05/05 11:35:12 jpm
* Amélioration de la gestion de l'internationalisation.
*
* Revision 1.11 2004/05/05 06:45:40 jpm
* Suppression de l'appel de la fonction générant le "vous êtes ici" dans la fonction affichant l'entête de l'application.
*
* Revision 1.10 2004/05/04 16:28:22 jpm
* Réduction de code pour la fonction afficherContenuTete().
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/v5.0-ouadji/papyrus/applications/afficheur/configuration/affi_fckconfig.js
New file
0,0 → 1,335
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www.gnu.org/licenses/gpl.html
*
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
* http://www.gnu.org/licenses/lgpl.html
*
* - Mozilla Public License Version 1.1 or later (the "MPL")
* http://www.mozilla.org/MPL/MPL-1.1.html
*
* == END LICENSE ==
*
* Editor configuration settings.
*
* Follow this link for more information:
* http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options
*/
 
FCKConfig.CustomConfigurationsPath = '' ;
 
FCKConfig.EditorAreaCSS = FCKConfig.BasePath + 'css/fck_editorarea.css' ;
FCKConfig.EditorAreaStyles = '' ;
FCKConfig.ToolbarComboPreviewCSS = '' ;
 
FCKConfig.DocType = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' ;
 
FCKConfig.BaseHref = '' ;
 
FCKConfig.FullPage = false ;
 
// The following option determines whether the "Show Blocks" feature is enabled or not at startup.
FCKConfig.StartupShowBlocks = false ;
 
FCKConfig.Debug = false ;
FCKConfig.AllowQueryStringDebug = true ;
 
FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/default/' ;
FCKConfig.SkinEditorCSS = '' ; // FCKConfig.SkinPath + "|<minified css>" ;
FCKConfig.SkinDialogCSS = '' ; // FCKConfig.SkinPath + "|<minified css>" ;
 
FCKConfig.PreloadImages = [ FCKConfig.SkinPath + 'images/toolbar.start.gif', FCKConfig.SkinPath + 'images/toolbar.buttonarrow.gif' ] ;
 
FCKConfig.PluginsPath = FCKConfig.BasePath + 'plugins/' ;
 
// FCKConfig.Plugins.Add( 'autogrow' ) ;
// FCKConfig.Plugins.Add( 'dragresizetable' );
FCKConfig.AutoGrowMax = 400 ;
 
// FCKConfig.ProtectedSource.Add( /<%[\s\S]*?%>/g ) ; // ASP style server side code <%...%>
// FCKConfig.ProtectedSource.Add( /<\?[\s\S]*?\?>/g ) ; // PHP style server side code
// FCKConfig.ProtectedSource.Add( /(<asp:[^\>]+>[\s|\S]*?<\/asp:[^\>]+>)|(<asp:[^\>]+\/>)/gi ) ; // ASP.Net style tags <asp:control>
 
FCKConfig.AutoDetectLanguage = true ;
FCKConfig.DefaultLanguage = 'fr' ;
FCKConfig.ContentLangDirection = 'ltr' ;
 
FCKConfig.ProcessHTMLEntities = true ;
FCKConfig.IncludeLatinEntities = true ;
FCKConfig.IncludeGreekEntities = true ;
 
FCKConfig.ProcessNumericEntities = false ;
 
FCKConfig.AdditionalNumericEntities = '' ; // Single Quote: "'"
 
FCKConfig.FillEmptyBlocks = true ;
 
FCKConfig.FormatSource = true ;
FCKConfig.FormatOutput = true ;
FCKConfig.FormatIndentator = ' ' ;
 
FCKConfig.EMailProtection = 'encode' ; // none | encode | function
FCKConfig.EMailProtectionFunction = 'mt(NAME,DOMAIN,SUBJECT,BODY)' ;
 
FCKConfig.StartupFocus = false ;
FCKConfig.ForcePasteAsPlainText = false ;
FCKConfig.AutoDetectPasteFromWord = true ; // IE only.
FCKConfig.ShowDropDialog = true ;
FCKConfig.ForceSimpleAmpersand = false ;
FCKConfig.TabSpaces = 0 ;
FCKConfig.ShowBorders = true ;
FCKConfig.SourcePopup = false ;
FCKConfig.ToolbarStartExpanded = true ;
FCKConfig.ToolbarCanCollapse = true ;
FCKConfig.IgnoreEmptyParagraphValue = true ;
FCKConfig.FloatingPanelsZIndex = 10000 ;
FCKConfig.HtmlEncodeOutput = false ;
 
FCKConfig.TemplateReplaceAll = true ;
FCKConfig.TemplateReplaceCheckbox = true ;
 
FCKConfig.ToolbarLocation = 'In' ;
 
FCKConfig.ToolbarSets["Default"] = [
['Source','DocProps','-','Save','NewPage','Preview','-','Templates'],
['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'],
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],
'/',
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote','CreateDiv'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
['Link','Unlink','Anchor'],
['Image','Flash','Table','Rule','Smiley','SpecialChar','PageBreak'],
'/',
['Style','FontFormat','FontName','FontSize'],
['TextColor','BGColor'],
['FitWindow','ShowBlocks','-','About'] // No comma for the last row.
] ;
 
FCKConfig.ToolbarSets["Basic"] = [
['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink','-','About']
] ;
 
FCKConfig.ToolbarSets["Papyrus"] = [
['FitWindow','ShowBlocks','Source','Preview','-','Cut','Copy','Paste','PasteText','PasteWord','SelectAll','-','Undo','Redo','Find','Replace'],
['RemoveFormat','Bold','Italic','Underline','StrikeThrough','Subscript','Superscript','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','-','OrderedList','UnorderedList'],
'/',
['Image','Link','Unlink','Table','Rule','SpecialChar'],
['FontFormat','FontName','FontSize'],
['TextColor','BGColor'],
['About']
] ;
 
FCKConfig.EnterMode = 'p' ; // p | div | br
FCKConfig.ShiftEnterMode = 'br' ; // p | div | br
 
FCKConfig.Keystrokes = [
[ CTRL + 65 /*A*/, true ],
[ CTRL + 67 /*C*/, true ],
[ CTRL + 70 /*F*/, true ],
[ CTRL + 83 /*S*/, true ],
[ CTRL + 84 /*T*/, true ],
[ CTRL + 88 /*X*/, true ],
[ CTRL + 86 /*V*/, 'Paste' ],
[ CTRL + 45 /*INS*/, true ],
[ SHIFT + 45 /*INS*/, 'Paste' ],
[ CTRL + 88 /*X*/, 'Cut' ],
[ SHIFT + 46 /*DEL*/, 'Cut' ],
[ CTRL + 90 /*Z*/, 'Undo' ],
[ CTRL + 89 /*Y*/, 'Redo' ],
[ CTRL + SHIFT + 90 /*Z*/, 'Redo' ],
[ CTRL + 76 /*L*/, 'Link' ],
[ CTRL + 66 /*B*/, 'Bold' ],
[ CTRL + 73 /*I*/, 'Italic' ],
[ CTRL + 85 /*U*/, 'Underline' ],
[ CTRL + SHIFT + 83 /*S*/, 'Save' ],
[ CTRL + ALT + 13 /*ENTER*/, 'FitWindow' ],
[ SHIFT + 32 /*SPACE*/, 'Nbsp' ]
] ;
 
FCKConfig.ContextMenu = ['Generic','Link','Anchor','Image','Flash','Select','Textarea','Checkbox','Radio','TextField','HiddenField','ImageButton','Button','BulletedList','NumberedList','Table','Form','DivContainer'] ;
FCKConfig.BrowserContextMenuOnCtrl = false ;
FCKConfig.BrowserContextMenu = false ;
 
FCKConfig.EnableMoreFontColors = true ;
FCKConfig.FontColors = '000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,808080,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF' ;
 
FCKConfig.FontFormats = 'p;h1;h2;h3;h4;h5;h6;pre;address;div' ;
FCKConfig.FontNames = 'Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana' ;
FCKConfig.FontSizes = 'smaller;larger;xx-small;x-small;small;medium;large;x-large;xx-large' ;
 
FCKConfig.StylesXmlPath = FCKConfig.EditorPath + 'fckstyles.xml' ;
FCKConfig.TemplatesXmlPath = FCKConfig.EditorPath + 'fcktemplates.xml' ;
 
FCKConfig.SpellChecker = 'ieSpell' ; // 'ieSpell' | 'SpellerPages'
FCKConfig.IeSpellDownloadUrl = 'http://www.iespell.com/download.php' ;
FCKConfig.SpellerPagesServerScript = 'server-scripts/spellchecker.php' ; // Available extension: .php .cfm .pl
FCKConfig.FirefoxSpellChecker = false ;
 
FCKConfig.MaxUndoLevels = 15 ;
 
FCKConfig.DisableObjectResizing = false ;
FCKConfig.DisableFFTableHandles = true ;
 
FCKConfig.LinkDlgHideTarget = false ;
FCKConfig.LinkDlgHideAdvanced = false ;
 
FCKConfig.ImageDlgHideLink = false ;
FCKConfig.ImageDlgHideAdvanced = false ;
 
FCKConfig.FlashDlgHideAdvanced = false ;
 
FCKConfig.ProtectedTags = '' ;
 
// This will be applied to the body element of the editor
FCKConfig.BodyId = '' ;
FCKConfig.BodyClass = '' ;
 
FCKConfig.DefaultStyleLabel = '' ;
FCKConfig.DefaultFontFormatLabel = '' ;
FCKConfig.DefaultFontLabel = '' ;
FCKConfig.DefaultFontSizeLabel = '' ;
 
FCKConfig.DefaultLinkTarget = '' ;
 
// The option switches between trying to keep the html structure or do the changes so the content looks like it was in Word
FCKConfig.CleanWordKeepsStructure = false ;
 
// Only inline elements are valid.
FCKConfig.RemoveFormatTags = 'b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var' ;
 
// Attributes that will be removed
FCKConfig.RemoveAttributes = 'class,style,lang,width,height,align,hspace,valign' ;
 
FCKConfig.CustomStyles =
{
'Red Title' : { Element : 'h3', Styles : { 'color' : 'Red' } }
};
 
// Do not add, rename or remove styles here. Only apply definition changes.
FCKConfig.CoreStyles =
{
// Basic Inline Styles.
'Bold' : { Element : 'strong', Overrides : 'b' },
'Italic' : { Element : 'em', Overrides : 'i' },
'Underline' : { Element : 'u' },
'StrikeThrough' : { Element : 'strike' },
'Subscript' : { Element : 'sub' },
'Superscript' : { Element : 'sup' },
 
// Basic Block Styles (Font Format Combo).
'p' : { Element : 'p' },
'div' : { Element : 'div' },
'pre' : { Element : 'pre' },
'address' : { Element : 'address' },
'h1' : { Element : 'h1' },
'h2' : { Element : 'h2' },
'h3' : { Element : 'h3' },
'h4' : { Element : 'h4' },
'h5' : { Element : 'h5' },
'h6' : { Element : 'h6' },
 
// Other formatting features.
'FontFace' :
{
Element : 'span',
Styles : { 'font-family' : '#("Font")' },
Overrides : [ { Element : 'font', Attributes : { 'face' : null } } ]
},
 
'Size' :
{
Element : 'span',
Styles : { 'font-size' : '#("Size","fontSize")' },
Overrides : [ { Element : 'font', Attributes : { 'size' : null } } ]
},
 
'Color' :
{
Element : 'span',
Styles : { 'color' : '#("Color","color")' },
Overrides : [ { Element : 'font', Attributes : { 'color' : null } } ]
},
 
'BackColor' : { Element : 'span', Styles : { 'background-color' : '#("Color","color")' } },
 
'SelectionHighlight' : { Element : 'span', Styles : { 'background-color' : 'navy', 'color' : 'white' } }
};
 
// The distance of an indentation step.
FCKConfig.IndentLength = 40 ;
FCKConfig.IndentUnit = 'px' ;
 
// Alternatively, FCKeditor allows the use of CSS classes for block indentation.
// This overrides the IndentLength/IndentUnit settings.
FCKConfig.IndentClasses = [] ;
 
// [ Left, Center, Right, Justified ]
FCKConfig.JustifyClasses = [] ;
 
// The following value defines which File Browser connector and Quick Upload
// "uploader" to use. It is valid for the default implementaion and it is here
// just to make this configuration file cleaner.
// It is not possible to change this value using an external file or even
// inline when creating the editor instance. In that cases you must set the
// values of LinkBrowserURL, ImageBrowserURL and so on.
// Custom implementations should just ignore it.
var _FileBrowserLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php | py
var _QuickUploadLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php | py
 
// Don't care about the following two lines. It just calculates the correct connector
// extension to use for the default File Browser (Perl uses "cgi").
var _FileBrowserExtension = _FileBrowserLanguage == 'perl' ? 'cgi' : _FileBrowserLanguage ;
var _QuickUploadExtension = _QuickUploadLanguage == 'perl' ? 'cgi' : _QuickUploadLanguage ;
 
FCKConfig.LinkBrowser = true ;
FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=' + encodeURIComponent( FCKConfig.BasePath + 'filemanager/connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ) ;
FCKConfig.LinkBrowserWindowWidth = FCKConfig.ScreenWidth * 0.7 ; // 70%
FCKConfig.LinkBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ; // 70%
 
FCKConfig.ImageBrowser = true ;
FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=' + encodeURIComponent( FCKConfig.BasePath + 'filemanager/connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ) ;
FCKConfig.ImageBrowserWindowWidth = FCKConfig.ScreenWidth * 0.7 ; // 70% ;
FCKConfig.ImageBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ; // 70% ;
 
FCKConfig.FlashBrowser = true ;
FCKConfig.FlashBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Flash&Connector=' + encodeURIComponent( FCKConfig.BasePath + 'filemanager/connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ) ;
FCKConfig.FlashBrowserWindowWidth = FCKConfig.ScreenWidth * 0.7 ; //70% ;
FCKConfig.FlashBrowserWindowHeight = FCKConfig.ScreenHeight * 0.7 ; //70% ;
 
FCKConfig.LinkUpload = true ;
FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension ;
FCKConfig.LinkUploadAllowedExtensions = ".(7z|aiff|asf|avi|bmp|csv|doc|fla|flv|gif|gz|gzip|jpeg|jpg|mid|mov|mp3|mp4|mpc|mpeg|mpg|ods|odt|pdf|png|ppt|pxd|qt|ram|rar|rm|rmi|rmvb|rtf|sdc|sitd|swf|sxc|sxw|tar|tgz|tif|tiff|txt|vsd|wav|wma|wmv|xls|xml|zip)$" ; // empty for all
FCKConfig.LinkUploadDeniedExtensions = "" ; // empty for no one
 
FCKConfig.ImageUpload = true ;
FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension + '?Type=Image' ;
FCKConfig.ImageUploadAllowedExtensions = ".(jpg|gif|jpeg|png|bmp)$" ; // empty for all
FCKConfig.ImageUploadDeniedExtensions = "" ; // empty for no one
 
FCKConfig.FlashUpload = true ;
FCKConfig.FlashUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension + '?Type=Flash' ;
FCKConfig.FlashUploadAllowedExtensions = ".(swf|flv)$" ; // empty for all
FCKConfig.FlashUploadDeniedExtensions = "" ; // empty for no one
 
FCKConfig.SmileyPath = FCKConfig.BasePath + 'images/smiley/msn/' ;
FCKConfig.SmileyImages = ['regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif','embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif','devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif','broken_heart.gif','kiss.gif','envelope.gif'] ;
FCKConfig.SmileyColumns = 8 ;
FCKConfig.SmileyWindowWidth = 320 ;
FCKConfig.SmileyWindowHeight = 210 ;
 
FCKConfig.BackgroundBlockerColor = '#ffffff' ;
FCKConfig.BackgroundBlockerOpacity = 0.50 ;
 
FCKConfig.MsWebBrowserControlCompat = false ;
 
FCKConfig.PreventSubmitHandler = false ;
/tags/v5.0-ouadji/papyrus/applications/afficheur/configuration/affi_configuration.inc.php
New file
0,0 → 1,152
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.3 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of Papyrus. |
// | |
// | Foobar 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; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar 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 Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: affi_configuration.inc.php,v 1.14 2007-06-26 13:30:48 jp_milcent Exp $
/**
* Application réalisant l'affichage du contenu stocké dans Papyrus.
*
* Les constantes et variables de configuration de l'application Afficheur.
*
*@package Afficheur
*@subpackage Configuration
//Auteur original :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.14 $ $Date: 2007-06-26 13:30:48 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
// Chemin des fichiers à inclure.
/** Chemin vers la bibliothèque PEAR.*/
define('AFFI_CHEMIN_BIBLIOTHEQUE_PEAR', '');
/** Chemin vers la bibliothèque API.*/
define('AFFI_CHEMIN_BIBLIOTHEQUE_API', 'api'.GEN_SEP);
/** Chemin vers la bibliothèque API : fckeditor.*/
define('AFFI_CHEMIN_FCKEDITOR', AFFI_CHEMIN_BIBLIOTHEQUE_API.'fckeditor'.GEN_SEP);
/** Chemin vers l'application Admin de l'afficheur de Papyrus.*/
define('AFFI_CHEMIN_APPLICATION', GEN_CHEMIN_APPLICATION.'afficheur'.GEN_SEP);
/** Chemin vers le dossier des squelettes de l'application.*/
define('AFFI_CHEMIN_SQUELETTE', AFFI_CHEMIN_APPLICATION.'squelettes'.GEN_SEP);
/** Chemin vers le dossier des styles de l'application.*/
define('AFFI_CHEMIN_STYLE', AFFI_CHEMIN_SQUELETTE);
/** Chaine à utiliser pour l'URL de la règle Freelink.*/
define('AFFI_URL_PAPYRUS', PAP_URL.'?menu=%s');
 
/** Utilisation de fckeditor (true).*/
$GLOBALS['_AFFI_']['fckeditor']['utilisation'] = true;
/** Hauteur de fckeditor.*/
$GLOBALS['_AFFI_']['fckeditor']['hauteur'] = '400';
/** Type de barre d'outil de fckeditor.*/
$GLOBALS['_AFFI_']['fckeditor']['barre'] = 'Papyrus';
/** Langue de fckeditor.*/
$GLOBALS['_AFFI_']['fckeditor']['langue'] = $GLOBALS['_GEN_commun']['i18n'];
/** Fichier de config personnalisé de fckeditor.*/
$base_url = parse_url(PAP_URL);
$dirname_base_url = dirname($base_url['path']);
// Suppression double slash pour site interdisant ce type d'url (a confirmer ...)
// Probleme également avec des sous-domaines (~ree05/papyrus etc.) ....
$GLOBALS['_AFFI_']['fckeditor']['CustomConfigurationsPath'] = str_replace('//', '/', $dirname_base_url.GEN_SEP.AFFI_CHEMIN_APPLICATION.'configuration'.GEN_SEP.'affi_fckconfig.js');
 
// L'objet PEAR::DB à utiliser pour l'afficheur :
$GLOBALS['_AFFICHEUR']['objet_pear_db'] =& $GLOBALS['_GEN_commun']['pear_db'];
 
// L'identifiant du menu courant :
if (isset($GLOBALS['_GEN_commun']['traduction_info_menu'])) {
$GLOBALS['_AFFICHEUR']['menu_courant_id'] = $GLOBALS['_GEN_commun']['traduction_info_menu']->gm_id_menu;
} else if (isset($GLOBALS['_GEN_commun']['info_menu'])) {
$GLOBALS['_AFFICHEUR']['menu_courant_id'] = $GLOBALS['_GEN_commun']['info_menu']->gm_id_menu;
} else {
$GLOBALS['_AFFICHEUR']['menu_courant_id'] = $GLOBALS['_GEN_commun']['url_menu'];
}
 
// Le jeu de caractère à utiliser pour la page courante :
$GLOBALS['_AFFICHEUR']['jeu_de_caracteres'] = $GLOBALS['_PAPYRUS_']['page']['jeu_de_caracteres'];
 
// Les sites correspodant aux liens interwiki:
$GLOBALS['_AFFICHEUR']['interwiki_sites'] =& $GLOBALS['_PAPYRUS_']['interwiki_sites'];
 
// Les sites correspodant à l'action inclure:
$GLOBALS['_AFFICHEUR']['inclure_sites'] =& $GLOBALS['_PAPYRUS_']['inclure_sites'];
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.13 2006-04-28 12:41:49 florian
* corrections erreurs chemin
*
* Revision 1.12 2005/08/25 08:59:12 ddelon
* Integrateur Wikini et administration des Wikini
*
* Revision 1.11 2005/08/18 10:20:04 ddelon
* Integrateur Wikini et Acces PEAR
*
* Revision 1.10 2005/07/21 18:11:43 ddelon
* configuration barre outil fcke
*
* Revision 1.9 2005/07/18 08:53:14 ddelon
* Configuration Fcsk et menage
*
* Revision 1.8 2005/07/15 17:10:08 ddelon
* Configuration Fcsk et menage
*
* Revision 1.7 2005/06/03 18:39:30 jpm
* Ajout de la barre d'outil Papyrus FCKeditor.
*
* Revision 1.6 2005/04/25 13:56:19 jpm
* Ajout de chemin vers les styles.
*
* Revision 1.5 2005/04/21 16:46:21 jpm
* Gestion via Papyrus du XHTML.
*
* Revision 1.4 2005/02/23 18:16:49 jpm
* Changement de l'url de Papyrus pour qu'elle corresponde à l'url courante de Papyrus.
*
* Revision 1.3 2005/02/23 17:41:21 jpm
* Modification de l'initialisation d'une variable.
*
* Revision 1.2 2005/02/22 17:55:38 jpm
* Changement de variable pour la récupération de l'identifiant du menu courant.
*
* Revision 1.1 2004/11/26 13:10:20 jpm
* Utilisation des actions Papyrus et implémentation de la syntaxe Wikini.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/v5.0-ouadji/papyrus/applications/afficheur/afficheur.admin.php
New file
0,0 → 1,367
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This library is free software; you can redistribute it and/or |
// | modify it under the terms of the GNU Lesser General Public |
// | License as published by the Free Software Foundation; either |
// | version 2.1 of the License, or (at your option) any later version. |
// | |
// | This library 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 |
// | Lesser General Public License for more details. |
// | |
// | You should have received a copy of the GNU Lesser General Public |
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: afficheur.admin.php,v 1.24 2007-06-26 15:38:39 jp_milcent Exp $
/**
* Gestion de la rédaction du contenu pour Papyrus.
*
* Contient les fonctions nécessaires à la gestion du contenu de Papyrus.
*
*@package Afficheur
*@subpackage Administration
//Auteur original :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.24 $ $Date: 2007-06-26 15:38:39 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTÊTE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
// Nous indiquons à Papyrus de ne pas chercher de balises d'applettes dans le contenu généré par l'appli
$GLOBALS['_PAPYRUS_']['applette']['analyse'] = false;
 
// +------------------------------------------------------------------------------------------------------+
// | CLASSE |
// +------------------------------------------------------------------------------------------------------+
class Afficheur_Admin {
var $objet_pear_auth;
var $objet_pear_db;
var $objet_pear_url;
var $sortie_xhtml;
/** Fonction redigerContenu() - Affiche le formulaire de rédaction
*
*
* @return string Le HTML
*/
function afficherContenuCorps()
{
/** Inclusion du fichier de configuration de cette application.*/
require_once GEN_CHEMIN_PAP.'applications'.GEN_SEP.'afficheur'.GEN_SEP.'configuration'.GEN_SEP.'affi_configuration.inc.php';
//-------------------------------------------------------------------------------------------------------------------
// Stockage des styles de l'application
GEN_stockerStyleExterne('afficheur', AFFI_CHEMIN_STYLE.'afficheur.css');
//-------------------------------------------------------------------------------------------------------------------
// Initialisation des attributs
$this->objet_pear_auth = $GLOBALS['_GEN_commun']['pear_auth'];
$this->objet_pear_db = $GLOBALS['_GEN_commun']['pear_db'];
$this->objet_pear_url = $GLOBALS['_GEN_commun']['url'];
$this->sortie_xhtml = '';
//-------------------------------------------------------------------------------------------------------------------
// Gestion de l'interface
if (isset($_POST['afficheur_annuler'])) {
return false;
} else if (isset($_POST['afficheur_enregistrer_quitter'])) {
// Mise à jour du contenu
$this->_ajouterContenu($this->objet_pear_db, $this->objet_pear_url, $this->objet_pear_auth, $_GET['adme_menu_id'], $_POST);
return false;
} else if (isset($_POST['afficheur_enregistrer_rester'])) {
// Mise à jour du contenu
$this->_ajouterContenu($this->objet_pear_db, $this->objet_pear_url, $this->objet_pear_auth, $_GET['adme_menu_id'], $_POST);
$this->sortie_xhtml .= $this->_redigerContenu($this->objet_pear_db, $this->objet_pear_url, $_GET['adme_site_id'], $_GET['adme_menu_id'], $_GET['adme_action']);
} else if (isset($_POST['afficheur_historique'])) {
// Réediter une version archivée
$this->sortie_xhtml .= $this->_reediterContenu($this->objet_pear_db, $this->objet_pear_url, $_GET['adme_site_id'], $_GET['adme_menu_id'], $_GET['adme_action']);
} else {
if (isset($_GET['adme_version'])) {
// Nous avons demandés la réedition d'une version archivées
$this->sortie_xhtml .= $this->_redigerContenu($this->objet_pear_db, $this->objet_pear_url, $_GET['adme_site_id'], $_GET['adme_menu_id'], $_GET['adme_action'], $_GET['adme_version']);
} else {
// Nous affichons le dernier contenu
$this->sortie_xhtml .= $this->_redigerContenu($this->objet_pear_db, $this->objet_pear_url, $_GET['adme_site_id'], $_GET['adme_menu_id'], $_GET['adme_action']);
}
}
return $this->sortie_xhtml;
}
function _redigerContenu($db, $url, $adme_site_id, $adme_menu_id, $adme_action, $adme_contenu_id = '')
{
//-------------------------------------------------------------------------------------------------------------------
// Initialisation de variable
$contenu = '';
$donnees = array();
$url->addQueryString('adme_site_id', $adme_site_id);
$url->addQueryString('adme_menu_id', $adme_menu_id);
$url->addQueryString('adme_action', $adme_action);
if ($adme_contenu_id != '') {
// Nous réeditons une version archivée
$ligne_dernier_contenu = GEN_rechercheContenuIdentifiant($db, $adme_contenu_id, DB_FETCHMODE_ASSOC);
$donnees['reedition_info'] = $ligne_dernier_contenu['gmc_date_modification'];
} else {
// Nous affichons la dernière version du contenu
$ligne_dernier_contenu = GEN_rechercheContenu($db, $adme_menu_id, DB_FETCHMODE_ASSOC);
}
 
//-------------------------------------------------------------------------------------------------------------------
// Récupération des données
$donnees['form_url'] = $url->getUrl();
// Gestion de FckEditor
$donnees['fck_editor'] = '';
if ($GLOBALS['_AFFI_']['fckeditor']['utilisation']) {
/** Inclusion du fichier de FCKeditor*/
require_once AFFI_CHEMIN_FCKEDITOR.'fckeditor.php';
$fckeditor = new FCKeditor('gmc_contenu');
if ($ligne_dernier_contenu['gmc_contenu']) {
$fckeditor->Value = $ligne_dernier_contenu['gmc_contenu'];
} else {
if ($contenu) {
$fckeditor->Value = $contenu;
} else {
$fckeditor->Value = '';
}
}
$fckeditor->Height = $GLOBALS['_AFFI_']['fckeditor']['hauteur'];
$fckeditor->ToolbarSet = $GLOBALS['_AFFI_']['fckeditor']['barre'];
$fckeditor->Config['CustomConfigurationsPath']=$GLOBALS['_AFFI_']['fckeditor']['CustomConfigurationsPath'];
$fckeditor->Config['AutoDetectLanguage'] = false;
$fckeditor->Config['DefaultLanguage'] = $GLOBALS['_AFFI_']['fckeditor']['langue'];
$fckeditor->BasePath = AFFI_CHEMIN_FCKEDITOR;
if ($fckeditor->IsCompatible()) {
$donnees['fck_editor'] = $fckeditor->CreateHtml();
}
}
 
// Identifiant du menu
$donnees['gmc_ce_menu'] = $adme_menu_id;
// Type de contenu
// Par défaut c'est du XHTML (donc 1)
$donnees['gmc_ce_type_contenu'] = 1;
if (isset($ligne_dernier_contenu['gmc_ce_type_contenu'])) {
$donnees['gmc_ce_type_contenu'] = $ligne_dernier_contenu['gmc_ce_type_contenu'];
}
$squelette = AFFI_CHEMIN_SQUELETTE.'formulaire.tpl.html';
return $this->_genererContenu($squelette, $donnees);
}
function _reediterContenu($db, $url, $adme_site_id, $adme_menu_id, $adme_action)
{
//-------------------------------------------------------------------------------------------------------------------
// Initialisation de variable
$contenu = '';
$donnees = array();
$url->addQueryString('adme_site_id', $adme_site_id);
$url->addQueryString('adme_menu_id', $adme_menu_id);
$url->addQueryString('adme_action', $adme_action);
$donnees['archives'] = GEN_lireContenuMenuHistorique(&$db, $adme_menu_id);
foreach ($donnees['archives'] as $cle => $archive) {
$url->addQueryString('adme_version', $archive->gmc_id_contenu);
$donnees['archives'][$cle]->url = $url->getURL();
$url->removeQueryString('adme_version');
}
// print_r($donnees['archives']);
 
$squelette = AFFI_CHEMIN_SQUELETTE.'historique.tpl.html';
return $this->_genererContenu($squelette, $donnees);
}
/** Méthode ajouterContenu() - Enregistre les infos du formulaire de saisie d'un menu
*
*
* @return void les données sont enregistrées dans la base de données.
*/
function _ajouterContenu($db, $url, $auth, $adme_menu_id, $tab_valeur)
{
//-------------------------------------------------------------------------------------------------------------------
// Récupération des informations du contenu concerné.
$ligne_menu = GEN_lireInfoMenu($db, $adme_menu_id, DB_FETCHMODE_ASSOC);
if ($ligne_menu == false) {
die('ERREUR Papyrus Administrateur de Menus: impossible de lire les infos du menu.<br />'.
'Idenitifiant du menu n° : '. $adme_menu_id .'<br />'.
'Ligne n° : '. __LINE__ .'<br />'.
'Fichier n° : '. __FILE__ .'<br />');
}
if ((isset($tab_valeur['gmc_ce_menu']) && $tab_valeur['gmc_ce_menu']!='') && (isset($tab_valeur['gmc_ce_type_contenu_table']) && $tab_valeur['gmc_ce_type_contenu_table']!='')) {
//-------------------------------------------------------------------------------------------------------------------
// Mise à jour de l'ancien contenu du menu
$requete = 'UPDATE gen_menu_contenu SET '.
'gmc_bool_dernier = 0 '.
'WHERE gmc_ce_menu = '.$tab_valeur['gmc_ce_menu'] . ' '.
'AND gmc_ce_type_contenu = '. $tab_valeur['gmc_ce_type_contenu_table']. ' ';
$result = $db->query($requete);
(DB::isError($result)) ? die(BOG_afficherErreurSql(__FILE__, __LINE__, $result->getMessage(), $requete)) : '';
}
//-------------------------------------------------------------------------------------------------------------------
// Obtention d'un nouvel identifiant de contenu
$nouveau_id_contenu = SQL_obtenirNouveauId($db, 'gen_menu_contenu', 'gmc_id_contenu');
//-------------------------------------------------------------------------------------------------------------------
// Ajout du nouveau contenu pour ce menu
$requete = 'INSERT INTO gen_menu_contenu SET '.
'gmc_id_contenu = '.$nouveau_id_contenu.', '.
'gmc_ce_admin = '.$auth->getAuthData('ga_id_administrateur').', '.
'gmc_ce_menu = '.$adme_menu_id.', '.
'gmc_ce_type_contenu = '.$tab_valeur['gmc_ce_type_contenu'].', '.
'gmc_contenu = "'.$tab_valeur['gmc_contenu'].'", '.
'gmc_ce_type_modification = '.$tab_valeur['gmc_ce_type_modification'].', '.
'gmc_resume_modification = "'.$tab_valeur['gmc_resume_modification'].'", '.
'gmc_date_modification = "'.date('Y-m-d H:i:s').'", '.
'gmc_bool_dernier = 1';
$result = $db->query($requete);
(DB::isError($result)) ? die(BOG_afficherErreurSql(__FILE__, __LINE__, $result->getMessage(), $requete)) : '';
}
function _genererContenu($squelette, $donnees)
{
//+------------------------------------------------------------------------------------------------------------+
// Extrait les variables et les ajoutes à l'espace de noms local
// Gestion des squelettes
extract($donnees);
// Démarre le buffer
ob_start();
// Inclusion du fichier
include($squelette);
// Récupérer le contenu du buffer
$contenu = ob_get_contents();
// Arrête et détruit le buffer
ob_end_clean();
return $contenu;
}
}// Fin de la classe
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.23 2007-06-26 13:30:48 jp_milcent
* Suppression de l'utilisation de Quickform.
* Utilisation de squellette PHP.
*
* Revision 1.22 2007-01-03 11:28:34 ddelon
* correction bug multilinguisme (portage bug livraison)
*
* Revision 1.21 2006/12/01 16:59:45 florian
* Ajout d'une variable parametrant la recherche de balise d'applette dans le contenu généré par l'appli.
*
* Revision 1.20 2006/12/01 11:23:23 ddelon
* Suppression mode wiki afficheur
*
* Revision 1.19 2006/10/16 15:49:07 ddelon
* Refactorisation code mulitlinguisme et gestion menu invisibles
*
* Revision 1.18 2006/04/28 12:41:49 florian
* corrections erreurs chemin
*
* Revision 1.17 2006/03/27 13:42:32 ddelon
* the last but not the least
*
* Revision 1.16 2006/03/27 11:21:49 ddelon
* Still some pb
*
* Revision 1.15 2006/03/27 10:14:43 ddelon
* Still some pb
*
* Revision 1.11 2006/03/13 22:27:23 ddelon
* bug afficheur multilinguisme
*
* Revision 1.10 2006/03/13 22:12:20 ddelon
* bug afficheur multilinguisme
*
* Revision 1.9 2006/03/13 21:00:20 ddelon
* Suppression messages d'erreur multilinguisme
*
* Revision 1.8 2006/03/02 10:49:49 ddelon
* Fusion branche multilinguisme dans branche principale
*
* Revision 1.7.2.1 2006/02/28 14:02:11 ddelon
* Finition multilinguisme
*
* Revision 1.7 2005/07/18 08:53:14 ddelon
* Configuration Fcsk et menage
*
* Revision 1.6 2005/07/15 17:10:08 ddelon
* Configuration Fcsk et menage
*
* Revision 1.5 2005/06/03 18:39:30 jpm
* Ajout de la barre d'outil Papyrus FCKeditor.
*
* Revision 1.4 2005/05/31 13:43:57 jpm
* Ajout d'un bouton pour remplacer les entités html.
*
* Revision 1.3 2005/04/25 13:56:31 jpm
* Ajout de styles.
*
* Revision 1.2 2005/02/28 10:34:15 jpm
* Changement de nom Genesia en Papyrus.
*
* Revision 1.1 2004/11/09 17:53:49 jpm
* Interface d'administration de l'application afficheur.
*
* Revision 1.4 2004/11/08 17:40:33 jpm
* Mise en conformité avec la convention de codage.
* Légères corrections.
*
* Revision 1.3 2004/09/23 17:45:13 jpm
* Amélioration de la gestion des liens annuler et du selecteur de sites.
*
* Revision 1.2 2004/07/06 17:07:37 jpm
* Modification de la documentation pour une mailleur analyse par PhpDocumentor.
*
* Revision 1.1 2004/06/16 15:04:32 jpm
* Changement de nom de Génésia en Papyrus.
* Changement de l'arborescence.
*
* Revision 1.5 2004/05/07 16:32:27 jpm
* Modification des commentaires.
*
* Revision 1.4 2004/05/07 07:23:53 jpm
* Amélioration du code, des commentaires et correction de bogues.
*
* Revision 1.3 2004/05/04 16:27:55 jpm
* Amélioration gestion du déplacement des menus.
*
* Revision 1.2 2004/05/03 14:51:59 jpm
* Normalisation du nom d'une fonction et ajout de la gestion d'une erreur.
*
* Revision 1.1 2004/04/30 16:21:30 jpm
* Ajout de la rédaction de contenu.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/v5.0-ouadji/papyrus/applications/afficheur/squelettes/formulaire.tpl.html
New file
0,0 → 1,41
<h1>Rédaction</h1>
<?php if (isset($reedition_info)) :?>
<p class="zone_info">Vous venez de rééditer la version archivée du <?=$reedition_info;?>.</p>
<?php endif; ?>
<form action="<?=$form_url;?>" method="post" name="form_modifier_contenu" id="form_modifier_contenu">
<ul>
<li>
<?=$fck_editor;?>
</li>
<li>
<label for="gmc_ce_type_modification">Type de modification : </label>
<select id="gmc_ce_type_modification" tabindex="1000" name="gmc_ce_type_modification">
<option value="1">Mineure</option>
<option value="2">Majeure</option>
</select>
</li>
<li>
<label for="gmc_resume_modification">Resumé modification : </label>
<input id="gmc_resume_modification" tabindex="1001" size="45" maxlength="255" name="gmc_resume_modification" type="text" />
</li>
<li>
<ul class="liste_bouton">
<li>
<input id="afficheur_enregistrer_quitter" name="afficheur_enregistrer_quitter" value="Enregistrer et quitter" type="submit" />
</li>
<li>
<input id="afficheur_enregistrer_rester" name="afficheur_enregistrer_rester" value="Enregistrer et rester en édition" type="submit" />
</li>
<li>
<input id="afficheur_historique" name="afficheur_historique" value="Réediter une version archivée" type="submit" />
</li>
<li>
<input id="afficheur_annuler" name="afficheur_annuler" value="Annuler" type="submit" />
</li>
</ul>
<input name="gmc_ce_type_contenu" type="hidden" value="<?=$gmc_ce_type_contenu;?>" />
<input name="gmc_ce_menu" type="hidden" value="<?=$gmc_ce_menu;?>" />
<input name="gmc_ce_type_contenu_table" type="hidden" value="1" />
</li>
</ul>
</form>
/tags/v5.0-ouadji/papyrus/applications/afficheur/squelettes/historique.tpl.html
New file
0,0 → 1,7
<h1>Archives</h1>
<p>Cliquer sur un des liens pour éditer à nouveau la version de la page sauvegardée à la date indiquée.</p>
<ul>
<?php foreach ($archives as $archive) : ?>
<li><a href="<?=$archive->url;?>"><?=$archive->gmc_date_modification;?></a></li>
<?php endforeach; ?>
</ul>
/tags/v5.0-ouadji/papyrus/applications/afficheur/squelettes/afficheur.css
New file
0,0 → 1,53
/* vim: set expandtab tabstop=4 shiftwidth=4: */
/* ========================================================================================================
| Copyright (C) 1999-2004 Tela Botanica (accueil@tela-botanica.org) |
+---------------------------------------------------------------------------------------------------------+
| This file is part of Papyrus. |
| |
| Foobar 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; either version 2 of the License, or |
| (at your option) any later version. |
| |
| Foobar 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 Foobar; if not, write to |
| the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
+---------------------------------------------------------------------------------------------------------+
CVS : $Id: afficheur.css,v 1.1 2007-06-26 13:30:48 jp_milcent Exp $
===========================================================================================================
DESCRIPTION : Fichier de style de l'application d'administration de l'affichage.
===========================================================================================================
Auteur original : Jean-Pascal MILCENT <jpm@tela-botanica.org>
 
Autres auteurs :
 
===========================================================================================================
AUTEUR : $Author: jp_milcent $
VERSION : $Revision: 1.1 $ $Date: 2007-06-26 13:30:48 $
======================================================================================================= */
 
/* +----------------------------------------------------------------------------------------------------+
| STRUCTURE |
+----------------------------------------------------------------------------------------------------+*/
#gmc_contenu {
width: 100%;
min-height:400px;
}
 
/* +----------------------------------------------------------------------------------------------------+
| DESIGN |
+----------------------------------------------------------------------------------------------------+*/
 
/* +--Fin des CSS ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005-04-25 13:56:08 jpm
* Ajout du style pour l'afficheur.
*
*
* +-- Fin des CSS ----------------------------------------------------------------------------------------+
*/