Jump to content

samphp


ultra89
 Share

Recommended Posts

 require("config.php");   $db->open("SELECT songlist.*, historylist.listeners as listeners, historylist.requestID as requestID, historylist.date_played as starttime FROM historylist,songlist WHERE (historylist.songID = songlist.ID) AND (songlist.songtype='S') ORDER BY historylist.date_played DESC",6); $history = $db->rows(); reset($history);  $db->open("SELECT songlist.*, queuelist.requestID as requestID FROM queuelist, songlist WHERE (queuelist.songID = songlist.ID)  AND (songlist.songtype='S') AND (songlist.artist  '') ORDER BY queuelist.sortID ASC",2); $queue = $db->rows(); reset($queue);   //### Calculate the bezt time to refresh the webpage in order to show new updated song information //==================================================================================================  list($key, $song) = each($history); $listeners = $song["listeners"];
$starttime = strtotime($song["date_played"]); $curtime = time();  $timeleft = $starttime+round($song["duration"]/1000)-$curtime;
 //Set refesh interval if($timeleft>0) # 30 second minimum wait   { $timeout = $timeleft;}        # if timeleft is valid, refresh on timeleft (should be end of song) else   { $timeout = 90; }            # otherwise, fall back on 90 second refresh    if(($timeout>180) or ($timeout==0)) $timeout = 180; if($timeout$pic_cnt = 0;function PicName(){ global $pic_cnt; echo "Picture".$pic_cnt; } function NextPicName(){  global $pic_cnt; $pic_cnt += 1; PicName();} 
function PutSongRow(&$song) { global $rc, $showpic, $darkrow, $lightrow; PrepareSong($song);  $rc++; $bgcolor = $darkrow; if(($rc % 2)==0) $bgcolor = $lightrow; ?>            if($song["haspicture"]) {?>            " target="_blank"><? echo $song[" alt="Buy CD!" border=0>};?>              }?>    

   >       echo $song["combine"];       if($song["requestid"]!=0) { echo " ~requested~ "; }       ?>           
" target="_blank">images/buy.gif                
" target="_blank">images/home.gif                    )">images/info.gif              echo $song["album"]; ?>           
 echo $song["mmss"]; ?>      }//PutSongRow
/* ## ===================================================================== ## */?>
require("header.php"); ?>
<!--- var refreshID = ""; refreshID = setTimeout("DoRefresh()", <? echo ($timeout*1000); ?>); function DoRefresh(){  document.location.href = '<? echo $refreshURL; ?>';}//--->
0)echo "There are currently $listeners listeners tuned into this station!

";?></pre><table border="0" width="98%" cellspacing="0" cellpadding="4">              
Currently Playing               
Links               
Album               
Time      
  $rc=0;  PutSongRow($song);   $mainsong = $song;?>  
if(count($queue)>0){?>Coming up:
 $i=0; while(list($key, $song) = each($queue)) {  if(empty($song["artist"]))    $song["artist"] = 'Unknown';     if($i>0) echo ", ";   echo $song["artist"];    if($song["requestid"]!=0)    { echo " ~requested~"; }   $i++;   }?>}?>
             
Recently         played songs            $rc=0;  while(list($key, $song) = each($history))    PutSongRow($song); ?></table><br><td valign="top" align="center">
##################### Request Dedication require("dedication.php");#===================   ?>  
##################### BuyCD image if($mainsong["haspicture"]) require("buycd.php");#=================== ?>
  ################### Top 10 requestsif($showtoprequests)   require("top10requests.php");#===================?>         </td>      require("footer.php"); ?&g

Edited by ultra89
adding text
Link to comment
Share on other sites

ultra89, you need to really use a code editor. I am not going to spend another half an hour reformatting code for you for free just so I can read it to fix an issue.

 

Your code is all on one line and without proper spacing, which makes it hard to read. It's like me typinglikethisitmakesthingsreadllyha

rdtoreadbecausethereisnotproperspacing.

 

