Sveiki taigi turiu prasyma. Gal kas galit pasakyt koki diva ar ka prirasyt, kad theme.php butu prisegtas eteris.php Headeryje buviau labai dekingas, taigi theme.php kodas:
<?php
/*------------------------------------------------------------------
Theme by wildformovies .
(www.wildformovies.com)
-------------------------------------------------------------------*/
if (!defined("IN_FUSION")) { header("Location: ../../index.php"); exit; }
require_once INCLUDES."theme_functions_include.php";
define("THEME_WIDTH", "1000");
define("THEME_BULLET", "<span class='bullet'><img src='".THEME."images/bullet.png'></span>");
function render_page($license=false) {
global $settings, $main_style;
//Header
echo "<table cellpadding='0' cellspacing='0' width='".THEME_WIDTH."' align='center'><tr><td>
<table cellpadding='0' cellspacing='0' width='".THEME_WIDTH."' style='border: 0px; margin: 0px auto'>
<tr><td>
<img src='".THEME."images/header.gif' alt='".$settings['sitename']."' width='1000' height='200' />";
echo "</td></tr></table>\n";
//Header
echo "<table cellpadding='0' cellspacing='0' class='main' align='center'>\n<tr>\n";
echo "<td class='sub-header-left'></td>\n";
echo "<td class='sub-header'>".showsublinks("", "white")."</td>\n";
echo "<td class='sub-header-right'></td>\n";
echo "</tr>\n</table>\n";
//Content
echo "<table cellpadding='0' cellspacing='0' width='".THEME_WIDTH."'>\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>"; }
echo "</tr>\n</table>\n";
//Footer
echo "<div id='footer'><table cellpadding='0' cellspacing='0' width='1000' class='footermain'>
<tr>
<td class='footer_t'>".showcopyright()." <br>Theme By <strong><a href='http://www.wildformovies.com' onclick='window.open(this.href); return false;' onkeypress='window.open(this.href); return false;'><font color='blue'>Wildformovies</font></a></strong>
</td>
</tr>
</table>
</div>
</td></tr></table>
\n";
}
function render_news($subject, $news, $info) {
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td class='capmain-left'></td>\n";
echo "<td class='capmain'>".$subject."</td>\n";
echo "<td class='capmain-right'></td>\n";
echo "</tr>\n</table>\n";
echo "<table width='100%' cellpadding='0' cellspacing='0' class='spacer'>\n<tr>\n";
echo "<td class='capmain-center-left'></td>\n";
echo "<td class='main-body middle-border'>".$news."</td>\n";
echo "<td class='capmain-center-right'></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='capmain-bottom-left'></td>\n";
echo "<td align='center' class='news-footer middle-border'>\n";
echo newsposter($info," ·").newsopts($info,"·").itemoptions("N",$info['news_id']);
echo "</td>\n";
echo "<td class='capmain-bottom-right'></td>\n";
echo "</tr>\n</table>\n";
}
function render_article($subject, $article, $info) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n<tr>\n";
echo "<td class='capmain-left'></td>\n";
echo "<td class='capmain'>".$subject."</td>\n";
echo "<td class='capmain-right'></td>\n";
echo "</tr>\n</table>\n";
echo "<table width='100%' cellpadding='0' cellspacing='0' class='spacer'>\n<tr>\n";
echo "<td class='capmain-center-left'></td>\n";
echo "<td class='main-body middle-border'>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."</td>\n";
echo "<td class='capmain-center-right'></td>\n";
echo "</tr>\n<tr>\n";
echo "<td class='capmain-bottom-left'></td>\n";
echo "<td align='center' class='news-footer'>\n";
echo articleposter($info," ·").articleopts($info,"·").itemoptions("A",$info['article_id']);
echo "</td>\n";
echo "<td class='capmain-bottom-right'></td>\n";
echo "</tr>\n</table>\n";
}
function opentable($title) {
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td class='capmain-left'></td>\n";
echo "<td class='capmain'>".$title."</td>\n";
echo "<td class='capmain-right'></td>\n";
echo "</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%' class='spacer'>\n<tr>\n";
echo "<td class='capmain-center-left'></td>\n";
echo "<td class='main-body'>\n";
}
function closetable() {
echo "</td>\n";
echo "<td class='capmain-center-right'></td>\n";
echo "</tr><tr>\n";
echo "<td class='capmain-bottom-left'></td>\n";
echo "<td class='news-footer'></td>\n";
echo "<td class='capmain-bottom-right'></td>\n";
echo "</tr><tr>\n";
echo "</tr>\n</table>\n";
}
function openside($title, $collapse = false, $state = "on") {
global $panel_collapse; $panel_collapse = $collapse;
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
echo "<td class='scapmain-left'></td>\n";
echo "<td class='scapmain'>$title</td>\n";
if ($collapse == true) {
$boxname = str_replace(" ", "", $title);
echo "<td class='scapmain' align='right'>".panelbutton($state, $boxname)."</td>\n";
}
echo "<td class='scapmain-right'></td>\n";
echo "</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%' class='spacer'>\n<tr>\n";
echo "<td class='scapmain-center-left'></td>\n";
echo "<td class='side-body'>\n";
if ($collapse == true) { echo panelstate($state, $boxname); }
}
function closeside() {
global $panel_collapse;
if ($panel_collapse == true) { echo "</div>\n"; }
echo "</td>\n";
echo "<td class='scapmain-center-right'></td>\n";
echo "</tr><tr>\n";
echo "<td class='scapmain-bottom-left'></td>\n";
echo "<td class='side-footer'></td>\n";
echo "<td class='scapmain-bottom-right'></td>\n";
echo "</table>\n";
}
?>
eteris.php kodas:
<?php
error_reporting(0);
$scdef = "Siuo metu radija yra."; // Default station name to display when server or stream is down
$scip = "http://mms.skynet.lt/PHR.asx"; // ip or url of shoutcast server (DO NOT ADD <a href='HTTP://' target='_blank'><span style='color:005C5B'>HTTP://</span></a> don't include the port)
$scport = "8000"; // port of shoutcast server
$scpass = "fiestafm159"; // password to shoutcast server
//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.'išjungta';
}
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]);
$AIM[$t] = ereg_replace(".*<SERVERTITLE>", "", $page);
$AIM[$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 'Rudis': $aimlogo = "Rudis"; break;
case 'Arvydas': $aimlogo = "Arvydas"; break;
case 'Mantas': $aimlogo = "Mantas"; break;
case 'Leila': $aimlogo = "Leila"; break;
case 'Shine': $aimlogo = "Shine"; break;
case 'Serveris': $aimlogo = "Serveris"; break;
default: $aimlogo = "dj";
}
$_SESSION['djus'] = $aim;
echo'<div align="left">
<table cellpadding="0" cellspacing="0" width="1">
<!-- MSTa*aš*ype="nolayout" -->
<tr>
<td height="30" valign="bottom" bgcolor="">
<div align="left" class="eteris_txt">
<table cellpadding="0" cellspacing="0" width="328">
<a href="http://fexfm.wu.lt/listen.m3u"><img src="http://fexfm.wu.lt/themes/FexFM2/images/wmp.png" border="0"></a>
<a href="http://fexfm.wu.lt/listen.m3u"><img src="http://fexfm.wu.lt/themes/FexFM2/images/mdpl.png" border="0"></a>
<a href="http://fexfm.wu.lt/web.html"><img src="http://fexfm.wu.lt/themes/FexFM2/images/web.png" border="0"></a>
<img src="'.THEME.'/komanda/'.$aim.'.jpg" style="margin:5px" border="1" width="100" height="100" align="left">
<br>
<font face="Tahoma" style="font-size: 10px" color="#000000"><b>Dabar eteryje:</b></font>
<font face="Tahoma" style="font-size: 12px" color="#cc00ff"><blink><b>'.$aim.'</b></blink></font>
<br></br></br></br>
<font face="Tahoma" style="font-size: 10px" color="#000000"><b>Eteryje Groja:</b></font>
<marquee scrolldelay="1" SCROLLAMOUNT="1" onmouseover="this.stop()" onmouseout="this.start()" direction="left" style="color:#000000;"><b>'.$daina.'</b></marquee></br></br>
</td>
</div>
</tr>
</tr>
</table>
</tr>
</table>
';
}
if($streamstatus == "0")
{
echo'<font size="2" face="tahoma" color="#6C6D7B">Šiuo metu radija yra išjungta.</font>';
}
?>
Buciau labai dekingas uz pagalba.
|