[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

/admin/ -> listcategories.php (source)

   1  <?php
   2  /*

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

   4  

   5    osCMax Power E-Commerce

   6    http://oscdox.com

   7  

   8    Copyright 2006 osCMax2002 Richard Fielder

   9  

  10    Released under the GNU General Public License

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


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