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>';
}
function dispHomeEdito(){
$result = getLastEdito();
if (mysql_num_rows($result)){
$str = '
<ul>
<li>'.$edito["edito_title"].'</li>
<li><img id="logo_edito" alt="" src="images/edito_logo.png" />'.$edito["edito_comment"].'</li>
</ul>';
return ($str);
}
function dispHomeLastVideos(){
if ($_SESSION["user_right"] >= $GLOBALS["PRIV_GUEST"] ) {
else if ($_SESSION["user_right"] >= $GLOBALS["GUEST"] ) {
$result = getLastVideosByTendu(1);
}
else {
$result = getLastVideosByTendu(0);
}
$str = '<ul>';
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 .= ' <a href=\'public/dailymotion.php?q='.$video["video_path_daily"].'\' onclick="return popitup(this, \'EPTV\')" >
<img class="daily_preview" src=\'../images/daily.png\' height="18" border=0></a>';