3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
6 * Copyright (c) 2001-2011 *
7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
9 * Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
10 * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
11 \***************************************************************************/
13 if (!defined('_ECRIRE_INC_VERSION')) return;
15 include_spip('inc/headers');
16 include_spip('inc/texte'); //inclue inc/lang et inc/filtres
19 // Presentation des pages d'installation et d'erreurs
22 // http://doc.spip.org/@install_debut_html
23 function install_debut_html($titre = 'AUTO', $onLoad = '') {
24 global $spip_lang_right,$spip_lang_left;
26 utiliser_langue_visiteur();
31 $titre=_T('info_installation_systeme_publication');
33 # le charset est en utf-8, pour recuperer le nom comme il faut
34 # lors de l'installation
36 header('Content-Type: text/html; charset=utf-8');
38 // au cas ou minipres() est appele avant spip_initialisation_suite()
39 if (!defined('_DOCTYPE_ECRIRE')) define('_DOCTYPE_ECRIRE', '');
40 return _DOCTYPE_ECRIRE
.
41 html_lang_attributes().
46 <link rel='stylesheet' href='".direction_css(find_in_path('minipres.css')).
47 "' type='text/css' media='all' />\n" .
48 // cet appel permet d'assurer un copier-coller du nom du repertoire a creer dans tmp (esj)
49 http_script('', "spip_barre.js") .
51 <body".$onLoad." class='minipres'>
59 // http://doc.spip.org/@install_fin_html
60 function install_fin_html() {
61 return "\n\t</div>\n\t</div>\n</body>\n</html>";
64 // http://doc.spip.org/@minipres
65 function minipres($titre='', $corps="", $onload='')
67 if (!defined('_AJAX')) define('_AJAX', false);
71 if (!$titre = _request('action')
72 AND !$titre = _request('exec')
73 AND !$titre = _request('page'))
76 $titre = htmlspecialchars($titre);
78 $titre = ($titre == 'install')
79 ?
_T('avis_espace_interdit')
80 : $titre . ' : '. _T('info_acces_interdit');
81 $corps = generer_form_ecrire('accueil', '','',_T('public:accueil_site'));
82 spip_log($GLOBALS['visiteur_session']['nom'] . " $titre " . $_SERVER['REQUEST_URI']);
86 return install_debut_html($titre, $onload)
90 include_spip('inc/headers');
91 include_spip('inc/actions');
92 $url = self('&',true);
93 foreach ($_POST as $v => $c)
94 $url = parametre_url($url, $v, $c, '&');
95 echo ajax_retour("<div>".$titre . redirige_formulaire($url)."</div>",false);