Exemple #1
0
function get_reports_user()
{
    global $order_id;
    $query = query("SELECT * FROM reports WHERE order_id = {$order_id}");
    confirm($query);
    while ($row = fetch_array($query)) {
        if ($row['report_user_id'] == $_SESSION['user_id']) {
            $srt = strtoupper(str_replace(" ", "_", "{$row['pname']}"));
            $report = <<<DELIMETER
        <tr>
            <td>{$row['order_id']}</td>
            <td><a href="{$srt}" target="_blank">{$row['pname']}</a></td>
            <td>{$row['pprice']}</td>
            <td>{$row['pquant']}</td>
        </tr>
DELIMETER;
            echo $report;
        } else {
            redirectjava('/');
        }
    }
}
Exemple #2
0
<?php

include 'core/init.php';
protect_page();
require 'html/php/includes/head.req.php';
require 'html/php/includes/header.req.php';
if (isset($_GET['oi'])) {
    $order_id = sanitize($_GET['oi']);
} else {
    redirectjava("/orders");
}
?>
<div class="container">
<h2 class="text-center">Items in Order #<?php 
echo $order_id;
?>
</h2>
<table class="table table-hover">
    <thead>
      <tr>
           <th>Order Number</th>
           <th>Product Name</th>
           <th>Price</th>
           <th>Product quantity</th>
      </tr>
    </thead>
    <tbody>
  <?php 
get_reports_user();
?>
  </tbody>
Exemple #3
0
</header><!--/header-->




<div class="container">
 <div class="companyinfo">
        <h2 class="title text-center">Sign Up For Shoppcart...!!!</h2>
</div>


<?php 
if (empty($_POST) === false && empty($errors) === true) {
    $register_data = array('first_name' => $_POST['first_name'], 'last_name' => $_POST['last_name'], 'address' => $_POST['address'], 'email' => $_POST['email'], 'username' => $_POST['username'], 'password' => $_POST['password'], 'mobile_number' => $_POST['mobile_number'], 'email_code' => md5($_POST['username'] + microtime()));
    register_user($register_data);
    redirectjava('/?success');
    exit;
} elseif (empty($errors) === false) {
    ?>


<div class="alert alert-danger alert-dismissible" role="alert">
  <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  <?php 
    echo output_errors($errors);
    ?>
</div>
<?php 
}
?>