Please format your code properly and re-post it for me to help you.

Studiio - All-In-One Radio Communication Platform
SMS | Phone Calls | Social Media | Content

Link to comment
Share on other sites

Again I get a feeling you are trying to RUN before you can WALK....

 

Your website is badly laid out and you should really learn how to code the basics before you move onto more complicated things like the SAM request system... If you can't get the basics right you have no hope going any further.

 

(I get a feeling ports 3306 & 1221 aren't open on your website host/firewall/router end therefore you won't be able to get the web templates for SAM PHP web to work)

 

You might want to search the Spacial forums for an answer/solution there's bound to be one already posted in the 15 or so years the forums have been online.

 

You really need to grasp the basics before you start demanding for help.

  • Thanks 1

My Blog https://djgarybaldy.blogspot.com

User of RadioDJ FREE radio playout software since 2010.

How to Install RadioDJ: https://djgarybaldy.blogspot.com/2020/08/how-to-install-radiodj-free-radio.html

RadioDJ is my FAVOURITE piece of software it works when I need It

 

 

Link to comment
Share on other sites

Rite one thing I'm not demanding, I'm asking

two my ports are open host/router/firewall

three I'm only asking for help just on that

code I sent in this forum. I know things aren't free

and don't even go there about my website, I'm not letting people

bring me down. Omg so please can you help me out instead of telling me what to do

Link to comment
Share on other sites

Usually a 500 error is generated if:

- the permissions of the file(s) are incorrect

- the ownership of the file(s) are incorrect

- the files are not in the proper location

- selinux is enabled and is choking on something

 

The error has nothing to do with 3306 and / or 1221 being open.

SCS - Dedicated Bandwidth Servers

Shoutcast / Icecast / Windows Media

Transcoding - Auto DJ - Mobile Radio - FLASH Players - Auto DJ

Broadcasting World's Stream Host of the Month

Link to comment
Share on other sites

I thought this user moved onto RadioDJ requests?? I'm sure it was them asking for help with it the other day on the RDJ forums and said they had them working, seems their website is currently down too.

My Blog https://djgarybaldy.blogspot.com

User of RadioDJ FREE radio playout software since 2010.

How to Install RadioDJ: https://djgarybaldy.blogspot.com/2020/08/how-to-install-radiodj-free-radio.html

RadioDJ is my FAVOURITE piece of software it works when I need It

 

 

Link to comment
Share on other sites

Their website is up:

http://urban-radio.co.uk/index.php

Just the request page is down.

 

They are also asking for help on the Spacial Forums (under a different name).

SCS - Dedicated Bandwidth Servers

Shoutcast / Icecast / Windows Media

Transcoding - Auto DJ - Mobile Radio - FLASH Players - Auto DJ

Broadcasting World's Stream Host of the Month

Link to comment
Share on other sites

  • 2 weeks later...

heres the code james

try {
// Get the configuration
require_once('../config/config.php');


// Get the code for this page
require_once('../code/code.playing.php');


// Get the display for this page
require_once('../display/display.playing.php');


} catch (Exception $ex) {
// The error page will be displayed if anything goes wrong above
$message = $ex->getMessage();
require_once('../display/display.error.php');
}

Link to comment
Share on other sites

That's just a small piece of the request code. That one requires no modification.

 

And I also thought you moved to RadioDJ because of your other post:

http://urban-radio.co.uk/req/request.php

SCS - Dedicated Bandwidth Servers

Shoutcast / Icecast / Windows Media

Transcoding - Auto DJ - Mobile Radio - FLASH Players - Auto DJ

Broadcasting World's Stream Host of the Month

Link to comment
Share on other sites

yes i have moved to radiodj you have a big point. and there request feature is so easy and quick for users

to be able to use. and it's easy to customize as well. i'm also using the voice meter cos i have got a xenyx802 mixing board with a bheringer

microphone so if i wanted to i could take calls through it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...