当前位置: 首页>>代码示例>>PHP>>正文


PHP notifications::errorMessage方法代码示例

本文整理汇总了PHP中notifications::errorMessage方法的典型用法代码示例。如果您正苦于以下问题:PHP notifications::errorMessage方法的具体用法?PHP notifications::errorMessage怎么用?PHP notifications::errorMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在notifications的用法示例。


在下文中一共展示了notifications::errorMessage方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: miscFunction

 $connection = $con->getConnection();
 $misc = new miscFunction($connection);
 $notifyObject = new notifications();
 $loginValues = array("username" => $username, "password" => $password);
 $_SESSION["loginValues"] = $loginValues;
 $validateLogin = $misc->validateLogin($username, $password);
 if ($validateLogin === false) {
     header("location:login.php");
 }
 $result = $misc->getAdminDetails($username, $password);
 if (mysqli_num_rows($result) == 1) {
     while ($row = $result->fetch_assoc()) {
         $status = $row["status"];
         if ($status == 0) {
             $msg = "You are not allowed to access this page because you have been deacvtivated!!!";
             echo $notifyObject->errorMessage($msg);
             exit;
         }
         $_SESSION["name"] = $row["name"];
         $_SESSION["level"] = $row["level"];
         $level = $row["level"];
         $_SESSION["Admin_Id"] = $row["admin_id"];
         //$details= array("identification"=>$Identification,"officerId"=>$officerId,"userName"=>$username,"level"=>$level);
         //$_SESSION["details"]=$details;
         if ($level == 1) {
             header("location:index.php");
             return;
         } elseif ($level == 2) {
             header("location:adminindex.php");
             return;
         }
开发者ID:Bunmie,项目名称:QAapp,代码行数:31,代码来源:loginvalidate.php

示例2:

		<div class="col-md-3 col-md-offset-3">
			<div class="centre">
				<ul>
				<li><a href="<?php 
        echo "./views/center.php?centercode=" . $centercode;
        ?>
 ">	<?php 
        echo $centercode;
        ?>
</a></li>
				</ul>
			</div>
		</div>
		<br/> <br/>	
		<?php 
    }
    ?>
		
		<div class= "finished">
			<a href="<?php 
    echo "./models/finish.php?Admin_Id=" . $Admin_Id;
    ?>
"> <button  name="Finish" class="btn-btn-danger btn-md"> FINISH </button></a>
		</div>
			<?php 
} else {
    echo $notifyObject->errorMessage("Please Login when a new session is configured");
}
?>
	</body>
</html>
开发者ID:Bunmie,项目名称:QAapp,代码行数:31,代码来源:index.php


注:本文中的notifications::errorMessage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。