function afficher_form_captcha() { afficher_top($GLOBALS['lang']['preferences']); echo '<div id="top">'; afficher_msg($GLOBALS['lang']['preferences']); afficher_menu(pathinfo($_SERVER['PHP_SELF'], PATHINFO_BASENAME)); echo '</div>'; echo '<div id="axe">' . "\n"; echo '<div id="page">' . "\n"; if (!empty($_SESSION['freecap_word_hash']) and !empty($_POST['word'])) { if (sha1(strtolower($_POST['word'])) == $_SESSION['freecap_word_hash']) { $_SESSION['freecap_word_hash'] = false; $word_ok = "yes"; } else { $word_ok = "no"; } } else { $word_ok = FALSE; } echo '<form action="' . $_SERVER['PHP_SELF'] . '?test_captcha" method="post" class="bordered-formbloc" >' . "\n"; echo '<fieldset class="pref">'; echo legend('Captcha', 'legend-config'); echo '<p>'; if ($word_ok !== FALSE) { if ($word_ok == "yes") { echo '<b style="color: green;">you got the word correct, rock on.</b>'; } else { echo '<b style="color: red;">sorry, that\'s not the right word, try again.</b>'; } } echo '</p>'; echo '<p><img src="../inc/freecap/freecap.php" id="freecap" alt="freecap"/></p>' . "\n"; echo '<p>If you can\'t read the word, <a href="#" onclick="new_freecap();return false;">click here to change image</a></p>' . "\n"; echo '<p>word above : <input type="text" class="text" name="word" /></p>' . "\n"; echo '<input class="submit blue-square" type="submit" name="valider" value="' . $GLOBALS['lang']['envoyer'] . '" />' . "\n"; echo '</fieldset>'; echo '</form>' . "\n"; }
//} //file_put_contents($GLOBALS['fichier_liste_fluxrss'], '<?php /* '.chunk_split(base64_encode(serialize($GLOBALS['liste_flux']))).' */'); //debug($GLOBALS['liste_flux']); // TRAITEMENT $erreurs = array(); if (isset($_POST['verif_envoi'])) { $erreurs = valider_form_rss(); if (empty($erreurs)) { traiter_form_rssconf(); } } afficher_top($GLOBALS['lang']['mesabonnements']); echo '<div id="top">' . "\n"; afficher_msg($GLOBALS['lang']['mesabonnements']); //echo moteur_recherche($GLOBALS['lang']['search_in_links']); afficher_menu(pathinfo($_SERVER['PHP_SELF'], PATHINFO_BASENAME)); echo '</div>' . "\n"; echo '<div id="axe">' . "\n"; echo '<div id="page">' . "\n"; if (isset($_GET['config'])) { echo afficher_form_rssconf($erreurs); echo "\n" . '<script type="text/javascript">' . "\n"; echo js_rsscnf_marktoremove(0); echo "\n" . '</script>' . "\n"; } else { // get list of posts from DB $all_flux = liste_elements('SELECT * FROM rss WHERE bt_statut=1 ORDER BY bt_date DESC', array(), 'rss'); // send to browser $out_html = send_rss_json($all_flux); $out_html .= '<div id="rss-list">' . "\n"; $out_html .= "\t\t" . '<div id="posts-menu">' . "\n";
# BlogoText is free software. # You can redistribute it under the terms of the MIT / X11 Licence. # # *** LICENSE *** $GLOBALS['BT_ROOT_PATH'] = '../'; require_once '../inc/inc.php'; error_reporting($GLOBALS['show_errors']); operate_session(); $begin = microtime(TRUE); $GLOBALS['db_handle'] = open_base($GLOBALS['db_location']); $GLOBALS['liste_fichiers'] = open_serialzd_file($GLOBALS['fichier_liste_fichiers']); $GLOBALS['liste_flux'] = open_serialzd_file($GLOBALS['fichier_liste_fluxrss']); afficher_top($GLOBALS['lang']['titre_maintenance']); echo '<div id="top">' . "\n"; afficher_msg($GLOBALS['lang']['titre_maintenance']); afficher_menu('preferences.php'); echo '</div>' . "\n"; echo '<div id="axe">' . "\n"; echo '<div id="page">' . "\n"; // création du dossier des backups creer_dossier($GLOBALS['BT_ROOT_PATH'] . $GLOBALS['dossier_backup'], 0); /* * reconstruit la BDD des fichiers (qui n’est pas dans SQL, mais un fichier serializé à côte) */ function rebuilt_file_db() { $idir = scandir($GLOBALS['BT_ROOT_PATH'] . $GLOBALS['dossier_images']); unset($idir[0], $idir[1]); // unset '.' and '..' $fdir = scandir($GLOBALS['BT_ROOT_PATH'] . $GLOBALS['dossier_fichiers']); unset($fdir[0], $fdir[1]);