Skip to content
videos.php_avecjukebox 5.55 KiB
Newer Older
Seblu's avatar
Seblu committed
<?

function dispVideos() {


$str = '

	
	<table width="100%">
		<tr>
		 <td height="100%" valign="top">
		<table width="100%" border="0" cellpadding="0" cellspacing="4">
			<tr>
			<td>
			<table width="100%" border="0" cellspacing="0" cellpadding="4">
				<tr>
				<td  width="15%" valign="top">
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
					<td bgcolor="#000000">
				
						<table width="100%" border="0" cellspacing="1" cellpadding="2">
							<tr>
							<td bgcolor="#000000">
								<b>
								<font color="#ffffff">
								&nbsp;v i d e o s&nbsp;
								</font> 
								</b> 
							</td>
							</tr>
							<tr>
							<td bgcolor="#d3d3df">
							<table width="100%" cellpadding="2" cellspacing="2" align="center">
							';

$str .= dispVideosMenu();

$str .= '						
							</table>
							</td>
							</tr>
						</table>
					
					</td>
					</tr>
				</table>
				</td>
				
				<td  width="85%" valign="top">
				';

			

$str .= dispVideosYear();

$str .= '
				</td>
				</tr>
			</table>
			</td>
			</tr>
		</table>		
		</td>
		</tr>
					
	</table>';


echo $str;
}


function dispVideosMenu(){

	$str = '';

	$str .= '
		<TR>
		<TD width="100%" align="center">
		<a href="index.php?section=Videos&year_page=2006" class="texte_link">2006</a>
		</TD>
		</TR>

		<TR>
		<TD width="100%" align="center">
		<a href="index.php?section=Videos&year_page=2005" class="texte_link">2005</a>
		</TD>
		</TR>

		<TR>
		<TD width="100%" align="center">
		<a href="index.php?section=Videos&year_page=2004" class="texte_link">2004</a>
		</TD>
		</TR>
	
		<TR>
		<TD width="100%" align="center">
		<a href="index.php?section=Videos&year_page=2003" class="texte_link">2003</a>
		</TD>
		</TR>

		<TR>
		<TD width="100%" align="center">
		<a href="index.php?section=Videos&year_page=2002" class="texte_link">2002</a>
		</TD>
		</TR>
					
		<TR>
		<TD width="100%" align="center">
		<a href="index.php?section=Videos&year_page=2001" class="texte_link">2001</a>
		</TD>
		</TR>

		<TR>
		<TD width="100%" align="center">
		<a href="index.php?section=Videos&year_page=2000" class="texte_link">Avant</a>
		</TD>
		</TR>';
						
	$str .= '
		<TR><TD> <hr width="90%"> </TD></TR>
		<TR>
		<TD width="100%" align="left">
		<small><p>Pour visualiser nos videos: Click-droit, telecharger...</p>
		<p>Nous vous conseillons le lecteur <a href="http://www.videolan.org/vlc" target="blank">VLC</a> disponible sous Windows/Mac/Linux.</p></small>
		</TD>
		</TR>
	';

	return ($str);
}


function dispVideosYear(){

	if ($_GET['year_page']) {
		$year_page = $_GET['year_page'];
	}
	else
	{
		$year_page = 2006;
	}

	$str = '<B>'.$year_page.'</B>	<IFRAME id="dm_jukebox_iframe" style="overflow:hidden; margin:0; padding:0; width: 100%; height: 250px;"
width="100%" align="center" frameborder="0" marginwidth="0" marginheight="0"
src="http://www.dailymotion.com/widget/jukebox?list[]=%2Fgroup%2F12388&skin=glossyblack"></IFRAME><br/>';
	

	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, "&nbsp;e p t v &nbsp; p r o d u c t i o n");	
	}
	
	if (mysql_num_rows($result_bonus)) {
		$str .= dispVideosByType($result_bonus, "&nbsp;e p t v &nbsp b o n u s");
	}
	if (mysql_num_rows($result_adm)) {
		$str .= dispVideosByType($result_adm, "&nbsp;e p t v . a d m");
	}


return ($str);
}


function dispVideosByType($result, $video_type) {
 
	$str = '		
<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr>
		<td bgcolor="#000000">
		<table width="100%" border="0" cellspacing="1" cellpadding="2">
			<tr>
			<td>
				<b>
				<font color="#ffffff">
				'.$video_type.'
				</font>
				</b> 
			</td>
			</tr>
						
			<tr>
			<td bgcolor="#d3d3df">
			<table cellpadding="0" cellspacing="0" width="100%">
				<tr>
				<td>
				<table width="100%" border="0" cellspacing="0" cellpadding="4">

		';

	
		while ($video = mysql_fetch_array($result)) {
 
	
			$str .= dispWhenTendu($video["video_tendu"]);

			$str .= '
		
				<a href="
					'.$video["video_path"].'
					" class="texte_link" ';
					
			if ($video["video_comment"]) {
			$str .= '	ONMOUSEOVER="popup(\'<font>'.$video["video_comment"].'</font>\', \'lightgray\')" ONMOUSEOUT="removeBox()"';
			}			
			$str .= '>
					'.$video["video_name"].'
				</TD>
				<TD>';
			if ($video["video_path_daily"]) {
			$str .= '<a href=\'dailymotion.php?q='.$video["video_path_daily"].'\' onclick="return popitup(this, \'EPTV\')" >
Seblu's avatar
Seblu committed
			<img src=\'http://www.dailymotion.com/favicon.ico\' height=15 border=0></a>';
			}	
			$str .= '</TD>
				<TD>
					'.$video["video_date"].'
				</TD>
			
				<TD align=center>
					'.$video["video_size"].' Mo
				</TD>
			</TR>';
			

		}
			
		

$str .= '
					</table>
					</td>
					</tr>
				</table>
				</td>
				</tr>
			</table>
			</td>
			</tr>
		</table>
		<br>
	';

	return ($str);

}

?>