grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026isAdminForModule('Users') ) { sugar_die("You cannot access this page."); } global $locale; $return_module = isset($_REQUEST['return_module']) ? $_REQUEST['return_module'] : ''; $return_action = isset($_REQUEST['return_action']) ? $_REQUEST['return_action'] : ''; $return_id = isset($_REQUEST['return_id']) ? $_REQUEST['return_id'] : ''; if (!empty($return_module)) { $cancel_location = "index.php?module=".$return_module."&action=".$return_action."&record=".$return_id; } else { $cancel_location = "index.php?module=Users&action=index"; } echo "
| \n";
if (! $workflow) {
$affected_rows = DBManagerFactory::getInstance()->getAffectedRowCount($res);
echo "{$mod_strings_users['LBL_UPDATE_FINISH']}: $affected_rows {$mod_strings_users['LBL_AFFECTED']} \n"; } else { $successarr = array(); $failarr = array(); require_once($beanFiles[$module]); while ($row = DBManagerFactory::getInstance()->fetchByAssoc($res)) { $bean = new $module(); if (empty($row['id'])) { continue; } $bean->retrieve($row['id']); // So that we don't create new blank records. if (!isset($bean->id)) { continue; } $bean->assigned_user_id = $touser; if ($bean->save()) { $linkname = "record with id {$bean->id}"; if (!empty($bean->name)) { $linkname = $bean->name; } elseif (!empty($bean->last_name)) { $linkname = $locale->getLocaleFormattedName($bean->first_name, $bean->last_name); } elseif (!empty($bean->document_name)) { $linkname = $bean->document_name; } $successstr = "{$mod_strings_users['LBL_REASS_SUCCESS_ASSIGN']} {$bean->object_name} \"module_dir}&action=DetailView&record={$bean->id}\">$linkname\" {$mod_strings_users['LBL_REASS_FROM']} $fromusername {$mod_strings_users['LBL_REASS_TO']} $tousername"; $successarr[] = $successstr; } else { $failarr[] = "{$mod_strings_users['LBL_REASS_FAILED_SAVE']} \"module_dir}&action=DetailView&record={$bean->id}\">$linkname\"."; } } if (isset($_POST['verbose']) && $_POST['verbose'] == "on") { echo " {$mod_strings_users['LBL_REASS_THE_FOLLOWING']} {$app_list_strings['moduleList'][$p_module]} {$mod_strings_users['LBL_REASS_HAVE_BEEN_UPDATED']}\n"; foreach ($successarr as $ord) { echo "$ord\n\n"; } if (empty($successarr)) { echo "{$mod_strings_users['LBL_REASS_NONE']}\n \n"; } echo " {$mod_strings_users['LBL_REASS_THE_FOLLOWING']} {$app_list_strings['moduleList'][$p_module]} {$mod_strings_users['LBL_REASS_CANNOT_PROCESS']}\n"; foreach ($failarr as $failure) { echo $failure."\n\n"; } if (empty($failarr)) { echo "{$mod_strings_users['LBL_REASS_NONE']}\n \n"; } } else { echo "{$mod_strings_users['LBL_REASS_UPDATE_COMPLETE']}\n \n"; echo " ".count($successarr)." {$mod_strings_users['LBL_REASS_SUCCESSFUL']}\n \n"; echo " ".count($failarr)." {$mod_strings_users['LBL_REASS_FAILED']}\n"; } echo " \n"; } echo " |