Location: PHPKode > projects > Caleb's Code > Cafe_Cart/admin/modules/view_product.php
<?php

if($pnconfig[Version_Sub] == "Rogue")
{
    if (!eregi('admin.php', $PHP_SELF)) die ('Access Denied: You can\'t access this file directly.');
    if (!authorised(0, "$ModName::", '::', ACCESS_ADMIN)) die ('Access Denied: No permissions');
}
else
{
    if (!eregi("admin.php", $PHP_SELF)) die ("Access Denied");
}

include ("header.php");
include ("modules/$ModName/classes/products.php");
GraphicAdmin($hlpfile);
cp_menu();
OpenTable();
if (!$seasonal) {
   $prod = mysql_fetch_array(mysql_query("SELECT * FROM $pntable[cp_products] WHERE prod='$item'"));
   $type = $prod[ptype];
   }
else {
   $prod = mysql_fetch_array(mysql_query("SELECT * FROM $pntable[cp_seasonal] WHERE prod='$item'"));
   $type = '99';
   }
echo "  <h2>$prod[name]</h2>\n"
    ."  <img src=\"http://images.cafepress.com/prodtn_nocache/".$item."_".$prod[def_view]."_TN.jpg\" border=0>\n"
    ."  <br>\n"
    ."  <table border=0>\n"
    ."   <tr>\n"
    ."    <td>Product ID#</td>\n"
    ."    <td>$item</td>\n"
    ."   </tr>\n"
    ."   <tr>\n"
    ."    <td>Type:</td>\n"
    ."    <td>$products[$type]</td>\n"
    ."   </tr>\n"
    ."   <tr>\n"
    ."    <td>Charge:</td>\n"
    ."    <td>\$$prod[charge]</td>\n"
    ."   </tr>\n"
    ."   <tr>\n"
    ."    <td>Description:</td>\n"
    ."    <td>$prod[description]</td>\n"
    ."   </tr>\n"
    ."  </table>\n";


CloseTable();
include ("footer.php");
?>
Return current item: Caleb's Code