Пример #1
0
	redirect_header( XOOPS_URL."/modules/$mydirname/" , 2 , _MD_D3DOWNLOADS_NOMATCH ) ;
	exit();
}

$lid = $historydata['lid'];
$history4assign = $historydata['historydata'];

// GET HISTORY lIST
$historylist = array() ;
$historylist = $history->get_history_list( $lid, $id );

// GET DOWNLOADDATA
include_once dirname(dirname(__FILE__)).'/class/mydownload.php' ;
$mydownload = new MyDownload( $mydirname, $lid );
$download4assign = $mydownload->get_downdata_for_singleview( 0, $lid, 0, 0, 1 );
$invisibleinfo = $mydownload->Invisible_Info();

// HISTORY RESTORE
if( ! empty( $_POST['restore'] ) ) {
	if ( ! $xoopsGTicket->check( true , 'd3downloads' ) ) {
		redirect_header(XOOPS_URL.'/modules/'.$mydirname.'/admin/index.php',3,$xoopsGTicket->getErrors());
	}
	require_once dirname( dirname(__FILE__) ).'/include/common_functions.php' ;
	$errors = '';
	$id = isset( $_POST['id'] ) ? intval( $_POST['id'] ) : 0 ;
	$lid = isset( $_POST['lid'] ) ? intval( $_POST['lid'] ) : 0 ;
	$cid = isset( $_POST['cid'] ) ? intval( $_POST['cid'] ) : 0 ;

	$new_id = $history->history_Insert_DB( $lid ) ;
	$result = $history->history_Restore( $id, $lid );
	if( ! $result ) $errors = $id ;