<?php if (!defined('sugarEntry') || !sugarEntry) { die('Not A Valid Entry Point'); } require_once 'modules/Realty/RealtyFormBase.php'; $realtyForm = new RealtyFormBase(); $prefix = empty($_REQUEST['dup_checked']) ? '' : 'Realty'; $realtyForm->handleSave($prefix, true, false);
echo getClassicModuleTitle('Realty', array($moduleName, $mod_strings['LBL_SAVE_REALTY']), true); $xtpl = new XTemplate('modules/Realty/ShowDuplicates.html'); $xtpl->assign("MOD", $mod_strings); $xtpl->assign("APP", $app_strings); $xtpl->assign("PRINT_URL", "index.php?" . $GLOBALS['request_string']); $xtpl->assign("MODULE", $_REQUEST['module']); if ($error_msg != '') { $xtpl->assign("ERROR", $error_msg); $xtpl->parse("main.error"); } if (isset($_REQUEST['popup']) && $_REQUEST['popup'] == 'true' || isset($_POST['popup']) && $_POST['popup'] == true) { insert_popup_header($theme); } $realty = new Realty(); require_once 'modules/Realty/RealtyFormBase.php'; $realtyForm = new RealtyFormBase(); $GLOBALS['check_notify'] = FALSE; $query = 'SELECT realty.id, realty.name, realty.address_street, realty.owner_phone FROM realty WHERE realty.deleted = 0 '; $duplicates = $_POST['duplicate']; $count = count($duplicates); if ($count > 0) { $query .= "AND ("; $first = true; foreach ($duplicates as $duplicate_id) { if (!$first) { $query .= ' OR '; } $first = false; $query .= "realty.id = '{$duplicate_id}' "; } $query .= ')';