File: fwphp/01mater/shop/admin/orders/orders.php

Recommend this page to a friend!
  Classes of Slavko Srakocic  >  B12 PHP FW  >  fwphp/01mater/shop/admin/orders/orders.php  >  Download  
File: fwphp/01mater/shop/admin/orders/orders.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: B12 PHP FW
Manage database records with a PDO CRUD interface
Author: By
Last change: ver 7.0.1 mnu, msg, mkd FUNCTIONAL namespaces, CRUD PDO trait, pretty URL-s
Date: 1 month ago
Size: 1,982 bytes
 

Contents

Class file image Download
<?php include 'view/header.php'; ?>
<?php
include 'view/sidebar_admin.php'; ?>
<main>
    <h1>Outstanding Orders</h1>
    <?php if (count($new_orders) > 0 ) : ?>
<ul>
            <?php foreach($new_orders as $order) :
               
$order_id = $order['orderID'];
               
$order_date = strtotime($order['orderDate']);
               
$order_date = date('M j, Y', $order_date);
               
$url = $module_relpath . 'admin/orders' .
                      
'?action=view_order&amp;order_id=' . $order_id;
               
?>
<li>
                    <a href="<?php echo $url; ?>">Order #
                    <?php echo $order_id; ?></a> for
                    <?php echo $order['firstName'] . ' ' .
                              
$order['lastName']; ?> placed on
                    <?php echo $order_date; ?>
</li>
            <?php endforeach; ?>
</ul>
    <?php else: ?>
<p>There are no shipped orders.</p>
    <?php endif; ?>
<h1>Shipped Orders</h1>
    <?php if (count($old_orders) > 0 ) : ?>
<ul>
            <?php foreach($old_orders as $order) :
               
$order_id = $order['orderID'];
               
$order_date = strtotime($order['orderDate']);
               
$order_date = date('M j, Y', $order_date);
               
$url = $module_relpath . 'admin/orders' .
                      
'?action=view_order&amp;order_id=' . $order_id;
               
?>
<li>
                    <a href="<?php echo $url; ?>">Order #
                    <?php echo $order_id; ?></a> for
                    <?php echo htmlspecialchars($order['firstName']) . ' ' .
                              
htmlspecialchars($order['lastName']); ?> placed on
                    <?php echo $order_date; ?>
</li>
            <?php endforeach; ?>
</ul>
    <?php else: ?>
<p>There are no shipped orders.</p>
    <?php endif; ?>
</main>
<?php include 'view/footer.php'; ?>

For more information send a message to info at phpclasses dot org.