define('IN_PHPBB', true); $df_root_path = '../'; // Définition du niveau de répertoire pour les includes de l'ensemble de la page $phpbb_root_path = $df_root_path.'/forum/'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include($phpbb_root_path . 'common.' . $phpEx); $user->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); } } // Inclusion du variateur automatique de style include ($df_root_path."includes/style-switcher.php"); // Connexion à la base de données $base = 6; //djembefola6 include ($df_root_path.'includes/mysql-connect.php'); // Récupération du ID $id = Securite::bdd($_GET['id']); if(is_numeric($id) AND $id != '1e309') { // Onglets switch($_GET['onglet']) { case current_video : $onglet = "current_video"; break; case last_added : $onglet = "last_added"; break; case top_view : $onglet = "top_view"; break; case top_rate : $onglet = "top_rate"; break; default: $onglet = "current_video"; break; } $retour = mysql_query("SELECT * FROM df_videos WHERE id=".mysql_real_escape_string($id)); $video = mysql_fetch_array($retour); $new_views = $video['views']+1; // Ajout d'une visualisation à la video $reqinsert="UPDATE df_videos SET views = ". $new_views ." WHERE id = ".mysql_real_escape_string($id). "; "; mysql_query($reqinsert) or die(''); mysql_close(); } else { ?> } if (empty ($video['id'])) { ?> } else { // Connexion à la base de données $base = 1; //djembefola include ($df_root_path.'includes/mysql-connect.php'); //suppression du tag "nouvelle vidéo" dans la base de données $reqinsert="UPDATE phpbb_users SET user_video_unread = REPLACE(user_video_unread ,'|".$video['id']."|','|') WHERE user_id = ".$user->data['user_id']." "; mysql_query($reqinsert) or die (''); // fermeture de la connexion // mysql_close(); ?>