PHP Classes

File: fwphp/01mater/shop/ch24_guitar_shop/admin/product/product_view.php

Recommend this page to a friend!
  Classes of Slavko Srakocic  >  B12 PHP FW  >  fwphp/01mater/shop/ch24_guitar_shop/admin/product/product_view.php  >  Download  
File: fwphp/01mater/shop/ch24_guitar_shop/admin/product/product_view.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: 2,095 bytes
 

Contents

Class file image Download
<?php include '../../view/header.php'; ?>
<?php
include '../../view/sidebar_admin.php'; ?>
<?php
if (!isset($product_order_count)) { $product_order_count = 0; } ?>
<main>
    <h1>Product Manager - View Product</h1>
   
    <!-- display product -->
    <?php include '../../view/product.php'; ?>

    <!-- display buttons -->
    <br>
    <div id="edit_and_delete_buttons">
        <form action="." method="post" id="edit_button_form" >
            <input type="hidden" name="action" value="show_add_edit_form">
            <input type="hidden" name="product_id"
                   value="<?php echo $product['productID']; ?>">
            <input type="hidden" name="category_id"
                   value="<?php echo $product['categoryID']; ?>">
            <input type="submit" value="Edit Product">
        </form>
        <?php if ($product_order_count == 0) : ?>
<form action="." method="post" id="delete_button_form" >
            <input type="hidden" name="action" value="delete_product">
            <input type="hidden" name="product_id"
                   value="<?php echo $product['productID']; ?>">
            <input type="hidden" name="category_id"
                   value="<?php echo $product['categoryID']; ?>">
            <input type="submit" value="Delete Product">
        </form>
        <?php endif; ?>
</div>
    <div id="image_manager">
        <h1>Image Manager</h1>
        <form action="." method="post" enctype="multipart/form-data" id="upload_image_form">
            <input type="hidden" name="action" value="upload_image">
            <input type="file" name="file1"><br>
            <input type="hidden" name="product_id"
                   value="<?php echo $product['productID']; ?>">
            <input type="submit" value="Upload Image">
        </form>
        <p><a href="../../images/<?php echo $product['productCode']; ?>.png">
            View large image</a></p>
        <p><a href="../../images/<?php echo $product['productCode']; ?>_s.png">
            View small image</a></p>
    </div>
</main>
<?php include '../../view/footer.php'; ?>

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