2 /********************************************************************************
3 * install.d/format.inc.php : HTML output subroutines
4 * --------------------------
6 * This file is part of the banana distribution
7 * Copyright: See COPYING files that comes with this distribution
8 ********************************************************************************/
10 /** produces HTML ouput for header section in post.php
11 * @param $_header STRING name of the header
12 * @param $_text STRING value of the header
13 * @param $_spool OBJECT spool object for building references
14 * @return STRING HTML output
17 function formatDisplayHeader($_header,$_text,$_spool) {
20 return formatDate($_text);
25 $groups = preg_split("/(\t| )*,(\t| )*/",$_text);
26 foreach ($groups as $g) {
27 $res.='<a href="thread.php?group='.$g.'">'.$g.'</a>, ';
29 return substr($res,0, -2);
32 return formatFrom($_text);
37 $text=str_replace("><","> <",$_text);
38 $text=preg_split("/( |\t)/",strtr($text,$_spool->ids
));
39 $parents=preg_grep("/^\d+$/",$text);
40 $p=array_pop($parents);
42 $rsl .= "<a href=\"article.php?group={$_spool->group}"
43 ."&id=$p\">$ndx</a> ";
44 $_spool->overview
[$p]->desc++
;
45 $p = $_spool->overview
[$p]->parent
;
51 return '<img src="xface.php?face='.base64_encode($_text)
55 return htmlentities($_text);
60 * @return STRING HTML output
62 function displayshortcuts() {
63 global $news,$first,$spool,$group,$post,$id;
64 $sname = basename($_SERVER['SCRIPT_NAME']);
66 echo '<div class="shortcuts">';
67 echo '[<a href="disconnect.php">'._b_('Déconnexion').'</a>] ';
71 echo '[<a href="index.php">'._b_('Liste des forums').'</a>] ';
72 echo "[<a href=\"post.php?group=$group\">"._b_('Nouveau message')."</a>] ";
73 if (sizeof($spool->overview
)>$news['max']) {
74 for ($ndx=1; $ndx<=sizeof($spool->overview
); $ndx +
= $news['max']) {
76 echo "[$ndx-".min($ndx+
$news['max']-1,sizeof($spool->overview
))."] ";
78 echo "[<a href=\"".$_SERVER['PHP_SELF']."?group=$group&first="
79 ."$ndx\">$ndx-".min($ndx+
$news['max']-1,sizeof($spool->overview
))
86 echo '[<a href="index.php">'._b_('Liste des forums').'</a>] ';
87 echo "[<a href=\"thread.php?group=$group\">$group</a>] ";
88 echo "[<a href=\"post.php?group=$group&id=$id&type=followup\">"._b_('Répondre')."</a>] ";
89 if (checkcancel($post->headers
)) {
90 echo "[<a href=\"article.php?group=$group&id=$id&type=cancel\">"._b_('Annuler ce message')."</a>] ";
94 echo '[<a href="index.php">'._b_('Liste des forums').'</a>] ';
95 echo "[<a href=\"thread.php?group=$group\">$group</a>]";