Example #1
0
        $alertArr[] = $ALERT['EMAIL_TOLONG'];
    }
    if ($_POST['email'] && !emailValid($_POST['email'])) {
        $alertArr[] = $ALERT['EMAIL_INVALID'];
    }
    if ($_POST['email'] && emailExist($_POST['email'])) {
        $alertArr[] = $ALERT['EMAIL_TAKEN'];
    }
    if (count($alertArr) == 0) {
        // Add the new account to the database
        // (password has already been encrypted using javascript)
        $_SESSION['reguname'] = $_SESSION['username'];
        $_SESSION['regresult'] = addNewUser($_POST['pass1'], $_POST['email']);
        $_SESSION['registered'] = true;
        $refresh = $HTTP_SERVER_VARS[PHP_SELF];
        exit(include_once HTML_PATH . "html_refresh.php");
        // stop script
    }
}
$alert = displayAlert($alertArr);
if ($_POST['pass_field_curr']) {
    $_POST['pass_field_curr'] = "";
}
if ($_POST['pass_field_1']) {
    $_POST['pass_field_1'] = "";
}
if ($_POST['pass_field_2']) {
    $_POST['pass_field_2'] = "";
}
// html change form
include_once HTML_PATH . "html_change_form.php";
Example #2
0
<body>
	<?php 
include "navbar.php";
?>
	<?php 
if (isset($_GET['errorcode']) && $_GET['errorcode'] == 'duplicate') {
    displayAlert('info', 'Info!', 'Product is already in your order. To edit quantity click on shopping cart!', 5);
} else {
    if (isset($_GET['errorcode']) && $_GET['errorcode'] == 'login') {
        displayAlert('info', 'Info!', 'Log in in order to start shopping or register <a href="registration.php">here</a>!', 5);
    } else {
        if (isset($_GET['errorcode']) && $_GET['errorcode'] == 'noorder') {
            displayAlert('danger', 'Error!', 'There are no products to display. You have no order in processing status.', 7);
        } else {
            if (isset($_GET['errorcode']) && $_GET['errorcode'] == 'nohistoryorder') {
                displayAlert('danger', 'Error!', 'There is no history of orders to display. You have not disbursed any order yet', 7);
            }
        }
    }
}
?>
<div class="container-fluid">
    
	<header>
	    <div class="row text-center icon-row">
	    	<a href="products.php?category=2"><img src="img/icons/mobile4.svg" alt="mobile phone" class="product_icons"></a>
	    	<a href="products.php?category=5"><img src="img/icons/tablet3.svg" alt="mobile phone" class="product_icons"></a>
	    	<a href="products.php?category=1"><img src="img/icons/laptop7.svg" alt="mobile phone" class="product_icons"></a>
	    	<a href="products.php?category=3"><img src="img/icons/headphones4.svg" alt="mobile phone" class="product_icons"></a>
	    	<a href="products.php?category=6"><img src="img/icons/smartwatch3.svg" alt="mobile phone" class="product_icons"></a>
	    	<a href="products.php?category=4"><img src="img/icons/floppy.svg" alt="mobile phone" class="product_icons"></a>
Example #3
0
if (isset($_GET['disburse']) && $_GET['disburse'] == 'completed') {
    displayAlert('success', 'Success!', 'Your order has been disbursed!', 5);
}
if (isset($_GET['disburse']) && $_GET['disburse'] == 'true') {
    disburseOrder($_GET['acc_id'], $_GET['order_id']);
    header('Location: index.php?disburse=completed');
}
if (isset($_GET['login_error'])) {
    if ($_GET['login_error'] == 'empty_submit') {
        displayAlert('danger', 'Error!', 'Password or Username was empty!', 5);
    } else {
        if ($_GET['login_error'] == 'wrong_submit') {
            displayAlert('danger', 'Error!', 'Wrong Username or Password! Please enter correct information!', 5);
        } else {
            if ($_GET['login_error'] == 'query_error') {
                displayAlert('info', 'Info!', 'Product is already in your order. To edit quantity click on shopping cart!', 5);
            }
        }
    }
}
?>
  <div class="container-fluid">
  <?php 
include "header.php";
?>
    <!-- CAROUSEL -->
    <div class="row carousel-wrapper">
      <div  class="col-md-12 ">
        <div class="carousel slide" id="my-carousel">

          <ol class="carousel-indicators">
                                    <b>{{ $user['first_name'] }} {{ $user['last_name'] }}
                                        (<span title="{{ $status }}">{{ str_limit($status, 4, '.') }}</span>)
                                    </b><br>
                                    <small><a href="{{ route('auth::logout') }}" class="">Se déconnecter</a></small>
                                </li>
                            </ul>
                        @endif
                    </div>
                </div>
            </nav>
        </header>

        <main id="page__content">
            <div class="container">
                <?php 
echo displayAlert();
?>
                @yield('content')
            </div>
        </main>

        <footer id="page__footer">
            <div class="container">
                <p><span class="copyleft">&copy;</span> 2015 - <b>L'équipe du Oui</b></p>
            </div>
        </footer>

        <script src="{{ asset(elixir('js/all.js')) }}"></script>
        @section('js')
        @show
    </body>