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


PHP REQUEST函数代码示例

本文整理汇总了PHP中REQUEST函数的典型用法代码示例。如果您正苦于以下问题:PHP REQUEST函数的具体用法?PHP REQUEST怎么用?PHP REQUEST使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: isConnectedToFacebook

 function isConnectedToFacebook()
 {
     if (SESSION("state") and SESSION("state") === REQUEST("state")) {
         return true;
     }
     return false;
 }
开发者ID:jgianpiere,项目名称:ZanPHP,代码行数:7,代码来源:facebook.php

示例2: run

 function run($template)
 {
     $dbuser = new User();
     if (isREQUEST("logout")) {
         $dbuser->logout();
     }
     if (isREQUEST("user") && isREQUEST("password")) {
         $usr = $dbuser->logout()->login(REQUEST("user"), REQUEST("password"));
     }
     if (!($usr = $dbuser->logedin())) {
         $template->view("login");
         return;
     }
     $template->add("usr", $usr);
     // für die User Infos oben Rechts
     //$t = new Termin();
     //$template->add("byuser", $t->allbyuser($usr["id"]));
     //$template->add("bymitglied", $t->allbymitglieder($usr["id"]));
     $template->view("user");
 }
开发者ID:Woems,项目名称:TerminGrul,代码行数:20,代码来源:user.controler.php

