Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Bėda su panele

Parašė -· 2008 Lie. 5 18:07:07
#6

openside("RADIJAS");
?>
error_reporting(0);
$scdef = "Šiuo metu radija yra išjungta!";               // Default station name to display when server or stream is down
$scip = "89.249.88.137"; // ip or url of shoutcast server (DO NOT ADD HTTP:// don't include the port)
$scport = "8002";                   // port of shoutcast server
$scpass = "adsfsdfsdfsdf";                 // NELYSK ETERIN!
$maxusers = "100"; // :)
//End configuration
error_reporting(0);
$scsuccs = NULL;
$page = NULL;
include('config_radio.php');  //you may edit this path to fit your server environment otherwise leave it alone
$scfp = fsockopen("$scip", $scport, &$errno, &$errstr, 30);
 if(!$scfp) {
  $scsuccs=1;
echo''.$scdef.' ';
 }
if ($scsuccs != 1) {
 fputs($scfp,"GET /admin.cgi?pass=$scpass&mode=viewxml HTTP/1.0\r\nUser-Agent: SHOUTcast Song Status (Mozilla Compatible)\r\n\r\n");
 while(!feof($scfp)) {
  $page .= fgets($scfp, 1000);
 }
######################################################################################################################
/////////////////////////part 1 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
//define  xml elements
 $loop = array("STREAMSTATUS", "BITRATE", "SERVERTITLE", "CURRENTLISTENERS", "AIM");
 $y=0;
 while (isset($loop[$y])) {
  $pageed = ereg_replace(".*<$loop[$y]>", "", $page);
  $scphp = strtolower($loop[$y]);
  $$scphp = ereg_replace("</$loop[$y]>.*", "", $pageed);
  if (($loop[$y] == "SERVERGENRE") || ($loop[$y] == "SERVERTITLE") || ($loop[$y] == "SONGTITLE") || ($loop[$y] == "SERVERTITLE") || ($loop[$y] == "AIM"))
   $$scphp = urldecode($$scphp);

// uncomment the next line to see all variables
// echo'$'.$scphp.' = '.$$scphp.'<br>';
  $y++;
 }
//end intro xml elements
######################################################################################################################
######################################################################################################################
/////////////////////////part 2\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
//get song info and history
 $pageed = ereg_replace(".*<SONGHISTORY>", "", $page);
 $pageed = ereg_replace("<SONGHISTORY>.*", "", $pageed);
 $songatime = explode("<SONG>", $pageed);
 $r=1;
 while (isset($songatime[$r])) {
  $t=$r-1;
  $playedat[$t] = ereg_replace(".*<PLAYEDAT>", "", $songatime[$r]);
  $playedat[$t] = ereg_replace("</PLAYEDAT>.*", "", $playedat[$t]);
  $song[$t] = ereg_replace(".*<TITLE>", "", $songatime[$r]);
  $song[$t] = ereg_replace("</TITLE>.*", "", $song[$t]);
  $song[$t] = urldecode($song[$t]);
  $dj[$t] = ereg_replace(".*<SERVERTITLE>", "", $page);
  $dj[$t] = ereg_replace("</SERVERTITLE>.*", "", $pageed);
$r++;
 }
 $daina = str_replace('_',' ',substr ($song[0],0,90));
//end song info

fclose($scfp);
}

//display stats
if($streamstatus == "1"){
switch ($aim) {
    case 'WiNALL': $aimlogo = "Serveris"; break;
 case 'Serveris': $aimlogo = "Serveris"; break;
case 'DJ_Deivis': $aimlogo = "deivis"; break;

  case 'Saulius': $aimlogo = "Saulius"; break;
 default:  $aimlogo = "dj";
}
$_SESSION['djus'] = $aim;
echo'
   <p align="center">
   <font face="Tahoma" style="font-size: 8pt" color="#8E1715"><b>Eteryje:</b></font>
   <font face="Tahoma" style="font-size: 8pt" color="#ffffff">'.$aim.'</font></td>
  </tr>
  <tr>
   <td height="17">
   <p align="center">
   <font face="Tahoma" style="font-size: 8pt" color="#8E1715"><b>Dabar eteryje groja:</b></font>
  <marquee behavior="right"><font face="Arial" style="font-size: 8pt" color="#ffffff">'.$daina.'</font></td></marquee></p>

  </tr>
  </tr>
  </table>
                 </div>
';

}
if($streamstatus == "0")
{
echo'<font size="2" face="tahoma" color="#6C6D7B">Šiuo metu radija yra išjungta.</font>';
}

/*
* Procentai isreiksti grafiskai
* Pavyzdys: Internetines radijos dabartiniai klausytojai
* Yra maksimalus leistinas klausytoju skaicius ir dabar besiklausanciu procentali israiska grafiskai
*/
$pavadinimas = ""; //pavadinimas

$ko = "Klausytojų:"; //vienetas (pvz: Lt.)


//paveiksleliu nustatymai
$bg_pic = "http://img340.imageshack.us/img340/2239/loadbarbgnc2.gif"; //fono paveiksliukas (neaktyvi zona)
$nulis_pic = "http://img340.imageshack.us/img340/2239/loadbarbgnc2.gif"; //rodomoas paveiksliukas jei rezultatas lygus 0% (pvz jei nera klausytoju)
$mazas_pic = "http://img340.imageshack.us/img340/456/loadbargreenyk1.gif"; //uzsidengiantis paveiksliukas (zalia)
$vidutinis_pic = "http://img230.imageshack.us/img230/3815/loadbaryellowue2.gif"; //Kai vidutine procentu israiska (geltona)
$didelis_pic = "http://img403.imageshack.us/img403/8008/loadbarreduh0.gif"; //Kai arti arba lygu 100 procentu (raudona)


//pagrindiniai veiksmai
$procentai = (int)round((100 * $currentlisteners) / $maxusers);
$width = $procentai; //paveiksliuko plotis procentaliai
if ($procentai <= 1) {$pic = $nulis_pic; $width = "100";}
elseif ($procentai <= 40) { $pic = $mazas_pic; }
elseif ($procentai <= 80) { $pic = $vidutinis_pic; }
elseif ($procentai <= 100) { $pic = $didelis_pic; }
else { $pic = $didelis_pic; $width = "100"; } //jei daugiau nei 100%

//atvaziduojam lentele su rezultatais
echo "<center><b> $ko  ".$currentlisteners."";
echo "<center><b>".$pavadinimas."</b><table class=main border=0 width=160><tr><td style='padding: 0px; background-image: url(".$bg_pic."); background-repeat: repeat-x'>";
echo "<img height=15 width=\"".$width."%\" src=\"$pic\" alt='$currentlisteners'><br><font size='1'><center>".$procentai."%</center></font></td></tr></table>";
?>
<html><center>
<a href="http://84.32.116.110:8002/listen.pls"><img src="http://www.bumsoradijas.lt/radioinfo/klausyt.gif" border="0" alt="OGline.Net"/></a><br/></center>
<center><b>Hosted by OGline.net</b><br><a href="http://bumsoradijas.lt">www.BumsoRadijas.lt</a><br></center>

</html>
<?


closeside();



nzn man atrodo taip Tinka ????

Redagavo -· 2008 Lie. 5 18:07:52