ZenCart_Documentation  1.5.0
http://www.collinsharper.com
C:/xampp/htdocs/zen-cart/admin/products_expected.php
Go to the documentation of this file.
00001 <?php
00002 //
00003 // +----------------------------------------------------------------------+
00004 // |zen-cart Open Source E-commerce                                       |
00005 // +----------------------------------------------------------------------+
00006 // | Copyright (c) 2003 The zen-cart developers                           |
00007 // |                                                                      |
00008 // | http://www.zen-cart.com/index.php                                    |
00009 // |                                                                      |
00010 // | Portions Copyright (c) 2003 osCommerce                               |
00011 // +----------------------------------------------------------------------+
00012 // | This source file is subject to version 2.0 of the GPL license,       |
00013 // | that is bundled with this package in the file LICENSE, and is        |
00014 // | available through the world-wide-web at the following url:           |
00015 // | http://www.zen-cart.com/license/2_0.txt.                             |
00016 // | If you did not receive a copy of the zen-cart license and are unable |
00017 // | to obtain it through the world-wide-web, please send a note to       |
00018 // | [email protected] so we can mail you a copy immediately.          |
00019 // +----------------------------------------------------------------------+
00020 //  $Id: products_expected.php 3295 2006-03-28 07:27:49Z drbyte $
00021 //
00022   require('includes/application_top.php');
00023 
00024   $db->Execute("update " . TABLE_PRODUCTS . "
00025                 set products_date_available = NULL
00026                 where to_days(now()) > to_days(products_date_available)");
00027 ?>
00028 <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
00029 <html <?php echo HTML_PARAMS; ?>>
00030 <head>
00031 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
00032 <title><?php echo TITLE; ?></title>
00033 <link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
00034 <link rel="stylesheet" type="text/css" href="includes/cssjsmenuhover.css" media="all" id="hoverJS">
00035 <script language="javascript" src="includes/menu.js"></script>
00036 <script language="javascript" src="includes/general.js"></script>
00037 <script type="text/javascript">
00038   <!--
00039   function init()
00040   {
00041     cssjsmenu('navbar');
00042     if (document.getElementById)
00043     {
00044       var kill = document.getElementById('hoverJS');
00045       kill.disabled = true;
00046     }
00047   }
00048   // -->
00049 </script>
00050 </head>
00051 <body onload="init()">
00052 <!-- header //-->
00053 <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
00054 <!-- header_eof //-->
00055 
00056 <!-- body //-->
00057 <table border="0" width="100%" cellspacing="2" cellpadding="2">
00058   <tr>
00059 <!-- body_text //-->
00060     <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
00061       <tr>
00062         <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
00063           <tr>
00064             <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
00065             <td class="pageHeading" align="right"><?php echo zen_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
00066           </tr>
00067         </table></td>
00068       </tr>
00069       <tr>
00070         <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
00071           <tr>
00072             <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
00073               <tr class="dataTableHeadingRow">
00074                 <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS; ?></td>
00075                 <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_DATE_EXPECTED; ?></td>
00076                 <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?>&nbsp;</td>
00077               </tr>
00078 <?php
00079   $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)$_SESSION['languages_id'] . "' order by p.products_date_available DESC";
00080   $products_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $products_query_raw, $products_query_numrows);
00081   $products = $db->Execute($products_query_raw);
00082   while (!$products->EOF) {
00083     if ((!isset($_GET['pID']) || (isset($_GET['pID']) && ($_GET['pID'] == $products->fields['products_id']))) && !isset($pInfo)) {
00084       $pInfo = new objectInfo($products->fields);
00085     }
00086 
00087     if (isset($pInfo) && is_object($pInfo) && ($products->fields['products_id'] == $pInfo->products_id)) {
00088       echo '                  <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . zen_href_link(FILENAME_CATEGORIES, 'action=new_product' . '&cPath=' . zen_get_products_category_id($pInfo->products_id) . '&pID=' . $pInfo->products_id . '&product_type=' . zen_get_products_type($pInfo->products_id)) . '\'">' . "\n";
00089     } else {
00090       echo '                  <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . zen_href_link(FILENAME_PRODUCTS_EXPECTED, 'page=' . $_GET['page'] . '&pID=' . $products->fields['products_id']) . '\'">' . "\n";
00091     }
00092 ?>
00093                 <td class="dataTableContent"><?php echo $products->fields['products_name']; ?></td>
00094                 <td class="dataTableContent" align="center"><?php echo zen_date_short($products->fields['products_date_available']); ?></td>
00095                 <td class="dataTableContent" align="right"><?php if (isset($pInfo) && is_object($pInfo) && ($products->fields['products_id'] == $pInfo->products_id)) { echo zen_image(DIR_WS_IMAGES . 'icon_arrow_right.gif'); } else { echo '<a href="' . zen_href_link(FILENAME_PRODUCTS_EXPECTED, 'page=' . $_GET['page'] . '&pID=' . $products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?>&nbsp;</td>
00096               </tr>
00097 <?php
00098     $products->MoveNext();
00099   }
00100 ?>
00101               <tr>
00102                 <td colspan="3"><table border="0" width="100%" cellspacing="0" cellpadding="2">
00103                   <tr>
00104                     <td class="smallText" valign="top"><?php echo $products_split->display_count($products_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_PRODUCTS_EXPECTED); ?></td>
00105                     <td class="smallText" align="right"><?php echo $products_split->display_links($products_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page']); ?></td>
00106                   </tr>
00107                 </table></td>
00108               </tr>
00109             </table></td>
00110 <?php
00111   $heading = array();
00112   $contents = array();
00113 
00114   if (isset($pInfo) && is_object($pInfo)) {
00115     $heading[] = array('text' => '<b>' . $pInfo->products_name . '</b>');
00116 
00117     $contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_CATEGORIES, 'action=new_product' . '&cPath=' . zen_get_products_category_id($pInfo->products_id) . '&pID=' . $pInfo->products_id . '&product_type=' . zen_get_products_type($pInfo->products_id)) . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a>');
00118     $contents[] = array('text' => '<br>' . TEXT_INFO_DATE_EXPECTED . ' ' . zen_date_short($pInfo->products_date_available));
00119   }
00120 
00121   if ( (zen_not_null($heading)) && (zen_not_null($contents)) ) {
00122     echo '            <td width="25%" valign="top">' . "\n";
00123 
00124     $box = new box;
00125     echo $box->infoBox($heading, $contents);
00126 
00127     echo '            </td>' . "\n";
00128   }
00129 ?>
00130           </tr>
00131         </table></td>
00132       </tr>
00133     </table></td>
00134 <!-- body_text_eof //-->
00135   </tr>
00136 </table>
00137 <!-- body_eof //-->
00138 
00139 <!-- footer //-->
00140 <?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
00141 <!-- footer_eof //-->
00142 <br>
00143 </body>
00144 </html>
00145 <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
 All Data Structures Namespaces Files Functions Variables Enumerations