PDA

View Full Version : Radio DJ Panel v3.



AlexOC
17-01-2009, 10:42 PM
Hey, im trying to figure out how to make a page where it displays the profile pic of the current dj and there slot.

But im not sure how to define which is the current slot and stuff, can anybody help.

Thanks.

Calon
19-01-2009, 01:29 PM
Not sure if it's possible as they encrypted the code.

Jxhn
20-01-2009, 09:11 AM
Where they've encrypted the code, just change eval to echo.

Romanity
20-01-2009, 05:33 PM
Im assuming you have a database of the details yeh?

Right, well on your radio stats page is probably something along the lines of "DJ Name: $dj_name"

Well find that and use something like this



$dj_details = mysql_fetch_array(mysql_query("SELECT * FROM `TABLENAME` WHERE `DJNAME` = '$dj_name'"));


Then you can just echo out any information such as profile picture <img src='<? echo $dj_details[profile_picture]; ?>'>

Obviously you will need to update the query to suit your database.

Lewis :)

AlexOC
20-01-2009, 06:09 PM
Thanks all.

I'm having problems with defining what is the current slot.

Like getting the correct time and day and choosing the current slot.

Romanity
20-01-2009, 07:29 PM
$slot = date("G");
$day = date("l");

$s = mysql_fetch_array(mysql_query("SELECT * FROM `timetable` WHERE `day` = '$day'"));

Then you got the, say Monday, row... now you need the hour from it.... so you would use $s[$slot]; which is the value for the current hour, on the current day.

Hope that helps :)

Want to hide these adverts? Register an account for free!