Parašė dknight· 2009 Spa. 26 22:10:38
#1
kaip uzkelti eterio panele ant banerio kaip hot fm sone ant banerio?
va theme jei galit padekyt
<?php
if (!defined("IN_FUSION")) { die("Access Denied"); }
require_once INCLUDES."theme_functions_include.php";
define("THEME_BULLET", "<img src='".THEME."images/bullet.gif' alt=''>");
// theme settings
function render_page($license=false) {
global $settings;
echo "<table border='0' width='100%' cellspacing='0' cellpadding='0' height='183'>
<tr>
<td>
<table border='0' width='100%' id='table2' cellspacing='0' cellpadding='0'>
<tr>
<td width='36' height='183'>
<img border='0' src='".THEME."images/links.jpg' width='205' height='183'></td>
<td background='".THEME."images/mitte.jpg' height='183'>
<p align='center'>
<img src='http://img132.imageshack.us/img132/9288/catsem.jpg' align='center'><br>
<center>
<a href='http://78.63.189.187:8002/listen.pls'><img src='http://img29.imageshack.us/img29/6118/winampas.jpg' border='0' /></a>
</center>
<td width='36' height='150'>
<img border='0' src='".THEME."images/rechts.jpg' width='205' height='183'></td>
</tr>
</table>
</td>
</tr>
</table>
<table class='center'>
<tr>
<td class='white-header center'>".showsublinks(" ".THEME_BULLET." ", "white")."</td>
</tr>
<table>
<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td width=\"0\" style='background: url(".THEME."images/b_left.jpg);'></td>
<td>\n";
echo "<table border='0' cellspacing='0' width='100%' cellpadding='0'><tr>";
echo "<td class='nav-right'>";
echo "</td></tr></table>";
echo "<table width='100%' cellspacing='0' cellpadding='0' class='tablebreak'>\n<tr>\n";
if (LEFT) { echo "<td class='side-border-left' valign='top'>".LEFT."</td>"; }
echo "<td class='main-bg' valign='top'>".U_CENTER.CONTENT.L_CENTER."</td>";
if (RIGHT) { echo "<td class='side-border-right' valign='top'>".RIGHT."</td>"; }
//footer
echo " <table border='0' width='100%' id='table1' cellspacing='0' cellpadding='0'>
<tr>
<td width='22' height='29'>
<img border='0' src='".THEME."images/border-tleft.gif' width='22' height='29'></td>
<td background='".THEME."images/border-tmain.gif' height='29'></td>
<td width='22' height='29'>
<img border='0' src='".THEME."images/border-tright.gif' width='22' height='29'></td>
</tr>
</table>
<table border='0' width='100%' id='table2' cellspacing='0' cellpadding='0'>
<tr>
<td background='".THEME."images/border-left.gif' width='22'></td>
<td>
<p align='center'><font color='#FFFFFF'>sukure Faina and by </font> <a href='' target='_blank' title='' class='white'>
<span style='text-decoration: none'></span></a>
<font color='#FFFFFF'>
</font> <a href='' target='_blank' title='' class='white'>
<span style='text-decoration: none'>Darkangell</span></a>
<font color='#FFFFFF' </font>
<a href=''>
<span style='text-decoration: none; font-weight: 700'></span></a></td>
<td background='".THEME."images/border-right.gif' width='22'></td>
</tr>
</table>
<table border='0' width='100%' id='table3' cellspacing='0' cellpadding='0'>
<tr>
<td width='22' height='17'>
<img border='0' src='".THEME."images/border-bleft.gif' width='22' height='17'></td>
<td background='".THEME."images/border-bmain.gif' height='17'></td>
<td width='22' height='17'>
<img border='0' src='".THEME."images/border-bright.gif' width='22' height='17'></td>
</tr>
</table>\n";
}
function render_news($subject, $news, $info) {
global $locale;
echo "<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='pan-left'><img src='".THEME."images/blank.gif' width='22' height='29' alt=''></td>
<td width='100%' class='pan-main'>$subject</td>
<td class='pan-right'><img src='".THEME."images/blank.gif' width='22' height='29' alt=''></td>
</tr>
</table>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='border-left tablebreak'><img src='".THEME."images/blank.gif' width='5' height='1' alt=''></td>
<td class='main-body'>
<div style='width:100%;vertical-align:top;'>$news</div>
<div style='margin-top:5px'>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td align='right' class='news-footer'>".
newsposter($info, THEME_BULLET).newsopts($info, THEME_BULLET).itemoptions("N",$info['news_id'])."
</td>
</tr>
</table>
</div>
</td>
<td class='border-right'><img src='".THEME."images/blank.gif' width='5' height='1' alt=''></td>
</tr>
<tr>
<td class='border-bleft'><img src='".THEME."images/blank.gif' width='22' height='17' alt=''></td>
<td class='border-bmain'><img src='".THEME."images/blank.gif' width='1' height='17' alt=''></td>
<td class='border-bright'><img src='".THEME."images/blank.gif' width='22' height='17' alt=''></td>
</tr>
</table>\n";
}
function render_article($subject, $article, $info) {
global $locale;
echo "<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='pan-left'><img src='".THEME."images/blank.gif' width='22' height='29' alt=''></td>
<td width='100%' class='pan-main'>$subject</td>
<td class='pan-right'><img src='".THEME."images/blank.gif' width='22' height='29' alt=''></td>
</tr>
</table>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='border-left tablebreak'><img src='".THEME."images/blank.gif' width='5' height='1' alt=''></td>
<td class='main-body'>
<div style='width:100%;vertical-align:top;'>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."</div>
<div style='margin-top:5px'>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td align='right' class='news-footer'>".
articleposter($info, THEME_BULLET).articleopts($info, THEME_BULLET).itemoptions("A",$info['article_id'])."
</td>
</tr>
</table>
</div>
</td>
<td class='border-right'><img src='".THEME."images/blank.gif' width='5' height='1' alt=''></td>
</tr>
<tr>
<td class='border-bleft'><img src='".THEME."images/blank.gif' width='22' height='17' alt=''></td>
<td class='border-bmain'><img src='".THEME."images/blank.gif' width='1' height='17' alt=''></td>
<td class='border-bright'><img src='".THEME."images/blank.gif' width='22' height='17' alt=''></td>
</tr>
</table>\n";
}
function opentable($title) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='pan-left'><img src='".THEME."images/blank.gif' width='22' height='29' alt=''></td>
<td width='100%' class='pan-main'>$title</td>
<td class='pan-right'><img src='".THEME."images/blank.gif' width='22' height='29' alt=''></td>
</tr>
</table>
<table width='100%' cellpadding='0' cellspacing='0' class='tablebreak'>
<tr>
<td class='border-left'><img src='".THEME."images/blank.gif' width='5' height='1' alt=''></td>
<td class='main-body'>\n";
}
function closetable() {
echo "</td>
<td class='border-right'><img src='".THEME."images/blank.gif' width='5' height='1' alt=''></td>
</tr>
<tr>
<td class='border-bleft'><img src='".THEME."images/blank.gif' width='22' height='17' alt=''></td>
<td class='border-bmain'><img src='".THEME."images/blank.gif' width='1' height='17' alt=''></td>
<td class='border-bright'><img src='".THEME."images/blank.gif' width='22' height='17' alt=''></td>
</tr>
</table>\n";
}
function openside($title, $collapse = false, $state = "on") {
global $panel_collapse; $panel_collapse = $collapse;
$boxname = str_replace(" ", "", $title);
echo "<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='pan-left'><img src='".THEME."images/blank.gif' width='22' height='29' alt=''></td>
<td class='pan-main'>$title</td>
".($collapse ? "<td class='scapmain' align='right'>".panelbutton($state, $boxname)."</td>" : "")."
<td class='pan-right'><img src='".THEME."images/blank.gif' width='22' height='29' alt=''></td>
</tr>
</table>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='border-left'><img src='".THEME."images/blank.gif' width='5' height='1' alt=''></td>
<td".($collapse ? " colspan='2'" : "")." class='side-body'>";
if ($collapse == true) { echo panelstate($state, $boxname); }
}
function closeside() {
global $panel_collapse;
if ($panel_collapse == true) { echo "</div>\n"; }
echo "</td>
<td class='border-right'><img src='".THEME."images/blank.gif' width='5' height='1' alt=''></td>
</tr>
<tr>
<td class='border-bleft'><img src='".THEME."images/blank.gif' width='22' height='17' alt=''></td>
<td class='border-bmain'".($panel_collapse ? " colspan='2'" : "")."><img src='".THEME."images/blank.gif' width='1' height='17' alt=''></td>
<td class='border-bright'><img src='".THEME."images/blank.gif' width='22' height='17' alt=''></td>
</tr>
</table>\n";
}
?>
o va eterio paneles kodas
openside("Eteryje");
//konfiguravimas
$scdef = "Vykdomi serverio atnaujinimai<br>Jums dekoja: Fainas FM!"; // serverio paw.
$scip = "78.63.189.187"; // ip arba URL (tik be jokiu html://)
$scport = "8002"; // Portas serverio
$scpass = "belekas"; // Paswordas
$maxusers = "32"; //Kiek vienu sykiu klausosi zmoniu
//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'<center>'.$scdef.'</center>';
}
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);
}
//Eterio Foto
if($streamstatus == "1"){
switch ($aim) {
case 'Laidos nera': $aimlogo = "Laidos nera";
}
$_SESSION['djus'] = $aim;
echo'
<table border="0" align="center" width="100%">
<tr>
<b>Eteryje:</b><br>
<span style="font-size:10px;">'.$servertitle.'</span>
<br><br>
<b>Dabar groja:</b><br>
<span style="font-size:10px;"><marquee behavior="scroll" direction="left" scrollamount="3" scrolldelay="10">'.$daina.'</marquee></span>
<br><br>
<b>Klausytojų:</b><br>
<span style="font-size:10px;">'.$currentlisteners.' / '.$maxusers.'</span>
</tr>
</table>
';
}
if($streamstatus == "0") {
echo'';
}
closeside();
padekyt jei galit butu aciu lb :)