當前位置: 首頁>>代碼示例>>PHP>>正文


PHP notifications::successMessage方法代碼示例

本文整理匯總了PHP中notifications::successMessage方法的典型用法代碼示例。如果您正苦於以下問題:PHP notifications::successMessage方法的具體用法?PHP notifications::successMessage怎麽用?PHP notifications::successMessage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在notifications的用法示例。


在下文中一共展示了notifications::successMessage方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: Connection

<?php

session_start();
require_once "../models/connection.php";
require_once "../models/dao.php";
require_once "../controllers/notifications.php";
$con = new Connection();
$connection = $con->getConnection();
$DAOobject = new Dao($connection);
$notifyObject = new notifications();
if (isset($_POST["startSession"])) {
    $state = $_POST["state"];
    $DAOobject->configureNewSession($state);
    $_SESSION["state"] = $state;
    header("location: configure.php");
    return;
} elseif (isset($_POST["endSession"])) {
    $statename = "";
    if (isset($_SESSION["state"])) {
        $statename = $_SESSION["state"];
    }
    $DAOobject->EndSession($statename);
    unset($_SESSION["state"]);
    $msg = "The current session for '{$statename} 'has ended!!!";
    echo $notifyObject->successMessage($msg);
}
?>
	<html>
		<br/>
		<a href="../views/adminindex.php"><button class="btn btn-primary"> HOME </button></a>
	</html>
開發者ID:Bunmie,項目名稱:QAapp,代碼行數:31,代碼來源:assign.php

示例2: header

if (!isset($_SESSION["Admin_Id"])) {
    header("location:../views/login.php");
}
if ($_SESSION["level"] != 2) {
    header("location:../views/login.php");
}
$con = new Connection();
$connection = $con->getConnection();
$misc = new MiscFunction($connection);
$notifyObject = new notifications();
if (isset($_POST["submit"])) {
    $fullname = $_POST["fullname"];
    $username = "QA" . $misc->createPassword();
    //creates new admin username
    $password = $misc->createPassword();
    //creates nes admin password
    //validate user input
    $errMsg = $misc->validateInput($fullname);
    if ($errMsg !== "") {
        $_SESSION["error"] = $errMsg;
        header("location: createAdmin.php");
    } else {
        $adminObj = new Admin($fullname, $username, $password);
        $DAOobject = new Dao($connection);
        $DAOobject->createNewAdmin($adminObj);
        //create new QA admin
        $msg = "Admin " . $fullname . " has been created <br/><br/>";
        echo $notifyObject->successMessage($msg) . '<br/><br/>';
        echo "<a href='../views/createAdmin.php'> Create new Admin </a>";
    }
}
開發者ID:Bunmie,項目名稱:QAapp,代碼行數:31,代碼來源:adminvalidate.php


注:本文中的notifications::successMessage方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。