Newer
Older
<?
function dispHome(){
$str = '
<div id="main_body">
<div class="top_box">
<object width="790" height="168"><param name="movie" value="http://www.dailymotion.com/flash/dmwall/dmwall.swf?feed=/eptv&cols=9&rows=2&slide=0&brand=none"></param><param name="allowscriptaccess" value="always"></param><param name="wmode" value="transparent"></param><embed width="790" height="168" wmode="transparent" allowscriptaccess="always" src="http://www.dailymotion.com/flash/dmwall/dmwall.swf?feed=/eptv&cols=9&rows=2&slide=0&duration=30&brand=none" type="application/x-shockwave-flash" /></object>
</div>
<!-- main body -->
<div id="left_side">
<div id="newsbox">
<h1><img alt="" src="images/puce.png" /> <strong>Dernières actualités</strong></h1>
$str .=dispHomeNews();
$str .= '
</ul></div>
</div>
<div id="right_side">
<div class="rightbox">
<h1><img alt="" src="images/puce.png" /><strong>Edito</strong></h1>
<h1><img alt="" src="images/puce.png" /> <strong>Dernières vidéo</strong></h1>
$str .='
</div>
</div>
<div class="clr"> </div>
</div>
</div>
';
echo $str;
}
function dispHomeNews(){
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 .= '
<li>
<h2><strong>
'.$news["news_title"].'
</strong>';
// DISP NEWS CONTENT BY TENDU
$str .= dispWhenTendu($news["news_tendu"]);
$str .= '
<span class="news_date"> - '.$news["news_date"].'</span></h2>
<p class="news_text">'.$news["news_comment"].'</p>
<p class="news_separator"><br /><img alt="" src="images/corner_20.png" /><br /></p>
</li>';
$result = getLastEdito();
if (mysql_num_rows($result))
$edito = mysql_fetch_array($result);
$str = '<ul>';
$str .= '<li>'.$edito["edito_title"].'</li>';
$str .= '<li><img id="logo_edito" alt="" src="images/edito_logo.png" />'.$edito["edito_comment"].'</li>';
$str .= '</ul>';
if ($_SESSION["user_right"] >= $GLOBALS["PRIV_GUEST"])
$result = getLastVideosByTendu(2);
else if ($_SESSION["user_right"] >= $GLOBALS["GUEST"])
$result = getLastVideosByTendu(1);
else
$result = getLastVideosByTendu(0);
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 .= ' <li><a href="' . $video["video_path"] . ' " class="texte_link"' . '>'.$video["video_name"].'</a></td><td>';
$str .= ' ';
$str .= '<a href="javascript:popup_video_dailymotion(\'?dailymotion='.$video["video_id"].'\')">';
$str .= '<img class="daily_preview" src=\'../images/daily.png\' height="18" border=0 />';
$str .= '</a>';
}
$str .= ' <strong>'.$video["video_size"].' Mo</strong>';
}
$str .= '</ul>';
}