Commit dd5b961b authored by Seblu's avatar Seblu

include javascript into default eptv page

dailymotion link is now functionnal
parent b82a6043
<?php
function getDailymotion($url) {
die("Unavailable!");
echo '<html><head><title>EPTV - Dailymotion Publication</title></head><div style="margin:-10px;"><object width="512" height="418"><param name="movie" value="';
echo $url;
echo '&colors=background:000000;glow:595959;foreground:CACCCB;special:59D424;&related=0"></param><param name="allowfullscreen" value="true"></param><embed src="';
echo $url;
echo '&v3=1&colors=background:000000;glow:595959;foreground:CACCCB;special:59D424;&related=0" type="application/x-shockwave-flash" width="512" height="418" allowfullscreen="true">
function getDailymotion() {
// get video indentifier
$result = getOneVideo($_GET['dailymotion']);
if (mysql_num_rows($result)) {
$video = mysql_fetch_array($result);
echo '<html><head><title>EPTV - Dailymotion - '.$video["video_name"].'</title></head><div style="margin:-10px;"><object width="512" height="418"><param name="movie" value="';
echo $video["video_path_daily"];
echo '&colors=background:000000;glow:595959;foreground:CACCCB;special:59D424;&related=0"></param><param name="allowfullscreen" value="true"></param><embed src="';
echo $video["video_path_daily"];
echo '&v3=1&colors=background:000000;glow:595959;foreground:CACCCB;special:59D424;&related=0" type="application/x-shockwave-flash" width="512" height="418" allowfullscreen="true">
</embed></object></div></html>';
}
else
die("No video found with this identifier!");
return;
}
?>
\ No newline at end of file
......@@ -42,8 +42,9 @@ function getAllEdito(){
function getOneVideo($vid_id){
$vid_id = mysql_real_escape_string($vid_id);
$query = "select * from $DB.videos_db WHERE video_id = '$vid_id'";
return $result = mysql_query($query);
return mysql_query($query);
}
......
......@@ -113,8 +113,10 @@ function dispHomeLastVideos(){
$str .= '&nbsp;<li><a href="' . $video["video_path"] . ' " class="texte_link"' . '>'.$video["video_name"].'</a></td><td>';
if ($video["video_path_daily"]) {
$str .= '&nbsp;&nbsp;&nbsp;<a href=?dailymotion='.$video["video_id"].' target="_blank">
<img class="daily_preview" src=\'../images/daily.png\' height="18" border=0></a>';
$str .= '&nbsp;&nbsp;&nbsp;';
$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 .= '&nbsp;&nbsp;&nbsp;<strong>'.$video["video_size"].' Mo</strong>';
}
......
<script language="JavaScript">
<!--
function popup_video_dailymotion(url) {
window.open(url, '', 'width=510,height=418,toolbar=no,directories=no,status=no,menubar=no,location=no,scrollbars=no,resizable=yes');
}
-->
</script>
......@@ -38,6 +38,7 @@ function dispHeader() {
echo '<style type="text/css" media="screen" title="EPTV Default">';
echo '@import url(css/default.css);';
echo '</style>';
include 'script.js';
echo '</head>';
}
......@@ -47,8 +48,6 @@ function dispBody() {
echo '<basefont face="lucida" />';
echo '<div id="main_container">';
echo '<div id="main_header_home">';
echo '<div id="menu_left"></div>';
echo '<div id="menu_right"></div>';
dispMenu();
echo '</div>';
dispSection();
......
......@@ -49,7 +49,7 @@ if ($_GET['video'])
// Dailymotion playback
if ($_GET['dailymotion'])
return getDailymotion($_GET['dailymotion']);
return getDailymotion();
// Display section
getSection();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment