本文整理汇总了PHP中misc::back方法的典型用法代码示例。如果您正苦于以下问题:PHP misc::back方法的具体用法?PHP misc::back怎么用?PHP misc::back使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类misc
的用法示例。
在下文中一共展示了misc::back方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
$errors[] = "Password [new] too long";
}
if (strlen($_POST['password_new']) < 6) {
$errors[] = "Passwrod [new] too short";
}
if ($_POST['password_new'] !== $_POST['password_new_confirm']) {
$errors[] = "New Passwords does not match!.";
}
if (count($errors) > 0) {
foreach ($errors as $nElement) {
echo $nElement . ".<br/>";
}
misc::back();
} else {
//verify
if (user::RestorePass($_GET['uid'], $_POST['password_new'])) {
echo "Password changed successfully. <br/>";
misc::redirect('?pg=news', 1);
} else {
echo "Invalid old password specified.<br/>";
misc::back();
}
}
} else {
core::$ucp->ForgotpwForm();
}
}
}
} else {
echo 'Entry is invalid.';
}
示例2: sendWebPrivMsg
public static function sendWebPrivMsg($to, $from, $title, $text)
{
global $core;
$msgTitle = security::toHTML($title);
$msgText = security::toHTML($text);
$senderJID = user::accountJIDbyUsername($from);
$receiverJID = user::accountJIDbyUsername($to);
if ($senderJID != $receiverJID) {
if (core::$sql->numRows("select * from srcms_privatemessages where receiver='{$receiverJID}'") >= $core->aConfig['maxPrivMsg']) {
echo "Receiver inbox is full.<br/>";
} else {
if (strlen($msgTitle) < $core->aConfig['minPrivMsgTitleLen'] || strlen($msgTitle) > $core->aConfig['maxPrivMsgTitleLen'] || strlen($msgText) < $core->aConfig['minPrivMsgBodyLen'] || strlen($msgText) > $core->aConfig['maxPrivMsgBodyLen']) {
echo "Message text, or title is too long or too short. Minimum title length is " . $core->aConfig['minPrivMsgTitleLen'] . " and " . $core->aConfig['maxPrivMsgTitleLen'] . "symbols\r\n\t\t\t\t\t\t\t\tmaximum. Message content minimum length is " . $core->aConfig['minPrivMsgBodyLen'] . " and " . $core->aConfig['maxPrivMsgBodyLen'] . " symbols maximum.<br/>";
misc::back();
} else {
$datetime = misc::getDateTime();
core::$sql->exec("insert into srcms_privatemessages(sender,receiver, title, msg, viewed, time) values('{$senderJID}', '{$receiverJID}', '{$msgTitle}', '{$msgText}', '0', '{$datetime}')");
echo "<br/>Message sent.<br/>";
misc::redirect("?pg=ucp&act=mailbox", 2);
}
}
} else {
echo "You can't send message to yourself.<br/>";
misc::back();
}
}