Example #1
0
	}
}

$user_access = new user_access( $mydirname ) ;
$whr_cat = "d.cid IN (".implode(",", $user_access->can_read() ).")" ;
$mydownload = new MyDownload( $mydirname, $whr_cat, $lid ) ;
if( ! $mydownload->return_lid() ) {
	d3download_delete_cache_of_categories( $mydirname ) ;
	redirect_header( XOOPS_URL."/modules/".$mydirname."/", 20, _MD_D3DOWNLOADS_NOMATCH ) ;
	exit() ;
}

if ( xoops_refcheck() ) $mydownload->Hits_Count( $lid ) ;
d3download_delete_cache_of_categories( $mydirname ) ;

switch( $second ) {
	case false :
		$url = $mydownload->return_url('Show') ;
		$filename = $mydownload->return_filename('Show') ;
		$ext = $mydownload->return_ext('Show') ;
		break ;
	case true :
		$url = $mydownload->return_file2('Show') ;
		$filename = $mydownload->return_filename2('Show') ;
		$ext = $mydownload->return_ext2('Show') ;
		break ;
}

d3download_download( $url, $filename, $ext, 0 ) ;

?>