include("classy/class.classy.php");
//include("classy/class.video.php");
$page = new classy_page(); //create instance of classy page
//$page->track(true);
include("config.php");
if(isset($_SESSION)==false){
session_start();
}
$id = sanitize($_GET['id']);
$sql=mysql_query("SELECT * FROM tbltitle WHERE titleid='$id'");
$data=@mysql_fetch_array($sql);
$title = cleanUp($data['title']);
?>
$sql=mysql_query("SELECT tbltitle.*, tblvideo.filename as filename FROM tbltitle, tblvideo WHERE tbltitle.titleid=tblvideo.titleid AND tbltitle.titleid='$id'");
if (mysql_num_rows($sql) == 1) {
$one_item = "true";
}
$data=mysql_fetch_array($sql);
$filename=$data['filename'];
$titleid=cleanUp($data['titleid']);
$title = cleanUp($data['title']);
$artfilename = $data['artfilename'];
$iconfilename = $data['iconfilename'];
$description = cleanUp($data['description']);
$price = $data['price'];
$public = $data['public'];
$state = $data['state'];
if ($public) {
$access=true;
}
$access = get_access($titleid, $userid);
//get first video id
$sql = mysql_query("SELECT MIN(tblvideo.videoid) AS firstVid_id FROM tblvideo, tbltitle WHERE tbltitle.titleid = tblvideo.titleid AND tbltitle.titleid = '$titleid' LIMIT 1");
$data = @mysql_fetch_array($sql);
$firstVid_id = $data['firstVid_id'];
?>
//video has very limited allowed viewers
if ($state == 'RESTRICTED') {
header('location: index.php');
exit();
}
if (!$access) {
if ($userid != "") {
$access_msg = "
Sorry, you do not have access to this title.
";
} else {
$access_msg = "
Please
Login to view this item.
";
}
$title_link = "

";
} else {
if ($one_item == true) {
if (strpos($filename, "pdf") > 0) {
$title_link = "

";
$download_info = "
Please click image to download this file.";
} else {
$title_link = "

";
$download_info = "
More content listed below.";
}
} else {
$title_link = "

";
$download_info = "
More content listed below.";
}
}
?>
/* if ($_SESSION['PST_ADMIN']=="") { ?>
} */?>
All items from this title:
$includebuttons=false;
$notitle=true;
$sql2=mysql_query('SELECT * FROM tblvideo WHERE titleid='.$titleid);
while($data=@mysql_fetch_array($sql2)) {
$videoid = $data['videoid'];
$titleid = $data['titleid'];
$filename = $data['filename'];
$iconfilename = str_replace(" ","-", $data['iconfilename']);
$videotitle = $data['title'];
$tags = get_all_tags($data['tags']);//$data['tags'];
$description = $data['description'];
$price = $data['price'];
$parent = mysql_fetch_array(mysql_query("select title FROM tbltitle WHERE titleid=".$titleid));
$title = $parent['title'];
echo "
";
if ($first == "First") {
$first = "";
}
//include("list_video.php");
}
?>
include("signup_block2.php"); ?>
Popular Tags:
include("pop_tags.php"); ?>