$error_message = '' ; // GET CATEGORY LIST $category4assin = d3download_categories_selbox( $mydirname, '', 0, 1, 1 ) ; $user_access = new user_access( $mydirname ) ; if( ! empty( $_POST['category_select'] ) ) $cid = intval( $_POST['category_select'] ); 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 = '' ;
function d3download_cat_pid( $mydirname, $cid ) { include_once dirname( dirname(__FILE__) ).'/class/mycategory.php' ; $mycategory = new MyCategory( $mydirname, 'Show', $cid ) ; return $mycategory->return_pid() ; }