Subversion Repositories Applications.papyrus

Compare Revisions

Ignore whitespace Rev 1086 → Rev 1087

/branches/livraison_menes/papyrus/applications/afficheur/configuration/affi_fckconfig.js
New file
0,0 → 1,185
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2005 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* File Name: fckconfig.js
* Editor configuration settings.
* See the documentation for more info.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
 
FCKConfig.CustomConfigurationsPath = '' ;
 
FCKConfig.EditorAreaCSS = FCKConfig.BasePath + 'css/fck_editorarea.css' ;
 
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 ;
 
FCKConfig.Debug = false ;
 
FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/default/' ;
 
FCKConfig.PluginsPath = FCKConfig.BasePath + 'plugins/' ;
 
// FCKConfig.Plugins.Add( 'placeholder', 'en,it' ) ;
 
FCKConfig.AutoDetectLanguage = true ;
FCKConfig.DefaultLanguage = 'fr' ;
FCKConfig.ContentLangDirection = 'ltr' ;
 
FCKConfig.EnableXHTML = true ; // Unsupported: Do not change.
FCKConfig.EnableSourceXHTML = true ; // Unsupported: Do not change.
 
FCKConfig.ProcessHTMLEntities = false ;
FCKConfig.IncludeLatinEntities = false ;
FCKConfig.IncludeGreekEntities = false ;
 
FCKConfig.FillEmptyBlocks = true ;
 
FCKConfig.FormatSource = true ;
FCKConfig.FormatOutput = true ;
FCKConfig.FormatIndentator = ' ' ;
 
FCKConfig.GeckoUseSPAN = true ;
FCKConfig.StartupFocus = false ;
FCKConfig.ForcePasteAsPlainText = false ;
FCKConfig.ForceSimpleAmpersand = false ;
FCKConfig.TabSpaces = 0 ;
FCKConfig.ShowBorders = true ;
FCKConfig.UseBROnCarriageReturn = false ;
FCKConfig.ToolbarStartExpanded = true ;
FCKConfig.ToolbarCanCollapse = true ;
FCKConfig.IEForceVScroll = false ;
FCKConfig.IgnoreEmptyParagraphValue = true ;
 
