diff --git a/css/main.css b/css/main.css index 94084f33c831ef9d5d5ea2c8d8008dcb082af8ec..ae124756e6f54cf3901f43e222d638931c8d41e5 100644 --- a/css/main.css +++ b/css/main.css @@ -11,20 +11,20 @@ body font-family: Tahoma,'Trebuchet MS',Verdana,Arial,"Lucida-Grande",Sans-serif; } * { - margin: 0; - padding: 0; + margin: 0px; + padding: 0px; font-family: Tahoma,'Trebuchet MS',Verdana,Arial,"Lucida-Grande",Sans-serif; } ul, li { list-style-type: none; - padding: 0; - margin: 0; + padding: 0px; + margin: 0px; } li { display: inline; } li a { - display:inline; + display: inline; } img { margin: 0 auto; @@ -104,7 +104,7 @@ div.top_box position: absolute; height: 22px; /*width: 334px;*/ - left: 270px; + left: 200px; top: 101px; } #menu li { @@ -169,8 +169,8 @@ div.top_box */ div#newsbox { - width: 530px; - margin: 0px 0px 20px 15px; + /*width: 530px;*/ + margin: 0px 15px 20px 15px; } div#newsbox ul { @@ -231,6 +231,13 @@ div.rightbox h1 { border-bottom: 1px solid #303030; } +#all_side { + float: left; + padding: 0px; + margin: 0px; + background: #303030; +} + #left_side { float: left; width: 550px; diff --git a/public/connection.php b/include/connection.php similarity index 100% rename from public/connection.php rename to include/connection.php diff --git a/public/contacts.php b/include/contacts.php similarity index 100% rename from public/contacts.php rename to include/contacts.php diff --git a/public/dailymotion.php b/include/dailymotion.php similarity index 100% rename from public/dailymotion.php rename to include/dailymotion.php diff --git a/include/functions_display.php b/include/functions_display.php index 53e93d7b7e3f4121df6ca7b0ce27eda8f83b4b1e..0d8194d3c522ae2faf573878bc170ecb787aa64d 100644 --- a/include/functions_display.php +++ b/include/functions_display.php @@ -13,7 +13,7 @@ function dispTableBegin($table_title, $table_percent_size, $table_center) { $str .= ''; if ($table_title != "") { - $str .= + $str .= '
'; @@ -64,7 +64,7 @@ function dispWhenTendu($tendu) // valeur chelou pour bien afficher le texte $str = '
'.$table_title.'
'; } - + return $str; @@ -87,7 +87,7 @@ function dispAdminWhenTendu($tendu) // valeur chelou pour bien afficher le texte $str = '
'; } - + return $str; diff --git a/include/functions_sql.php b/include/functions_sql.php index 41438fe02bf10a82e08bd0f7ea40af24c5fb4e53..de4193044e22f68de31c9e351468d20f08844225 100644 --- a/include/functions_sql.php +++ b/include/functions_sql.php @@ -5,14 +5,14 @@ ################################ function getOneNews($news_id){ - + $query = "select * from $DB.news_db WHERE news_id = '$news_id'"; return $result = mysql_query($query); } function getLastNews($tendu){ - $query = "SELECT * FROM $DB.news_db + $query = "SELECT * FROM $DB.news_db WHERE news_tendu<='$tendu' ORDER BY news_date desc, news_time desc"; return $result = mysql_query($query); @@ -24,20 +24,20 @@ function getLastNews($tendu){ ################################ function getOneEdito($edito_id){ - + $query = "select * from $DB.editos_db WHERE edito_id = '$edito_id'"; return $result = mysql_query($query); } function getLastEdito(){ - + $query = "select * from $DB.editos_db ORDER BY edito_date DESC"; return $result = mysql_query($query); } function getAllEdito(){ - + $query = "select * from $DB.editos_db ORDER BY edito_date DESC"; return $result = mysql_query($query); } @@ -48,7 +48,7 @@ function getAllEdito(){ function getOnePhoto($vid_id){ - + $query = "select * from $DB.photos_db WHERE photo_id = '$vid_id'"; return $result = mysql_query($query); } @@ -67,7 +67,7 @@ function getLastPhotos(){ function getPhotosByType( $type){ - $query = "select * from $DB.photos_db + $query = "select * from $DB.photos_db WHERE photo_type='$type' ORDER BY photo_date desc"; return $result = mysql_query($query); @@ -76,12 +76,12 @@ function getPhotosByType( $type){ function getPhotosByYearAndTypeAndTendu($year, $type, $tendu){ if ($year == 2000) { - $query = "select * from $DB.photos_db + $query = "select * from $DB.photos_db WHERE photo_type='$type' AND photo_tendu<='$tendu' AND YEAR(photo_date)<='$year' ORDER BY photo_date desc"; } else { - $query = "select * from $DB.photos_db + $query = "select * from $DB.photos_db WHERE photo_type='$type' AND photo_tendu<='$tendu' AND YEAR(photo_date)='$year' ORDER BY photo_date desc"; } @@ -92,11 +92,11 @@ function getPhotosByYearAndTypeAndTendu($year, $type, $tendu){ function getLastPhotosByTendu($tendu){ - - $query = "select * from $DB.photos_db + + $query = "select * from $DB.photos_db WHERE photo_tendu<='$tendu' ORDER BY photo_id desc"; - + return $result = mysql_query($query); } @@ -107,7 +107,7 @@ function getLastPhotosByTendu($tendu){ function getOneVideo($vid_id){ - + $query = "select * from $DB.videos_db WHERE video_id = '$vid_id'"; return $result = mysql_query($query); } @@ -126,7 +126,7 @@ function getLastVideos(){ function getVideosByType( $type){ - $query = "select * from $DB.videos_db + $query = "select * from $DB.videos_db WHERE video_type='$type' ORDER BY video_date desc"; return $result = mysql_query($query); @@ -135,12 +135,12 @@ function getVideosByType( $type){ function getVideosByYearAndTypeAndTendu($year, $type, $tendu){ if ($year == 2000) { - $query = "select * from $DB.videos_db + $query = "select * from $DB.videos_db WHERE video_type='$type' AND video_tendu<='$tendu' AND YEAR(video_date)<='$year' ORDER BY video_date desc"; } else { - $query = "select * from $DB.videos_db + $query = "select * from $DB.videos_db WHERE video_type='$type' AND video_tendu<='$tendu' AND YEAR(video_date)='$year' ORDER BY video_date desc"; } @@ -151,11 +151,11 @@ function getVideosByYearAndTypeAndTendu($year, $type, $tendu){ function getLastVideosByTendu($tendu){ - - $query = "select * from $DB.videos_db + + $query = "select * from $DB.videos_db WHERE video_tendu<='$tendu' ORDER BY video_id desc"; - + return $result = mysql_query($query); } diff --git a/public/home.php b/include/home.php similarity index 55% rename from public/home.php rename to include/home.php index 00ee67980f2e05dba110d16557cbc84f9b08352d..0c32500058d45f504cc45f71efd9eaf001339e9b 100644 --- a/public/home.php +++ b/include/home.php @@ -2,8 +2,6 @@ function dispHome(){ -//echo 'test'.$_SESSION["WEEZ"]." CRYPTAGE MD5 : ".md5($_SESSION["WEEZ"]) ; - $str = '
@@ -13,9 +11,9 @@ $str = '
-

