64 lines
1.9 KiB
PHP
Executable File
64 lines
1.9 KiB
PHP
Executable File
<?
|
|
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
|
|
|
global $sugar_version, $sugar_config, $current_user, $app_strings, $mod_strings, $current_user, $app_list_strings;
|
|
|
|
|
|
require_once('modules/EcmProductCategories/EcmProductCategory.php');
|
|
require_once('modules/EcmProductCategories/Forms.php');
|
|
require_once ('include/time.php');
|
|
require_once('include/json_config.php');
|
|
|
|
$json_config = new json_config();
|
|
|
|
$focus = new EcmProductCategory();
|
|
|
|
if(isset($_REQUEST['record']))$focus->retrieve($_REQUEST['record']);
|
|
|
|
|
|
require_once('include/MVC/View/SugarView.php');
|
|
|
|
|
|
|
|
|
|
if(file_exists('modules/EcmProductCategories/views/view.detail.php')) {
|
|
require_once('modules/EcmProductCategories/views/view.detail.php');
|
|
$detail = new EcmProductCategory();
|
|
}
|
|
else{
|
|
require_once('include/MVC/View/views/view.detail.php');
|
|
$detail = new ViewDetail();
|
|
}
|
|
|
|
global $app_list_strings;
|
|
|
|
$detail->bean = $focus;
|
|
$detail->module = 'EcmProductCategories';
|
|
$detail->ss = new Sugar_Smarty();
|
|
|
|
//show assigned file
|
|
if ($focus->assigned_file!="" && $focus->assigned_file) {
|
|
$tmp = explode(".", $focus->assigned_file);
|
|
if (end($tmp) == 'jpeg' || end($tmp) == 'jpg' || end($tmp) == 'png' || end($tmp) == 'bmp')
|
|
$af = '<img src="modules/EcmProductCategories/files/'.$focus->assigned_file.'"/>';
|
|
else
|
|
$af = '<a href="modules/EcmProductCategories/files/'.$focus->assigned_file.'" target="new">'.$focus->assigned_file.'</a>';
|
|
}
|
|
|
|
$detail->ss->assign("ASSIGNED_FILE", $af);
|
|
|
|
//features
|
|
$json = getJSONobj();
|
|
$features = $json->decode(htmlspecialchars_decode($focus->features));
|
|
|
|
$f = '';
|
|
foreach ($features as $feature) {
|
|
$opt = ' [ '.str_replace(";", " | ", $feature['feature_options']).' ]';
|
|
$f.=$feature['feature_name'].$opt.'<br>';
|
|
}
|
|
|
|
$detail->ss->assign("FEATURES", $f);
|
|
|
|
$detail->preDisplay();
|
|
|
|
echo $detail->display(); |