<?php
require(DIR_WS_CLASSES.'imports.php');
$id = xtc_db_input($_GET['id']);
$imports = new imports();
$import = $imports->get_import($id);

switch($_GET['action']){
	case 'delete_confirm':
		$smarty->assign('BOX_TITLE', $import->data->import_number );
		$contents = array();
		$contents[] = array('align'=>'center','text' => DELETE_ENTRY );
		$contents[] = array('align'=>'center','text' => yes_draw_href_button(IMAGE_DELETE,xtc_href_link(FILENAME_IMPORTS,xtc_get_all_get_params(array('action')).'action=delete'),$access='func_imports_delete','width:100px;').'&nbsp;'.yes_draw_href_button(IMAGE_CANCEL,"javascript:ajax_box_action('".$id."','');",$access='imports','width:100px;') );
		
		break;
	default:
		$smarty->assign('BOX_TITLE', $import->data->import_number );
		$contents = array();
		$contents[] = array('align'=>'center','text' => yes_draw_href_button(IMAGE_OVERVIEW,xtc_href_link(FILENAME_IMPORTS,'id='.$id.'&action=overview'),$access='imports','width:180px;') );
		$contents[] = array('align'=>'center','text' => yes_draw_href_button(NEW_QUICKNOTE,"javascript:toggleBox('addquicknote');",'notiz','width:180px;').yes_draw_quicknote( xtc_href_link(FILENAME_IMPORTS,'id='.$id.'&action=overview') ) );
		$contents[] = array('align'=>'center','text' => yes_draw_href_button(IMAGE_DELETE,"javascript:ajax_box_action('".$id."','delete_confirm');",$access='func_imports_delete','width:180px;') );
		$contents[] = array('align'=>'left','text' => '<b>'.IMAGE_STATUS.':</b> '.yes_get_imports_status_name($import->data->status) );
		break;
}

$box = new box;
$smarty->assign('BOX_CONTENT', $box->infoBox($contents) );

