From b82a6043536c807bca60fd59e762c7bf5a39f46b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Luttringer?= Date: Thu, 4 Mar 2010 23:39:39 +0000 Subject: [PATCH] delete remaining photos sql queries link to dailymotion now user index?dailymotion= some code cleaning! (delete trailing/reindent) removing index.php and user directoryIndex apacha by default in menu.php starting reviewing all code index.php is now a clean file with good web site schema --- admin/admin_home.php | 8 +- css/default.css | 462 +++++++++++++++++++++++++++++++++ css/eptv.css | 114 -------- css/main.css | 454 -------------------------------- include/connection.php | 91 +++---- include/dailymotion.php | 18 +- include/functions_display.php | 8 - include/functions_sql.php | 187 ++++--------- include/global.php | 11 + include/home.php | 79 +++--- include/menu.php | 23 +- include/section.php | 71 +++++ include/tables.php | 24 -- include/videos.php | 165 +++++------- include/videos.php_avecjukebox | 265 ------------------- index.php | 106 +++----- 16 files changed, 776 insertions(+), 1310 deletions(-) create mode 100644 css/default.css delete mode 100644 css/eptv.css delete mode 100644 css/main.css create mode 100644 include/global.php create mode 100644 include/section.php delete mode 100644 include/tables.php delete mode 100644 include/videos.php_avecjukebox diff --git a/admin/admin_home.php b/admin/admin_home.php index 73bcc07..dd07912 100644 --- a/admin/admin_home.php +++ b/admin/admin_home.php @@ -13,14 +13,10 @@ include_once "admin/admin_members.php"; include_once "admin/admin_users.php"; include_once "admin/admin_blacklist.php"; - - if ($_SESSION["user_right"] >= $GLOBALS["REPORTER"] ) { - -$str = ' - - + $str = '
'; + $str .= '
diff --git a/css/default.css b/css/default.css new file mode 100644 index 0000000..4538282 --- /dev/null +++ b/css/default.css @@ -0,0 +1,462 @@ +@charset "UTF-8"; +/* CSS Document */ + +* { + margin: 0px; + padding: 0px; + font-family: Tahoma,'Trebuchet MS',Verdana,Arial,"Lucida-Grande",Sans-serif; +} + +body { + background: #000000; + margin: 0px; + padding: 0px; + font-size: 11px; + color: #CCCCCC; + font-family: Tahoma,'Trebuchet MS',Verdana,Arial,"Lucida-Grande",Sans-serif; +} + +a { + text-decoration: none; + color: #cccccc; +} + +ul, li { + list-style-type: none; + padding: 0px; + margin: 0px; +} + +li { + display: inline; +} + +li a { + display: inline; +} + +img { + margin: 0 auto; + padding: 0px; +} + +.clr { + clear: both; + height: 0px; +} + +.copyrights { + color: #646464; + font-family: Tahoma,'Trebuchet MS',Verdana,Arial,"Lucida-Grande",Sans-serif; + text-align: center; + margin: 10px 0px 0px 0px; +} + +/* +** main header body footer container +*/ +#main_container { + position: relative; + background: #303030; + /* test background background: #00ff00; */ + top: 0px; + width: 901px; + margin: 0 auto; +} + +#main_body { + margin: 0px 0px 0px 0px; + background: #303030; + border-left: 1px solid #646464; + border-right: 1px solid #646464; +} + +#main_header_home { + height: 100px; + border-left: 1px solid #646464; + border-right: 1px solid #646464; + border-bottom: 1px solid #646464; + background: #003366; + background: url(../images/jukebox_2.jpg) no-repeat; +} + +#main_header_membres { + height: 249px; + background: url(../images/nomad_v5_top_membres.png) no-repeat; +} + +#main_header_cours { + height: 249px; + background: url(../images/nomad_v5_top_cours.png) no-repeat; +} + +#main_header_releases { + height: 249px; + background: url(../images/nomad_v5_top_releases.png) no-repeat; +} + +div.top_box +{ + margin-top: 40px; + text-align: center; +} + +/* +** header/menu class & id +*/ +#menu ul, #menu li { + margin:0; + padding: 0; + list-style-type: none; +} + +#menu ul { + position: absolute; + height: 22px; + /*width: 334px;*/ + left: 200px; + top: 101px; +} + +#menu li { + float: left; +} + +#menu li a { /* dimensions et définitions des boutons */ + display: block; /* mise en block de pour lui donner des dimensions */ + height: 22px; + color: #B8B8B8; + padding: 8px 0px 0px 0px; + font-size: 13px; + font-family: Tahoma,'Trebuchet MS',Verdana,Arial,"Lucida-Grande",Sans-serif; + text-decoration: none; + text-align: center; +} + +#menu li a:hover { /* dimensions et définitions des boutons */ + display: block; /* mise en block de pour lui donner des dimensions */ + height: 22px; + color: #99FF33; + font-size: 13px; + font-family: Tahoma,'Trebuchet MS',Verdana,Arial,"Lucida-Grande",Sans-serif; + text-decoration: none; + text-align: center; +} + +#menu a#tabs_home { + width: 79px; + background: transparent url(../images/maquette_decoupe_03.png) top left no-repeat; +} +#menu a#tabs_members { + width: 83px; + background: transparent url(../images/maquette_decoupe_05.png) top left no-repeat; +} +#menu a#tabs_cours { + width: 83px; + background: transparent url(../images/maquette_decoupe_05.png) top left no-repeat; +} +#menu a#tabs_releases { + width: 81px; + background: transparent url(../images/maquette_decoupe_07.png) top left no-repeat; +} + +#menu_left { + position: absolute; + left: 0px; + top: 101px; + height: 30px; + width: 159px; +} + +#menu_right { + position: absolute; + right: 0px; + top: 101px; + height: 30px; + width: 163px; +} + +/* +** main body +*/ + +div#newsbox { + /*width: 530px;*/ + margin: 0px 15px 20px 15px; +} + +div#newsbox ul { + background: #1D1D1D; + padding: 15px; +} + +div#newsbox li { + display: block; +} + +div#newsbox h1 { + height: 26px; + font-size: 14px; + font-family: Tahoma,'Trebuchet MS',Verdana,Arial,"Lucida-Grande",Sans-serif; + padding: 10px; + background: #1D1D1D; + color: #B8B8B8; + border-bottom: 1px solid #303030; +} + +.rightbox a { + text-decoration: none; + color: #cccccc; +} + +.rightbox a:hover { + text-decoration: none; + color: #99FF33; +} + +div.rightbox { + width: 320px; + margin: 0px 15px 15px 0px; +} + +div.rightbox ul { + background: #1D1D1D; + padding: 0px; + width: 320px; +} + +div.rightbox li { + display: block; + padding: 5px 0px 8px 15px; + font-size:12px; + color:#cccccc; + border-bottom: 1px solid #303030; +} + +div.rightbox h1 { + height: 26px; + font-size: 14px; + font-family: Tahoma,'Trebuchet MS',Verdana,Arial,"Lucida-Grande",Sans-serif; + padding: 10px; + background: #1D1D1D; + color: #B8B8B8; + border-bottom: 1px solid #303030; +} + +#all_side { + float: left; + padding: 0px; + margin: 0px; + background: #303030; +} + +#left_side { + float: left; + width: 550px; + padding: 0; + background: #303030; +} + +#newsbox h2 { + color: #B8B8B8; + margin: 10px 0px 0px 0px; + padding: 0px 0px 0px 10px; + background: url(../images/puce_carre.jpg) left no-repeat; +} + +.news_date { + color: #6D6C6C; + margin: 10px 0px 0px 0px; + padding: 0px 0px 0px 5px; +} + +.news_separator { + margin: 0px 0px 0px -15px; + padding:0; +} + +.news_text { + font-size: 12px; + color: #B8B8B8; + margin: 10px 0px 0px 0px; + padding: 0px 0px 5px 20px; +} + +#left_side h3 { + color: #aaa28b; + margin: 10px 0px 0px 0px; + padding: 0px 0px 0px 5px; +} + +#right_side { + float: right; + width: 330px; +} + +div#menu +{ + float:left; + margin-bottom: 20px; + width: 900px; + height: 130px; +} + +/* + #right_side li a:hover { + color: #cfc5ab; + height: 26px; + font: 10px Verdana, "Lucida Grande", Tahoma, Helvetica, Sans-Serif; + text-decoration: none; + } + +#right_side li { +display: block; +list-style-type: none; +padding: 0; +margin: 0; +} + +#right_side ul { +margin: 0px 0px 0px 10px; +} + +#right_side li a,span{ +color: #aaa28b; +height: 26px; +font: 10px Verdana, "Lucida Grande", Tahoma, Helvetica, Sans-Serif; +text-decoration: none; +} +*/ + +#right_side h2 { + color: #aaa28b; + margin: 10px 0px 0px 0px; + padding: 0px 0px 0px 5px; + font-size: 12px; + font-family: Tahoma,'Trebuchet MS',Verdana,Arial,"Lucida-Grande",Sans-serif; +} + +#right_side h3 { + color: #aaa28b; + margin: 10px 0px 0px 0px; + padding: 0px 0px 0px 5px; + font-size: 12px; + font-family: Tahoma,'Trebuchet MS',Verdana,Arial,"Lucida-Grande",Sans-serif; +} + + +/* + ** footer class & id + */ + +#main_footer { + position: relative; + margin: 0 auto; + width: 901px; + height: 47px; +} + +#foot_menu { + background: #303030; + border-left: 1px solid #646464; + border-right: 1px solid #646464; +} + +#foot_menu ul { + height: 15px; + width: 860px; + margin: 0 auto; + text-align: center; +} + +#foot_menu li { + display: inline; + margin: 0 10px; +} + +#foot_menu li a { + color: #B8B8B8; + font-size: 9px; + font-family: Tahoma,'Trebuchet MS',Verdana,Arial,"Lucida-Grande",Sans-serif; + text-decoration: none; +} + +#foot_menu li a:hover, a:active { + color: #B8B8B8; + font-size: 9px; + font-family: Tahoma,'Trebuchet MS',Verdana,Arial,"Lucida-Grande",Sans-serif; + text-decoration: none; +} + +#foot_logo { + float: right; + position: relative; + top: 4px; + right: 20px; +} + +#foot_menu img { + position: relative; + top: 5px; + border: 0; +} + +.footnoimg { + background: none; +} + +#ft_img_left { + position: absolute; + left: 0px; + height: 19px; + width: 19px; + background: url(../images/corner_24.png) no-repeat; +} + +#ft_img_mid { + position: absolute; + left: 19px; + height: 18px; + width: 863px; + background: #303030; + border-bottom: 1px solid #646464; + +} + +#ft_img_right { + position: absolute; + right: 0px; + height: 19px; + width: 19px; + background: url(../images/corner_24_r.png) no-repeat; +} + +#logo_edito { + float: left; +} + +table a.texte_link,table { + color: #FFFFFF; +} + +a:hover { + text-decoration: none; + color: #99FF33; +} + +a:active { + text-decoration: none; + color: #99FF33; +} + +.back_tendu { + background-color:#460002; +} + +.back_private { + background-color:#990000; +} + +img.daily_preview { + margin-bottom: -5px; +} diff --git a/css/eptv.css b/css/eptv.css deleted file mode 100644 index 2352845..0000000 --- a/css/eptv.css +++ /dev/null @@ -1,114 +0,0 @@ -.back{ -background-color:#000000; -} -.back_tendu{ -background-color:#A8A8C6; -} -.back_private{ -background-color:#DFBE5B; -} - - -.titre_rubrique{ - color:#FFFFFF; - font-family:courier; - font-size:16px; - font-weight:bold; -} -.titre_sous_rubrique{ - color:#000000; - font-family:courier; - font-size:15px; - font-weight:bold; -} -.texte_normal{ - color:#000000; - font-family:courier; - font-size:14px; - font-weight:none; -} -.texte_date{ - color:#808080; - font-family:courier; - font-size:15px; - font-weight:none; -} -/*.texte_link{ - color:#000099; - font-family:courier; - font-size:12px; - font-weight:none; -} -.texte_link:hover{ - color:#B8C16F; - font-family:courier; - font-size:12px; - font-weight:none; -} -.texte_link:visited{ - color:#123456; - font-family:courier; - font-size:12px; - font-weight:none; -}*/ -.texte_info{ - color:#999999; - font-family:courier; - font-size:13px; - font-weight:bold; -} -.texte_info:hover{ - color:#B8C16F; - font-family:courier; - font-size:13px; - font-weight:bold; -} -.texte_input{ - color:#8B1B14; - font-family:courier; - font-size:12px; - font-weight:none; -} -.menu{ - color:#8B1B14; - font-family:courier; - font-size:19px; - font-weight:bold; - text-decoration:none; -} -.menu:hover{ - color:#B8C16F; - font-family:courier; - font-size:19px; - font-weight:bold; - text-decoration:none; -} -/*.lien{ - color:#999999; - font-family:courier; - font-size:13px; - font-weight:bold; - text-decoration:none; -} -.lien:hover{ - color:#B8C16F; - font-family:courier; - font-size:13px; - font-weight:bold; - text-decoration:none; -}*/ -.button{ - font:courier; - font-size:10px; - background-color:#888888; -} -.small_button{ - font:courier; - font-size:9px; - background-color:#888888; -} -.textarea{ - font:courier; - font-size: 12px; -} - diff --git a/css/main.css b/css/main.css deleted file mode 100644 index ae12475..0000000 --- a/css/main.css +++ /dev/null @@ -1,454 +0,0 @@ -@charset "UTF-8"; -/* CSS Document */ - -body -{ - background: #000000; - margin: 0px; - padding: 0px; - font-size: 11px; - color: #CCCCCC; - font-family: Tahoma,'Trebuchet MS',Verdana,Arial,"Lucida-Grande",Sans-serif; -} -* { - margin: 0px; - padding: 0px; - font-family: Tahoma,'Trebuchet MS',Verdana,Arial,"Lucida-Grande",Sans-serif; -} -ul, li { - list-style-type: none; - padding: 0px; - margin: 0px; -} -li { - display: inline; -} -li a { - display: inline; -} -img { - margin: 0 auto; - padding: 0px; -} -.clr { - clear: both; - height: 0px; -} - -.copyrights { - color: #646464; - font-family: Tahoma,'Trebuchet MS',Verdana,Arial,"Lucida-Grande",Sans-serif; - text-align: center; - margin: 10px 0px 0px 0px; -} - - -/* -** main header body footer container -*/ -#main_container { - position: relative; - background: #303030; - top: 0px; - width: 901px; - margin: 0 auto; -} - -#main_body { - margin: 0px 0px 0px 0px; - background: #303030; - border-left: 1px solid #646464; - border-right: 1px solid #646464; -} - -#main_header_home { - height: 100px; - border-left: 1px solid #646464; - border-right: 1px solid #646464; - border-bottom: 1px solid #646464; - background: #003366; - background: url(../images/jukebox_2.jpg) no-repeat; -} - -#main_header_membres { - height: 249px; - background: url(../images/nomad_v5_top_membres.png) no-repeat; -} - -#main_header_cours { - height: 249px; - background: url(../images/nomad_v5_top_cours.png) no-repeat; -} - -#main_header_releases { - height: 249px; - background: url(../images/nomad_v5_top_releases.png) no-repeat; -} - - -div.top_box -{ - margin-top: 40px; - text-align: center; -} - -/* -** header/menu class & id -*/ -#menu ul, #menu li { - margin:0; - padding: 0; - list-style-type: none; - } -#menu ul { - position: absolute; - height: 22px; - /*width: 334px;*/ - left: 200px; - top: 101px; -} -#menu li { - float: left; -} -#menu li a { /* dimensions et définitions des boutons */ - display: block; /* mise en block de pour lui donner des dimensions */ - height: 22px; - color: #B8B8B8; - padding: 8px 0px 0px 0px; - font-size: 13px; - font-family: Tahoma,'Trebuchet MS',Verdana,Arial,"Lucida-Grande",Sans-serif; - text-decoration: none; - text-align: center; -} - -#menu li a:hover { /* dimensions et définitions des boutons */ - display: block; /* mise en block de pour lui donner des dimensions */ - height: 22px; - color: #99FF33; - font-size: 13px; - font-family: Tahoma,'Trebuchet MS',Verdana,Arial,"Lucida-Grande",Sans-serif; - text-decoration: none; - text-align: center; -} - -#menu a#tabs_home { - width: 79px; - background: transparent url(../images/maquette_decoupe_03.png) top left no-repeat; -} -#menu a#tabs_members { - width: 83px; - background: transparent url(../images/maquette_decoupe_05.png) top left no-repeat; -} -#menu a#tabs_cours { - width: 83px; - background: transparent url(../images/maquette_decoupe_05.png) top left no-repeat; -} -#menu a#tabs_releases { - width: 81px; - background: transparent url(../images/maquette_decoupe_07.png) top left no-repeat; -} - -#menu_left { - position: absolute; - left: 0px; - top: 101px; - height: 30px; - width: 159px; -} - -#menu_right { - position: absolute; - right: 0px; - top: 101px; - height: 30px; - width: 163px; -} - -/* -** main body -*/ - -div#newsbox { - /*width: 530px;*/ - margin: 0px 15px 20px 15px; -} - -div#newsbox ul { - background: #1D1D1D; - padding: 15px; -} - -div#newsbox li { - display: block; -} - -div#newsbox h1 { - height: 26px; - font-size: 14px; - font-family: Tahoma,'Trebuchet MS',Verdana,Arial,"Lucida-Grande",Sans-serif; - padding: 10px; - background: #1D1D1D; - color: #B8B8B8; - border-bottom: 1px solid #303030; -} - -.rightbox a { - text-decoration: none; - color: #cccccc; -} - -.rightbox a:hover { - text-decoration: none; - color: #99FF33; -} - -div.rightbox { - width: 320px; - margin: 0px 15px 15px 0px; -} - -div.rightbox ul { - background: #1D1D1D; - padding: 0px; - width: 320px; -} - -div.rightbox li { - display: block; - padding: 5px 0px 8px 15px; - font-size:12px; - color:#cccccc; - border-bottom: 1px solid #303030; -} - -div.rightbox h1 { - height: 26px; - font-size: 14px; - font-family: Tahoma,'Trebuchet MS',Verdana,Arial,"Lucida-Grande",Sans-serif; - padding: 10px; - background: #1D1D1D; - color: #B8B8B8; - border-bottom: 1px solid #303030; -} - -#all_side { - float: left; - padding: 0px; - margin: 0px; - background: #303030; -} - -#left_side { - float: left; - width: 550px; - padding: 0; - background: #303030; -} - -#newsbox h2 { - color: #B8B8B8; - margin: 10px 0px 0px 0px; - padding: 0px 0px 0px 10px; - background: url(../images/puce_carre.jpg) left no-repeat; -} - -.news_date { - color: #6D6C6C; - margin: 10px 0px 0px 0px; - padding: 0px 0px 0px 5px; -} - -.news_separator { - margin: 0px 0px 0px -15px; - padding:0; -} - -.news_text { - font-size: 12px; - color: #B8B8B8; - margin: 10px 0px 0px 0px; - padding: 0px 0px 5px 20px; -} - -#left_side h3 { - color: #aaa28b; - margin: 10px 0px 0px 0px; - padding: 0px 0px 0px 5px; -} - -#right_side { - float: right; - width: 330px; -} - -div#menu -{ - float:left; - margin-bottom: 20px; - width: 900px; - height: 130px; -} - -/* -#right_side li a:hover { - color: #cfc5ab; - height: 26px; - font: 10px Verdana, "Lucida Grande", Tahoma, Helvetica, Sans-Serif; - text-decoration: none; -} - -#right_side li { - display: block; - list-style-type: none; - padding: 0; - margin: 0; -} - -#right_side ul { - margin: 0px 0px 0px 10px; -} - -#right_side li a,span{ - color: #aaa28b; - height: 26px; - font: 10px Verdana, "Lucida Grande", Tahoma, Helvetica, Sans-Serif; - text-decoration: none; -} -*/ -#right_side h2 { - color: #aaa28b; - margin: 10px 0px 0px 0px; - padding: 0px 0px 0px 5px; - font-size: 12px; - font-family: Tahoma,'Trebuchet MS',Verdana,Arial,"Lucida-Grande",Sans-serif; -} - -#right_side h3 { - color: #aaa28b; - margin: 10px 0px 0px 0px; - padding: 0px 0px 0px 5px; - font-size: 12px; - font-family: Tahoma,'Trebuchet MS',Verdana,Arial,"Lucida-Grande",Sans-serif; -} - - -/* -** footer class & id -*/ - -#main_footer { - position: relative; - margin: 0 auto; - width: 901px; - height: 47px; -} - -#foot_menu { - background: #303030; - border-left: 1px solid #646464; - border-right: 1px solid #646464; -} - -#foot_menu ul { - height: 15px; - width: 860px; - margin: 0 auto; - text-align: center; -} - -#foot_menu li { - display: inline; - margin: 0 10px; -} - -#foot_menu li a { - color: #B8B8B8; - font-size: 9px; - font-family: Tahoma,'Trebuchet MS',Verdana,Arial,"Lucida-Grande",Sans-serif; - text-decoration: none; -} - -#foot_menu li a:hover, a:active { - color: #B8B8B8; - font-size: 9px; - font-family: Tahoma,'Trebuchet MS',Verdana,Arial,"Lucida-Grande",Sans-serif; - text-decoration: none; -} - -#foot_logo { - float: right; - position: relative; - top: 4px; - right: 20px; -} - -#foot_menu img { - position: relative; - top: 5px; - border: 0; -} - -.footnoimg { - background: none; -} - -#ft_img_left { - position: absolute; - left: 0px; - height: 19px; - width: 19px; - background: url(../images/corner_24.png) no-repeat; -} - -#ft_img_mid { - position: absolute; - left: 19px; - height: 18px; - width: 863px; - background: #303030; - border-bottom: 1px solid #646464; - -} - -#ft_img_right { - position: absolute; - right: 0px; - height: 19px; - width: 19px; - background: url(../images/corner_24_r.png) no-repeat; -} - -#logo_edito { - float: left; -} - -a { - text-decoration: none; - color: #cccccc; -} - -table a.texte_link,table -{ - color: #FFFFFF; -} - -a:hover { - text-decoration: none; - color: #99FF33; -} - -a:active { - text-decoration: none; - color: #99FF33; -} -.back_tendu{ -background-color:#460002; -} -.back_private{ -background-color:#990000; -} - -img.daily_preview -{ - margin-bottom: -5px; -} diff --git a/include/connection.php b/include/connection.php index 397381c..331334c 100644 --- a/include/connection.php +++ b/include/connection.php @@ -1,64 +1,49 @@
'; - - - /////// BEGIN TABLE DOWN /////// - if ($_SESSION["user_right"] == "ANONYM") { -// $str .= dispConnectionRegister(); // HIDE WAITING FORUM - } - else if ($_SESSION["user_right"] == "EPI") { -// $str .= dispConnectionEpiRegister(); // HIDE WAITING REGISTER PAGE - } - else { -// $str .= dispConnectionProfile(); // HIDE WAITING EDIT PROFIL - } - - - echo $str; + /////// BEGIN TABLE UP /////// + if ($_SESSION["user_right"] == 0) + $str .= dispConnectionLogin(); + else + $str .= dispConnectionDisconnect(); + + /////// BEGIN SPACE /////// + //$str .= '
'; + + /////// BEGIN TABLE DOWN /////// + if ($_SESSION["user_right"] == "ANONYM") { + // $str .= dispConnectionRegister(); // HIDE WAITING FORUM + } + else if ($_SESSION["user_right"] == "EPI") { + // $str .= dispConnectionEpiRegister(); // HIDE WAITING REGISTER PAGE + } + else { + // $str .= dispConnectionProfile(); // HIDE WAITING EDIT PROFIL + } + + echo $str; } - - function dispConnectionLogin() { /////// CONNECTION LOGIN /////// - - $str = dispTableBegin("c o n n e x i o n", "30", 1); - - if ($_SERVER['HTTPS'] == "on") - $str .= ' - -
- Login - - Pass - -
-
- '; - else - $str .= "Pour vous connecter au site, vous devez utiliser une connexion SSL!"; - - $str .= dispTableEnd(); - - return ($str); + $str = '
'; + $str .= dispTableBegin("c o n n e x i o n", "30", 1); + if ($_SERVER['HTTPS'] == "on") { + $str .= '
'; + $str .= 'Login'; + $str .= ''; + $str .= 'Pass'; + $str .= ''; + $str .= '
'; + $str .= '
'; + } + else + $str .= "

Pour vous connecter au site, vous devez utiliser une connexion SSL!

"; + + $str .= dispTableEnd(); + $str .= '
'; + return ($str); } - - function dispConnectionRegister() { /////// CONNECTION REGISTER /////// diff --git a/include/dailymotion.php b/include/dailymotion.php index 02d1c20..169a062 100644 --- a/include/dailymotion.php +++ b/include/dailymotion.php @@ -1,11 +1,13 @@ EPTV - Dailymotion Preview
+function getDailymotion($url) { + die("Unavailable!"); + + echo 'EPTV - Dailymotion Publication
'; -} + return; + } ?> \ No newline at end of file diff --git a/include/functions_display.php b/include/functions_display.php index 0d8194d..13f5893 100644 --- a/include/functions_display.php +++ b/include/functions_display.php @@ -1,6 +1,5 @@ '; @@ -46,10 +45,6 @@ return $str; } - - - - function dispWhenTendu($tendu) { @@ -68,11 +63,8 @@ function dispWhenTendu($tendu) return $str; - - } - function dispAdminWhenTendu($tendu) { diff --git a/include/functions_sql.php b/include/functions_sql.php index de41930..da54b7c 100644 --- a/include/functions_sql.php +++ b/include/functions_sql.php @@ -1,21 +1,18 @@ -= 7"; - return $result = mysql_query($query); + $query = "select * from $DB.users_db WHERE user_right >= 7"; + return $result = mysql_query($query); } function getAnExistingStatut($statut){ - $query = "select * from $DB.users_db WHERE user_statut = '$statut'"; - return $result = mysql_query($query); + $query = "select * from $DB.users_db WHERE user_statut = '$statut'"; + return $result = mysql_query($query); } - #################################### ########## SQL Blacklist ######## #################################### function getOneBlacklistById($id){ - $query = "select * from $DB.blacklist_db WHERE blacklist_id='$id'"; - return $result = mysql_query($query); + $query = "select * from $DB.blacklist_db WHERE blacklist_id='$id'"; + return $result = mysql_query($query); } function getOneBlacklistByLogin($login){ - $query = "select * from $DB.blacklist_db WHERE blacklist_login='$login'"; - return $result = mysql_query($query); + $query = "select * from $DB.blacklist_db WHERE blacklist_login='$login'"; + return $result = mysql_query($query); } function getAllBlacklist(){ - $query = "select * from $DB.blacklist_db"; - return $result = mysql_query($query); + $query = "select * from $DB.blacklist_db"; + return $result = mysql_query($query); } function getAllBlacksite(){ - $query = "select * from $DB.blacksites_db"; - return $result = mysql_query($query); + $query = "select * from $DB.blacksites_db"; + return $result = mysql_query($query); } function getOneBlacksiteById($id){ - $query = "select * from $DB.blacksites_db WHERE blacksite_id='$id'"; - return $result = mysql_query($query); + $query = "select * from $DB.blacksites_db WHERE blacksite_id='$id'"; + return $result = mysql_query($query); } - ?> \ No newline at end of file diff --git a/include/global.php b/include/global.php new file mode 100644 index 0000000..461400f --- /dev/null +++ b/include/global.php @@ -0,0 +1,11 @@ + diff --git a/include/home.php b/include/home.php index 0c32500..aa77e5b 100644 --- a/include/home.php +++ b/include/home.php @@ -47,9 +47,6 @@ $str = ' echo $str; } - - - function dispHomeNews(){ $str = ''; @@ -86,63 +83,47 @@ function dispHomeNews(){ } function dispHomeEdito(){ + $result = getLastEdito(); + if (mysql_num_rows($result)) + $edito = mysql_fetch_array($result); - $result = getLastEdito(); - if (mysql_num_rows($result)){ - $edito = mysql_fetch_array($result); - } + $str = '
    '; + $str .= '
  • '.$edito["edito_title"].'
  • '; + $str .= '
  • '.$edito["edito_comment"].'
  • '; + $str .= '
'; - $str = ' -
    -
  • '.$edito["edito_title"].'
  • -
  • '.$edito["edito_comment"].'
  • -
'; - - return ($str); + return ($str); } function dispHomeLastVideos(){ + if ($_SESSION["user_right"] >= $GLOBALS["PRIV_GUEST"]) + $result = getLastVideosByTendu(2); + else if ($_SESSION["user_right"] >= $GLOBALS["GUEST"]) + $result = getLastVideosByTendu(1); + else + $result = getLastVideosByTendu(0); + $str = '
    '; - if ($_SESSION["user_right"] >= $GLOBALS["PRIV_GUEST"] ) { - $result = getLastVideosByTendu(2); - } - else if ($_SESSION["user_right"] >= $GLOBALS["GUEST"] ) { - $result = getLastVideosByTendu(1); - } - else { - $result = getLastVideosByTendu(0); - } - - $str = '
      '; - - - if (mysql_num_rows($result)){ - for ($cpt = 0; $cpt < 20 && ($video = mysql_fetch_array($result)); $cpt++) { - -// DISP LAST VIDEOS BY TENDU - $str .= dispWhenTendu($video["video_tendu"]); - - $str .= ' + if (mysql_num_rows($result)){ + for ($cpt = 0; $cpt < 20 && ($video = mysql_fetch_array($result)); $cpt++) { + // DISP LAST VIDEOS BY TENDU + $str .= dispWhenTendu($video["video_tendu"]); -  
    • '.$video["video_name"].' - - '; + $str .= ' 
    • '.$video["video_name"].''; - if ($video["video_path_daily"]) { - $str .= '    - '; - } - $str .= '   '.$video["video_size"].' Mo'; - } - $str .= '
    '; - } + if ($video["video_path_daily"]) { + $str .= '    + '; + } + $str .= '   '.$video["video_size"].' Mo'; + } + $str .= '
'; + } - $str .= ' - - '; + $str .= ''; - return ($str); + return ($str); } ?> diff --git a/include/menu.php b/include/menu.php index 9df97e8..d3b2ee3 100644 --- a/include/menu.php +++ b/include/menu.php @@ -1,24 +1,23 @@
    '; - - $str .= '
  • Home
  • '; - $str .= '
  • Actualités
  • '; - $str .= '
  • Vidéos
  • '; - $str .= '
  • Membres
  • '; + $str = ''; + $str .= '"; + $str .= ''; echo $str; } diff --git a/include/section.php b/include/section.php new file mode 100644 index 0000000..c439119 --- /dev/null +++ b/include/section.php @@ -0,0 +1,71 @@ +'; + echo ''; + dispHeader(); + dispBody(); + echo ''; + } + +// Display a section +function dispSection() { + $tab_section = array(); + $tab_section["Home"] = dispHome; +//$tab_section["Webcam"] = dispWebcam; +//$tab_section["Player"] = dispPlayer; + $tab_section["News"] = dispNews; + $tab_section["Videos"] = dispVideos; + $tab_section["Members"] = dispMembers; + $tab_section["Fans"] = dispFans; + $tab_section["Contacts"] = dispContacts; + $tab_section["AdminHome"] = dispAdminHome; + $tab_section["Connection"] = dispConnection; + + if ($_GET['section'] && array_key_exists($_GET['section'], $tab_section)) + $section = $_GET['section']; + else + $section = "Home"; + $tab_section[$section](); +} + +// display html header +function dispHeader() { + echo ''; + echo 'EPTV'; + echo ''; + echo ''; + echo ''; + echo ''; +} + +// display html body +function dispBody() { + echo ''; + echo ''; + echo '
    '; + echo '
    '; + echo ''; + echo ''; + dispMenu(); + echo '
    '; + dispSection(); + echo '
    '; + echo ''; + echo ''; +} + +?> diff --git a/include/tables.php b/include/tables.php deleted file mode 100644 index 2587c68..0000000 --- a/include/tables.php +++ /dev/null @@ -1,24 +0,0 @@ - diff --git a/include/videos.php b/include/videos.php index 2c3b802..91369cc 100644 --- a/include/videos.php +++ b/include/videos.php @@ -38,89 +38,64 @@ $str = ' echo $str; } - function dispVideosMenu(){ - - $str = ''; - - $str .= ' - - '; - - return ($str); + $str = '
      '; + $str .= '
    • 2010
    • '; + $str .= '
    • 2009
    • '; + $str .= '
    • 2008
    • '; + $str .= '
    • 2007
    • '; + $str .= '
    • 2006
    • '; + $str .= '
    • 2005
    • '; + $str .= '
    • 2004
    • '; + $str .= '
    • 2003
    • '; + $str .= '
    • 2002
    • '; + $str .= '
    • 2001
    • '; + $str .= '
    • avant
    • '; + $str .= '
    • Pour visualiser nos videos: Click-droit, telecharger...

      +

      Nous vous conseillons le lecteur VLC disponible sous Windows/Mac/Linux.

      +
    • '; + $str .= '
    '; + return ($str); } function dispVideosYear(){ - if ($_GET['year_page']) { - $year_page = $_GET['year_page']; - } - else - { - $year_page = DEFAULT_YEAR; - } - - - - $str = '';//''.$year_page.''; - - - if ($_SESSION["user_right"] >= $GLOBALS["PRIV_GUEST"] ) { - $result_prod = getVideosByYearAndTypeAndTendu($year_page, "eptvprod", 2); - $result_bonus = getVideosByYearAndTypeAndTendu($year_page, "eptvbonus", 2); - $result_adm = getVideosByYearAndTypeAndTendu($year_page, "eptv.adm", 2); - } - else if ($_SESSION["user_right"] >= $GLOBALS["GUEST"] ) { - $result_prod = getVideosByYearAndTypeAndTendu($year_page, "eptvprod", 1); - $result_bonus = getVideosByYearAndTypeAndTendu($year_page, "eptvbonus", 1); - $result_adm = getVideosByYearAndTypeAndTendu($year_page, "eptv.adm", 1); - } - else { - $result_prod = getVideosByYearAndTypeAndTendu($year_page, "eptvprod", 0); - $result_bonus = getVideosByYearAndTypeAndTendu($year_page, "eptvbonus", 0); - $result_adm = getVideosByYearAndTypeAndTendu($year_page, "eptv.adm", 0); - } - - - if (mysql_num_rows($result_prod)) { - $str .= dispVideosByType($result_prod, " e p t v   p r o d u c t i o n"); - } - - if (mysql_num_rows($result_bonus)) { - $str .= dispVideosByType($result_bonus, " e p t v   b o n u s"); - } - if (mysql_num_rows($result_adm)) { - $str .= dispVideosByType($result_adm, " e p t v . a d m"); - } - - -return ($str); + if ($_GET['year_page']) + $year_page = $_GET['year_page']; + else + $year_page = DEFAULT_YEAR; + + $str = '';//''.$year_page.''; + + if ($_SESSION["user_right"] >= $GLOBALS["PRIV_GUEST"] ) { + $result_prod = getVideosByYearAndTypeAndTendu($year_page, "eptvprod", 2); + $result_bonus = getVideosByYearAndTypeAndTendu($year_page, "eptvbonus", 2); + $result_adm = getVideosByYearAndTypeAndTendu($year_page, "eptv.adm", 2); + } + else if ($_SESSION["user_right"] >= $GLOBALS["GUEST"] ) { + $result_prod = getVideosByYearAndTypeAndTendu($year_page, "eptvprod", 1); + $result_bonus = getVideosByYearAndTypeAndTendu($year_page, "eptvbonus", 1); + $result_adm = getVideosByYearAndTypeAndTendu($year_page, "eptv.adm", 1); + } + else { + $result_prod = getVideosByYearAndTypeAndTendu($year_page, "eptvprod", 0); + $result_bonus = getVideosByYearAndTypeAndTendu($year_page, "eptvbonus", 0); + $result_adm = getVideosByYearAndTypeAndTendu($year_page, "eptv.adm", 0); + } + + if (mysql_num_rows($result_prod)) + $str .= dispVideosByType($result_prod, " e p t v   p r o d u c t i o n"); + if (mysql_num_rows($result_bonus)) + $str .= dispVideosByType($result_bonus, " e p t v   b o n u s"); + if (mysql_num_rows($result_adm)) + $str .= dispVideosByType($result_adm, " e p t v . a d m"); + + return ($str); } function dispVideosByType($result, $video_type) { - - $str = ' - + $str = '
    @@ -191,7 +142,7 @@ $str .= '
    '; - return ($str); + return ($str); } diff --git a/include/videos.php_avecjukebox b/include/videos.php_avecjukebox deleted file mode 100644 index 927e677..0000000 --- a/include/videos.php_avecjukebox +++ /dev/null @@ -1,265 +0,0 @@ - - - - - -
    @@ -144,40 +119,16 @@ function dispVideosByType($result, $video_type) { '; - while ($video = mysql_fetch_array($result)) - { - - - $str .= dispWhenTendu($video["video_tendu"]); - - $str .= ' - -  '.$video["video_name"].' - - - - - - '; - - - } - + while ($video = mysql_fetch_array($result)) { + $str .= dispWhenTendu($video["video_tendu"]); + $str .= '  '.$video["video_name"].''; + } -$str .= ' + $str .= '
    '; - - if ($video["video_path_daily"]) - { - - $str .= ''; - } - - $str .= ' - '.$video["video_date"].' - - '.$video["video_size"].' Mo -
    '; + if ($video["video_path_daily"]) + $str .= ''; + $str .= ''.$video["video_date"].''.$video["video_size"].' Mo
    - - - - -
    - - - - - - -
    - - - - -
    - - - - - - - - -
    - - -  v i d e o s  - - -
    - - '; - -$str .= dispVideosMenu(); - -$str .= ' -
    -
    - -
    -
    - '; - - - -$str .= dispVideosYear(); - -$str .= ' -
    -
    -
    '; - - -echo $str; -} - - -function dispVideosMenu(){ - - $str = ''; - - $str .= ' - - - 2006 - - - - - - 2005 - - - - - - 2004 - - - - - - 2003 - - - - - - 2002 - - - - - - 2001 - - - - - - Avant - - '; - - $str .= ' -
    - - -

    Pour visualiser nos videos: Click-droit, telecharger...

    -

    Nous vous conseillons le lecteur VLC disponible sous Windows/Mac/Linux.

    - - - '; - - return ($str); -} - - -function dispVideosYear(){ - - if ($_GET['year_page']) { - $year_page = $_GET['year_page']; - } - else - { - $year_page = 2006; - } - - $str = ''.$year_page.'
    '; - - - if ($_SESSION["user_right"] >= $GLOBALS["PRIV_GUEST"] ) { - $result_prod = getVideosByYearAndTypeAndTendu($year_page, "eptvprod", 2); - $result_bonus = getVideosByYearAndTypeAndTendu($year_page, "eptvbonus", 2); - $result_adm = getVideosByYearAndTypeAndTendu($year_page, "eptv.adm", 2); - } - else if ($_SESSION["user_right"] >= $GLOBALS["GUEST"] ) { - $result_prod = getVideosByYearAndTypeAndTendu($year_page, "eptvprod", 1); - $result_bonus = getVideosByYearAndTypeAndTendu($year_page, "eptvbonus", 1); - $result_adm = getVideosByYearAndTypeAndTendu($year_page, "eptv.adm", 1); - } - else { - $result_prod = getVideosByYearAndTypeAndTendu($year_page, "eptvprod", 0); - $result_bonus = getVideosByYearAndTypeAndTendu($year_page, "eptvbonus", 0); - $result_adm = getVideosByYearAndTypeAndTendu($year_page, "eptv.adm", 0); - } - - - if (mysql_num_rows($result_prod)) { - $str .= dispVideosByType($result_prod, " e p t v   p r o d u c t i o n"); - } - - if (mysql_num_rows($result_bonus)) { - $str .= dispVideosByType($result_bonus, " e p t v   b o n u s"); - } - if (mysql_num_rows($result_adm)) { - $str .= dispVideosByType($result_adm, " e p t v . a d m"); - } - - -return ($str); -} - - -function dispVideosByType($result, $video_type) { - - $str = ' - - - - -
    - - - - - - - - -
    - - - '.$video_type.' - - -
    - - - - -
    - - - '; - - - while ($video = mysql_fetch_array($result)) { - - - $str .= dispWhenTendu($video["video_tendu"]); - - $str .= ' - - '.$video["video_comment"].'\', \'lightgray\')" ONMOUSEOUT="removeBox()"'; - } - $str .= '> - '.$video["video_name"].' - - - - - - '; - - - } - - - -$str .= ' -
    '; - if ($video["video_path_daily"]) { - $str .= ' - '; - } - $str .= ' - '.$video["video_date"].' - - '.$video["video_size"].' Mo -
    -
    -
    -
    -
    - '; - - return ($str); - -} - -?> diff --git a/index.php b/index.php index 5bb1d7e..46058d1 100644 --- a/index.php +++ b/index.php @@ -1,27 +1,28 @@ - 0) userDisconnect(); -?> - - - - -EPTV - - - - - - - - -
    - -
    - - - -
    +// Download video +if ($_GET['video']) + return getVideo(); - 0) - echo ''; - else - echo ''; - */ - ?> +// Dailymotion playback +if ($_GET['dailymotion']) + return getDailymotion($_GET['dailymotion']); +// Display section +getSection(); +?> - - -
    - - - -- GitLab