All pastes #990108 Raw Edit

Someone

public php v1 · immutable
#990108 ·published 2008-04-19 23:44 UTC
rendered paste body
<?phpinclude("shoutcast.class.php");if (isset($_GET['t'])) {echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><meta http-equiv="refresh" content="30"/><title>RMRK Radio</title></head><style type="text/css">body {font-family:\'Myriad Pro\',\'trebuchet ms\',arial,sans-serif;font-size:14px;}.head {font-weight: bold;font-size: 20px;}a {border: none;text-decoration: none;}a img {border: none;}</style>';if (($_GET['t']) == "11") {echo '<style type="text/css">body {background: #2D2A3C;color: #ffffff}</style>';}elseif (($_GET['t']) == "14") {echo '<style type="text/css">body {background: #FFE7F7;color: #85465D}</style>';}elseif (($_GET['t']) == "18") {echo '<style type="text/css">body {color: #ffffff}</style>';}}else die('Error: Missing parameters');function ConvertSeconds($seconds) {	$tmpseconds = substr("00".$seconds % 60, -2);	if ($seconds > 59) {		if ($seconds > 3599) {			$tmphours = substr("0".intval($seconds / 3600), -2);			$tmpminutes = substr("0".intval($seconds / 60 - (60 * $tmphours)), -2);						return ($tmphours.":".$tmpminutes.":".$tmpseconds);		} else {			return ("00:".substr("0".intval($seconds / 60), -2).":".$tmpseconds);		}	} else {		return ("00:00:".$tmpseconds);	}}$shoutcast = new ShoutCast();$shoutcast->host = "localhost";$shoutcast->port = 8000;$shoutcast->passwd = "";if ($shoutcast->openstats()) {	if ($shoutcast->GetStreamStatus()) {		echo "<b class=\"head\">RMRK Radio is up!</b> (Current listeners: ".$shoutcast->GetCurrentListenersCount().", peak: ".$shoutcast->GetPeakListenersCount().")<br /><br />				<a href=\"http://rmrk.net:8000/listen.pls\"><img src=\"http://rmrk.net/src/plw.png\" alt=\"Play in Winamp\" /></a>&nbsp;&nbsp;		<a href=\"http://rmrk.net/src/ra/\" target=\"_blank\" \"onclick=\"window.open('http://rmrk.net/src/ra/','RMRK Radio','width=550,height=400,left='+(screen.availWidth/2-550)+',top='+(screen.availHeight/2-400)+'');return false;\"><img src=\"http://rmrk.net/src/plb.png\" alt=\"Play in Browser\" /></a>&nbsp;&nbsp;		<a href=\"http://rmrk.net/index.php?action=dlattach;topic=13201.0;attach=11280\"><img src=\"http://rmrk.net/src/rpl.png\" alt=\"Get RMRK Standalone Player\" /></a><br />		";				echo "<table border=0 cellpadding=0 cellspacing=0>\n";		echo "<tr><td><b>Current Song: </b></td><td>".$shoutcast->GetCurrentSongTitle()."</td></tr>\n";		echo "<tr><td><b>BitRate: </b></td><td>".$shoutcast->GetBitRate()."</td></tr><tr><td colspan=2>&nbsp;</td></tr>\n";				echo "<tr><td><b>Average listen time: </b></td><td>".ConvertSeconds($shoutcast->GetAverageListenTime())."</td></tr>";		echo "</table><p>";				echo "<b>Song history;</b><br>\n";		$history = $shoutcast->GetSongHistory();		if (is_array($history)) {			for ($i=0;$i<sizeof($history);$i++) {				echo "[".$history[$i]["playedat"]."] - ".$history[$i]["title"]."<br>\n";			}		} else {			echo "No song history available..";		}		echo "<p>";				echo "";		$listeners = $shoutcast->GetListeners();		if (is_array($listeners)) {						}		} else {			echo "<b class=\"head\">There isn't any broadcast available right now, sorry! =(</b> ";		}	} else {		echo "<b class=\"head\">There isn't any broadcast available right now, sorry! =(</b>";			}?>