Location: PHPKode > projects > Content*Builder > modules/gallery/fileView.inc.php
<?php
	
	$igOption = new CBOption();
	$igOption->setModule("gallery");
	$igOption->getOptionList();
	
	$columns = 3;
	
	if(!empty($id) || ereg("(^[1-9]?[0-9]*$)", $id)) {
		$fileQuery     = mysql_fetch_object(mysql_query("SELECT * FROM ".TABLE."_mm_files WHERE fileID = '$id'"));
		$actualGallery = mysql_fetch_object(mysql_query("SELECT * FROM ".TABLE."_mm_folder WHERE branchID = '$fileQuery->branchID'"));
		$userQuery     = mysql_fetch_object(mysql_query("SELECT * FROM ".TABLE."_user WHERE userid = '$fileQuery->userid'"));
		$tpl->assign("fileDetails", 
			array ( "FID"     => $fileQuery->fileID,
					"BID"     => $fileQuery->branchID,
					"UID"     => $fileQuery->userid,
					"NAME"    => $fileQuery->filename,
					"TITLE"   => $fileQuery->title,
					"DESC"    => $fileQuery->description,
					"DATE"    => $fileQuery->insertdate,
					"GALNAME" => $actualGallery->name,
					"DIRECTORY" => $actualGallery->branchName,
					"USERNAME" => $userQuery->fullname
			)
		);
		if($fileQuery->filename != "") {
			$tpl->assign("fileDetailsSet", "1");
		}
	}
	$tpl->display("fileView.template");
?>
Return current item: Content*Builder