Location: PHPKode > projects > Tetravex oggserv > oggserv/header.php
<?
//header.php for tetravex oggserv by Edd Barrett
$host1=`hostname`;
session_start();
$user_=$_SESSION['user'];
if (!$user_){
	header("Location: index.php");
}

include "back/conf.php";

//lets see whats going on.
$sql="SELECT * FROM oggserv_main";
$result=mysql_query($sql,$link);
$row=mysql_fetch_array($result);
$random=$row['random'];
$media_id=$row['current_track'];
$playlist=$row['playlist_progress'];
//$playlist-=1;


$sql2="SELECT * FROM oggserv_media WHERE media_id='$media_id'";
$result=mysql_query($sql2,$link);
$row=mysql_fetch_array($result);
$artist=$row['artist'];
$album=$row['album_name'];
$track_name=$row['track_name'];
$duration=$row['duration'];

$num="SELECT play_id FROM oggserv_playlist WHERE play_id>$playlist";
$res=mysql_query($num,$link);
$q=mysql_num_rows($res);

?>

<HTML>
<HEAD>
<!--<META HTTP-EQUIV="refresh" content="25;index2.php">-->
<TITLE>OggBox on <? echo $host1; ?></TITLE>
</HEAD>
<BODY bgcolor="#465aa0" text="#cccccc" link="white" alink="red" vlink="white">
<table width="100%" cellpadding="0" cellspacing="0">
	<tr><td bgcolor="#465aa0" valign="center"><b><img src="oggbox.jpg"></td><td><font size="+1"><a href="q.php">[Tracks in queue: <? echo $q;?> ]</a></font>
</td>	
</table>
<center>TetraVex Oggserv:Oggbox V<? echo $vers; ?> Running on <?echo $host1; ?><br><br>NOW PLAYING:</center>


<table width="100%" cellspacing="3" cellpadding="3" bgcolor="#00117c" border="0">
<tr bgcolor="#3C4E9E"><td><b><center>Track Name</center></b></td><td><b><center>Artist</center></b></td><td><b><center>Album</center></b></td><td><b><center>Duration</center></b></td><td><b><center>Who?</center></b></tr>
<tr bgcolor="#3c4e9e"><td><center><? echo $track_name; ?></center></td><td><center><? echo $artist; ?></center></td><td><center><? echo $album; ?></center></td><td><center><? echo $duration; ?></center></td><td><center>

<?
if ($random=="1"){
	echo "OggBox";
} else {
	$get_pers="SELECT user FROM oggserv_playlist WHERE play_id=$playlist";
	$result=mysql_query($get_pers,$link);
	$row=mysql_fetch_array($result);
	$person=$row['user'];
	
	echo $person;
	
	}	
	


?>
</center>
</td>

</tr>
</table>
<center><a href="q.php">View Queued Tracks</a> :: <a href="q.php?mode=history">View Queue History</a> :: <a href="index2.php">Queue Tracks</a></center>

<br><br> 

 
Return current item: Tetravex oggserv