[ Index ] |
|
Code source de Zen Cart E-Commerce Shopping Cart 1.3.7.1 |
1 <?php 2 // 3 // +----------------------------------------------------------------------+ 4 // |zen-cart Open Source E-commerce | 5 // +----------------------------------------------------------------------+ 6 // | Copyright (c) 2003 The zen-cart developers | 7 // | | 8 // | http://www.zen-cart.com/index.php | 9 // | | 10 // | Portions Copyright (c) 2003 osCommerce | 11 // +----------------------------------------------------------------------+ 12 // | This source file is subject to version 2.0 of the GPL license, | 13 // | that is bundled with this package in the file LICENSE, and is | 14 // | available through the world-wide-web at the following url: | 15 // | http://www.zen-cart.com/license/2_0.txt. | 16 // | If you did not receive a copy of the zen-cart license and are unable | 17 // | to obtain it through the world-wide-web, please send a note to | 18 // | license@zen-cart.com so we can mail you a copy immediately. | 19 // +----------------------------------------------------------------------+ 20 // $Id: products_expected.php 3295 2006-03-28 07:27:49Z drbyte $ 21 // 22 require ('includes/application_top.php'); 23 24 $db->Execute("update " . TABLE_PRODUCTS . " 25 set products_date_available = NULL 26 where to_days(now()) > to_days(products_date_available)"); 27 ?> 28 <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> 29 <html <?php echo HTML_PARAMS; ?>> 30 <head> 31 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> 32 <title><?php echo TITLE; ?></title> 33 <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> 34 <link rel="stylesheet" type="text/css" href="includes/cssjsmenuhover.css" media="all" id="hoverJS"> 35 <script language="javascript" src="includes/menu.js"></script> 36 <script language="javascript" src="includes/general.js"></script> 37 <script type="text/javascript"> 38 <!-- 39 function init() 40 { 41 cssjsmenu('navbar'); 42 if (document.getElementById) 43 { 44 var kill = document.getElementById('hoverJS'); 45 kill.disabled = true; 46 } 47 } 48 // --> 49 </script> 50 </head> 51 <body onload="init()"> 52 <!-- header //--> 53 <?php require(DIR_WS_INCLUDES . 'header.php'); ?> 54 <!-- header_eof //--> 55 56 <!-- body //--> 57 <table border="0" width="100%" cellspacing="2" cellpadding="2"> 58 <tr> 59 <!-- body_text //--> 60 <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> 61 <tr> 62 <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0"> 63 <tr> 64 <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> 65 <td class="pageHeading" align="right"><?php echo zen_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> 66 </tr> 67 </table></td> 68 </tr> 69 <tr> 70 <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> 71 <tr> 72 <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> 73 <tr class="dataTableHeadingRow"> 74 <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS; ?></td> 75 <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_DATE_EXPECTED; ?></td> 76 <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td> 77 </tr> 78 <?php 79 $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"; 80 $products_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $products_query_raw, $products_query_numrows); 81 $products = $db->Execute($products_query_raw); 82 while (!$products->EOF) { 83 if ((!isset($_GET['pID']) || (isset($_GET['pID']) && ($_GET['pID'] == $products->fields['products_id']))) && !isset($pInfo)) { 84 $pInfo = new objectInfo($products->fields); 85 } 86 87 if (isset($pInfo) && is_object($pInfo) && ($products->fields['products_id'] == $pInfo->products_id)) { 88 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"; 89 } else { 90 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"; 91 } 92 ?> 93 <td class="dataTableContent"><?php echo $products->fields['products_name']; ?></td> 94 <td class="dataTableContent" align="center"><?php echo zen_date_short($products->fields['products_date_available']); ?></td> 95 <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>'; } ?> </td> 96 </tr> 97 <?php 98 $products->MoveNext(); 99 } 100 ?> 101 <tr> 102 <td colspan="3"><table border="0" width="100%" cellspacing="0" cellpadding="2"> 103 <tr> 104 <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> 105 <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> 106 </tr> 107 </table></td> 108 </tr> 109 </table></td> 110 <?php 111 $heading = array(); 112 $contents = array(); 113 114 if (isset($pInfo) && is_object($pInfo)) { 115 $heading[] = array('text' => '<b>' . $pInfo->products_name . '</b>'); 116 117 $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>'); 118 $contents[] = array('text' => '<br>' . TEXT_INFO_DATE_EXPECTED . ' ' . zen_date_short($pInfo->products_date_available)); 119 } 120 121 if ( (zen_not_null($heading)) && (zen_not_null($contents)) ) { 122 echo ' <td width="25%" valign="top">' . "\n"; 123 124 $box = new box; 125 echo $box->infoBox($heading, $contents); 126 127 echo ' </td>' . "\n"; 128 } 129 ?> 130 </tr> 131 </table></td> 132 </tr> 133 </table></td> 134 <!-- body_text_eof //--> 135 </tr> 136 </table> 137 <!-- body_eof //--> 138 139 <!-- footer //--> 140 <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> 141 <!-- footer_eof //--> 142 <br> 143 </body> 144 </html> 145 <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 16:45:43 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |