Пример #1
0
 function __construct($message, $type)
 {
     $bootstrap = false;
     if (!empty(Utilities::FindKey('BootstrapMessages', $GLOBALS['Config']))) {
         $bootstrap = Utilities::FindKey('BootstrapMessages', $GLOBALS['Config']);
     }
     switch (strtoupper($type)) {
         default:
         case 'ERR':
         case 'ERROR':
             $style = 'danger';
             break;
         case 'SUCC':
         case 'SUCCESS':
             $style = 'success';
             break;
         case 'WARN':
         case 'WARNING':
             $style = 'warning';
             break;
         case 'INFO':
         case 'INFORMATION':
             $style = 'info';
             break;
     }
     if ($bootstrap === true) {
         $message = '<p class="alert alert-' . $style . '" role="alert">' . $message . '</p>';
     }
     echo $message;
 }
Пример #2
0
 private static function runQuery($query, $params = null, $db)
 {
     try {
         $stmt = $db->prepare($query);
         $result = $stmt->execute($params);
         return array('Result' => $stmt, 'Success' => true);
     } catch (PDOException $ex) {
         if (Utilities::FindKey('Debug', $GLOBALS['Config']) === true) {
             $message = 'Error Message: ' . $ex->getMessage();
         } else {
             $message = 'Something went wrong while running the query. Please report to an administrator as soon as possible.';
         }
         return array('Result' => $message, 'Success' => false);
     }
 }
Пример #3
0
	<!-- Optional theme -->
	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">

	<!-- Latest compiled and minified JavaScript -->
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
	<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
</head>
<body>
	<div class="container-fluid">
		<div class="row">
			<div class="col-lg-2"></div>
			<div class="col-lg-8">
				<div class="page-header">
				  <h1><?php 
echo Utilities::FindKey('SiteTitle', $Config);
?>
 <small>Documentation</small></h1>
				</div>
				<nav class="navbar navbar-default">
					<div class="navbar-header">
						<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#nozframework-navbar-collapse" aria-expanded="false">
							<span class="sr-only">Toggle navigation</span>
							<span class="icon-bar"></span>
							<span class="icon-bar"></span>
							<span class="icon-bar"></span>
						</button>
					</div>
					<div class="collapse navbar-collapse" id="nozframework-navbar-collapse">
						<ul class="nav navbar-nav navbar-left">
							<li><a href="#">Getting Started</a></li>