session_begin(); $auth->acl($user->data); $user->setup(); // Initialisation des fichiers de langue $user->add_lang('df/df_commons'); // Destruction de la session en cas de nouvelle demande if (isset($_GET['logout'])) { $user->session_kill(); $user->session_begin(); } // Vérification de la présence de variables if (isset($_POST['login'])) { $username = request_var('username', '', true); $password = request_var('password', '', true); $autologin = (!empty($_POST['autologin'])) ? true : false; $viewonline = (!empty($_POST['viewonline'])) ? 0 : 1; $admin = 0; $result = $auth->login($username, $password, $autologin, $viewonline, $admin); if ($result['status'] != LOGIN_SUCCESS) { $err = $user->lang[$result['error_msg']]; if ($result['error_msg'] == 'LOGIN_ERROR_USERNAME' || $result['error_msg'] == 'LOGIN_ERROR_PASSWORD') { $err = (!$config['board_contact']) ? sprintf($user->lang[$result['error_msg']], '', '') : sprintf($user->lang[$result['error_msg']], '', ''); } } else { $auth->acl($user->data); } } if(is_numeric($_GET['id'])) { // Onglets switch($_GET['onglet']) { case article : $onglet = "article"; break; case commentaires : $onglet = "commentaires"; break; case downloads : $onglet = "downloads"; break; case similar_topics : $onglet = "similar_topics"; break; default: $onglet = "article"; break; } // Connexion à la base de données $base = 3; //djembefola3 include ($df_root_path.'includes/mysql-connect.php'); // Inclusion du variateur automatique de style + Chargement des fonctions de sécurité (avant tout Securite::html) include ($df_root_path."includes/style-switcher.php"); // Sécurisation du ID : provient d'une URL et peut être modifié $id = Securite::bdd($_GET['id']); if(is_numeric($id)) { $reqselect = "SELECT * FROM articles WHERE id = ". mysql_real_escape_string($id).""; $retour = mysql_query($reqselect) or die(''); mysql_close(); $article = mysql_fetch_array($retour); // Comptage de nb de visualisations $new_views = $article['views']+1; } else { ?>'); // Recherche des sujets similaires $articles_similaires = mysql_query ($similar_request); $count_similar_articles = mysql_num_rows($articles_similaires); // Liste des notes $notes = mysql_query("SELECT * FROM `articles_notes` WHERE `article_id` ='". $article['id'] ."' ORDER BY note_time ASC LIMIT 0,10"); $count_notes = mysql_num_rows($notes); mysql_close(); // Préparation des mots à rechercher pour les fichiers joints $recherche = Securite::html($article['title']); //sécurisation des variables $recherche=strtolower($recherche); //on passe en minuscule $mots = str_replace("+", "", trim($recherche)); //on remplace les + par des espaces $mots = str_replace("'", "", $mots); //idem pour ' $mots = str_replace("-", "", $mots); //idem pour - $mots = str_replace("\"", "", $mots); //idem pour \ $mots = str_replace(",", "", $mots); //idem pour , $mots = str_replace("; ", "", $mots); //idem pour ; $mots = str_replace(": ", "", $mots); //idem pour : $mots = str_replace("(", "", $mots); //idem pour ( $mots = str_replace(")", "", $mots); //idem pour ) $mots = explode(" " , $mots); $nombre_mots = count($mots); //comptage du nombre de mots for($i = 0; $i < $nombre_mots; $i++) { $phrase_request .= ''.$mots[$i].'* +'; $phrase_request_clean .= ''.$mots[$i].', '; } $phrase_request = substr($phrase_request, 0, -1); // Supprime le dernier + $phrase_request_clean = substr($phrase_request_clean, 0, -1); // Supprime la dernière , $request_attachments = "SELECT * FROM phpbb_attachments WHERE MATCH(`real_filename`, `attach_comment`) AGAINST ('$phrase_request' IN BOOLEAN MODE) ORDER BY real_filename ASC"; $request_download = "SELECT * FROM phpbb_downloads WHERE MATCH(`file_name`) AGAINST ('$phrase_request' IN BOOLEAN MODE) ORDER BY file_name ASC"; // La recherche dans la BDD suit en dessous // Connexion à la base de données $base = 1; //djembefola include ($df_root_path.'includes/mysql-connect.php'); //Suppression du tag "nouvel article" dans la base de données $reqinsert="UPDATE phpbb_users SET user_articles_unread = REPLACE(user_articles_unread ,'|".$article['id']."|','|') WHERE user_id = ".$user->data['user_id']." "; mysql_query($reqinsert) or die(''); // obtention des infos utilisateur $retour3 = mysql_query("SELECT * FROM phpbb_users WHERE user_id=".$article['user_id'].""); // Requetes de recherche des fichiers joints $rythmes_attachments = mysql_query($request_attachments); $rythmes_download = mysql_query($request_download); // fermeture de la connexion // mysql_close(); // Arrays $utilisateur = mysql_fetch_array($retour3); // Requetes de comptage des fichiers joints $count_rythmes_attachments = mysql_num_rows($rythmes_attachments); $count_rythmes_downloads = mysql_num_rows($rythmes_download); // Compte des fichiers $total_files = $count_rythmes_attachments + $count_rythmes_downloads; // Nettoyage de la description pour les robots (suppression des retours chariots, suppressions des doubles quotes et des balises BBCodes) $string = Securite::html($article['fr_description']); $patterns = array(); $patterns[0] = '`\"`si'; $patterns[1] = '`\\n`si'; $patterns[2] = '`\[(.+?)]`si'; // Suppression des balises BBCodes ouvrantes $patterns[3] = '`\[\/(.+?)]`si'; // Suppression des balises BBCodes fermantes $patterns[3] = '`\[\/(.+?)]`si'; // Suppression des balises BBCodes fermantes $replacements = array(); $replacements[0] = ''; $replacements[1] = ''; $replacements[2] = ''; $replacements[3] = ''; $fr_description = preg_replace($patterns, $replacements, $string); $fr_description = html_entity_decode($fr_description);// Décodage des balises HTML $fr_description = substr($fr_description, 0, 255); // Réduction à 255 caractères $fr_description .= '...'; // Ajout des points de suspension ?>
Notice: Undefined variable: df_root_path in /public_html/articles/article.php on line 248

Warning: include(includes/charset.php): failed to open stream: No such file or directory in /public_html/articles/article.php on line 248

Warning: include(includes/charset.php): failed to open stream: No such file or directory in /public_html/articles/article.php on line 248

Warning: include(): Failed opening 'includes/charset.php' for inclusion (include_path='.:/opt/php56/lib/php') in /public_html/articles/article.php on line 248
<? echo Securite::html($article['title']);?> - www.djembefola.fr, l'encyclopédie mandingue
lang['QUICK_NAV']; ?> www.djembefola.fr'; ?> » Encyclopédie mandingue';?> » ' . Securite::html($article['title']) . '';?>