예제 #1
0
// UNAPROVAL DELETE
if( ! empty( $_POST['unapproval_delete'] ) ) {
	if ( ! $xoopsGTicket->check( true , 'd3downloads' ) ) {
		redirect_header(XOOPS_URL.'/modules/'.$mydirname.'/admin/index.php',3,$xoopsGTicket->getErrors());
	}
	if( empty( $_POST['action_selects'] ) ) $message[] = _MD_D3DOWNLOADS_ERROR_SEL_FILSE ;
	if( ! empty( $message ) ){
		$iserror = 1 ;
		$error_message = implode( '<br />' , $message ) ;
	}
	if( empty( $iserror ) ) {
		foreach( $_POST['action_selects'] as $id => $value ) {
			if( empty( $value ) ) continue ;
			$requestid = intval( $id ) ;
			$error = $unapproval_execution->Delete_Unapproval( $requestid );
			if( ! empty ( $error ) ) $errors[] = $requestid ;
		}
		redirect_header( XOOPS_URL."/modules/$mydirname/admin/index.php?page=approvalmanager" , 2 , $errors ? sprintf( _MD_D3DOWNLOADS_ERROR_MESSEAGE , implode( ',' , $errors ) ) : _MD_D3DOWNLOADS_DELETED ) ;
		exit() ;
	}
}

// UNAPROVAL MODFILE LIST
$modfile_sum = sprintf( _MD_D3DOWNLOADS_UNAPROVALNUM , $unapproval_execution->Total_Num( 'ModFile' ) );
$modfile = $unapproval_execution->get_unapproval_list( 'ModFile' ) ;

// UNAPROVAL MODFILE DELETE
if( ! empty( $_POST['modfile_delete'] ) ) {
	if ( ! $xoopsGTicket->check( true , 'd3downloads' ) ) {
		redirect_header(XOOPS_URL.'/modules/'.$mydirname.'/admin/index.php',3,$xoopsGTicket->getErrors());
예제 #2
0
	if( isset( $_POST['makedownload_preview'] ) ){
		 $ispreview = true ;
		 $preview_title = $submit_result['preview_title'] ;
		 $preview_body = $submit_result['preview_body'] ;
	}
}

// DELETE SQL
if( isset( $_POST['makedownloadform_delete'] ) ) {
	if ( ! $xoopsGTicket->check( true , 'd3downloads' ) ) {
		redirect_header(XOOPS_URL.'/modules/'.$mydirname.'/admin/index.php',3,$xoopsGTicket->getErrors());
	}

	$error = 0 ;
	$id = isset( $_POST['requestid'] ) ? intval( @$_POST['requestid'] ) : '' ;
	$error = $unapproval->Delete_Unapproval( $id );
	redirect_header( XOOPS_URL."/modules/$mydirname/admin/index.php?page=approvalmanager" , 2 , $error ? sprintf( _MD_D3DOWNLOADS_ERROR_MESSEAGE , $error ) : _MD_D3DOWNLOADS_DELETED ) ;
	exit();
}

// display stage
xoops_cp_header();
include dirname(__FILE__).'/mymenu.php' ;
require_once XOOPS_ROOT_PATH.'/class/template.php' ;
$tpl = new XoopsTpl() ;
$tpl->assign( array(
	'mydirname' => $mydirname ,
	'mod_url' => $mod_url ,
	'page' => 'approval' ,
	'unapproval' => $download4assign ,
	'down' => $nowdata ,