function load_report_beans() { global $beanList, $app_list_strings; $app_list_strings['aor_moduleList'] = $app_list_strings['moduleList']; foreach ($app_list_strings['aor_moduleList'] as $mkey => $mvalue) { if (!isset($beanList[$mkey]) || str_begin($mkey, 'AOR_') || str_begin($mkey, 'AOW_')) { unset($app_list_strings['aor_moduleList'][$mkey]); } } $app_list_strings['aor_moduleList'] = array_merge((array) array('' => ''), (array) $app_list_strings['aor_moduleList']); asort($app_list_strings['aor_moduleList']); }
function genDropDownJS2() { global $app_list_strings, $beanList, $beanFiles; $lblContactAndOthers = implode('/', array(isset($app_list_strings['moduleListSingular']['Contacts']) ? $app_list_strings['moduleListSingular']['Contacts'] : 'Contact', isset($app_list_strings['moduleListSingular']['Leads']) ? $app_list_strings['moduleListSingular']['Leads'] : 'Lead', isset($app_list_strings['moduleListSingular']['Prospects']) ? $app_list_strings['moduleListSingular']['Prospects'] : 'Target')); $dropdown = ''; array_multisort($app_list_strings['moduleList'], SORT_ASC, $app_list_strings['moduleList']); foreach ($app_list_strings['moduleList'] as $key => $name) { if (isset($beanList[$key]) && isset($beanFiles[$beanList[$key]]) && !str_begin($key, 'AOW_') && !str_begin($key, 'zr2_')) { if ($key == 'Contacts') { $dropdown .= "<option value='" . $key . "'>\n\t\t\t\t\t\t" . $lblContactAndOthers . "\n\t\t \t </option>"; } else { if (isset($app_list_strings['moduleListSingular'][$key])) { $dropdown .= "<option value='" . $key . "'>\n\t\t\t\t\t\t" . $app_list_strings['moduleListSingular'][$key] . "\n\t\t \t </option>"; } else { $dropdown .= "<option value='" . $key . "'>\n\t\t\t\t\t\t" . $app_list_strings['moduleList'][$key] . "\n\t\t \t </option>"; } } } } return $dropdown; }
/** * This function will take a number and system_id and format * @param $url URL containing host to append port * @param $port the port number - if '' is passed, no change to url * @return $resulturl the new URL with the port appended to the host */ function appendPortToHost($url, $port) { $resulturl = $url; // if no port, don't change the url if ($port != '') { $split = explode("/", $url); //check if it starts with http, in case they didn't include that in url if (str_begin($url, 'http')) { //third index ($split[2]) will be the host $split[2] .= ":" . $port; } else { //first index ($split[0]) will be the host $split[0] .= ":" . $port; } $resulturl = implode("/", $split); } return $resulturl; }