FCKConfig.ToolbarSets["Default"] = [
['Source','DocProps','-','Save','NewPage','Preview','-','Templates'],
['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'],
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
['OrderedList','UnorderedList','-','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
['Link','Unlink','Anchor'],
['Image','Flash','Table','Rule','Smiley','SpecialChar','UniversalKey'],
['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],
'/',
['Style','FontFormat','FontName','FontSize'],
['TextColor','BGColor'],
['About']
] ;
 
FCKConfig.ToolbarSets["Basic"] = [
['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink','-','About']
] ;
FCKConfig.ToolbarSets["Papyrus"] = [
['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','Table','Link','Unlink','Rule','SpecialChar','UniversalKey'],
['FontFormat','FontName','FontSize','TextColor'],
['About']
] ;
 
FCKConfig.ContextMenu = ['Generic','Link','Anchor','Image','Flash','Select','Textarea','Checkbox','Radio','TextField','HiddenField','ImageButton','Button','BulletedList','NumberedList','TableCell','Table','Form'] ;
 
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.FontNames = 'Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana' ;
FCKConfig.FontSizes = '1/xx-small;2/x-small;3/small;4/medium;5/large;6/x-large;7/xx-large' ;
FCKConfig.FontFormats = 'p;div;pre;address;h1;h2;h3;h4;h5;h6' ;
 
FCKConfig.StylesXmlPath = FCKConfig.EditorPath + 'fckstyles.xml' ;
FCKConfig.TemplatesXmlPath = FCKConfig.EditorPath + 'fcktemplates.xml' ;
 
FCKConfig.SpellChecker = 'ieSpell' ; // 'ieSpell' | 'SpellerPages'
FCKConfig.IeSpellDownloadUrl = 'http://www.iespell.com/rel/ieSpellSetup211325.exe' ;
 
FCKConfig.MaxUndoLevels = 15 ;
 
FCKConfig.DisableImageHandles = false ;
FCKConfig.DisableTableHandles = false ;
 
FCKConfig.LinkDlgHideTarget = false ;
FCKConfig.LinkDlgHideAdvanced = false ;
 
FCKConfig.ImageDlgHideLink = false ;
FCKConfig.ImageDlgHideAdvanced = false ;
 
FCKConfig.FlashDlgHideAdvanced = false ;
 
FCKConfig.LinkBrowser = true ;
//FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/asp/connector.asp' ;
//FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/asp/connector.asp&ServerPath=/CustomFiles/' ;
// ASP.Net // FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/aspx/connector.aspx' ;
// ColdFusion // FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/cfm/connector.cfm' ;
// Perl // FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/perl/connector.cgi' ;
// PHP //
FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/php/connector.php' ;
// PHP - mcpuk
//FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/mcpuk/browser.html?Connector=connectors/php/connector.php' ;
FCKConfig.LinkBrowserWindowWidth = screen.width * 0.7 ; // 70%
FCKConfig.LinkBrowserWindowHeight = screen.height * 0.7 ; // 70%
 
FCKConfig.ImageBrowser = true ;
//FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/asp/connector.asp' ;
// ASP.Net // FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/aspx/connector.aspx' ;
// ColdFusion // FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/cfm/connector.cfm' ;
// Perl // FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/perl/connector.cgi' ;
// PHP //
FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/php/connector.php' ;
// PHP - mcpuk
//FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/mcpuk/browser.html?Type=Image&Connector=connectors/php/connector.php' ;
FCKConfig.ImageBrowserWindowWidth = screen.width * 0.7 ; // 70% ;
FCKConfig.ImageBrowserWindowHeight = screen.height * 0.7 ; // 70% ;
 
FCKConfig.FlashBrowser = true ;
//FCKConfig.FlashBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/asp/connector.asp' ;
// ASP.Net // FCKConfig.FlashBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/aspx/connector.aspx' ;
// ColdFusion // FCKConfig.FlashBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/cfm/connector.cfm' ;
// Perl // FCKConfig.FlashBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/perl/connector.cgi' ;
// PHP //
FCKConfig.FlashBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/php/connector.php' ;
// PHP - mcpuk
// FCKConfig.FlashBrowserURL = FCKConfig.BasePath + 'filemanager/browser/mcpuk/browser.html?Type=Flash&Connector=connectors/php/connector.php' ;
FCKConfig.FlashBrowserWindowWidth = screen.width * 0.7 ; //70% ;
FCKConfig.FlashBrowserWindowHeight = screen.height * 0.7 ; //70% ;
 
FCKConfig.LinkUpload = true ;
//FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/upload/asp/upload.asp' ;
// PHP //
FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/upload/php/upload.php' ;
FCKConfig.LinkUploadAllowedExtensions = "" ; // empty for all
FCKConfig.LinkUploadDeniedExtensions = ".(php|php3|php5|phtml|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|dll|reg|cgi)$" ; // empty for no one
 
FCKConfig.ImageUpload = true ;
//FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'filemanager/upload/asp/upload.asp?Type=Image' ;
// PHP //
FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'filemanager/upload/php/upload.php?Type=Image' ;
FCKConfig.ImageUploadAllowedExtensions = ".(jpg|gif|jpeg|png)$" ; // empty for all
FCKConfig.ImageUploadDeniedExtensions = "" ; // empty for no one
 
FCKConfig.FlashUpload = true ;
//FCKConfig.FlashUploadURL = FCKConfig.BasePath + 'filemanager/upload/asp/upload.asp?Type=Flash' ;
// PHP //
FCKConfig.FlashUploadURL = FCKConfig.BasePath + 'filemanager/upload/php/upload.php?Type=Flash' ;
FCKConfig.FlashUploadAllowedExtensions = ".(swf|fla)$" ; // 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 = 240 ;
 
if( window.console ) window.console.log( 'Config is loaded!' ) ; // @Packager.Compactor.RemoveLine
/branches/livraison_menes/papyrus/applications/afficheur/configuration/affi_configuration.inc.php
New file
0,0 → 1,148
<?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.13 2006-04-28 12:41:49 florian 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.13 $ $Date: 2006-04-28 12:41:49 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | 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 styles de l'application.*/
define('AFFI_CHEMIN_STYLE', AFFI_CHEMIN_APPLICATION.'presentations'.GEN_SEP.'styles'.GEN_SEP);
/** 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']);
$GLOBALS['_AFFI_']['fckeditor']['CustomConfigurationsPath'] =$dirname_base_url.GEN_SEP.AFFI_CHEMIN_APPLICATION."configuration".GEN_SEP."affi_fckconfig.js";
// 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("//", "/", $GLOBALS['_AFFI_']['fckeditor']['CustomConfigurationsPath']);
 
// 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.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 ----------------------------------------------------------------------------------------+
*/
?>
/branches/livraison_menes/papyrus/applications/afficheur/afficheur.admin.php
New file
0,0 → 1,342
<?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.20 2006-12-01 11:23:23 ddelon 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.20 $ $Date: 2006-12-01 11:23:23 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTÊTE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | 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/afficheur/configuration/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']);
return $this->sortie_xhtml;
}
function _redigerContenu($db, $url, $adme_site_id, $adme_menu_id, $adme_action) {
$contenu='';
//-------------------------------------------------------------------------------------------------------------------
// Initialisation de variable
$url->addQueryString('adme_site_id', $adme_site_id);
$url->addQueryString('adme_menu_id', $adme_menu_id);
$url->addQueryString('adme_action', $adme_action);
$ligne_dernier_contenu=GEN_rechercheContenu($db,$adme_menu_id,DB_FETCHMODE_ASSOC);
// Hack :
$retour = '<h1>'.'Rédaction'.'</h1>'."\n";
//-------------------------------------------------------------------------------------------------------------------
// Création du formulaire
$form =& new HTML_QuickForm('form_modifier_contenu', 'post', str_replace('&amp;', '&', $url->getUrl()));
$tab_index = 1000;
$squelette =& $form->defaultRenderer();
$squelette->setFormTemplate("\n".'<form{attributes}>'."\n".'<ul>'."\n".'{content}'."\n".'</ul>'."\n".'</form>'."\n");
$squelette->setElementTemplate( '<li>'."\n".
'{label}'."\n".
'{element}'."\n".
'<!-- BEGIN required --><span class="symbole_obligatoire">*</span><!-- END required -->'."\n".
'<!-- BEGIN error --><span class="erreur">{error}</span><!-- END error -->'."\n".
'</li>'."\n");
//$squelette->setHeaderTemplate('<p>{header}</p>');
//$form->addElement('header', 'Entete', 'REDACTION');.liste_bouton li{display:inline;}
$aso_options = array();
$form->addElement('hidden','gmc_ce_type_contenu',1);
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()) {
$form->addElement('html', '<li>'.$fckeditor->CreateHtml().'</li>');
} else {
$GLOBALS['_AFFI_']['fckeditor']['utilisation'] = false;
}
}
if (!$GLOBALS['_AFFI_']['fckeditor']['utilisation']) {
$id = 'gmc_contenu';
$aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'rows' => 20, 'cols' => 100);
$label = '<label for="'.$id.'">'.'Contenu : '.'</label>';
$form->addElement('textarea', $id, $label, $aso_attributs);
}
$aso_options = array();
$aso_options[1] = 'Mineure';
$aso_options[2] = 'Majeure';
$id = 'gmc_ce_type_modification';
$aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++);
$label = '<label for="'.$id.'">'.'Type de modification : '.'</label>';
$form->addElement('select', $id, $label, $aso_options, $aso_attributs);
$id = 'gmc_resume_modification';
$aso_attributs = array('id'=> $id, 'tabindex' => $tab_index++, 'size' => 45, 'maxlength' => 255);
$label = '<label for="'.$id.'">'.'Resumé modification : '.'</label>';
$form->addElement('text', $id, $label, $aso_attributs);
$form->addElement('hidden','gmc_ce_menu',$ligne_dernier_contenu['gmc_ce_menu']);
$form->addElement('hidden','gmc_ce_type_contenu_table',$ligne_dernier_contenu['gmc_ce_type_contenu']);
// .liste_bouton li{display:inline;}
$liste_bouton_debut = '<ul class="liste_bouton">'."\n";
$form->addElement('html', $liste_bouton_debut);
$form->addElement('submit', 'afficheur_enregistrer_quitter', 'Enregistrer et quitter');
$form->addElement('submit', 'afficheur_enregistrer_rester', 'Enregistrer et rester en édition');
$form->addElement('submit', 'afficheur_annuler', 'Annuler');
$liste_bouton_fin = '</ul>'."\n";
$form->addElement('html', $liste_bouton_fin);
$form->setDefaults($ligne_dernier_contenu);
$retour .= $form->toHTML()."\n";
return $retour;
}
/** 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)) : '';
}
}// Fin de la classe
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* 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 ----------------------------------------------------------------------------------------+
*/
?>
/branches/livraison_menes/papyrus/applications/afficheur/presentations/styles/afficheur.css
New file
0,0 → 1,50
/* 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 2005-04-25 13:56:08 jpm 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: jpm $
VERSION : $Revision: 1.1 $ $Date: 2005-04-25 13:56:08 $
======================================================================================================= */
 
/* +----------------------------------------------------------------------------------------------------+
| STRUCTURE |
+----------------------------------------------------------------------------------------------------+*/
#gmc_contenu {
width: 100%;
min-height:400px;
}
 
/* +----------------------------------------------------------------------------------------------------+
| DESIGN |
+----------------------------------------------------------------------------------------------------+*/
 
/* +--Fin des CSS ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
*
* +-- Fin des CSS ----------------------------------------------------------------------------------------+
*/
/branches/livraison_menes/papyrus/applications/afficheur/afficheur.php
New file
0,0 → 1,386
<?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.13 2006-11-21 18:52:20 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.13 $ $Date: 2006-11-21 18:52:20 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | 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.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 ----------------------------------------------------------------------------------------+
*/
?>