<?php

if (!defined('sugarEntry') || !sugarEntry)
	die('Not A Valid Entry Point');

global $sugar_version, $sugar_config, $current_user, $app_strings, $mod_strings, $current_user;

require_once ('include/time.php');
require_once('include/json_config.php');

$json_config = new json_config();
$focus = new EcmWorkCard();

if (isset($_REQUEST['record']) && $_REQUEST['record'] != '') {
	$focus->retrieve($_REQUEST['record']);
	$focus->format_all_fields();
}else{
	if($_REQUEST['date']!=""){
		$focus->date = $_REQUEST['date'];
	} else {
		$focus->date = date("d.m.Y");
	}

}

require_once('include/MVC/View/SugarView.php');
require_once('modules/EcmWorkCards/view/EditView/view.edit.my.php');

$edit = new ViewEditEcmWorkCards();
$edit->ss = new Sugar_Smarty();
$edit->tplFile = 'include/ECM/EcmViews/EditView/Tabs/EditView.tpl';
$edit->module = 'EcmWorkCards';
$edit->bean = $focus;

$eal = $focus->getActionList();
$edit->ss->assign('TABLEECMACTIONS_LIST', $eal);

$edit->preDisplay();
echo $edit->display();
?>