当前位置: 首页>>代码示例>>PHP>>正文


PHP Util::make_form方法代码示例

本文整理汇总了PHP中Util::make_form方法的典型用法代码示例。如果您正苦于以下问题:PHP Util::make_form方法的具体用法?PHP Util::make_form怎么用?PHP Util::make_form使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Util的用法示例。


在下文中一共展示了Util::make_form方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: urlencode

</head>

<body>

<?php 
if (POST('withoutmenu') != "1") {
    include "../hmenu.php";
    $get_param = "ip={$ip}&name=" . urlencode($sname);
} else {
    $get_param = "ip={$ip}&name=" . urlencode($sname) . "&withoutmenu=1";
}
if (POST('insert') && !empty($sname)) {
    if ($error == true) {
        $txt_error = "<div>" . _("We Found the following errors") . ":</div><div style='padding:10px;'>" . implode("<br/>", $message_error) . "</div>";
        Util::print_error($txt_error);
        Util::make_form("POST", "modifysensorform.php?" . $get_param);
        die;
    }
    $db = new ossim_db();
    $conn = $db->connect();
    Sensor::update($conn, $sname, $ip, $priority, $port, $tzone, $descr);
    $db->close($conn);
    Util::clean_json_cache_files("sensors");
}
if (isset($_SESSION['_sensor'])) {
    unset($_SESSION['_sensor']);
}
?>
    <script type='text/javascript'>document.location.href="modifysensorform.php?<?php 
echo $get_param;
?>
开发者ID:jhbsz,项目名称:ossimTest,代码行数:31,代码来源:modifysensor.php

示例2: _

	<meta http-equiv="Pragma" content="no-cache"/>
	<link rel="stylesheet" type="text/css" href="../style/av_common.css?t=<?php 
echo Util::get_css_id();
?>
"/>
</head>

<body>
<?php 
if (POST('insert')) {
    if ($data['status'] == 'error') {
        $txt_error = "<div>" . _("We Found the following errors") . ":</div>\n    \t\t\t\t\t  <div style='padding:10px;'>" . implode("<br/>", $validation_errors) . "</div>";
        $config_nt = array('content' => $txt_error, 'options' => array('type' => 'nf_error', 'cancel_button' => FALSE), 'style' => 'width: 80%; margin: 20px auto; text-align: left;');
        $nt = new Notification('nt_1', $config_nt);
        $nt->show();
        Util::make_form("POST", "newlocationsform.php");
        die;
    }
    $db = new ossim_db();
    $conn = $db->connect();
    $newid = Locations::insert($conn, $ctx, $name, $desc, $location, $latitude, $longitude, $cou);
    Util::memcacheFlush();
    $db->close($conn);
}
?>
    <script type='text/javascript'>
        if (!parent.is_lightbox_loaded(window.name))
        {
            document.location.href="locations.php?msg=updated";
        }
        else
开发者ID:AntBean,项目名称:alienvault-ossim,代码行数:31,代码来源:newlocations.php

示例3: _

	<meta http-equiv="Pragma" content="no-cache"/>
	<link type="text/css" rel="stylesheet" href="../style/av_common.css?t=<?php 
echo Util::get_css_id();
?>
"/>
</head>

<body>
    <?php 
