| 4 |
david |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
include ("inc_version.php3");
|
|
|
4 |
|
|
|
5 |
// Recuperer les infos de langue (preferences auteur), si possible
|
|
|
6 |
if (@file_exists("inc_connect.php3")) {
|
|
|
7 |
include_ecrire ("inc_auth.php3");
|
|
|
8 |
}
|
|
|
9 |
|
|
|
10 |
include_ecrire ("inc_lang.php3");
|
|
|
11 |
utiliser_langue_visiteur();
|
|
|
12 |
if ($var_lang) changer_langue($var_lang);
|
|
|
13 |
|
|
|
14 |
// Selection du fichier d'aide correspondant a la langue
|
|
|
15 |
function fichier_aide($lang_aide) {
|
|
|
16 |
if (@file_exists($fichier_aide = "AIDE/$lang_aide/aide"))
|
|
|
17 |
return array($fichier_aide, $lang_aide);
|
|
|
18 |
else // reduction ISO du code langue oci_prv_ni => oci_prv => oci
|
|
|
19 |
if (ereg("(.*)_", $lang_aide, $regs))
|
|
|
20 |
return fichier_aide($regs[1]);
|
|
|
21 |
|
|
|
22 |
return false;
|
|
|
23 |
}
|
|
|
24 |
|
|
|
25 |
if (!$aide) $aide = 'spip';
|
|
|
26 |
$lang_aide = $spip_lang;
|
|
|
27 |
|
|
|
28 |
// Recuperation du contenu de l'aide demandee
|
|
|
29 |
list($fichier_aide, $l) = fichier_aide($lang_aide);
|
|
|
30 |
if (!$fichier_aide)
|
|
|
31 |
$html = _T('aide_non_disponible');
|
|
|
32 |
else {
|
|
|
33 |
if ($var_lang) {
|
|
|
34 |
$lastmodified = filemtime($fichier_aide);
|
|
|
35 |
$headers_only = http_last_modified($lastmodified);
|
|
|
36 |
if ($headers_only) exit;
|
|
|
37 |
}
|
|
|
38 |
|
|
|
39 |
$html = join('', file($fichier_aide));
|
|
|
40 |
$html = substr($html, strpos($html,"<$aide>") + strlen("<$aide>"));
|
|
|
41 |
$html = substr($html, 0, strpos($html, "</$aide>"));
|
|
|
42 |
|
|
|
43 |
// Localisation des images de l'aide (si disponibles)
|
|
|
44 |
$suite = $html;
|
|
|
45 |
$html = "";
|
|
|
46 |
while (ereg("AIDE/([-_a-zA-Z0-9]+\.(gif|jpg))", $suite, $r)) {
|
|
|
47 |
$f = $r[1];
|
|
|
48 |
if (@file_exists("AIDE/$l/$f")) $f = "$l/$f";
|
|
|
49 |
else if (@file_exists("AIDE/fr/$f")) $f = "fr/$f";
|
|
|
50 |
$p = strpos($suite, $r[0]);
|
|
|
51 |
$html .= substr($suite, 0, $p) . "AIDE/$f";
|
|
|
52 |
$suite = substr($suite, $p + strlen($r[0]));
|
|
|
53 |
}
|
|
|
54 |
$html .= $suite;
|
|
|
55 |
}
|
|
|
56 |
|
|
|
57 |
?>
|
|
|
58 |
<html>
|
|
|
59 |
<head>
|
|
|
60 |
<style type="text/css"><!--
|
|
|
61 |
.spip_cadre {
|
|
|
62 |
width : 100%;
|
|
|
63 |
background-color: #FFFFFF;
|
|
|
64 |
padding: 5px;
|
|
|
65 |
}
|
|
|
66 |
.spip_quote {
|
|
|
67 |
margin-left : 40px;
|
|
|
68 |
margin-top : 10px;
|
|
|
69 |
margin-bottom : 10px;
|
|
|
70 |
border : solid 1px #aaaaaa;
|
|
|
71 |
background-color: #dddddd;
|
|
|
72 |
padding: 5px;
|
|
|
73 |
}
|
|
|
74 |
|
|
|
75 |
a {text-decoration: none;}
|
|
|
76 |
a:hover {color:#FF9900; text-decoration: underline;}
|
|
|
77 |
|
|
|
78 |
body {
|
|
|
79 |
font-family: Georgia, Garamond, Times New Roman, serif;
|
|
|
80 |
}
|
|
|
81 |
h3.spip {
|
|
|
82 |
font-family: Verdana,Arial,Sans,sans-serif;
|
|
|
83 |
font-weight: bold;
|
|
|
84 |
font-size: 115%;
|
|
|
85 |
text-align: center;
|
|
|
86 |
}
|
|
|
87 |
|
|
|
88 |
table.spip {
|
|
|
89 |
}
|
|
|
90 |
|
|
|
91 |
table.spip tr.row_first {
|
|
|
92 |
background-color: #FCF4D0;
|
|
|
93 |
}
|
|
|
94 |
|
|
|
95 |
table.spip tr.row_odd {
|
|
|
96 |
background-color: #C0C0C0;
|
|
|
97 |
}
|
|
|
98 |
|
|
|
99 |
table.spip tr.row_even {
|
|
|
100 |
background-color: #F0F0F0;
|
|
|
101 |
}
|
|
|
102 |
|
|
|
103 |
table.spip td {
|
|
|
104 |
padding: 1px;
|
|
|
105 |
text-align: left;
|
|
|
106 |
vertical-align: center;
|
|
|
107 |
}
|
|
|
108 |
|
|
|
109 |
--></style>
|
|
|
110 |
</head>
|
|
|
111 |
<?php
|
|
|
112 |
|
|
|
113 |
include_ecrire ("inc_texte.php3");
|
|
|
114 |
include_ecrire ("inc_filtres.php3");
|
|
|
115 |
|
|
|
116 |
echo '<body bgcolor="#FFFFFF" text="#000000" TOPMARGIN="24" LEFTMARGIN="24" MARGINWIDTH="24" MARGINHEIGHT="24"';
|
|
|
117 |
if ($spip_lang_rtl)
|
|
|
118 |
echo " dir='rtl'";
|
|
|
119 |
echo ">";
|
|
|
120 |
|
|
|
121 |
if ($aide == 'spip') {
|
|
|
122 |
echo '<TABLE BORDER=0 WIDTH=100% HEIGHT=60%>
|
|
|
123 |
<TR WIDTH=100% HEIGHT=60%>
|
|
|
124 |
<TD WIDTH=100% HEIGHT=60% ALIGN="center" VALIGN="middle">
|
|
|
125 |
|
|
|
126 |
<CENTER>
|
|
|
127 |
<img src="img_pack/logo-spip.gif" alt="SPIP" width="300" height="170" border="0">
|
|
|
128 |
</CENTER>
|
|
|
129 |
|
|
|
130 |
</TD></TR></TABLE>';
|
|
|
131 |
}
|
|
|
132 |
|
|
|
133 |
// hack pour que la langue de typo() soit celle de l'aide en ligne
|
|
|
134 |
$spip_lang = $lang_aide;
|
|
|
135 |
|
|
|
136 |
$html = justifier(propre($html)."<p>");
|
|
|
137 |
// Remplacer les liens externes par des liens ouvrants (a cause des frames)
|
|
|
138 |
$html = ereg_replace('<a href="(http://[^"]+)"([^>]*)>', '<a href="\\1"\\2 target="_blank">', $html);
|
|
|
139 |
|
|
|
140 |
echo $html;
|
|
|
141 |
echo "<font size=2>$les_notes</font><p>";
|
|
|
142 |
|
|
|
143 |
?>
|
|
|
144 |
|
|
|
145 |
|
|
|
146 |
</body>
|
|
|
147 |
</html>
|