コード例 #1
0
ファイル: visit_url.php プロジェクト: nunoluciano/uxcl
	include_once dirname( dirname(__FILE__) ).'/class/mydownload.php' ;
	$mydownload = new MyDownload( $mydirname, $whr_cat, $lid ) ;
	if( ! $mydownload->return_lid() ) {
		redirect_header( XOOPS_URL."/modules/".$mydirname."/", 20, _MD_D3DOWNLOADS_NOMATCH );
		exit();
	}
} elseif( ! empty( $history ) && ! empty( $id ) ) {
	include_once dirname( dirname(__FILE__) ).'/class/history_download.php' ;
	$mydownload = new history_download( $mydirname, $id ) ;
	if( ! $mydownload->return_lid() ) {
		redirect_header( XOOPS_URL."/modules/".$mydirname."/", 20, _MD_D3DOWNLOADS_NOMATCH );
		exit();
	}
} elseif( ! empty( $unapproval ) && ! empty( $id ) ) {
	include_once dirname( dirname(__FILE__) ).'/class/unapproval_download.php' ;
	$mydownload = new unapproval_download( $mydirname, $id ) ;
	if( ! $mydownload->return_requestid() ) {
		redirect_header( XOOPS_URL."/modules/".$mydirname."/", 20, _MD_D3DOWNLOADS_NOMATCH );
		exit();
	}
}

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') ;
コード例 #2
0
ファイル: approval.php プロジェクト: nunoluciano/uxcl
$downdata = $category =$select_platform = $select_license = $img_ar = array();
$preview_title = $preview_body = $error_message =  '' ;

if( is_object( $xoopsUser ) ) {
	$xoops_isuser = true ;
	$xoops_userid = $xoopsUser->getVar('uid') ;
	$xoops_uname = $xoopsUser->getVar('uname') ;
	$xoops_isadmin = $xoopsUserIsAdmin ;
} else {
	$xoops_isuser = false ;
	$xoops_userid = 0 ;
	$xoops_uname = '' ;
	$xoops_isadmin = false ;
}

$unapproval = new unapproval_download( $mydirname ) ;

// GET REQUESTID FROM $_GET
$requestid = isset( $_GET['requestid'] ) ? intval( $_GET['requestid'] ) : "";

// CATEGORY LIST
$category = d3download_categories_selbox( $mydirname, '', 0, 0, 1 ) ;

// GET PLATFORM LIST
$select_platform = $unapproval->Select_Platform() ;

// GET LICENSE LIST
$select_license = $unapproval->Select_License() ;

$formtitle = _MD_D3DOWNLOADS_SUBMIT_APPROVAL ;
コード例 #3
0
ファイル: approvalmanager.php プロジェクト: nunoluciano/uxcl
// PERMISSION ERROR
$module_handler =& xoops_gethandler( 'module' ) ;
$module =& $module_handler->getByDirname( $mydirname ) ;
$moduleperm_handler =& xoops_gethandler( 'groupperm' ) ;
$mid = $module->getVar('mid') ;
if( ! is_object( @$xoopsUser ) || ! $moduleperm_handler->checkRight( 'module_admin' , $mid , $xoopsUser->getGroups() ) ) {
	die( 'Only administrator can use this feature.' ) ;
}

$iserror = 0 ;
$unapproval = $modfile = $message = $errors = array() ;
$error_message = '' ;

// UNAPROVAL LIST
$unapproval_execution = new unapproval_download( $mydirname ) ;
$unaproval_sum = sprintf( _MD_D3DOWNLOADS_UNAPROVALNUM , $unapproval_execution->Total_Num( 'NewFile' ) );
$unapproval = $unapproval_execution->get_unapproval_list( 'NewFile' ) ;

// UNAPROVAL DELETE
if( ! empty( $_POST['unapproval_delete'] ) ) {
	if ( ! $xoopsGTicket->check( true , 'd3downloads' ) ) {
		redirect_header(XOOPS_URL.'/modules/'.$mydirname.'/admin/index.php',3,$xoopsGTicket->getErrors());
	}
	if( empty( $_POST['action_selects'] ) ) $message[] = _MD_D3DOWNLOADS_ERROR_SEL_FILSE ;
	if( ! empty( $message ) ){
		$iserror = 1 ;
		$error_message = implode( '<br />' , $message ) ;
	}
	if( empty( $iserror ) ) {
		foreach( $_POST['action_selects'] as $id => $value ) {
コード例 #4
0
ファイル: index.php プロジェクト: nunoluciano/uxcl
	if( $module_admin ){
		include_once dirname( dirname(__FILE__) ).'/class/broken_download.php' ;
		$broken_download = new broken_download( $mydirname ) ;
		// 破損報告件数をアサイン
		$broken_num = $broken_download->Broken_Num() ;
		$xoopsTpl->assign( 'broken_num' , $broken_num['num']  ) ;
		$xoopsTpl->assign( 'broken_link' , $broken_num['link']  ) ;
		// アップロードファイル破損チェック
		if( ! empty( $_POST['brokencheck'] ) ) {
			$broken_report = new broken_report( $mydirname ) ;
			$broken_report->broken_check() ;
		}
		// 承認待ち件数をアサイン
		include_once dirname( dirname(__FILE__) ).'/class/unapproval_download.php' ;
		$unapproval_download = new unapproval_download( $mydirname ) ;
		$unapproval_num = $unapproval_download->Unapproval_Num() ;
		$xoopsTpl->assign( 'unapproval_num' , $unapproval_num['num']  ) ;
		$xoopsTpl->assign( 'unapproval_link' , $unapproval_num['link']  ) ;
	}
}

// ページナビなどをアサイン
if( ! empty( $cid ) || ! empty( $mypost ) ){
	$perpage4assign = d3download_items_perpage() ;
	$select_perpage = d3download_select_perpage( $mydirname ) ;
	$current_start = isset( $_GET['start'] ) ? intval( $_GET['start'] ) : 0 ;
	require_once dirname( dirname(__FILE__) ).'/class/my_pagenav.php' ;
	$orderby4pagenav = d3download_convertorderbyout( $orderby ) ;
	$pagenavarg = ( empty( $submitter  ) ) ? "&amp;cid=".$cid."&amp;intree=".$intree : "&amp;submitter=".$submitter ;
	$pagenavarg .= "&amp;orderby=".$orderby4pagenav."&amp;perpage=".$select_perpage;