예제 #1
0
    function flashhtml()
    {
        global $setctl, $phpenv, $u_cookieid, $u_id, $cfg;
        kprintheader('');
        $result = db_execquery('SELECT sid FROM ' . TBL_TEMPLIST . ' WHERE uid = ' . $u_id . ' ORDER BY rid ASC');
        while ($row = db_fetch_row($result)) {
            $this->xml_link($row[0], false);
        }
        $width = $cfg['jw_window_x'] - 20;
        $height = $cfg['jw_window_y'] - 10;
        $imgheight = round($cfg['jw_window_y'] / 2);
        $jsdata = '';
        for ($i = 0, $c = count($this->items); $i < $c; $i++) {
            $jsdata .= '{ ';
            if (strlen($this->items[$i][0]) > 0) {
                $jsdata .= 'image: "' . $this->items[$i][0] . '", ';
            }
            $jsdata .= 'file: \'' . $this->items[$i][1] . '\', title: \'' . str_replace('"', '\\"', $this->items[$i][2]) . '\', provider:\'sound\'}';
            if ($i + 1 < $c) {
                $jsdata .= ',';
            }
        }
        ?>

		<script type="text/javascript" src="<?php 
        echo $cfg['jw6_url'];
        ?>
"></script>
		<div id="mediaplayer"><?php 
        echo get_lang(253);
        ?>
</div>

		<script type="text/javascript">
		jwplayer("mediaplayer").setup({
			flashplayer: "/jwplayer-5/jwPlayer5/player.swf",
			'plugins': {
				'/jwplayer-5/jwPlayer5/spectrumvisualizer-1.swf': {
					effect: "reflection",
					xlen: 500,
					ylen: 150
				}
			},
			'skin': '/jwplayer-5/jwPlayer5/stormtrooper.zip',
			"viral.allowmenu": false,
			"viral.onpause": false,
			"viral.oncomplete": false,
			autostart: true,
			"controlbar.position": "bottom",
			"controlbar.forcenextprev": true,
			height: <?php 
        echo $height;
        ?>
,
			width: <?php 
        echo $width;
        ?>
,
			"playlist.position": "bottom",
		        "playlist.size": 360,
			"player.fullscreen": false,
			'playlist': [
				<?php 
        echo $jsdata;
        ?>
			],
			repeat: 'list'
		});
		</script>	
	
		<?php 
        kprintend();
    }
예제 #2
0
    function flashhtml()
    {
        global $setctl, $phpenv, $u_cookieid, $u_id, $cfg;
        kprintheader('');
        $result = db_execquery('SELECT sid FROM ' . TBL_TEMPLIST . ' WHERE uid = ' . $u_id . ' ORDER BY rid ASC');
        while ($row = db_fetch_row($result)) {
            $this->xml_link($row[0], false);
        }
        $width = $cfg['jw_window_x'] - 20;
        $height = $cfg['jw_window_y'] - 10;
        $imgheight = round($cfg['jw_window_y'] / 2);
        $jsdata = '';
        for ($i = 0, $c = count($this->items); $i < $c; $i++) {
            $jsdata .= '{ ';
            if (strlen($this->items[$i][0]) > 0) {
                $jsdata .= 'image: "' . $this->items[$i][0] . '", ';
            }
            $jsdata .= 'sources: [ { file: "' . $this->items[$i][1] . '", type: "' . $this->items[$i][3] . '" } ], title: "' . str_replace('"', '\\"', $this->items[$i][2]) . '", description: "' . $this->items[$i][4] . '" }';
            if ($i + 1 < $c) {
                $jsdata .= ',';
            }
        }
        ?>

		<script type="text/javascript" src="<?php 
        echo $cfg['jw6_url'];
        ?>
"></script>
		<div id="jw6id"><?php 
        echo get_lang(253);
        ?>
</div>

		<script type="text/javascript">
		jwplayer("jw6id").setup({
			autostart: true,
			height: <?php 
        echo $height;
        ?>
,
			width: <?php 
        echo $width;
        ?>
,
			listbar: {
				position: 'bottom',
				size: 200
			},
			playlist: [
				<?php 
        echo $jsdata;
        ?>
			]
		});
		</script>	
	
		<?php 
        kprintend();
    }
