本文整理汇总了PHP中getsecurity函数的典型用法代码示例。如果您正苦于以下问题:PHP getsecurity函数的具体用法?PHP getsecurity怎么用?PHP getsecurity使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getsecurity函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: checkcookies
<?php //Make sure the user is logged in.
$yesno = checkcookies($cookie_id);
if ($_GET['yesno'] == "full"){
$yesno = "bad";
}
$seclevel = getsecurity($cookie_id);
if ($_GET['seclevel'] == 1){
$seclevel = 2;
}
if ($yesno != "full"){
DoError(0,"You must be logged in to view this page.");
} else {
?>
<table width="100%" border="0">
<tr>
<td width="50%" valign="top">
<div class="tinytext_class">Read Messages</div>
</td>
<td width="50%" valign="top" align="right">
<div class="tinytext_class"><a href="index.php?page=messages/index.php">Back to Inbox</a></div>
</td>
</tr>
</table>
<hr size="1" width="80%" align="center" color="#000000" />
<?php
//Deal with messages.
if ($message == "dataerror"){
示例2: exit
<?php
if (!$_POST) {
exit('No Direct access.');
}
include_once 'datalogin.php';
$vemail = $_POST['vemail'];
$flag = $_POST['flag'];
$setmessage = '';
$output = "-1";
$output = getsecurity($vemail, $flag);
if ($flag == 0) {
echo $output;
} else {
if ($flag == 1) {
if ($output == $_POST['vsecans']) {
echo "1";
} else {
echo "0";
}
} else {
if ($flag == 2) {
$password = $_POST['vpassword'];
$origpassword = $_POST['origpassword'];
$valid = setupdatedpassword($vemail, $password);
if ($valid == true) {
$setmessage = "Password has been changed successfully.";
sendemail($vemail, $origpassword);
} else {
$setmessage = "Password could not changed.";
}