<?php
include(DIR_FS_CATALOG.'lang/'.$_SESSION['language'].'/admin/configuration.php');
require(DIR_WS_CLASSES.'configurations.php');
$id = xtc_db_input($_GET['id']);
$configurations = new configurations();
$configuration = $configurations->get_configuration($id);

switch($_GET['action']){
	case 'delete_confirm':
		die('Unconfirmed Action');
		$smarty->assign('BOX_TITLE', $configuration->data->name );
		$contents = array();
		$contents[] = array('align'=>'center','text' => DELETE_ENTRY );
		$contents[] = array('align'=>'center','text' => yes_draw_href_button(IMAGE_DELETE,xtc_href_link(FILENAME_CONFIGURATIONS,xtc_get_all_get_params(array('action')).'action=delete'),$access='func_configurations_delete','width:100px;').'&nbsp;'.yes_draw_href_button(IMAGE_CANCEL,"javascript:ajax_box_action('".$id."','');",$access='configurations','width:100px;') );

		break;
	default:
		$smarty->assign('BOX_TITLE', $configuration->data->name );
		$contents = array();
		$contents[] = array('align'=>'center','text' => $configuration->data->desc );
		$contents[] = array('align'=>'center','text' => yes_draw_href_button(IMAGE_EDIT,xtc_href_link(FILENAME_CONFIGURATIONS_EDIT,'id='.$id),$access='configurations_edit','width:180px;') );
		break;
}

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

