PHP Classes

File: fwphp/01mater/shop/view/sidebar_admin.php

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


Class file image Download
// Check if user is logged in and
        // display appropriate account links
$account_url = $module_relpath . 'admin/account';
$logout_url = $account_url . '?action=logout';
        if (isset(
$_SESSION['admin'])) :
<a href="<?php echo $logout_url; ?>">Logout</a>
        <?php else: ?>
<a href="<?php echo $account_url; ?>">Login</a>
        <?php endif; ?>
            <a href="<?php echo $module_relpath; ?>">Home</a>
            <a href="<?php echo $module_relpath; ?>admin">Admin</a>
    <?php if (isset($categories)) : ?>
<!-- display links for all categories -->
        <?php foreach ($categories as $category) : ?>
            <a href="<?php echo $module_relpath .
'admin/product?action=list_products' .
'&amp;category_id=' . $category['categoryID']; ?>">
                <?php echo htmlspecialchars($category['categoryName']); ?>
        <?php endforeach; ?>
    <?php endif; ?>

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