示例3: print_r

    exit;
}
/*
echo '<pre style="white-space: pre;">';
    print_r($_SESSION['_scan']);
echo '</pre>';
*/
//All sensors
$filters = array('where' => "sensor.id = acl_sensors.sensor_id AND acl_sensors.entity_id = UNHEX('{$ctx}')");
$all_sensors = Av_sensor::get_basic_list($conn, $filters);
//Closing database connection
$db->close();
$asset_value = 2;
$threshold_c = 30;
$threshold_a = 30;
$num_ips = REQUEST('ips');
$msg = GET('msg');
ossim_valid($num_ips, OSS_DIGIT, 'illegal:' . _('Scanned IPs'));
if (ossim_error()) {
    echo ossim_error(_('Error! Scan data not found or unallowed'));
    exit;
}
$ips = array();
for ($i = 0; $i < $num_ips; $i++) {
    if (ossim_valid(POST("ip_{$i}"), OSS_IP_ADDR, 'illegal:' . _('IP address'))) {
        $ips[] = POST("ip_{$i}");
        ossim_clean_error();
    }
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
开发者ID:AntBean,项目名称:alienvault-ossim,代码行数:31,代码来源:scan_form.php

示例4: ossim_db

$db = new ossim_db();
$conn = $db->connect();
$conn->SetFetchMode(ADODB_FETCH_BOTH);
// check the number of plugins
$query = 'select count(*) as total_plugins from vuln_nessus_plugins';
$result = $conn->execute($query);
if ($result->fields['total_plugins'] == 0) {
    die('<h2>Please run updateplugins.pl script first before using web interface.</h2>');
}
$tz = Util::get_timezone();
$force = FALSE;
$close = FALSE;
// get parameters
$parameters = array('action', 'job_name', 'targets', 'schedule_type', 'ROYEAR', 'ROMONTH', 'ROday', 'time_hour', 'time_min', 'dayofweek', 'dayofmonth', 'timeout', 'SVRid', 'sid', 'targets', 'job_id', 'sched_id', 'user', 'entity', 'hosts_alive', 'scan_locally', 'nthweekday', 'nthdayofweek', 'time_interval', 'biyear', 'bimonth', 'biday', 'not_resolve', 'send_email', 'ssh_credential', 'smb_credential', 'hosts_alive', '$scan_locally', 'not_resolve', 'type', 'total_assets');
foreach ($parameters as $variable) {
    ${$variable} = REQUEST($variable);
}
$hosts_alive = intval($hosts_alive);
$scan_locally = intval($scan_locally);
$not_resolve = intval($not_resolve);
$send_email = intval($send_email);
$total_assets = intval($total_assets);
$scheduled_status = $_REQUEST['status'] != '' ? intval($_REQUEST['status']) : 1;
// enable scheduled jobs by default
ossim_valid($action, 'create_scan', 'save_scan', OSS_NULLABLE, 'Illegal:' . _('Action'));
if (ossim_error()) {
    die(_('Invalid Action Parameter'));
}
$selected = Filter_list::get_total_selection($conn, $type);
if ($selected > Filter_list::MAX_VULNS_ITEMS) {
    $msg = _('Vulnerability scans can only be performed on %s assets at a time. Please select less assets and try again.');
开发者ID:jackpf,项目名称:ossim-arc,代码行数:31,代码来源:new_scan.php

示例5: ossim_valid

    ossim_valid($action_id, OSS_HEX, OSS_NULLABLE, 'illegal:' . _('Action ID'));
    if (ossim_error()) {
        die(ossim_error());
    }
    list($db, $conn) = Ossim_db::get_conn_db();
    $action_list = Action::get_list($conn, " AND id = UNHEX('{$action_id}')");
    if (is_array($action_list)) {
        $action = $action_list[0];
    }
    if (!is_null($action)) {
        $action_type = $action->get_action_type();
        $ctx = $action->get_ctx();
        $cond = Util::htmlentities($action->get_cond());
        $on_risk = $action->is_on_risk();
        $name = $action->get_name();
        if (REQUEST('descr')) {
            $description = $descr;
        } else {
            $description = $action->get_descr();
        }
    } else {
        $action_type = "";
        $cond = "True";
        $on_risk = 0;
        $description = "";
        $name = "";
    }
}
$update = intval(GET('update'));
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
开发者ID:jackpf,项目名称:ossim-arc,代码行数:31,代码来源:actionform.php

示例6: json_encode

    if (is_array($validation_errors) && !empty($validation_errors)) {
        $data['status'] = 'error';
        $data['data'] = $validation_errors;
    }
    echo json_encode($data);
    exit;
}
$db = new ossim_db();
$conn = $db->connect();
$plugin_id = REQUEST('plugin_id');
$name = REQUEST('ds_name');
$sid = REQUEST('sid');
$reliability = REQUEST('reliability');
$priority = REQUEST('priority');
$category = REQUEST('category');
$subcategory = REQUEST('subcategory');
$validation_errors = validate_form_fields('POST', $validate);
$data['status'] = 'OK';
$list_categories = Category::get_list($conn);
if ($priority < 0 || $priority > 5) {
    $validation_errors['priority'] = _('Priority must be between 0 and 5');
}
if ($reliability < 0 || $reliability > 10) {
    $validation_errors['reliability'] = _('Reliability must be between 0 and 10');
}
$data['data'] = $validation_errors;
if (POST('ajax_validation_all') == TRUE) {
    if (is_array($validation_errors) && !empty($validation_errors)) {
        $data['status'] = 'error';
        echo json_encode($data);
    } else {
开发者ID:jackpf,项目名称:ossim-arc,代码行数:31,代码来源:modifypluginsid.php

示例7: array

*
* You should have received a copy of the GNU General Public License
* along with this package; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
* MA  02110-1301  USA
*
*
* On Debian GNU/Linux systems, the complete text of the GNU General
* Public License can be found in `/usr/share/common-licenses/GPL-2'.
*
* Otherwise you can read it here: http://www.gnu.org/licenses/gpl-2.0.txt
*
*/
require_once 'av_init.php';
$scan_types = array('nmap' => 5, 'ocs' => 3, 'wmi' => 4);
$s_type = REQUEST('s_type');
$s_type = empty($s_type) ? 'nmap' : $s_type;
if (!array_key_exists($s_type, $scan_types)) {
    header("Location: " . AV_MAIN_ROOT_PATH . "/404.php");
    exit;
}
//Save current scan type in memory
$_SESSION['av_inventory_type'] = $s_type;
// Logcheck by s_type
if ($s_type == 'ocs') {
    Session::logcheck('configuration-menu', 'AlienVaultInventory');
} else {
    Session::logcheck('environment-menu', 'AlienVaultInventory');
}
?>
开发者ID:alienfault,项目名称:ossim,代码行数:30,代码来源:list.php

示例8: dirname

*
* You should have received a copy of the GNU General Public License
* along with this package; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
* MA  02110-1301  USA
*
*
* On Debian GNU/Linux systems, the complete text of the GNU General
* Public License can be found in `/usr/share/common-licenses/GPL-2'.
*
* Otherwise you can read it here: http://www.gnu.org/licenses/gpl-2.0.txt
*
*/
require_once dirname(__FILE__) . '/../../conf/config.inc';
Session::logcheck('environment-menu', 'EventsHidsConfig');
$sensor_id = REQUEST('sensor_id');
ossim_valid($sensor_id, OSS_HEX, 'illegal:' . _('Sensor ID'));
if (!ossim_error()) {
    $db = new ossim_db();
    $conn = $db->connect();
    if (!Ossec_utilities::is_sensor_allowed($conn, $sensor_id)) {
        $db->close();
        $error_msg = sprintf(_("Sensor %s not allowed. Please check with your account admin for more information"), Av_sensor::get_name_by_id($conn, $sensor_id));
        echo ossim_error($error_msg);
        exit;
    }
    $db->close();
}
//Current sensor
$_SESSION['ossec_sensor'] = $sensor_id;
?>
开发者ID:jackpf,项目名称:ossim-arc,代码行数:31,代码来源:agent_form.php

示例9: REQUEST

?>
 </title>
  <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
  <link rel="stylesheet" type="text/css" href="../style/style.css"/>
</head>
<body>
<?php 
require_once 'ossim_db.inc';
require_once 'classes/Security.inc';
$id = REQUEST('id');
$sid = REQUEST('sid');
$priority = REQUEST('priority');
$reliability = REQUEST('reliability');
$name = REQUEST('name');
$category = REQUEST('category');
$subCategory = REQUEST('subCategory');
ossim_valid($id, OSS_ALPHA, 'illegal:' . _("id"));
ossim_valid($sid, OSS_ALPHA, 'illegal:' . _("sid"));
ossim_valid($priority, OSS_ALPHA, 'illegal:' . _("priority"));
ossim_valid($reliability, OSS_ALPHA, 'illegal:' . _("reliability"));
ossim_valid($name, OSS_ALPHA, OSS_PUNC_EXT, OSS_SCORE, OSS_SPACE, OSS_NULLABLE, 'illegal:' . _("name"));
ossim_valid($category, OSS_NULLABLE, OSS_ALPHA, 'illegal:' . _("category"));
ossim_valid($subCategory, OSS_NULLABLE, OSS_ALPHA, 'illegal:' . _("subCategory"));
//
if ($category == 'NULL') {
    $category = NULL;
    $subCategory = NULL;
} else {
    if ($subCategory == 'NULL') {
        $subCategory = NULL;
    }
开发者ID:jhbsz,项目名称:ossimTest,代码行数:31,代码来源:pluginupdate.php

示例10: POST

* Otherwise you can read it here: http://www.gnu.org/licenses/gpl-2.0.txt
****************************************************************************/
/**
* Class and Function List:
* Function list:
* Classes list:
*/
require_once 'classes/Session.inc';
require_once 'ossim_db.inc';
require_once 'classes/Action.inc';
require_once 'classes/Security.inc';
Session::logcheck("MenuIntelligence", "PolicyActions");
$error = false;
$action = POST('action');
$action_id = POST('id');
$action_type = REQUEST('action_type');
$cond = POST('cond');
$on_risk = POST('on_risk') == "" ? "0" : "1";
$descr = POST('descr');
$email_from = POST('email_from');
$email_to = POST('email_to');
$email_subject = POST('email_subject');
$email_message = POST('email_message');
$exec_command = POST('exec_command');
$v_exec_command = $v_email = "";
if ($action_type == "email") {
    $v_exec_commad = ",OSS_NULLABLE";
} else {
    if ($action_type == "exec") {
        $v_email = ",OSS_NULLABLE";
    } else {
开发者ID:jhbsz,项目名称:ossimTest,代码行数:31,代码来源:modifyactions.php

示例11: dirname

* MA  02110-1301  USA
*
*
* On Debian GNU/Linux systems, the complete text of the GNU General
* Public License can be found in `/usr/share/common-licenses/GPL-2'.
*
* Otherwise you can read it here: http://www.gnu.org/licenses/gpl-2.0.txt
*
*/
require_once dirname(__FILE__) . '/../../conf/config.inc';
Session::logcheck('environment-menu', 'EventsHidsConfig');
$events_hids_config = Session::menu_perms('environment-menu', 'EventsHidsConfig');
$agent_data = explode('###', base64_decode(GET('agent_data')));
$_POST['agent_id'] = $agent_data[0];
$_POST['ip_cidr'] = $agent_data[1];
$_POST['sensor_id'] = REQUEST('sensor_id');
$agent_id = POST('agent_id');
$ip_cidr = POST('ip_cidr');
$sensor_id = POST('sensor_id');
$validate = array('sensor_id' => array('validation' => "OSS_HEX", 'e_message' => 'illegal:' . _('Sensor ID')), 'sensor_id' => array('validation' => "OSS_HEX", 'e_message' => 'illegal:' . _('Agent ID')), 'ip_cidr' => array('validation' => 'OSS_IP_ADDRCIDR', 'e_message' => 'illegal:' . _('Agent IP')));
if ($ip_cidr == 'any') {
    $validate['ip_cidr'] = array('validation' => 'any', 'e_message' => 'illegal:' . _('Agent IP'));
}
$validation_errors = validate_form_fields('POST', $validate);
//Get Sensor IP for selected sensor
if (empty($validation_errors)) {
    $db = new ossim_db();
    $conn = $db->connect();
    if (!Ossec_utilities::is_sensor_allowed($conn, $sensor_id)) {
        $db->close();
        $validation_errors['sensor_id'] = sprintf(_("Sensor %s not allowed. Please check with your account admin for more information"), Av_sensor::get_name_by_id($conn, $sensor_id));
开发者ID:jackpf,项目名称:ossim-arc,代码行数:31,代码来源:link_asset_form.php

示例12: REQUEST

  <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
  <link rel="stylesheet" type="text/css" href="../style/style.css"/>
</head>
<body>
<?php 
include "../hmenu.php";
?>
                                                                   

<?php 
require_once 'classes/Security.inc';
$status = REQUEST('status');
$interactive = REQUEST('interactive');
$nsensors = REQUEST('nsensors');
$sensors = REQUEST('sensors');
$scheduler_id = REQUEST('scheduler_id');
ossim_valid($nsensors, OSS_ALPHA, OSS_NULLABLE, 'illegal:' . _("nsensors"));
ossim_valid($status, OSS_ALPHA, OSS_NULLABLE, 'illegal:' . _("Status"));
ossim_valid($scheduler_id, OSS_DIGIT, OSS_NULLABLE, 'illegal:' . _("Status"));
if (ossim_error()) {
    die(ossim_error());
}
require_once 'ossim_acl.inc';
require_once 'ossim_db.inc';
require_once 'classes/Sensor.inc';
require_once 'classes/Net_group_scan.inc';
require_once 'classes/Net_group.inc';
require_once 'classes/Net_scan.inc';
require_once 'classes/Host_group_scan.inc';
require_once 'classes/Host_group.inc';
require_once 'classes/Host_scan.inc';
开发者ID:jhbsz,项目名称:ossimTest,代码行数:31,代码来源:do_nessus.php

示例13: ossim_db

* Public License can be found in `/usr/share/common-licenses/GPL-2'.
*
* Otherwise you can read it here: http://www.gnu.org/licenses/gpl-2.0.txt
*
*/
require_once 'av_init.php';
Session::logcheck("configuration-menu", "Osvdb");
// DB connect
$db = new ossim_db();
$conn = $db->connect();
// Get upload dir from ossim config file
$user = $_SESSION["_user"];
$conf = $GLOBALS["CONF"];
$uploads_dir = $conf->get_conf("repository_upload_dir");
$id_document = GET('id_document') != "" ? GET('id_document') : (POST('id_document') != "" ? POST('id_document') : "");
$go_back = intval(REQUEST("go_back"));
$error = FALSE;
$info_error = NULL;
if (empty($_FILES) && empty($_POST) && empty($_GET)) {
    $msg = "The server was unable to handle that much POST data (" . $_SERVER['CONTENT_LENGTH'] . " bytes) due to its current configuration";
    echo ossim_error(_($msg));
    exit;
}
if (!ossim_valid($id_document, OSS_DIGIT, 'illegal:' . _("Document ID"))) {
    echo ossim_error(_("Document ID not allowed"));
    exit;
}
if (!is_dir($uploads_dir)) {
    echo ossim_error(_("Upload directory does not exist") . " <strong>{$uploads_dir}</strong><br>" . _("Please, Check OSSIM configuration options."), AV_WARNING);
    exit;
}
开发者ID:AntBean,项目名称:alienvault-ossim,代码行数:31,代码来源:repository_attachment.php

示例14: REQUEST

$asset = $conf->get_conf("def_asset") != "" ? $conf->get_conf("def_asset") : "2";
$rrd_profile = "None";
$scan = REQUEST('scan');
$ip = REQUEST('ip');
$num_ips = REQUEST('ips');
$type_action = REQUEST('action');
ossim_valid($ip, OSS_IP_ADDR, OSS_NULLABLE, 'illegal:' . _("Ip"));
ossim_valid($ips, OSS_DIGIT, OSS_NULLABLE, 'illegal:' . _("Hosts"));
ossim_valid($scan, OSS_ALPHA, OSS_NULLABLE, 'illegal:' . _("Scan"));
ossim_valid($type_action, "duplicate", OSS_NULLABLE, 'illegal:' . _("Action"));
if (ossim_error()) {
    die(ossim_error());
}
if (!empty($scan)) {
    $groupname = isset($_REQUEST['groupname']) ? REQUEST('groupname') : $_SESSION['_host']['groupname'];
    $ip = REQUEST('target');
    $action = "../netscan/scan_db.php";
    $submit_function = "submit_form()";
    for ($i = 0; $i < $num_ips; $i++) {
        $item_ip = "ip_{$i}";
        $ips_address[] = isset($_SESSION['_host'][$item_ip]) ? $_SESSION['_host'][$item_ip] : POST($item_ip);
    }
} else {
    $action = "newhost.php";
    $submit_function = "check_host()";
}
if (isset($_SESSION['_host'])) {
    $hostname = $_SESSION['_host']['hostname'];
    $ip = $_SESSION['_host']['ip'];
    $fqdns = $_SESSION['_host']['fqdns'];
    $descr = $_SESSION['_host']['descr'];
开发者ID:jhbsz,项目名称:ossimTest,代码行数:31,代码来源:newhostform.php

示例15: REQUEST

 $groupType = REQUEST('groupType');
 ossim_valid($action, OSS_ALPHA, OSS_NULLABLE, 'illegal:' . _("Action"));
 ossim_valid($id, OSS_DIGIT, OSS_NULLABLE, 'illegal:' . _("ID"));
 ossim_valid($minute, OSS_CRONTAB, 'illegal:' . _("Minute"));
 ossim_valid($hour, OSS_CRONTAB, 'illegal:' . _("Hour"));
 ossim_valid($day_month, OSS_CRONTAB, 'illegal:' . _("Day of month"));
 ossim_valid($month, OSS_CRONTAB, 'illegal:' . _("Month"));
 ossim_valid($day_week, OSS_CRONTAB, 'illegal:' . _("Day of week"));
 if (ossim_error()) {
     die(ossim_error());
 }
 if ($groupType == "sensor") {
     $sensors = array();
     for ($i = 0; $i < $nsensors; $i++) {
         if (REQUEST("sensor{$i}") != null) {
             array_push($sensors, REQUEST("sensor{$i}"));
         }
     }
     if (!count($sensors)) {
         die(ossim_error(_("At least one Sensor required")));
     }
 } else {
     $netgroup_array = POST("netgroupList");
     $hostgroup_array = POST("hostgroupList");
     $net_array = POST("netList");
     $host_array = POST("hostList");
     if (!count($netgroup_array) and !count($hostgroup_array) and !count($net_array) and !count($host_array)) {
         die(ossim_error(_("At least one Netgroup/Hostgroup/Net/Host required")));
     }
 }
 Plugin_scheduler::insert($conn, $plugin, $minute, $hour, $day_month, $month, $day_week, $sensors, $netgroup_array, $hostgroup_array, $net_array, $host_array, $groupType);
开发者ID:jhbsz,项目名称:ossimTest,代码行数:31,代码来源:scheduler.php


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