function d3download_group_useraccess_info( $mydirname, $cid ) { $pid = d3download_cat_pid( $mydirname, $cid ) ; require_once dirname( dirname(__FILE__) ).'/class/user_access.php' ; $user_access = new user_access( $mydirname ) ; return $user_access->get_group_form( $cid, $pid, 1 ) ; }
elseif( ! empty( $_GET['cid'] ) ) $cid = intval( $_GET['cid'] ); else $cid = $user_access->get_top_weightid( 1 ) ; // GET CATEGORY TITLE $mycategory = new MyCategory( $mydirname, 'Show', $cid ) ; $title = $mycategory->return_title() ; $formtitle = ( $title ) ? sprintf( _MD_D3DOWNLOADS_H2USERACCESS , $title ) : _MD_D3DOWNLOADS_NEWCID_USERACCESS ; $parentid = $mycategory->return_pid() ; $maincid = ( $parentid != 0 ) ? $mycategory->get_my_maincid( $cid ) : 0 ; $category_tree = ( $parentid != 0 ) ? d3download_category_tree( $mydirname, $cid, 'index.php?page=user_access' ) : '' ; $copyselect = d3download_categories_selbox( $mydirname, '', 0, 0, 1, '----' , 1, $cid ) ; $categorycount = count( $copyselect ) ; // GROUP FORM $group_trs = ( $categorycount > 1 ) ? $user_access->get_group_form( $cid, $parentid, 0, 1 ) : $user_access->get_group_form( $cid, $parentid ) ; // USER FORM $user_trs = ( $categorycount > 1 ) ? $user_access->get_user_form( $cid, $parentid, 0, 1 ) : $user_access->get_user_form( $cid, $parentid ) ; // NEW USER FORM if( $categorycount > 1 && $parentid == 0 ) $newuser_trs = $user_access->get_newuser_form( $cid, 1 ) ; elseif( $parentid == 0 ) $newuser_trs = $user_access->get_newuser_form( $cid ) ; else $newuser_trs = '' ; // TRANSACTION PART if( isset( $_POST['group_update'] ) ){ if ( ! $xoopsGTicket->check( true , 'd3downloads' ) ) { redirect_header(XOOPS_URL.'/modules/'.$mydirname.'/admin/index.php',3,$xoopsGTicket->getErrors()); } // GROUP UPDATE
$my_shots_dir = d3download_shots_dir( $mydirname, $cid ) ; $select_imgurl = $mydownload->shots_img_ar( $cid, $my_shots_dir ) ; // GET CATEGORY TITLE $title = $mycategory->return_title() ; $formtitle = ( $title ) ? sprintf( _MD_D3DOWNLOADS_CATEGORYEDITTITLE , $title ) : _MD_D3DOWNLOADS_NEWCATEGORYEDITTITLE ; if( $cid == 0 ) $title_useraccess = ( $title ) ? sprintf( _MD_D3DOWNLOADS_H2USERACCESS , $title ) : _MD_D3DOWNLOADS_NEWCID_USERACCESS ; elseif( $pid == 0 ) $title_useraccess = ( $title ) ? sprintf( _MD_D3DOWNLOADS_H2USERACCESS , $title ) : _MD_D3DOWNLOADS_NEWCID_USERACCESS ; else $title_useraccess = ( $title ) ? sprintf( _MD_D3DOWNLOADS_H2USERACCESS_INFO , $title ) : _MD_D3DOWNLOADS_NEWCID_USERACCESS_INFO ; // MAIN CATEGORY LIST $maincategory = $category_edit->categories_selbox( '', 0, 0, 1, '------', 0, $cid ) ; // GROUP FORM $user_access = new user_access( $mydirname ) ; $group_trs = $user_access->get_group_form( $cid, $pid ) ; // USER FORM $user_trs = $user_access->get_user_form( $cid, $pid ) ; // NEW USER FORM $newuser_trs = $user_access->get_newuser_form( $cid ) ; $useraccess_edit_info = ( empty( $cid ) ) ? '' : d3download_useraccess_edit_info( $mydirname, $cid, $pid ) ; // TRANSACTION PART if( isset( $_POST['categoryform_post'] ) || isset( $_POST['category_update'] ) || isset( $_POST['group_update'] ) || isset( $_POST['user_update'] ) ) { if ( ! $xoopsGTicket->check( true , 'd3downloads' ) ) { redirect_header(XOOPS_URL.'/modules/'.$mydirname.'/admin/index.php',3,$xoopsGTicket->getErrors()); } $requests_int = $category_edit->requests_int_categories() ;