X-Git-Url: http://git.cyclocoop.org/?p=velocampus%2Fweb%2Fwww.git;a=blobdiff_plain;f=www%2Fecrire%2Finc%2Fminipres.php;fp=www%2Fecrire%2Finc%2Fminipres.php;h=6c15ba230f79d5bf890aecf39f0c7166695c4b9c;hp=0000000000000000000000000000000000000000;hb=80b4d3e85f78d402ed2e73f8f5d1bf4c19962eed;hpb=aaf970bf4cdaf76689ecc10609048e18d073820c diff --git a/www/ecrire/inc/minipres.php b/www/ecrire/inc/minipres.php new file mode 100644 index 0000000..6c15ba2 --- /dev/null +++ b/www/ecrire/inc/minipres.php @@ -0,0 +1,98 @@ +\n". + "". + textebrut($titre). + " + \n" . + // cet appel permet d'assurer un copier-coller du nom du repertoire a creer dans tmp (esj) + http_script('', "spip_barre.js") . +" + +
+

". + $titre . + "

+
\n"; +} + +// http://doc.spip.org/@install_fin_html +function install_fin_html() { + return "\n\t
\n\t
\n\n"; +} + +// http://doc.spip.org/@minipres +function minipres($titre='', $corps="", $onload='') +{ + if (!defined('_AJAX')) define('_AJAX', false); + if (!$titre) { + if (!_AJAX) + http_status(403); + if (!$titre = _request('action') + AND !$titre = _request('exec') + AND !$titre = _request('page')) + $titre = '?'; + + $titre = htmlspecialchars($titre); + + $titre = ($titre == 'install') + ? _T('avis_espace_interdit') + : $titre . ' : '. _T('info_acces_interdit'); + $corps = generer_form_ecrire('accueil', '','',_T('public:accueil_site')); + spip_log($GLOBALS['visiteur_session']['nom'] . " $titre " . $_SERVER['REQUEST_URI']); + } + + if (!_AJAX) + return install_debut_html($titre, $onload) + . $corps + . install_fin_html(); + else { + include_spip('inc/headers'); + include_spip('inc/actions'); + $url = self('&',true); + foreach ($_POST as $v => $c) + $url = parametre_url($url, $v, $c, '&'); + echo ajax_retour("
".$titre . redirige_formulaire($url)."
",false); + } +} +?>