Ejemplo n.º 1
0
	<?php 
//configure ribbon (breadcrumbs) array("name"=>"url"), leave url empty if no url
//$breadcrumbs["New Crumb"] => "http://url.com"
$breadcrumbs["Misc"] = "";
include "inc/ribbon.php";
?>

	<!-- MAIN CONTENT -->
	<div id="content">
		<section id="widget-grid" class="">
			<?php 
$ui = new SmartUI();
$ui->start_track();
$alert_success = SmartUI::print_alert('<strong>Success</strong> The page has been added.', 'success', array(), true);
$alert_danger = SmartUI::print_alert('<strong>Success</strong> Opps!!!', 'danger', array('closebutton' => false), true);
$alert_options = SmartUI::print_alert('<h4 class="alert-heading">Warning!</h4>
						Best check yo self, you\'re not looking too good. Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.', 'warning', array('block' => true, 'closebutton' => false, 'icon' => false), true);
// snippet
$body = $alert_success . $alert_danger . $alert_options;
$run_time = $ui->run_time(false);
$ui->create_widget()->body('content', $body)->header('title', '<h2>SmartUI Alerts</h2>')->print_html();
// print html output
$hb = new HTMLIndent();
$html_snippet = SmartUtil::clean_html_string($hb->indent($body), false);
$contents = array("body" => '<pre class="prettyprint linenums">' . $html_snippet . '</pre>', "header" => array("icon" => 'fa fa-code', "title" => '<h2>HTML Output (Run Time: ' . $run_time . ')</h2>'));
$options = array("editbutton" => false, "colorbutton" => false, "collapsed" => true);
$ui->create_widget($options, $contents)->color('pink')->print_html();
?>
			<div class="row">
		
				<div class="col-sm-12">
					<div class="well">
Ejemplo n.º 2
0
<?php

//initilize the page
require_once "inc/init.php";
//require UI configuration (nav, ribbon, etc.)
require_once "inc/config.ui.php";
session_start();
$login = htmlspecialchars(stripslashes($_POST["email"]));
$password = htmlspecialchars(stripslashes($_POST["password"]));
$result = mysql_query("SELECT * FROM users WHERE login='******'", $db);
$myrow = mysql_fetch_array($result);
if (empty($myrow['password'])) {
    SmartUI::print_alert('<strong>Ошибка!</strong> Введеный Вами логин не найден.', 'warning');
} else {
    if ($myrow['password'] == $password) {
        echo "Успех";
        $_SESSION['login'] = $myrow['login'];
        $_SESSION['id'] = $myrow['userid'];
        echo "<script type=\"text/javascript\"> window.location=\"index.php\";</script>";
    } else {
        SmartUI::print_alert('<strong>Ошибка!</strong> Логин и пароль не совпадают.', 'warning');
    }
}