Пример #1
0
$invisible = isset( $_GET['invisible'] ) ? intval( $_GET['invisible'] ) : 0 ;

// GET SUBMITTER LIST
$submitter_select = $file_manager->submitter_select_box( '', 1 ) ;

$mypost = ( isset( $_POST['sel_submitter'] ) || isset( $_GET['mypost'] ) ) ? 1 : 0 ;
if( ! empty( $_POST['submitter'] ) ) $submitter = intval( $_POST['submitter'] ) ;
elseif( ! empty( $_GET['submitter'] ) ) $submitter = intval( $_GET['submitter'] ) ;
else $submitter = 0 ;

$select_intree = d3download_select_intree() ;
$intree = ( ! empty( $_POST['intree'] ) || ! empty( $_GET['intree'] ) ) ? 1 : 0 ;

$select_perpage = d3download_select_perpage( $mydirname ) ;
$list_order = d3download_select_order() ;
$select_order = d3download_selected_order( $mydirname ) ;

$current_start = isset($_GET['start']) ? intval( $_GET['start'] ) : 0 ;
$perpage4assign = d3download_items_perpage();

if( empty( $mypost ) ) $total_num = $file_manager->Total_Num( '', $category_select, 1, $invisible, $intree ) ;
else  $total_num = $file_manager->Total_Mypost( '', $submitter, $category_select, 1, $intree ) ;

$invisible_num = $file_manager->Invisible_Num( $category_select, $intree ) ;

if( ! empty( $mypost ) ) $postname = $file_manager->get_postname( $submitter ) ;

if( ! empty( $category_select ) && empty( $mypost ) ){
	$total_info =  ( empty( $invisible ) ) ? _MD_D3DOWNLOADS_CATEGORY_FIlE_NUM : _MD_D3DOWNLOADS_CATEGORY_INVISIBLE_NUM ;
} elseif( empty( $mypost ) ){
	$total_info =  ( empty( $invisible ) ) ? _MD_D3DOWNLOADS_TOTAL_FIlE_NUM : _MD_D3DOWNLOADS_TOTAL_INVISIBLE_NUM ;
Пример #2
0
	$xoops_userid = $xoopsUser->getVar('uid') ;
	$xoops_uname = $xoopsUser->getVar('uname') ;
	$module_handler =& xoops_gethandler( 'module' ) ;
	$module =& $module_handler->getByDirname( $mydirname ) ;
	$mid = $module->getVar('mid') ;
	$module_admin = $xoopsUser->isAdmin( $mid ) ;
} else {
	$xoops_isuser = false ;
	$xoops_userid = 0 ;
	$xoops_uname = '' ;
	$module_admin = false ;
}

// DELETE NULLBYTE
$_GET = d3download_delete_nullbyte( $_GET );
$orderby = d3download_selected_order( $mydirname ) ;
$xoopsTpl->assign('lang_cursortedby', sprintf( _MD_D3DOWNLOADS_CURSORTBY, d3download_convertorderbytrans( $orderby ) ) );

$mydownload = new MyDownload( $mydirname );

// CID を取得した場合の処理
$cid = ( ! empty( $_GET['cid'] ) ) ? intval( $_GET['cid'] ) : 0 ;
$select_intree = d3download_select_intree();
$intree =  ( ! empty( $_GET['intree'] ) ) ? 1 : 0 ;

$xoopsTpl->assign( 'select_id', $cid ) ; 
$xoopsTpl->assign( 'category_id', $cid );
$xoopsTpl->assign( 'select_intree' , $select_intree ) ; 
$xoopsTpl->assign( 'intree', $intree );

// 登録件数を取得