diff --git a/css/default.css b/css/default.css
index 4538282a5081bd903db7b0eb74d81e6778edc832..7a675c7a57a5f9a905d67ebbd5824017de9ef8e2 100644
--- a/css/default.css
+++ b/css/default.css
@@ -270,6 +270,11 @@ div.rightbox h1 {
padding: 0px 0px 0px 5px;
}
+.news_by {
+ color: #6D6C6C;
+ font-style: italic;
+}
+
.news_separator {
margin: 0px 0px 0px -15px;
padding:0;
diff --git a/include/functions_sql.php b/include/functions_sql.php
index c8dca8303bb59bee8e5db8b888d066f0188783cc..a7e0654c5180e2d4f3970a147127dd87c01029ab 100644
--- a/include/functions_sql.php
+++ b/include/functions_sql.php
@@ -12,7 +12,7 @@ function getOneNews($news_id) {
function getLastNews($tendu) {
$tendu = mysql_real_escape_string($tendu);
- $query = "SELECT * FROM $DB.news_db WHERE news_tendu<='$tendu' ORDER BY news_date desc, news_time desc";
+ $query = "SELECT * FROM $DB.news_db INNER JOIN $DB.users_db ON news_db.news_user_id = users_db.user_id WHERE news_tendu<='$tendu' ORDER BY news_date desc, news_time desc";
return mysql_query($query);
}
diff --git a/include/home.php b/include/home.php
index 182ab5ced6b3d1400f429ef74f16e588e786698c..aa6c7fa65cedde25344e9de882225f2623006fa6 100644
--- a/include/home.php
+++ b/include/home.php
@@ -14,7 +14,7 @@ $str = '
Dernières actualités
';
- $str .=dispHomeNews();
+ $str .=dispNewsRows();
$str .= '
@@ -47,41 +47,6 @@ $str = '
echo $str;
}
-function dispHomeNews(){
-
- $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)) {
- for ($cpt = 0; $cpt < 10 && ($news = mysql_fetch_array($result)); $cpt++) {
-
- // 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);
-}
-
function dispHomeEdito(){
$result = getLastEdito();
if (mysql_num_rows($result))
diff --git a/include/news.php b/include/news.php
index 5d207be2f9f60938a924c2078e7162caccf6c0aa..2b500590caba7426fb3c1e818fa29d944686c333 100644
--- a/include/news.php
+++ b/include/news.php
@@ -32,8 +32,7 @@ function dispNewsRows(){
// DISP NEWS CONTENT BY TENDU
$str .= dispWhenTendu($news["news_tendu"]);
-
- $str .= ' - '.$news["news_date"].'
+ $str .= ' - Le '.date("d/m/Y", strtotime($news["news_date"])).' par '.$news["user_pseudo"].'
'.$news["news_comment"].'
';
diff --git a/include/videos.php b/include/videos.php
index f0c11fbb4b02cb73cbf16071f3008c6d29cf2f6c..81dc2106380a3b78ce0bf4d9d7b143284d07c521 100644
--- a/include/videos.php
+++ b/include/videos.php
@@ -124,7 +124,7 @@ function dispVideosByType($result, $video_type) {
if ($video["video_path_daily"])
$str .= '';
- $str .= ''.$video["video_date"].' | '.$video["video_size"].' Mo | ';
+ $str .= ''.date("d/m/Y", strtotime($video["video_date"])).' | '.$video["video_size"].' Mo | ';
}
$str .= '