/branches/livraison_aha/papyrus/applications/afficheur/configuration/affi_fckconfig.js |
---|
New file |
0,0 → 1,169 |
/* |
* 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 = '\t' ; |
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 ; |
// 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 ; |
// 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 ; |
// 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 ; |
// 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 ; |
// 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 ; |
// 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_aha/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 ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/branches/livraison_aha/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 ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/branches/livraison_aha/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> |
/branches/livraison_aha/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> |
/branches/livraison_aha/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 ----------------------------------------------------------------------------------------+ |
*/ |
/branches/livraison_aha/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 ----------------------------------------------------------------------------------------+ |
*/ |
?> |