diff options
Diffstat (limited to 'contrib/www/2012')
-rw-r--r-- | contrib/www/2012/embed.php | 2 | ||||
-rw-r--r-- | contrib/www/2012/init.php | 16 | ||||
-rw-r--r-- | contrib/www/2012/player.php | 12 | ||||
-rw-r--r-- | contrib/www/2012/style.css | 2 |
4 files changed, 25 insertions, 7 deletions
diff --git a/contrib/www/2012/embed.php b/contrib/www/2012/embed.php index c13cc7e..ac8f97a 100644 --- a/contrib/www/2012/embed.php +++ b/contrib/www/2012/embed.php @@ -13,7 +13,7 @@ <body> <center> <?php -$EMBED=1; +$EMBED=2; require_once('player.php'); ?> </center> diff --git a/contrib/www/2012/init.php b/contrib/www/2012/init.php index 2bafd52..4afba69 100644 --- a/contrib/www/2012/init.php +++ b/contrib/www/2012/init.php @@ -11,7 +11,13 @@ if (($browser['name'] == 'firefox' && $browser['majorver'] >= 4) || $DEFAULT_MODE = 'html5'; } -$PROFILE= isset($_GET['profile']) ? $_GET['profile'] : 'medium'; +if ( isset($EMBED) && $EMBED >= 2 ) { + $DEFAULT_PROFILE = 'low'; +} else { + $DEFAULT_PROFILE = 'medium'; +} + +$PROFILE= isset($_GET['profile']) ? $_GET['profile'] : $DEFAULT_PROFILE; switch($PROFILE) { case 'high': { $WIDTH = 1280; $HEIGHT = 720; break; } case 'low': { $WIDTH = 640; $HEIGHT = 360; break; } @@ -31,6 +37,7 @@ switch($MODE) { } $URL_BASE = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']; +$URL_BASE_IDX = str_replace("embed.php", "index.php", $URL_BASE); $URL_FLASH = $URL_BASE . "?mode=flash&src=$SRC&profile=$PROFILE"; $URL_HTML5 = $URL_BASE . "?mode=html5&src=$SRC&profile=$PROFILE"; @@ -39,12 +46,15 @@ $URL_ORIG = $URL_BASE . "?mode=$MODE&src=av-orig&profile=$PROFILE"; $URL_EN = $URL_BASE . "?mode=$MODE&src=av-en&profile=$PROFILE"; if ( isset($EMBED) ) { - $URL_BASE_IDX = str_replace("embed.php", "index.php", $URL_BASE); $URL_HIGH = $URL_BASE_IDX . "?mode=$MODE&src=$SRC&profile=high"; } else { $URL_HIGH = $URL_BASE . "?mode=$MODE&src=$SRC&profile=high"; } -$URL_MEDIUM = $URL_BASE . "?mode=$MODE&src=$SRC&profile=medium"; +if ( isset($EMBED) && $EMBED >= 2 ) { + $URL_MEDIUM = $URL_BASE_IDX . "?mode=$MODE&src=$SRC&profile=medium"; +} else { + $URL_MEDIUM = $URL_BASE . "?mode=$MODE&src=$SRC&profile=medium"; +} $URL_LOW = $URL_BASE . "?mode=$MODE&src=$SRC&profile=low"; diff --git a/contrib/www/2012/player.php b/contrib/www/2012/player.php index ddcef1a..cb9edba 100644 --- a/contrib/www/2012/player.php +++ b/contrib/www/2012/player.php @@ -38,7 +38,11 @@ switch($PROFILE) { case 'high': { echo " <span class='selected'>high</span>"; - echo " <span><a href='$URL_MEDIUM'>medium</a></span>"; + if ( isset($EMBED) && $EMBED >= 2 ) { + echo " <span><a href='$URL_MEDIUM' target='_parent'>medium</a></span>"; + } else { + echo " <span><a href='$URL_MEDIUM'>medium</a></span>"; + } echo " <span><a href='$URL_LOW'>low</a></span>"; break; } @@ -58,7 +62,11 @@ } else { echo " <span><a href='$URL_HIGH'>high</a></span>"; } - echo " <span><a href='$URL_MEDIUM'>medium</a></span>"; + if ( isset($EMBED) && $EMBED >= 2 ) { + echo " <span><a href='$URL_MEDIUM' target='_parent'>medium</a></span>"; + } else { + echo " <span><a href='$URL_MEDIUM'>medium</a></span>"; + } echo " <span class='selected'>low</span>"; break; } diff --git a/contrib/www/2012/style.css b/contrib/www/2012/style.css index 299df44..987d9bd 100644 --- a/contrib/www/2012/style.css +++ b/contrib/www/2012/style.css @@ -46,5 +46,5 @@ td span.selected { } table#footer td { - padding: 0.3em 1em; + padding: 0.3em 0.5em; } |