Load("index"); $hArr = unpk(file_get_contents("system/cache/horoscopes.dat")); $i=0; foreach ($hArr as $key => $array) { $hRep[$i]["id"] = $key; $hRep[$i]["horoscope"] = $array["body"]["english"]; $i++; } $tpl -> Loop("horoscopes", $hRep); $tpl -> Flush();ng_rtl']) { echo ''; echo $frame_body.$frame_menu; } else { echo ''; echo $frame_menu.$frame_body; } echo ''; echo "\n"; } ///////////////////////////// // Le contenu demande // // Erreur aide non disponible function erreur_aide_indisponible() { include_ecrire('inc_presentation.php3'); install_debut_html(_T('forum_titre_erreur')); echo "
"._T('aide_non_disponible')."
"; echo "
".menu_langues('var_lang_ecrire')."
"; install_fin_html(); exit; } // Selection de l'aide correspondant a la langue demandee function fichier_aide($lang_aide = '') { global $help_server; if (!$lang_aide) $lang_aide = $GLOBALS['spip_lang']; // fichier local ? if (@file_exists($fichier_aide = "../AIDE/aide-$lang_aide-aide.html")) { return array(spip_file_get_contents($fichier_aide), $lang_aide); } // fichier local ? si reduction ISO du code langue oc_prv_ni => oc else if (ereg("(.*)_", $lang_aide, $regs) AND (@file_exists($fichier_aide = "../AIDE/aide-".$regs[1]."-aide.html"))) return array(spip_file_get_contents($fichier_aide), $regs[1]); // Aide internet else { // en cache ? if (!@file_exists($fichier_aide = _DIR_CACHE . "aide-$lang_aide-aide.html")) { if ($help_server) { include_ecrire('inc_sites.php3'); if (ecrire_fichier(_DIR_CACHE . 'aide-test', "test") AND ($contenu = recuperer_page("$help_server/$lang_aide-aide.html"))) ecrire_fichier ($fichier_aide, $contenu); } } if (@file_exists($fichier_aide)) lire_fichier($fichier_aide, $contenu); if (strlen($contenu) > 500) { return array($contenu, $lang_aide); } // Pas d'aide meme sur internet : n'existe pas dans la langue // Hack: comportement special sur le serveur d'aide SPIP.NET // (definir la constante SPIP.NET_...) if (defined('SPIP.NET_PAS_DE_BOUCLE_AIDE')) { $GLOBALS['clean_link'] = new Link("../aide/?aide=$aide"); } } return false; } function help_body($aide, $html) { global $help_server; // Recuperation du contenu de l'aide demandee if ($aide) { $html = analyse_aide($html, $aide); if (!$html) { erreur_aide_indisponible(); } } else { // panneau d'accueil $html = '
SPIP

Système de publication pour l\'Internet
'. preg_replace(",'; } // Recherche des images de l'aide $suite = $html; $html = ""; while (preg_match("@(]* +)? src=['\"])" . "((AIDE|IMG)/([-_a-zA-Z0-9]*/?)([^'\"<>]*))@i", $suite, $r)) { $image = $r[3]; $image_plat = str_replace('/', '-', $image); $f = "aide_index.php3?img=$image_plat"; $p = strpos($suite, $r[0]); $html .= substr($suite, 0, $p) . $r[1].$f; $suite = substr($suite, $p + strlen($r[0])); } $html .= $suite; ?> "; if ($aide == 'spip') { echo '
SPIP
'; } // Il faut que la langue de typo() soit celle de l'aide en ligne changer_typo($lang_aide); $html = justifier($html."

"); // Remplacer les liens externes par des liens ouvrants (a cause des frames) $html = ereg_replace(']*)>', '', $html); echo $html; } ///////////////////////////////////// // Recuperer une image dans le cache // function help_img($regs) { global $help_server; list ($cache, $rep, $lang, $file, $ext) = $regs; header("Content-Type: image/$ext"); if (@file_exists($img = _DIR_CACHE . 'aide-'.$cache)) { readfile($img); } else if (@file_exists($img = '../AIDE/aide-'.$cache)) { readfile($img); } else if ($help_server) { include_ecrire('inc_sites.php3'); if (ecrire_fichier(_DIR_CACHE . 'aide-test', "test") AND ($contenu = recuperer_page("$help_server/$rep/$lang/$file"))) { echo $contenu; ecrire_fichier (_DIR_CACHE . 'aide-'.$cache, $contenu); } else redirige_par_entete("$help_server/$rep/$lang/$file"); } exit; } /////////////////////////////////////// // Le menu de gauche // function help_menu($aide, $html) { global $spip_lang_left, $spip_lang_rtl, $spip_lang_right; $triangle = "url(" . _DIR_IMG_PACK . 'triangle'.$spip_lang_rtl.'.gif) '; echo '