$ispreview = $iserror = $auto_approved = $canhtml = $canupload = $config_error = 0 ; $permissions = $category = $select_platform = $select_license = $img_ar = $liveformErrors= array() ; $shots_help = $preview_title = $preview_body = $error_message = ''; if( ! empty( $_GET['cid'] ) ) $cid = intval( $_GET['cid'] ) ; elseif( ! empty( $_POST['cid'] ) ) $cid = intval( $_POST['cid'] ) ; // 登録は CID の指定を必要とします if( empty( $cid ) ){ redirect_header(XOOPS_URL.'/modules/'.$mydirname.'/index.php',3, _MD_D3DOWNLOADS_NO_CID ); exit(); } // 存在しない CID の場合リダイレクト $mycategory = new MyCategory( $mydirname, 'Show', $cid ) ; if( ! $mycategory->return_cid() ) { redirect_header( XOOPS_URL."/modules/$mydirname/" , 2 , _MD_D3DOWNLOADS_NOREADPERM ) ; exit(); } // 投稿権限をチェック $user_access = new user_access( $mydirname ) ; $permissions = $user_access->permissions_of_current_user( $cid ) ; if( empty( $permissions['can_post'] ) ) { redirect_header(XOOPS_URL.'/modules/'.$mydirname.'/',3, _MD_D3DOWNLOADS_NOSUBMITPERM ); exit(); } // 自動承認のチェック(管理者は除く) $auto_approved = $permissions['auto_approved'] ;
$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.' ) ; } $error = $iserror = $can_selectshotsdir = 0 ; $categorydata = $error_message = $tags = array() ; $error_message = '' ; $cid = isset( $_GET['cid'] ) ? intval( $_GET['cid'] ) : 0 ; $mycategory = new MyCategory( $mydirname, 'Show', $cid ) ; // 存在しない CID の場合リダイレクト if( $cid != 0 && ! $mycategory->return_cid() ) { redirect_header( XOOPS_URL."/modules/$mydirname/admin/index.php?page=categorymanager" , 2 , _MD_D3DOWNLOADS_NOREADPERM ) ; exit(); } // GET CATEGORY DATA $category_edit = new MyCategory( $mydirname,'Edit' ) ; if( empty( $iserror ) ) $categorydata = $category_edit->MyCategory_for_Edit( $cid ) ; $pid = $categorydata['pid'] ; $useshots = d3download_can_useshots( $mydirname ) ; $usealbum = d3download_can_albumselect( $mydirname ) ; if( ! empty( $useshots ) && empty( $usealbum ) ) $can_selectshotsdir = 1 ; $shots_dir = XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/images/shots/' ; $shotsdirhelp = sprintf( _MD_D3DOWNLOADS_CATEGORYSHOTSDIRHELP , $shots_dir ) ;