コード例 #1
0
global $app_strings;
global $app_list_strings;
global $current_language;
global $current_user;
global $sugar_version, $sugar_config;
$focus = new ProductEstimate();
if (!empty($_REQUEST['record'])) {
    $focus->retrieve($_REQUEST['record']);
}
$precalc = null;
if (isset($_REQUEST['precalc']) && !empty($_REQUEST['precalc'])) {
    $precalc = $_REQUEST['precalc'];
}
if (!empty($_REQUEST['product_id']) && isset($_REQUEST['product_id']) && !is_null($_REQUEST['product_id'])) {
    $product_id = $_REQUEST['product_id'];
    $components_estimate = $focus->componentsEstimate($product_id);
} elseif (isset($focus->product_id) && !is_null($focus->product_id)) {
    $product_id = $focus->product_id;
    $components_estimate = $focus->componentsEstimate($product_id);
} else {
    exit;
}
if (!empty($_REQUEST['product_name']) && isset($_REQUEST['product_name']) && !is_null($_REQUEST['product_name'])) {
    $product_name = $_REQUEST['product_name'];
}
echo "\n<p>\n";
echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME'] . ": " . $focus->name, true);
echo "\n</p>\n";
global $theme;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";