Vėl man nutiko bėda..
Paspaudus Mano proflis, turėtu parodyti MANO PROFILĮ iš šalies, o man kai ant jo paspaudžiu išmeta: news.php
Kur reikia nukreipt tą adresą?
Header.php , theme.php ?
Header.php:
<?php
error_reporting(0);
$scdef = ""; // Default station name to display when server or stream is down
$scip = "shoutcast.volna.lt"; // ip or url of shoutcast server (DO NOT ADD HTTP:// don't include the port)
$scport = "8050"; // port of shoutcast server
$scpass = "kaniukai"; // password to shoutcast server
$maxusers = "100"; //Kiek vienu sykiu klausosi zmoniu
$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);
}
$loop = array("STREAMSTATUS", "BITRATE", "SERVERTITLE", "CURRENTLISTENERS", "AIM", "ICQ");
$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
//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));
fclose($scfp);
}
//display stats
if($streamstatus == "1"){
switch ($aim) {
case 'WiNALL': $aimlogo = "Serveris"; break;
case 'Serveris': $aimlogo = "Serveris"; break;
case 'Bakkaz': $aimlogo = "Bakkaz"; break;
case 'Dj_Tadydass': $aimlogo = "Dj_Tadydass"; break;
case 'Dj Destiny': $aimlogo = "Dj Destiny"; break;
case 'Dj Destiny': $aimlogo = "Dj Destiny"; break;
case 'Laurynas' : $aimlogo = "Laurynas"; break;
default: $aimlogo = "dj";
}
$_SESSION['djus'] = $aim;
echo " <table cellpadding='0' cellspacing='0' width='1'>
<tr>
<td height='17' valign='middle' >
<table cellpadding='0' cellspacing='0' width='130' align='center'>
<tr>
<td height='17'>
<p align='center'>
<font face='Tahoma' style='font-size: 8pt' color='#FFFFFF'><b>Laida:</b></font>
<font face='Tahoma' style='font-size: 8pt' color='#FFFFFF'>".$icq."</font><br>
<font face='Tahoma' style='font-size: 8pt' color='#FFFFFF'><b>Eteryje:</b></font>
<font face='Tahoma' style='font-size: 8pt' color='#FFFFFF'>".$aim."</font>
</p>
</td>
</tr>
<tr>
<td height='17'>
<p align='center'>
<marquee behavior='right'> <font face='Arial' style='font-size: 8pt' color='#000000'>".$daina."</font></marquee>
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>\n";
}
if($streamstatus == "0"){
echo "<table cellpadding='0' cellspacing='0' align='center><tr><td><font size='2' face='tahoma' color='#6C6D7B'>Technine profilaktika.</font></td></tr></table>";
}
$pavadinimas = ""; //pavadinimas
echo " <center><b>".$pavadinimas."</b>
<font size='1'><center></font>
</td>
</tr>
</table>
</td>
</tr>
<tr>
</table>\n";
closeside_panel();
?>
Theme.php:
<?php
if (!defined("IN_FUSION")) { header("Location: ../../index.php"); exit; }
require_once INCLUDES."theme_functions_include.php";
// theme settings
$body_text = "#000000";
$body_bg = "#FFFFFF";
$theme_width = "100%";
$theme_width_l = "215";
$theme_width_r = "215";
function render_header($header_content) {
global $theme_width,$locale,$data,$aidlink,$db_prefix;
echo "<table align='center' cellpadding='0' cellspacing='0' width='850' class='paneles'>\n<tr>
<tr>
<td>
<table cellpadding='0' cellspacing='0' width='850'>
<tr>
<td align='center' style='padding-left: 400px; padding-top: -40px;' width='0'>";
include THEME."user_info_panel.php";
echo "</td>
<td align='center' style='padding-right: 30px; padding-top: 0px;' width='0'>";
include THEME."header.php";
echo "</td>
</tr>
</table><br>\n";
echo "<table cellpadding='0' align='center' cellspacing='0' width='990'>\n<tr>\n";
}
function render_footer($license=false) {
global $theme_width,$settings;
echo "</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%' class='footer'>
<tr>
<td width='73' align='left' style='padding-left: 6px;padding-top: 13px;'> <a href='http://www.mmw.too.lt/' target='_blank'><img src='".THEME."images/42.png' border='0'></a></td>
<td width='446'></td>
<td width='247' align='right' class='f_text'>TVS: <a href='http://www.php-fusion.co.uk' target='_blank' style='color:#000;'>PHP-Fusion</a> | 2008-2009</td>
</tr>
</table>
</td>
</tr>
</table>\n";
}
function render_news($subject, $news, $info) {
echo "<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='capmain'>$subject</td>
</tr>
<tr>
<td class='main-body'>$news</td>
</tr>
<tr>
<td align='center' class='news-footer'>\n";
echo openform("N",$info['news_id']).newsposter($info," ·").newsopts($info,"·").closeform("N",$info['news_id']);
echo "</td>
</tr>
</table>\n";
}
function render_article($subject, $article, $info) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>
<tr>
<td class='capmain'>$subject</td>
</tr>
<tr>
<td class='main-body'>
".($info['article_breaks'] == "y" ? nl2br($article) : $article)."
</td>
</tr>
<tr>
<td align='center' class='news-footer'>\n";
echo openform("A",$info['article_id']).articleposter($info," ·").articleopts($info,"·").closeform("A",$info['article_id']);
echo "</td>
</tr>
</table>\n";
}
function opentable($title) {
echo "<table cellpadding='0' cellspacing='0' width='521'>
<tr>
<td class='capmain'>$title</td>
</tr>
<tr>
<td class='main-body'>\n";
}
function closetable() {
echo "</td>
</tr>
<tr><td><img src='".THEME."images/news_foot.gif'></td></tr>
</table>\n";
}
function openside_header($title) {
echo "<table align='center' cellpadding='center' cellspacing='0'>
<tr>
<td align='center'class='side-body-panel'>\n";
}
function closeside_header() {
echo "</td>
</tr>
</table>\n";
tablebreak();
}
function openside_panel($title) {
echo "<table align='center' cellpadding='center' cellspacing='0' width='150'>
<tr>
<td class='side-body-panel'>\n";
}
function closeside_panel() {
echo "</td>
</tr>
</table>\n";
tablebreak();
}
function openside($title) {
echo "<table cellpadding='0' cellspacing='0' width='100%' class='border'>
<tr>
<td class='scapmain'>$title</td>
</tr>
<tr>
<td class='side-body'>\n";
}
function closeside() {
echo "</td>
</tr>
</table>\n";
tablebreak();
}
function opensidex($title,$state="on") {
$boxname = str_replace(" ", "", $title);
echo "<table cellpadding='0' cellspacing='0' width='100%' class='border'>
<tr>
<td class='scapmain'>$title</td>
<td class='scapmain' align='right'>".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";
}
?>
www.styGRAFIKA.tk - Grafikos Studija!
Redagavo iSty 2009 Bal. 12 12:04:32 |