コード例 #1
0
} else {
    $list_ports[] = $ports_name;
}
$db = new ossim_db();
$conn = $db->connect();
$output_ajax = "[";
foreach ($list_ports as $port) {
    if (is_numeric($port)) {
        if ($port < 0 && $port > 65535) {
            $db->close();
            die("ZZZ");
        }
        $output_ajax .= "'" . $port . "',";
        continue;
    }
    $port = Port::service2port($conn, $port, $protocol);
    if (is_numeric($port)) {
        if ($port < 0 && $port > 65535) {
            $db->close();
            die("ZZZ");
        }
        $output_ajax .= "'" . $port . "',";
        continue;
    } else {
        $db->close();
        die("XXX");
    }
}
$output_ajax = preg_replace('/,$/', '', $output_ajax);
$output_ajax .= "];";
$db->close();