当前位置: 首页>>代码示例>>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;未经允许,请勿转载。