<?php
include("config.php");
//get variables
if (isset($_GET['act']) && $_GET['act'] == 'pls')
$main = "pls.php";
elseif (isset($_GET['act']) && $_GET['act'] == 'search')
$main = "search.php";
elseif ((isset($_GET['act'])) && ($_GET['act'] == 'new' or $_GET['act'] == 'sort'))
$main = "list.php";
else
$main = "browse.php";
if (isset($_POST['pick'])) {
$pls = new playlist;
$pls->add_to_pls($_POST['pick']);
header("Location: $_SERVER[PHP_SELF]?act=pls");
}
if (isset($_POST['unpick'])) {
$pls = new playlist;
$pls->remove_from_pls($_POST['unpick'],$_POST['page'],$_POST['limit']);
header("Location: $_SERVER[PHP_SELF]?act=pls");
print_r($_POST['unpick']);
}
//staert output
$tpl = new tpl("skin/template.html");
$tpl->get_content(array(
"config" => "config.php",
"title" => "skin/title.php",
"advert" => "skin/topad.html",
"body" => $main,
"left" => "skin/pls_menu.php",
"footer" => "skin/footer.php"
)
);
?>