Brèves

+

Dernières actualités

    '; - + $str .=dispHomeNews(); $str .= ' @@ -26,24 +24,16 @@ $str = '

    Edito

    '; - - $str .= dispHomeEdito(); + + $str .= dispHomeEdito(); $str .= '

    Dernières vidéo

    '; - - $str .= dispHomeLastVideos(); - $str .=' -
    -
    -

    Dernières photos

    - '; - - $str .= dispHomeLastPhotos(); + $str .= dispHomeLastVideos(); $str .='
    @@ -62,53 +52,46 @@ echo $str; function dispHomeNews(){ - $str = ''; + $str = ''; - if ($_SESSION["user_right"] >= $GLOBALS["PRIV_GUEST"] ) { - $result = getLastNews(2); - } - else if ($_SESSION["user_right"] >= $GLOBALS["GUEST"] ) { - $result = getLastNews(1); - } - else { - $result = getLastNews(0); - } - - if (mysql_num_rows($result)){ - while ($news = mysql_fetch_array($result)) { + if ($_SESSION["user_right"] >= $GLOBALS["PRIV_GUEST"]) + $result = getLastNews(2); + else if ($_SESSION["user_right"] >= $GLOBALS["GUEST"]) + $result = getLastNews(1); + else + $result = getLastNews(0); + if (mysql_num_rows($result)) { + for ($cpt = 0; $cpt < 10 && ($news = mysql_fetch_array($result)); $cpt++) { -// DISP NEWS TITLE BY TENDU - $str .= dispWhenTendu($news["news_tendu"]); - - $str .= ' + // DISP NEWS TITLE BY TENDU + $str .= dispWhenTendu($news["news_tendu"]); + + $str .= '
  • '.$news["news_title"].' '; -// DISP NEWS CONTENT BY TENDU - $str .= dispWhenTendu($news["news_tendu"]); - - - $str .= ' + // DISP NEWS CONTENT BY TENDU + $str .= dispWhenTendu($news["news_tendu"]); + $str .= ' - '.$news["news_date"].'

    '.$news["news_comment"].'



  • '; - } - } - - return ($str); + } + } + return ($str); } function dispHomeEdito(){ $result = getLastEdito(); if (mysql_num_rows($result)){ - $edito = mysql_fetch_array($result); + $edito = mysql_fetch_array($result); } - + $str = '
    • '.$edito["edito_title"].'
    • @@ -121,10 +104,10 @@ function dispHomeEdito(){ function dispHomeLastVideos(){ - if ($_SESSION["user_right"] >= $GLOBALS["PRIV_GUEST"] ) { + if ($_SESSION["user_right"] >= $GLOBALS["PRIV_GUEST"] ) { $result = getLastVideosByTendu(2); } - else if ($_SESSION["user_right"] >= $GLOBALS["GUEST"] ) { + else if ($_SESSION["user_right"] >= $GLOBALS["GUEST"] ) { $result = getLastVideosByTendu(1); } else { @@ -135,22 +118,21 @@ function dispHomeLastVideos(){ if (mysql_num_rows($result)){ - for ($cpt = 0; $cpt < 10 && ($video = mysql_fetch_array($result)); $cpt++) { - + for ($cpt = 0; $cpt < 20 && ($video = mysql_fetch_array($result)); $cpt++) { // DISP LAST VIDEOS BY TENDU $str .= dispWhenTendu($video["video_tendu"]); $str .= ' - +  
    • '.$video["video_name"].'
'; - + if ($video["video_path_daily"]) { $str .= '    '; - } + } $str .= '   '.$video["video_size"].' Mo'; } $str .= ''; @@ -163,51 +145,4 @@ function dispHomeLastVideos(){ return ($str); } -function dispHomeLastPhotos(){ - - - if ($_SESSION["user_right"] >= $GLOBALS["PRIV_GUEST"] ) { - $result = getLastPhotosByTendu(2); - } - else if ($_SESSION["user_right"] >= $GLOBALS["GUEST"] ) { - $result = getLastPhotosByTendu(1); - } - else { - $result = getLastPhotosByTendu(0); - } - - $str = '
    '; - - - if (mysql_num_rows($result)){ - for ($cpt = 0; $cpt < 10 && ($photo = mysql_fetch_array($result)); $cpt++) { - - -// DISP LAST PHOTOS BY TENDU - $str .= dispWhenTendu($photo["photo_tendu"]); - - $str .= '
  • '.$photo["photo_comment"].'\', \'#d3d3df\')"'; - } - $str .= '>'.$photo["photo_name"].' '; - if ($_SESSION["user_right"] >= $GLOBALS["PRIV_GUEST"] && photo_img_path != 0) { - $str .= '(zip)'; - } - $str .= ''; - $str .= '   '.$photo["photo_size"]. ' Img -
  • - '; - } - $str .= '
'; - } - - $str .= ' - - '; - - return ($str); -} - ?> diff --git a/public/jukebox.php b/include/jukebox.php similarity index 100% rename from public/jukebox.php rename to include/jukebox.php diff --git a/public/members.php b/include/members.php similarity index 100% rename from public/members.php rename to include/members.php diff --git a/include/menu.php b/include/menu.php index dacd7ccac0edce5eeaeebda20ddf9eb2edcb9b0f..9df97e84fb51aaa64d0b686a648e29dd388b5b06 100644 --- a/include/menu.php +++ b/include/menu.php @@ -4,8 +4,10 @@ function dispMenu() { $str = ''; + echo $str; +} + +function dispNewsRows(){ + + $str = ''; + + if ($_SESSION["user_right"] >= $GLOBALS["PRIV_GUEST"] ) + $result = getLastNews(2); + else if ($_SESSION["user_right"] >= $GLOBALS["GUEST"] ) + $result = getLastNews(1); + else + $result = getLastNews(0); + + if (mysql_num_rows($result)){ + while ($news = mysql_fetch_array($result)) { + // DISP NEWS TITLE BY TENDU + $str .= dispWhenTendu($news["news_tendu"]); + + $str .= '
  • '.$news["news_title"].''; + + // DISP NEWS CONTENT BY TENDU + $str .= dispWhenTendu($news["news_tendu"]); + + + $str .= ' - '.$news["news_date"].'

    +

    '.$news["news_comment"].'

    +



    +
  • '; + } + } + return ($str); +} + +?> diff --git a/public/player.php b/include/player.php similarity index 100% rename from public/player.php rename to include/player.php diff --git a/include/tables.php b/include/tables.php index 3b7bf1473901f6334169d21b41e526544a2c6cc1..2587c68b7b412cbb8c4978c668558b024391b1c1 100644 --- a/include/tables.php +++ b/include/tables.php @@ -4,8 +4,10 @@ $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; diff --git a/public/videos.php b/include/videos.php similarity index 92% rename from public/videos.php rename to include/videos.php index a53a4c33f10e934256d782907bb49c0f2e576ad9..2c3b8026a6bfcf8b0501ec46d58a28be15b9b22a 100644 --- a/public/videos.php +++ b/include/videos.php @@ -1,8 +1,5 @@

    Videos'. $curyear .'

      '; - + $str .= dispVideosYear(); $str .= ' @@ -27,8 +24,8 @@ $str = '

      Années

      '; - - $str .= dispVideosMenu(); + + $str .= dispVideosMenu(); $str .= '
      @@ -61,7 +58,7 @@ function dispVideosMenu(){
    • avant
    • '; - + $str .= '
    • Pour visualiser nos videos: Click-droit, telecharger...

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

      @@ -85,14 +82,14 @@ function dispVideosYear(){ $str = '';//''.$year_page.''; - - if ($_SESSION["user_right"] >= $GLOBALS["PRIV_GUEST"] ) { + + 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"] ) { + 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); @@ -102,12 +99,12 @@ function dispVideosYear(){ $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"); + $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"); } @@ -121,8 +118,8 @@ return ($str); function dispVideosByType($result, $video_type) { - - $str = ' + + $str = ' - +
      @@ -133,10 +130,10 @@ function dispVideosByType($result, $video_type) { '.$video_type.' - +
      @@ -145,40 +142,40 @@ function dispVideosByType($result, $video_type) {
      '; - - + + while ($video = mysql_fetch_array($result)) { - - + + $str .= dispWhenTendu($video["video_tendu"]); $str .= ' - +  '.$video["video_name"].' - + '; - + } - - + + $str .= '
      '; if ($video["video_path_daily"]) { - + $str .= ''; - } - + } + $str .= ' '.$video["video_date"].' '.$video["video_size"].' Mo
      diff --git a/public/videos.php_avecjukebox b/include/videos.php_avecjukebox similarity index 100% rename from public/videos.php_avecjukebox rename to include/videos.php_avecjukebox diff --git a/index.php b/index.php index 6e8266b22a5a381d8403b806011a18b819a91323..5bb1d7e1706510fcc93d8cbaaf940d3b0f722c08 100644 --- a/index.php +++ b/index.php @@ -7,13 +7,14 @@ include "include/tables.php"; include "include/menu.php"; include "include/functions_www.php"; include "include/functions_display.php"; +include "include/connection.php"; +include "include/home.php"; +include "include/news.php"; +include "include/videos.php"; +include "include/members.php"; +include "include/contacts.php"; -include "public/connection.php"; -include "public/home.php"; -include "public/videos.php"; -include "public/members.php"; include "admin/admin_home.php"; -include "public/contacts.php"; // define user right and id if new session if (!$_SESSION["user_right"]) diff --git a/public/forum.php b/public/forum.php deleted file mode 100644 index 7d6bffea9662e025c87210ee174f606aff18a7ab..0000000000000000000000000000000000000000 --- a/public/forum.php +++ /dev/null @@ -1,34 +0,0 @@ -';*/ - -echo ' -
      -
      -
      -

      Forum

      -
        -
      • Patience bordel !
      • -
      -
      - -
      -
      -

      Rien

      -
      -
      -
      -
       
      -
      - - - '; - -} - - -?> \ No newline at end of file diff --git a/public/photos.php b/public/photos.php deleted file mode 100644 index c45c05fda4c1866d97a522e50ee6013b0c98747b..0000000000000000000000000000000000000000 --- a/public/photos.php +++ /dev/null @@ -1,172 +0,0 @@ - -
      -
      -
      -

      Photos'.$curyear.'

      -
        '; - - $str .=dispPhotosYear(); - - $str .= ' -
      -
      - -
      -
      -

      Années

      - '; - - $str .= dispPhotosMenu(); - - $str .= ' -
      -
      -
       
      -
      -'; - - -echo $str; -} - - -function dispPhotosMenu(){ -$str = ''; -$str .= ' - - '; - - return ($str); -} - - -function dispPhotosYear(){ - - if ($_GET['year_page']) { - $year_page = $_GET['year_page']; - } - else - { - $year_page = 2006; - } - - if ($_SESSION["user_right"] >= $GLOBALS["PRIV_GUEST"] ) { - $result_prod = getPhotosByYearAndTypeAndTendu($year_page, "eptvprod", 2); - $result_bonus = getPhotosByYearAndTypeAndTendu($year_page, "eptvbonus", 2); - $result_adm = getPhotosByYearAndTypeAndTendu($year_page, "eptv.adm", 2); - } - else if ($_SESSION["user_right"] >= $GLOBALS["GUEST"] ) { - $result_prod = getPhotosByYearAndTypeAndTendu($year_page, "eptvprod", 1); - $result_bonus = getPhotosByYearAndTypeAndTendu($year_page, "eptvbonus", 1); - $result_adm = getPhotosByYearAndTypeAndTendu($year_page, "eptv.adm", 1); - } - else { - $result_prod = getPhotosByYearAndTypeAndTendu($year_page, "eptvprod", 0); - $result_bonus = getPhotosByYearAndTypeAndTendu($year_page, "eptvbonus", 0); - $result_adm = getPhotosByYearAndTypeAndTendu($year_page, "eptv.adm", 0); - } - - - if (mysql_num_rows($result_prod)) { - $str .= dispPhotosByType($result_prod, " e p t v   p r o d u c t i o n"); - } - - if (mysql_num_rows($result_bonus)) { - $str .= dispPhotosByType($result_bonus, " e p t v   b o n u s"); - } - - if (mysql_num_rows($result_adm)) { - $str .= dispPhotosByType($result_adm, " e p t v . a d m"); - } - - -return ($str); -} - - -function dispPhotosByType($result, $photo_type) { - - $str = ' - - - - -
      - - - - - - - - -
      - - - '.$photo_type.' - - -
      - - - - -
      - - - '; - - while ($photo = mysql_fetch_array($result)) { - - $str .= dispWhenTendu($photo["photo_tendu"]); - - $str .= ' '.$photo["photo_comment"].'\', \'lightgray\')" ONMOUSEOUT="removeBox()"'; - } - $str .= '> - '.$photo["photo_name"].' - - - - - '; - } - -$str .= ' -
      - '.$photo["photo_date"].' - - '.$photo["photo_size"].' Img -
      -
      -
      -
      -
      - '; - - return ($str); - -} - -?> diff --git a/public/photos_show.php b/public/photos_show.php deleted file mode 100644 index 7dc16da04c5510ff65d31aaf1bfc81b7e00da007..0000000000000000000000000000000000000000 --- a/public/photos_show.php +++ /dev/null @@ -1,14 +0,0 @@ -"; -// frame - -} - - -?>