예제 #3
0
파일: index.php 프로젝트: Git-Host/AMPPS
    function flashhtml_enqueue()
    {
        global $setctl, $phpenv, $u_cookieid, $u_id, $cfg;
        kprintheader('', 0, 0, 'createPlayer();');
        $playlist = $setctl->get('streamurl') . $phpenv['streamlocation'];
        $playlist .= '?templist=' . $u_id . '&c=' . $u_cookieid . '&file=' . lzero(getrand(1, 999999), 6) . '.xml';
        $playlist = urlencode($playlist);
        $width = $cfg['jw_window_x'] - 20;
        $height = $cfg['jw_window_y'] - 20;
        $imgheight = round($height / 2);
        $link = $cfg['jw_urls']['swf'];
        ?>
		<script type="text/javascript" src="<?php 
        echo $cfg['jw_urls']['js'];
        ?>
"></script>
		<script type="text/javascript">
		<!--
	
		var xmlhttp;
		var xmlDoc;

		function loadXMLDoc(theFile) 
		{
			xmlhttp=null;
			if (window.XMLHttpRequest) 
			{
				xmlhttp = new XMLHttpRequest(); 
			} else 
			if (window.ActiveXObject) 
			{ 
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 
			}

			if (xmlhttp != null)
			{
				xmlhttp.onreadystatechange = loaded;
				xmlhttp.open("GET",theFile,true);
				xmlhttp.send(null);
			} 
			else 
			{
				alert('Sorry, your browser can\'t handle this script'); 
				return;
			}
		}

		function checkReadyState(obj) 
		{
			if(obj.readyState == 4) 
			{
				if(obj.status == 200) 
				{ 
					return true; 
				} else 
				{ 
					alert("Problem retrieving XML data"); 
				}
			}
		}

		function loaded() 
		{	
			if(checkReadyState(xmlhttp)) 
			{
				xmlDoc=xmlhttp.responseXML.documentElement;
				showTags('track');
			}
		}

		function showTags(theTag) 
		{
			function getTag(tag) 
			{
				var tmp='';
				xx=x[i].getElementsByTagName(tag);
				try 
				{ 
					tmp=xx[0].firstChild.data; 
				}
				catch(er) 
				{ 
					tmp=''; 
				}
				return(tmp);
			}

			var xx; var x; var txt;
			x = xmlDoc.getElementsByTagName(theTag);
			for (i=0; i<x.length; i++) 
			{
				addItem('mpl',{file: decodeURIComponent(getTag("location")), image: decodeURIComponent(getTag("image")), title: getTag("title"), author: getTag("creator")});
			}
		}

		function createPlayer() 
		{
			var s1 = new SWFObject('<?php 
        echo $link;
        ?>
','mpl','<?php 
        echo $width;
        ?>
','<?php 
        echo $height;
        ?>
','8');
			s1.addParam("allowfullscreen", "true");
			s1.addParam('allowscriptaccess','always');			
			s1.addVariable('height',<?php 
        echo $height;
        ?>
);
			s1.addVariable('width',<?php 
        echo $width;
        ?>
);
			s1.addVariable('displayheight',<?php 
        echo $imgheight;
        ?>
);			
			s1.addVariable("enablejs", "true");
			s1.addVariable("javascriptid", "kPlayer");
			s1.addVariable('searchbar','false');
			s1.addVariable('autostart','true');
			s1.addVariable('repeat','list');
			s1.addVariable('shuffle','false');
			s1.addVariable('file','<?php 
        echo $playlist;
        ?>
');
			s1.write('player1');
		}

		function thisMovie(swf) 
		{
			if(navigator.appName.indexOf("Microsoft") != -1)
			{
				return window[swf];
			} 
			else 
			{
				return document[swf];
			}
		}

		function loadFile(swf,obj) 
		{ 
			thisMovie(swf).loadFile(obj); 
		}
			
		function addItem(swf, obj, idx)
		{
			thisMovie(swf).addItem(obj, idx);
		}
		
		-->
		</script>

		<p id="player1"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</p>

		<?php 
        kprintend();
    }