Ejemplo n.º 1
0
echo getClassicModuleTitle('xVendors', array($moduleName, $mod_strings['LBL_SAVE_XVENDOR']), true);
$xtpl = new XTemplate('modules/xVendors/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);
}
$xvendor = new xVendor();
require_once 'modules/xVendors/xVendorFormBase.php';
$xvendorForm = new xVendorFormBase();
$GLOBALS['check_notify'] = FALSE;
$query = 'select id, name, website, billing_address_city  from xvendors where 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 .= "id='{$duplicate_id}' ";
    }
    $query .= ')';
Ejemplo n.º 2
0
 * details.
 * 
 * You should have received a copy of the GNU Affero General Public License along with
 * this program; if not, see http://www.gnu.org/licenses or write to the Free
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301 USA.
 * 
 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
 * 
 * The interactive user interfaces in modified source and object code versions
 * of this program must display Appropriate Legal Notices, as required under
 * Section 5 of the GNU Affero General Public License version 3.
 * 
 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
 * these Appropriate Legal Notices must retain the display of the "Powered by
 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
 * technical reasons, the Appropriate Legal Notices must display the words
 * "Powered by SugarCRM".
 ********************************************************************************/
/*********************************************************************************
 * Description:  Saves an xVendor record and then redirects the browser to the
 * defined return URL.
 * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
 * All Rights Reserved.
 * Contributor(s): ______________________________________..
 ********************************************************************************/
require_once 'modules/xVendors/xVendorFormBase.php';
$xvendorForm = new xVendorFormBase();
$prefix = empty($_REQUEST['dup_checked']) ? '' : 'xVendors';
$xvendorForm->handleSave($prefix, true, false);