[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

/admin/ -> listproducts.php (source)

   1  <?php
   2  /*

   3    $Id: validproducts.php,v 0.01 2002/08/17 15:38:34 Richard Fielder

   4  

   5    osCMax Power E-Commerce

   6    http://oscdox.com

   7  

   8    

   9  

  10    Copyright 2006 osCMax2002 Richard Fielder

  11  

  12    Released under the GNU General Public License

  13  */
  14  
  15  require ('includes/application_top.php');
  16  
  17  
  18  ?>
  19  <html>
  20  <head>
  21  <title>Valid Categories/Products List</title>
  22  <style type="text/css">
  23  <!--
  24  h4 {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: x-small; text-align: center}
  25  p {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: xx-small}
  26  th {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: xx-small}
  27  td {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: xx-small}
  28  -->
  29  </style>
  30  <head>
  31  <body>
  32  <table width="550" border="1" cellspacing="1" bordercolor="gray">
  33  <tr>
  34  <td colspan="3">
  35  <h4>Valid Products List</h4>
  36  </td>
  37  </tr>
  38  <?php
  39     $coupon_get=tep_db_query("select restrict_to_products,restrict_to_categories from " . TABLE_COUPONS . "  where coupon_id='".$HTTP_GET_VARS['cid']."'");
  40     $get_result=tep_db_fetch_array($coupon_get);
  41  
  42      echo "<tr><th>Product ID</th><th>Product Name</th><th>Product Size</th></tr><tr>";
  43      $pr_ids = split("[,]", $get_result['restrict_to_products']);
  44      for ($i = 0; $i < count($pr_ids); $i++) {
  45        $result = mysql_query("SELECT * FROM products, products_description WHERE products.products_id = products_description.products_id and products_description.language_id = '" . $languages_id . "'and products.products_id = '" . $pr_ids[$i] . "'");
  46        if ($row = mysql_fetch_array($result)) {
  47              echo "<td>".$row["products_id"]."</td>\n";
  48              echo "<td>".$row["products_name"]."</td>\n";
  49              echo "<td>".$row["products_model"]."</td>\n";
  50              echo "</tr>\n";
  51        }
  52      }
  53        echo "</table>\n";
  54  ?>
  55  <br>
  56  <table width="550" border="0" cellspacing="1">
  57  <tr>
  58  <td align=middle><input type="button" value="Close Window" onClick="window.close()"></td>
  59  </tr></table>
  60  </body>
  61  </html>


Generated: Fri Jan 1 13:43:16 2010 Cross-referenced by PHPXref 0.7