$DBRESULT =& $pearDB->query("UPDATE `mod_gmap_locations` SET `h_id`='{$hg_id}',`lat`='{$lat}',`lng`='{$lng}',`address`='{$address}' WHERE l_id='{$l_id}' LIMIT 1"); } else { if ($action == "delete") { $DBRESULT =& $pearDB->query("DELETE from `mod_gmap_locations` WHERE l_id='{$l_id}' LIMIT 1"); } } } if (PEAR::isError($DBRESULT)) { print "DB Error : " . $DBRESULT->getDebugInfo() . "<br>"; } } /* * we pass either group or host */ getHostgroupLatLong2('host'); getHostList(); $mod_gmap_options = readConfigOptions($pearDB, $oreon); $tpl = new Smarty(); $tpl = initSmartyTpl($path, $tpl); $tpl->assign("h_names", $smarty_host); $tpl->assign("host_list", $smarty_host_list); $tpl->assign("hostgroup_list", $smarty_hostgroup_list); $tpl->assign("gmap_lat", $mod_gmap_options['lat']); $tpl->assign("gmap_lng", $mod_gmap_options['lng']); $tpl->assign("gmap_height", $mod_gmap_options['height']); $tpl->assign("gmap_zoom", $mod_gmap_options['zoomLevel']); /* * translations */ $tpl->assign("host", _("Hosts")); $tpl->assign("address", _("Address, postal code, city, country"));
?> </th> <th><?php echo gettext('IP'); ?> </th> </tr> <?php if (substr($to_list, 0, 1) == '!') { $default_checked = ' checked="checked"'; $to_list = substr($to_list, 1); } else { $default_checked = ''; } if ($host_list = getHostList()) { foreach ($host_list as $host) { $hostname = $host->get_hostname(); $ip = $host->get_ip(); if ($to == 'ANY') { $checked = ' checked="checked"'; } elseif (in_array($ip, split(',', $to_list))) { $checked = $default_checked == '' ? ' checked="checked"' : ''; } else { $checked = $default_checked; } ?> <tr> <td> <input type="checkbox" id="hosttab" name="chk"
function getLang() { $my_host = getMyHostName(); $host_list = getHostList(); return array_search($my_host, $host_list); }
</a> </div> <!-- loop end --> </div> </div> <!-- menu5 --> <input class="tab_input" type="radio" name="menu" id="menu5" checked> <div class="tab_text"> <p class="arrow_box" style="left:87%"> </p> <div class="tab_contentbox"> <!-- loop start --> <?php global $my_host; $hostList = getHostList(); foreach ($hostList as $lang => $host) { if ($host != $my_host) { $langList .= '<div class="tab_menu5"><a href="http://' . $host . '">' . $lang . '</a></div>'; } } print $langList; ?> <!-- loop end --> </div> </div> <!-- menu1 --> <input class="tab_input" type="radio" name="menu" id="menu1" checked> <div class="tab_text"> <p class="arrow_box" style="left:18px"> </p>
function jpnCheck() { global $my_host; $hostList = getHostList(); $jp_flg = 0; if ($my_host == $hostList['日本語']) { $jp_flg = 1; } return $jp_flg; }