PHP Classes

File: fwphp/01mater/shop/ch24_guitar_shop/view/sidebar.php

Recommend this page to a friend!
  Classes of Slavko Srakocic  >  B12 PHP FW  >  fwphp/01mater/shop/ch24_guitar_shop/view/sidebar.php  >  Download  
File: fwphp/01mater/shop/ch24_guitar_shop/view/sidebar.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:
Date: 2 months ago
Size: 1,717 bytes


Class file image Download
            <a href="<?php echo $app_path . 'cart'; ?>">View Cart</a>
// Check if user is logged in and
            // display appropriate account links
$account_url = $app_path . 'account';
$logout_url = $account_url . '?action=logout';
            if (isset(
$_SESSION['user'])) :
<li><a href="<?php echo $account_url; ?>">My Account</a></li>
                <li><a href="<?php echo $logout_url; ?>">Logout</a>
            <?php else: ?>
<li><a href="<?php echo $account_url; ?>">Login/Register</a></li>
            <?php endif; ?>
            <a href="<?php echo $app_path; ?>">Home</a>
        <!-- display links for all categories -->
$categories = get_categories();
$categories as $category) :
$name = $category['categoryName'];
$id = $category['categoryID'];
$url = $app_path . 'catalog?category_id=' . $id;
            <a href="<?php echo $url; ?>">
               <?php echo htmlspecialchars($name); ?>
        <?php endforeach; ?>
    <h2>Temp Link</h2>
            <!-- This link is for testing only.
                 Remove it from a production application. -->
            <a href="<?php echo $app_path; ?>admin">Admin</a>

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