if (POST('insert')) {
    if ($data['status'] == 'error') {
        $txt_error = "<div>" . _('The following errors occurred') . ":</div>\n    \t\t\t\t\t  <div style='padding: 2px 10px 5px 10px;'>" . implode("<br/>", $validation_errors) . "</div>";
        $config_nt = array('content' => $txt_error, 'options' => array('type' => 'nf_error', 'cancel_button' => FALSE), 'style' => 'width: 80%; margin: 20px auto; text-align: left;');
        $nt = new Notification('nt_1', $config_nt);
        $nt->show();
        Util::make_form('POST', 'newsensorform.php');
        exit;
    }
    $db = new ossim_db();
    $conn = $db->connect();
    $new_id = Util::uuid();
    try {
        $new = new Av_Sensor($new_id);
        $new->set_properties(array('version' => '', 'has_nagios' => 0, 'has_ntop' => 1, 'has_vuln_scanner' => 1, 'has_kismet' => 0));
        $new->set_name($sname);
        $new->set_ip($ip);
        $new->set_priority($priority);
        $new->set_port($port);
        $new->set_tzone($tzone);
        $new->set_descr($descr);
        foreach ($entities as $ctx) {
开发者ID:jackpf,项目名称:ossim-arc,代码行数:31,代码来源:newsensor.php

示例4: _

echo Util::get_css_id();
?>
"/>
    </head>

    <body>

    <?php 
$msg = NULL;
if (empty($data['data']['login'])) {
    if ($data['status'] == 'error') {
        $txt_error = "<div>" . _('The following errors occurred') . ":</div>\n                          <div style='padding:10px;'>" . implode('<br/>', $validation_errors) . '</div>';
        $config_nt = array('content' => $txt_error, 'options' => array('type' => 'nf_error', 'cancel_button' => FALSE), 'style' => 'width: 80%; margin: 20px auto; text-align: left;');
        $nt = new Notification('nt_1', $config_nt);
        $nt->show();
        Util::make_form('POST', "user_form.php?login={$login}");
        exit;
    } else {
        //Create or update user
        $insert_menu = FALSE;
        $language_changed = FALSE;
        $tzone_changed = FALSE;
        // MENUS
        if (!$pro && $am_i_admin && !$is_my_profile) {
            $insert_menu = true;
            $perms = array();
            list($menu_perms, $perms_check) = Session::get_menu_perms($conn);
            foreach ($menu_perms as $mainmenu => $menus) {
                foreach ($menus as $key => $menu) {
                    $cond_1 = POST("menu_perm{$key}") == 'on';
                    $cond_2 = $perms_check[$mainmenu][$key] == TRUE;
开发者ID:alienfault,项目名称:ossim,代码行数:31,代码来源:users_edit.php

示例5: POST

                }
            }
        }
        $period = POST('task_period');
        $enable = POST('task_enable') >= 1 ? 1 : 0;
        ossim_valid($id, OSS_DIGIT, OSS_NULLABLE, 'illegal:' . _('Task ID'));
        if (ossim_error()) {
            $data['status'] = 'error';
            $data['data']['id'] = ossim_get_error_clean();
        }
        if ($data['status'] == 'error') {
            $txt_error = '<div>' . _('We Found the following errors') . ":</div>\n\t\t\t\t\t  <div style='padding: 2px 10px 5px 10px;'>" . implode('<br/>', $validation_errors) . '</div>';
            $config_nt = array('content' => $txt_error, 'options' => array('type' => 'nf_error', 'cancel_button' => false), 'style' => 'width: 80%; margin: 20px auto; text-align: left;');
            $nt = new Notification('nt_1', $config_nt);
            $nt->show();
            Util::make_form("POST", "index.php");
            exit;
        } else {
            if (POST('mode') == 'insert') {
                $id = Inventory::insert($conn, $sensor_id, $name, $s_type_ids[$s_type], $period, $params, $enable, $nets);
                Web_indicator::set_on('Reload_tasks');
                ?>
			<script type="text/javascript">document.location.href = "index.php?s_type=<?php 
                echo $s_type;
                ?>
&msg=saved"</script>
			<?php 
                exit;
            } elseif (POST('mode') == 'update') {
                Inventory::modify($conn, $id, $sensor_id, $name, $s_type_ids[$s_type], $period, $params, $enable, $nets);
                Web_indicator::set_on('Reload_tasks');
开发者ID:AntBean,项目名称:alienvault-ossim,代码行数:31,代码来源:task_edit.php

示例6: die

     $db->close();
     exit;
 }
 if (!Session::hostAllowed_by_ip_ctx($conn, $ip, Session::get_default_ctx())) {
     $db->close();
     die(ossim_error(_("You don't have permission to create a new server with this IP Address")));
 }
 // Try to attach a new server
 $client = new Alienvault_client();
 $response = $client->system()->set_component($ip, $rpass);
 $return = @json_decode($response, TRUE);
 if (!$return || $return['status'] == 'error') {
     $config_nt = array('content' => $return['message'], 'options' => array('type' => 'nf_error', 'cancel_button' => FALSE), 'style' => 'width: 80%; margin: 20px auto; text-align:center;');
     $nt = new Notification('nt_1', $config_nt);
     $nt->show();
     Util::make_form("POST", "newserverform.php");
     $db->close();
     exit;
 } else {
     $new_id = strtoupper(str_replace('-', '', $return['data']['server_id']));
     if ($return['data']['hostname'] != '') {
         $sname = $return['data']['hostname'];
     }
 }
 if (!isset($resend_alarms)) {
     $resend_alarms = 0;
 }
 if (!isset($resend_events)) {
     $resend_events = 0;
 }
 $new_id = Server::insert($conn, $sname, $ip, $port, $descr, $correlate, $cross_correlate, $store, $rep, $qualify, $resend_alarms, $resend_events, $sign, $sem, $sim, $alarm_to_syslog, $remoteadmin, $remotepass, $remoteurl, $fwrd_server, TRUE, $new_id);
开发者ID:AntBean,项目名称:alienvault-ossim,代码行数:31,代码来源:newserver.php

示例7: _

	<meta http-equiv="Pragma" content="no-cache"/>
	<link rel="stylesheet" type="text/css" href="../style/av_common.css?t=<?php 
echo Util::get_css_id();
?>
"/>
</head>
<body>

<?php 
if (POST('insert') && empty($data['data']['locations_id'])) {
    if ($data['status'] == 'error') {
        $txt_error = "<div>" . _("We Found the following errors") . ":</div>\n\t\t\t\t\t  <div style='padding:10px;'>" . implode("<br/>", $validation_errors) . "</div>";
        $config_nt = array('content' => $txt_error, 'options' => array('type' => 'nf_error', 'cancel_button' => FALSE), 'style' => 'width: 80%; margin: 20px auto; text-align: left;');
        $nt = new Notification('nt_1', $config_nt);
        $nt->show();
        Util::make_form("POST", "newlocationsform.php?id=" . urlencode($locations_id));
        exit;
    }
    $db = new ossim_db();
    $conn = $db->connect();
    Locations::update($conn, $locations_id, $name, $desc, $location, $latitude, $longitude, $cou);
    Util::memcacheFlush();
    $db->close();
    ?>
	<script type='text/javascript'>
        if (!parent.is_lightbox_loaded(window.name))
        {
            document.location.href="locations.php?msg=updated";
        }
        else
        {
开发者ID:AntBean,项目名称:alienvault-ossim,代码行数:31,代码来源:modifylocations.php

示例8: _

	  <meta http-equiv="Pragma" content="no-cache"/>
	  <link rel="stylesheet" type="text/css" href="../style/av_common.css?t=<?php 
echo Util::get_css_id();
?>
"/>
</head>

<body>

<?php 
if ($data['status'] == 'error') {
    $txt_error = "<div>" . _("The following errors occurred") . ":</div>\n\t\t\t\t\t  <div style='padding: 2px 10px 5px 10px;'>" . implode("<br/>", $validation_errors) . "</div>";
    $config_nt = array('content' => $txt_error, 'options' => array('type' => 'nf_error', 'cancel_button' => false), 'style' => 'width: 80%; margin: 20px auto; text-align: left;');
    $nt = new Notification('nt_1', $config_nt);
    $nt->show();
    Util::make_form("POST", "newportform.php");
    exit;
}
$db = new ossim_db();
$conn = $db->connect();
if (POST('insert')) {
    Port::insert($conn, $port, $protocol, $service, $descr, $ctx);
    Util::memcacheFlush();
}
$db->close();
?>

<script type='text/javascript'>
    if (!parent.is_lightbox_loaded(window.name))
    {
        document.location.href="port.php?msg=updated";
开发者ID:jackpf,项目名称:ossim-arc,代码行数:31,代码来源:newport.php

示例9: unset

    Util::print_error($txt_error);
    if (is_numeric($ips) && isset($_SESSION["_scan"]) && $num_hosts > 0 && !$invalid_hosts) {
        Util::make_form("POST", "../host/newhostform.php?scan=1&ips={$ips}");
    } else {
        if (!$invalid_hosts) {
            unset($_SESSION["_scan"]);
        }
        Util::make_form("POST", "../netscan/index.php");
    }
    die;
}
/*
echo "<pre>";
	print_r($_SESSION["_scan"]);
echo "</pre>";
*/
if (isset($_SESSION["_scan"])) {
    $scan = $_SESSION["_scan"];
    update_db($_POST, $scan);
    echo "<br/><a href=\"../netscan/index.php\">" . _("Return to Scan Results page") . "</a><br/>";
    echo "<br/><a href=\"../host/host.php?hmenu=Assets&smenu=Hosts\">" . _("Return to host's policy") . "</a>";
} else {
    echo ossim_error(_("Error to update database values"));
    Util::make_form("POST", "../netscan/index.php");
}
?>

</body>
</html>

开发者ID:jhbsz,项目名称:ossimTest,代码行数:29,代码来源:scan_db.php

示例10: gettext

    $get_param = "withoutmenu=1";
}
?>

<h1><?php 
echo gettext("New Server");
?>
</h1>


<?php 
if (POST('insert')) {
    if ($error == true) {
        $txt_error = "<div>" . _("We Found the following errors") . ":</div><div style='padding:10px;'>" . implode("<br/>", $message_error) . "</div>";
        Util::print_error($txt_error);
        Util::make_form("POST", "newserverform.php?" . $get_param);
        die;
    }
    $db = new ossim_db();
    $conn = $db->connect();
    if (!isset($resend_alarms)) {
        $resend_alarms = 0;
    }
    if (!isset($resend_events)) {
        $resend_events = 0;
    }
    Server::insert($conn, $sname, $ip, $port, $descr, $correlate, $cross_correlate, $store, $qualify, $resend_alarms, $resend_events, $sign, $sem, $sim);
    $db->close($conn);
}
if (isset($_SESSION['_server'])) {
    unset($_SESSION['_server']);
开发者ID:jhbsz,项目名称:ossimTest,代码行数:31,代码来源:newserver.php

示例11: gettext

echo gettext('OSSIM Framework');
?>
 </title>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
	<meta http-equiv="Pragma" content="no-cache"/>
	<link rel="stylesheet" type="text/css" href="../style/av_common.css?t=<?php 
echo Util::get_css_id();
?>
"/>
</head>
<body>

<?php 
if ($data['status'] == 'error') {
    $txt_error = '<div>' . _('We Found the following errors') . ":</div>\n\t\t\t\t\t  <div style='padding: 2px 10px 5px 10px;'>" . implode('<br/>', $validation_errors) . "</div>";
    $config_nt = array('content' => $txt_error, 'options' => array('type' => 'nf_error', 'cancel_button' => FALSE), 'style' => 'width: 80%; margin: 20px auto; text-align: left;');
    $nt = new Notification('nt_1', $config_nt);
    $nt->show();
    Util::make_form('POST', 'newdbsform.php');
    exit;
}
$db = new ossim_db();
$conn = $db->connect();
Databases::insert($conn, $db_name, $ip, $port, $user, $pass, $icon);
Util::memcacheFlush();
$db->close();
?>
    <script type='text/javascript'>document.location.href="dbs.php?msg=created";</script>

</body>
</html>
开发者ID:AntBean,项目名称:alienvault-ossim,代码行数:31,代码来源:newdbs.php

示例12: _

</head>

<body>

<?php 
if (POST('withoutmenu') != "1") {
    include "../hmenu.php";
    $get_param = "ip={$ip}";
} else {
    $get_param = "ip={$ip}&withoutmenu=1";
}
if (POST('insert') && !empty($ip)) {
    if ($error == true) {
        $txt_error = "<div>" . _("We Found the following errors") . ":</div><div style='padding:10px;'>" . implode("<br/>", $message_error) . "</div>";
        Util::print_error($txt_error);
        Util::make_form("POST", "modifyhostform.php?" . $get_param);
        die;
    }
    $db = new ossim_db();
    $conn = $db->connect();
    Host::update($conn, $ip, $hostname, $asset, $threshold_c, $threshold_a, $rrd_profile, $alert, $persistence, $nat, $sensors, $descr, $os, $mac, $mac_vendor, $latitude, "{$longitude};{$zoom}", $fqdns, $icon);
    if ($hostname != $old_hostname) {
        $query = "UPDATE risk_indicators SET type_name=? WHERE type='host' AND type_name=?";
        $params = array($hostname, $hostname_old);
        $conn->Execute($query, $params);
    }
    Host_scan::delete($conn, $ip, 3001);
    Host_scan::delete($conn, $ip, 2007);
    //if (!empty($nessus)) Host_scan::insert($conn, $ip, 3001);
    Host_scan::delete($conn, $ip, 3001);
    if (!empty($nagios)) {
开发者ID:jhbsz,项目名称:ossimTest,代码行数:31,代码来源:modifyhost.php

示例13: gettext

<?php 
if (POST('withoutmenu') != "1") {
    include "../hmenu.php";
}
?>

<h1> <?php 
echo gettext("New port");
?>
 </h1>

<?php 
if ($error == true) {
    $txt_error = "<div>" . _("We Found the following errors") . ":</div><div style='padding:10px;'>" . implode("<br/>", $message_error) . "</div>";
    Util::print_error($txt_error);
    Util::make_form("POST", "newsingleportform.php");
    die;
}
if (POST('insert')) {
    Port::insert($conn, $port, $protocol, $service, $descr);
}
if (isset($_SESSION['_singleport'])) {
    unset($_SESSION['_singleport']);
}
$db->close($conn);
?>
    <p> <?php 
echo gettext("Port succesfully inserted");
?>
 </p>
    <?php 
开发者ID:jhbsz,项目名称:ossimTest,代码行数:31,代码来源:newsingleport.php

示例14: _

<body>

<?php 
include "../hmenu.php";
?>

<h1><?php 
echo _("Modify Agentless Host");
?>
</h1>


<?php 
if (!empty($info_error)) {
    Util::print_error($info_error);
    Util::make_form("POST", "agentless.php");
} else {
    ?>
	<div id='info' class='ossim_error' style='<?php 
    echo $display;
    ?>
'><?php 
    echo _($info);
    ?>
</div>
	   
	<table align="center" id='table_form'>
		<tr>
			<td class='nobborder subsection_1'>
				<form method="POST" name="al_modify_form_1" id="al_modify_form_1" action="al_modifyform.php?al_data=hd">
				<table width='100%'>
开发者ID:jhbsz,项目名称:ossimTest,代码行数:31,代码来源:al_modifyform.php

示例15: gettext

} else {
    $get_param = "withoutmenu=1";
}
?>
                                                                                
<h1> <?php 
echo gettext("New Database Server");
?>
 </h1>

<?php 
if (POST('insert')) {
    if ($error == true) {
        $txt_error = "<div>" . _("We Found the following errors") . ":</div><div style='padding:10px;'>" . implode("<br/>", $message_error) . "</div>";
        Util::print_error($txt_error);
        Util::make_form("POST", "newdbsform.php?" . $get_param);
        die;
    }
    $db = new ossim_db();
    $conn = $db->connect();
    $icon = "";
    if (is_uploaded_file($HTTP_POST_FILES['icon']['tmp_name'])) {
        $icon = file_get_contents($HTTP_POST_FILES['icon']['tmp_name']);
    }
    Databases::insert($conn, $dbs_name, $ip, $port, $user, $pass, $icon);
    $db->close($conn);
    if (isset($_SESSION['_dbs'])) {
        unset($_SESSION['_dbs']);
    }
}
?>
开发者ID:jhbsz,项目名称:ossimTest,代码行数:31,代码来源:newdbs.php


注:本文中的Util::make_form方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。