include("../setup.php");
include( "download_function.php" );
// Debug
if( isset( $_GET['refferer'] ) )
echo $_GET['refferer'];
else
// If we got a file
if( isset( $_GET['file'] ) )
{
$sql = "SELECT * FROM `gz_file` WHERE file_name='".$_GET['file']."'";
if( ( $r = $gz_db->query( $sql ) ) == false )
echo $gz_db->error.'
'.$sql.'
';
else
{
$row = $r->fetch_assoc();
header("Location: ".BASE_URL.DOWNLOAD_LINK.FILE_LIST_LINK.getFileLink( $row['file_id'] ) );
$r->close();
}
}
// Else, if we got an id
else
if( isset( $_GET['id'] ) )
header("Location: ".BASE_URL.DOWNLOAD_LINK.FILE_LIST_LINK.getFileLink( $_GET['id'] ) );
?>