Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: kas galit paredaguoti sita tema
Parašė mariuksxll· 2008 Bal. 8 15:04:04
#1
svx visi kas galit paredaguoti sita tema kad radija butu desinei pusei ant henderio buciau labai dekingas ;)
<?php
if (!defined("IN_FUSION")) { header("Location: ../../index.php"); exit; }
require_once INCLUDES."theme_functions_include.php";
// theme settings
$body_text = "#6aa311";
$body_bg = "#000000";
$theme_width = "950";
$theme_width_l = "175";
$theme_width_r = "175";
function render_header($header_content) {
echo "</div></td><td background='".THEME."images/header_01.jpg' width='584' align=''>";
echo "<table width='161' cellspacing='0' cellpadding='0' border='0' style='padding-:15px;'><tr><td>";
error_reporting(0);
$scdef = "radijas siuo metu yra isjunkttas"; // Default station name to display when server or stream is down
$scip = ""; // ip or url of shoutcast server (DO NOT ADD HTTP:// don't include the port)
$scport = ""; // port of shoutcast server
$scpass = ""; // password to shoutcast server
$maxusers = "100"; //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''.$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 'Dovis': $aimlogo = "Dovis"; break;
case 'Gintaras': $aimlogo = "Gintaras"; break;
case 'Saulius': $aimlogo = "Saulius"; break;
default: $aimlogo = "dj";
}
$_SESSION['djus'] = $aim;
echo'<div align="center">
<table cellpadding="0" cellspacing="0" width="1">
<!-- MSTaašype="nolayout" -->
<tr>
<td height="36" bgcolor="">
<p align="center">
<a href="http://89.249.88.159:8000/listen.pls"><img border="0" src="http://www.rmffm.xz.lt/radio/dj/'.$aimlogo.'.jpg" width="120" heigth="90"></a></td>
</tr>
<tr>
<td height="17" valign="bottom" bgcolor="">
<div align="center">
<table cellpadding="0" cellspacing="0" width="130">
<tr>
<td height="17">
<p align="center">
<font face="Tahoma" style="font-size: 8pt" color="#3E1710"><b>Eteryje:</b></font>
<font face="Tahoma" style="font-size: 8pt" color="#000000">'.$aim.'</font></td>
</tr>
<tr>
<td height="17">
<p align="center">
<font face="Tahoma" style="font-size: 8pt" color="#3E1710"><b></b></font>
<marquee behavior="right"> <font face="Arial" style="font-size: 8pt" color="#000000">'.$daina.'</font></td></marquee></p>
</tr>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
</div>';
}
if($streamstatus == "0")
{
echo'<font size="2" face="tahoma" color="#6C6D7B">Sveiki yra kile keletas nesklandumu tikimes viskas bus greitai sutvarkyta!.</font>';
}
/*
* Procentai isreiksti grafiskai
* Pavyzdys: Internetines radijos dabartiniai klausytojai
* Yra maksimalus leistinas klausytoju skaicius ir dabar besiklausanciu procentali israiska grafiskai
*/
$pavadinimas = ""; //pavadinimas
$ko = "klausytoju:"; //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://89.249.88.159:8000/listen.pls"><img src="http://img463.imageshack.us/img463/2893/winampasok3.png" border="0" alt="Winamp" /></a> <a href="http://89.249.88.159:8000/listen.m3u"><img src="http://img463.imageshack.us/img463/4828/mediawy9.png" border="0" alt="Windows Media Player" /></a><br>
</html>
<?
}
function render_footer($license=false) {
global $theme_width,$settings;
echo "</td>
</tr>
</table>
<table cellSpacing='0' cellPadding='2' width='100%' border='0' background='".THEME."images/footer.gif' style='border-right: solid #c1d2ec 1px; border-left: solid #c1d2ec 1px;'>
<td width='20%' height='40' class='white' align='left'><b><a href='http://php-fusion.co.uk' target='_blank'></a></b></td>
<td width='40%' class='white' align='center'><b><center>Copyright © 2008</center></b></td><td width='26%' class='white' align='right'><b><a href=''></a></b></td><div align='center'></tr></table></td></tr></table></div>\n";
}
function render_news($subject, $news, $info) {
echo "<table border='0' style=': 1px solid #000000' cellspacing='1' width='100%' cellpadding='3'>
<tr><td background='".THEME."images/cellpic_news.gif' height='30'><font class='block-title'><a name='news_".$info['news_id']."' id='news_".$info['news_id']."'></a>$subject</font></td></tr>
</table>
<table width='100%' cellpadding='0' cellspacing='1' class='border'><tr><td><table width='100%' cellpadding='0' cellspacing='0'>
<tr><td class='main-body'>$news</td></tr>
</table>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr><td class='news-footer'>\n";
echo openform("N",$info['news_id']).newsposter($info," ·").newsopts($info,"·").closeform("N",$info['news_id']);
echo "</td></tr>
</table>
</td></tr>
</table>\n";
}
function render_article($subject, $article, $info) {
echo "<table border='0' cellspacing='1' width='100%' cellpadding='3'>
<tr><td background='".THEME."images/cellpic_news.gif' height='30'><font class='block-title'>$subject</font></td></tr>
</table>
<table width='100%' cellpadding='0' cellspacing='1' class='border'><tr><td><table width='100%' cellpadding='0' cellspacing='0'>
<tr><td class='main-body'>".($info['article_breaks'] == "y" ? nl2br($article) : $article)."</td></tr>
</table>
<table width='100%' cellpadding='0' cellspacing='0'>
<tr><td class='news-footer'>\n";
echo openform("A",$info['article_id']).articleposter($info," ·").articleopts($info,"·").closeform("A",$info['article_id']);
echo "</td></tr>
</table>
</td></tr>
</table>\n";
}
function opentable($title) {
echo "<table width='100%' cellpadding='3' cellspacing='1' style='border: 1px solid #c1d2ec'>
<tr><td bgcolor='#ffffff' background='".THEME."images/cellpic1.gif' height='25'><font class='head-title'>$title</font></td></tr>
</table>
<table width='100%' cellpadding='0' cellspacing='0' class='border'>
<tr><td class='main-body'>\n";
}
function closetable() {
echo "</td>
</tr>
</table>\n";
}
function openside($title) {
echo "<table border='0' style='border: 1px solid #c1d2ec' cellspacing='1' width='100%' cellpadding='3'>
<tr><td height='27' width='100%' background='".THEME."images/cellpic3.gif'><font class='block-title'>$title</font></td></tr>
<tr><td bgcolor='#ffffff' class='side-body' width='100%'>\n";
}
function closeside() {
echo "</td></tr></table>\n";
tablebreak();
}
function opensidex($title,$state="on") {
$boxname = str_replace(" ", "", $title);
echo "<table border='0' style='border: 1px solid #c1d2ec' cellspacing='1' width='100%' cellpadding='3'>
<tr>
<td height='27' width='100%' background='".THEME."images/cellpic3.gif'><font class='block-title'>$title</font></td>
<td height='27' width='120%' background='".THEME."images/cellpic3.gif'>".panelbutton($state,$boxname)."</td>
</tr>
<tr>
<td colspan='2' class='side-body'>
<div id='box_$boxname'".($state=="off"?" style='display:none'":"").">\n";
}
function closesidex() {
echo "</div>
</td>
</tr>
</table>\n";
tablebreak();
}
function tablebreak() {
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n<td height='5'></td>\n</tr>\n</table>\n";
}
?>
Redagavo MAnjack· 2008 Bal. 8 16:04:26
Parašė Žmogus· 2008 Bal. 8 17:04:58
#2
padding-right:0px;
Keik į padding paprasta
Parašė MaFetas· 2008 Bal. 8 18:04:54
#3
Su mielu noru uz 10lt labas papildyma padaryciau:P
Parašė bad_user· 2008 Bal. 8 18:04:53
#4
Aš irgi galiu.. :)
Parašė bad_user· 2008 Bal. 8 18:04:33
#6
Biznio gadintojas.. Aš sask nebeturiu.. :D Už dyka pasipildičiau :D
Parašė mariuksxll· 2008 Bal. 8 19:04:53
#7
aisku dekui uz patarimus ;)
Parašė mariuksxll· 2008 Bal. 8 19:04:24
#8
bet padariau kaip cia rase bet nesigavo gavosi prie apcios beveik :)
Parašė bad_user· 2008 Bal. 8 20:04:28
#9
Galiu už litus padaryti :)