[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

/admin/ -> products_expected.php (source)

   1  <?php
   2  /*

   3  $Id: products_expected.php 3 2006-05-27 04:59:07Z user $

   4  

   5    osCMax Power E-Commerce

   6    http://oscdox.com

   7  

   8    Copyright 2006 osCMax

   9  

  10    Released under the GNU General Public License

  11  */
  12  
  13    require ('includes/application_top.php');
  14  
  15    tep_db_query("update " . TABLE_PRODUCTS . " set products_date_available = '' where to_days(now()) > to_days(products_date_available)");
  16  ?>
  17  <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
  18  <html <?php echo HTML_PARAMS; ?>>
  19  <head>
  20  <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
  21  <title><?php echo TITLE; ?></title>
  22  <link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
  23  <script language="javascript" src="includes/general.js"></script>
  24  </head>
  25  <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();">
  26  <!-- header //-->
  27  <?php require (DIR_WS_INCLUDES . 'header.php'); ?>
  28  <!-- header_eof //-->
  29  
  30  <!-- body //-->
  31  <table border="0" width="100%" cellspacing="2" cellpadding="2">
  32    <tr>
  33      <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
  34  <!-- left_navigation //-->
  35  <?php require (DIR_WS_INCLUDES . 'column_left.php'); ?>
  36  <!-- left_navigation_eof //-->
  37      </table></td>
  38  <!-- body_text //-->
  39      <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
  40        <tr>
  41          <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
  42            <tr>
  43              <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
  44              <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
  45            </tr>
  46          </table></td>
  47        </tr>
  48        <tr>
  49          <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
  50            <tr>
  51              <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
  52                <tr class="dataTableHeadingRow">
  53                  <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS; ?></td>
  54                  <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_DATE_EXPECTED; ?></td>
  55                  <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?>&nbsp;</td>
  56                </tr>
  57  <?php
  58    $products_query_raw = "select pd.products_id, pd.products_name, p.products_date_available from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p where p.products_id = pd.products_id and p.products_date_available != '' and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_available DESC";
  59    $products_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $products_query_raw, $products_query_numrows);
  60    $products_query = tep_db_query($products_query_raw);
  61    while ($products = tep_db_fetch_array($products_query)) {
  62      if ((!isset($HTTP_GET_VARS['pID']) || (isset($HTTP_GET_VARS['pID']) && ($HTTP_GET_VARS['pID'] == $products['products_id']))) && !isset($pInfo)) {
  63        $pInfo = new objectInfo($products);
  64      }
  65  
  66      if (isset($pInfo) && is_object($pInfo) && ($products['products_id'] == $pInfo->products_id)) {
  67        echo '                  <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CATEGORIES, 'pID=' . $products['products_id'] . '&action=new_product') . '\'">' . "\n";
  68      } else {
  69        echo '                  <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_PRODUCTS_EXPECTED, 'page=' . $HTTP_GET_VARS['page'] . '&pID=' . $products['products_id']) . '\'">' . "\n";
  70      }
  71  ?>
  72                  <td class="dataTableContent"><?php echo $products['products_name']; ?></td>
  73                  <td class="dataTableContent" align="center"><?php echo tep_date_short($products['products_date_available']); ?></td>
  74                  <td class="dataTableContent" align="right"><?php if (isset($pInfo) && is_object($pInfo) && ($products['products_id'] == $pInfo->products_id)) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif'); } else { echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_EXPECTED, 'page=' . $HTTP_GET_VARS['page'] . '&pID=' . $products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?>&nbsp;</td>
  75                </tr>
  76  <?php
  77    }
  78  ?>
  79                <tr>
  80                  <td colspan="3"><table border="0" width="100%" cellspacing="0" cellpadding="2">
  81                    <tr>
  82                      <td class="smallText" valign="top"><?php echo $products_split->display_count($products_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_PRODUCTS_EXPECTED); ?></td>
  83                      <td class="smallText" align="right"><?php echo $products_split->display_links($products_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page']); ?></td>
  84                    </tr>
  85                  </table></td>
  86                </tr>
  87              </table></td>
  88  <?php
  89    $heading = array();
  90    $contents = array();
  91  
  92    if (isset($pInfo) && is_object($pInfo)) {
  93      $heading[] = array('text' => '<b>' . $pInfo->products_name . '</b>');
  94  
  95      $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'pID=' . $pInfo->products_id . '&action=new_product') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a>');
  96      $contents[] = array('text' => '<br>' . TEXT_INFO_DATE_EXPECTED . ' ' . tep_date_short($pInfo->products_date_available));
  97    }
  98  
  99    if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
 100      echo '            <td width="25%" valign="top">' . "\n";
 101  
 102      $box = new box;
 103      echo $box->infoBox($heading, $contents);
 104  
 105      echo '            </td>' . "\n";
 106    }
 107  ?>
 108            </tr>
 109          </table></td>
 110        </tr>
 111      </table></td>
 112  <!-- body_text_eof //-->
 113    </tr>
 114  </table>
 115  <!-- body_eof //-->
 116  
 117  <!-- footer //-->
 118  <?php require (DIR_WS_INCLUDES . 'footer.php'); ?>
 119  <!-- footer_eof //-->
 120  <br>
 121  </body>
 122  </html>
 123  <?php require (DIR_WS_INCLUDES . 'application_bottom.php'); ?>


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