Esempio n. 1
0
	$invisible_num = $mydownload->Invisible_Num( $cid, $intree ) ;
	$xoopsTpl->assign( 'invisible_num' , $invisible_num['num']  ) ;
	$xoopsTpl->assign( 'invisible_link' , $invisible_num['link']  ) ;
}

// ページタイトルをアサイン
$pagetitle4assign = _MD_D3DOWNLOADS_FILELIST_MAIN ;
if( ! empty( $cid ) ){
	include_once dirname( dirname(__FILE__) ).'/class/mycategory.php' ;
	$mycategory = new MyCategory( $mydirname, 'Show', $cid, $whr_cat ) ;
	$pagetitle4assign .= ' - '.$mycategory->return_title() ;
}

// パンくず部分の処理
$bc[0] = d3download_breadcrumbs( $mydirname ) ;
$breadcrumbs_tree = d3download_breadcrumbs_tree( $mydirname, $cid, $whr_cat, "index.php?page=filelist" ) ;
$bc[] = ( empty( $breadcrumbs_tree ) ) ? array( 'name' => _MD_D3DOWNLOADS_FILELIST_MAIN ) : array( 'url' => 'index.php?page=filelist' , 'name' => _MD_D3DOWNLOADS_FILELIST_MAIN ) ;
$breadcrumbs = array_merge( $bc, $breadcrumbs_tree ) ;

// ページナビの処理
$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 = "page=filelist&cid=".$cid."&orderby=".$orderby4pagenav."&perpage=".$select_perpage."&intree=".$intree ;
$pagenav = new My_PageNav( $total, $select_perpage, $current_start, 'start', $pagenavarg ) ;
$pagenav4assign = $pagenav->renderNav( 5 ) ;
$orderbyarg = "index.php?page=filelist&cid=".$cid."&perpage=".$select_perpage."&intree=".$intree ;
$xoopsTpl->assign( 'perpage' , $perpage4assign ) ; 
$xoopsTpl->assign( 'select_perpage' , $select_perpage ) ; 
Esempio n. 2
0
if( empty( $ispreview ) && empty( $iserror ) ) $download4assign = $downdata['downdata'] ;

// 取得した LID で投稿者本人かどうかをチェック
if( $module_admin ) $canedit = 1 ;
elseif( ! empty( $can_edit ) && $submitter == $xoops_userid &&  $xoops_isuser ) $canedit = 1 ;
else $canedit = 0 ;

if( empty( $canedit ) ) {
	redirect_header(XOOPS_URL.'/modules/'.$mydirname.'/',3, _MD_D3DOWNLOADS_NOEDITTPERM );
	exit();
}

// パンくず部分の処理
$whr_cat = "cid IN (".implode(",", $user_access->can_read() ).")" ;
$bc[0] = d3download_breadcrumbs( $mydirname ) ;
$breadcrumbs = array_merge( $bc ,d3download_breadcrumbs_tree( $mydirname, $cid4assign, $whr_cat, '', 1 ) ) ;
$breadcrumbs[] = array( 'name' => $formtitle.':'.$title4assign ) ;

// 管理者の投稿フォーム用に HISTORY DATA を取得
$history = new history_download( $mydirname ) ;
$history4assign = $history->get_history_list( $lid );

// 同一リンクの再登録を認めるかどうか
$check_url = ! empty( $xoopsModuleConfig['check_url'] ) ? 1 : 0 ;

// maxfilesize(テンプレートへのアサイン用)
$upload_max_filesize = d3download_get_maxsize( $mydirname );
$max_submit_size = sprintf( _MD_D3DOWNLOADS_SUBMIT_MAXFILESIZE , number_format( $upload_max_filesize ) ) ;
$submit_extension = d3download_get_allowed_extension( $mydirname );

// 環境チェックし error の場合はアップロードフォームを選択できないようにする
Esempio n. 3
0
	include_once dirname( dirname(__FILE__) ).'/class/mycategory.php' ;
	$mycategory = new MyCategory( $mydirname, 'Show', $cid, $whr_cat ) ;
	$pagetitle4assign = $mycategory->return_title() ;

	// 閲覧できないカテゴリはリダイレクト
	$canread = $user_access->user_access_for_cat( $cid, $whr_cat ) ;
	if( empty( $canread ) ) {
		redirect_header( XOOPS_URL.'/modules/'.$mydirname.'/',3, _MD_D3DOWNLOADS_NOREADPERM ) ;
		exit() ;
	}

	// 投稿可能なカテゴリのみ投稿フォームへのリンクを表示
	$can_post4cid = $user_access->user_access_for_cat( $cid, $whr_cat4post ) ;

	// パンくず部分の処理
	$breadcrumbs = array_merge( $bc ,d3download_breadcrumbs_tree( $mydirname, $cid, $whr_cat ) ) ;

} elseif ( isset( $_GET['submitter'] ) ) {
	// uid を取得した場合の処理
	$submitter = intval( $_GET['submitter'] ) ;

	$xoopsOption['template_main'] = $mydirname.'_main_viewcat.html' ;

	$mypost = true ;
	$xoopsTpl->assign( 'mypost', $mypost ) ;
	$xoopsTpl->assign( 'submitter', $submitter ) ;

	// 投稿者毎の登録件数を取得
	$total = $mydownload->Total_Mypost( $whr_cat, $submitter ) ;
	$postname = $mydownload->get_postname( $submitter ) ;
	$total_num = sprintf( _MD_D3DOWNLOADS_MYPOST_NUM , $postname , $total ) ;