本文整理汇总了PHP中isUserAuthenticated函数的典型用法代码示例。如果您正苦于以下问题:PHP isUserAuthenticated函数的具体用法?PHP isUserAuthenticated怎么用?PHP isUserAuthenticated使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了isUserAuthenticated函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isUserAuthenticated
<?php
/**
* Script to display switches
*
*/
/* verify that user is authenticated! */
isUserAuthenticated();
/* get all unique switches */
$settings = getAllSettings();
/* get all selected fields for IP print */
$setFieldsTemp = getSelectedIPaddrFields();
/* format them to array! */
$setFields = explode(";", $setFieldsTemp);
?>
<h4><?php
print _('Tools');
?>
</h4>
<ul class="nav nav-tabs nav-stacked nav-tools">
<li <?php
if ($_REQUEST['toolsId'] == "ipCalc") {
print "class='active'";
}
?>
>
<a href="tools/ipCalc/"><i class="icon-chevron-right pull-right icon-gray"></i> <?php
print _('IP calculator');
示例2: _
require_once '../../functions/functions.php';
?>
<!-- header -->
<div class="pHeader"><?php
print _("Select fields to export");
?>
</div>
<!-- content -->
<div class="pContent">
<?php
/* verify that user is authenticated! */
isUserAuthenticated(false);
/* get all selected fields for IP print */
$setFieldsTemp = getSelectedIPaddrFields();
/* format them to array! */
$setFields = explode(";", $setFieldsTemp);
/* get all site settings */
$settings = getAllSettings();
# permissions
$permission = checkSubnetPermission($_POST['subnetId']);
if ($permission < 1) {
die("<div class='alert alert-danger'>" . _('You cannot access this subnet') . "!</div>");
}
# print
print '<form id="selectExportFields">';
# table
print "\t<table class='table table-striped table-condensed'>";
示例3: isUserAuthenticated
<?php
/*
* Discover new hosts with ping
*******************************/
/* required functions */
require_once '../../../functions/functions.php';
/* verify that user is logged in */
isUserAuthenticated(true);
/* filter input */
$_POST = filter_user_input($_POST, true, true, false);
/* subnet Id must be a integer */
if (!is_numeric($_POST['subnetId']) || $_POST['subnetId'] == 0) {
die("<div class='alert alert-danger'>Invalid subnetId!</div>");
}
/* verify that user has write permissions for subnet */
$subnetPerm = checkSubnetPermission($_POST['subnetId']);
if ($subnetPerm < 2) {
die('<div class="alert alert-danger">' . _('You do not have permissions to modify hosts in this subnet') . '!</div>');
}
# verify post
CheckReferrer();
# ok, lets get results form post array!
foreach ($_POST as $key => $line) {
// IP address
if (substr($key, 0, 2) == "ip") {
$res[substr($key, 2)]['ip_addr'] = $line;
}
// description
if (substr($key, 0, 11) == "description") {
$res[substr($key, 11)]['description'] = $line;
示例4: trim
$message = $_GET['message'];
}
}
if ($_SERVER['REQUEST_METHOD'] == "POST") {
$emailid = trim($_POST['email']);
$password = trim($_POST['password']);
if (!empty($emailid) && !empty($password)) {
//echo "</br> Not empty Fields";
//----------------------------------
if (emailValidation($emailid)) {
//echo "</br> Valid email";
//------------------------------
if (isMailRegistered($emailid)) {
//echo "</br> email Registered";
//--------------------------
if (isUserAuthenticated($emailid, $password)) {
//check if email and password is correct
/*Now we should Redirect to Home Page */
redirect("index.php");
} else {
$message = "Wrong Password...</br>Please Try Again..!";
}
} else {
$message = "Dear " . $emailid . "</br>Your Account Does Not Exist. Please Register";
}
} else {
$message = "Invalid email";
}
} else {
$message = "All Fields Are REQUIRED..!";
}