Location: PHPKode > scripts > AmaroK Web Frontend > obsidianmusic-2.3.0/index.php
<?php

//
//  ObsidianMusic
//   a.k.a. amaroK Web Frontend 2.0
//
//  Created 11/24/05
//   By Ryan Loebs (ObsidianX)
//
//  index.php - Main page
//
///////////////////////////////////////

if(isset($_GET['SID'])) {
	session_id($_GET['SID']);
}

session_start();
header("Cache-control: private");

define('SID', session_id());

$queryCount = 0;

require_once("inc/includes.php");
if($enabled === true && $action != "auth" && $action != "logout"){
	if($action){
		require_once("pages/$action.php");
	}else{
		require_once("pages/latest.php");
	}
	
	$tpl->addGlobalVar("sid", SID);
	
	if($extrainfo && $action != "artist" && $action != "album" && $action != "playlist" && $action != "search" && $action != "albumview"){
		$tpl->setAttribute("extrainfo", "visibility", "visible");
		$tpl->addGlobalVar("bitrate", _BITRATE);
		$tpl->addGlobalVar("format", _FORMAT);
		$spacespan = 7;
	}
}else if($action == "logout" && $locked){
	if($authtype == 1){
		unset($_SESSION['om_check']);
	}else{
		setcookie("om_check", NULL, 0);
	}
	die(header("Location: ?"));
}

if(isset($parse) && $parse){
	$mtime = explode(" ",microtime());
	$gentime = floatval(($mtime[1] + $mtime[0]) - $tstart);
	$tpl->addVar("listing", "spacespan", $spacespan);
	$tpl->addVar("root", "gentime", round($gentime, 4));
	$tpl->addVar("root", "query_count", $queryCount);
	$tpl->addVar("root", "mem_usage", round(memory_get_usage()/1024));
	$tpl->displayParsedTemplate();
}

?>
Return current item: AmaroK Web Frontend