[ Index ] |
|
Code source de Zen Cart E-Commerce Shopping Cart 1.3.7.1 |
1 <?php 2 /** 3 * @package admin 4 * @copyright Copyright 2003-2006 Zen Cart Development Team 5 * @copyright Portions Copyright 2003 osCommerce 6 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 7 * @version $Id: orders_download.php 3009 2006-02-11 15:41:10Z wilt $ 8 */ 9 if (!defined('IS_ADMIN_FLAG')) { 10 die('Illegal Access'); 11 } 12 // select downloads for current order 13 $orders_download_query = "select * from " . TABLE_ORDERS_PRODUCTS_DOWNLOAD . " where orders_id='" . $_GET['oID'] . "'"; 14 $orders_download = $db->Execute($orders_download_query); 15 16 // only display if there are downloads to display 17 if ($orders_download->RecordCount() > 0) { 18 ?> 19 <tr> 20 <td class="main"><table border="1" cellspacing="0" cellpadding="5"> 21 <tr> 22 <td class="smallText" align="center"><?php echo TEXT_LEGEND; ?></td> 23 <td class="smallText" align="center"><?php echo TEXT_DOWNLOAD_AVAILABLE . '<br />' . zen_image(DIR_WS_IMAGES . 'icon_green_on.gif', IMAGE_ICON_STATUS_CURRENT); ?></td> 24 <td class="smallText" align="center"><?php echo TEXT_DOWNLOAD_EXPIRED . '<br />' . zen_image(DIR_WS_IMAGES . 'icon_yellow_on.gif', IMAGE_ICON_STATUS_EXPIRED); ?></td> 25 <td class="smallText" align="center"><?php echo TEXT_DOWNLOAD_MISSING . '<br />' . zen_image(DIR_WS_IMAGES . 'icon_red_on.gif', IMAGE_ICON_STATUS_MISSING); ?></td> 26 <tr> 27 <td colspan="4" class="smallText" align="center"><strong><?php echo TEXT_DOWNLOAD_TITLE; ?></strong></td> 28 </tr> 29 <tr> 30 <td class="smallText" align="center"><?php echo TEXT_DOWNLOAD_STATUS; ?></td> 31 <td class="smallText" align="left"><?php echo TEXT_DOWNLOAD_FILENAME; ?></td> 32 <td class="smallText" align="center"><?php echo TEXT_DOWNLOAD_MAX_DAYS; ?></td> 33 <td class="smallText" align="center"><?php echo TEXT_DOWNLOAD_MAX_COUNT; ?></td> 34 </tr> 35 <?php 36 // add legend 37 while (!$orders_download->EOF) { 38 switch (true) { 39 case ($orders_download->fields['download_maxdays'] > 0 and $orders_download->fields['download_count'] > 0): 40 $zc_file_status = '<a href="' . zen_href_link(FILENAME_ORDERS, zen_get_all_get_params(array('oID', 'action')) . 'oID=' . $_GET['oID'] . '&action=edit&download_reset_off=' . $orders_download->fields['orders_products_download_id'], 'NONSSL') . '">' . zen_image(DIR_WS_IMAGES . 'icon_green_on.gif', IMAGE_ICON_STATUS_CURRENT) . '</a>'; 41 break; 42 case ($orders_download->fields['download_maxdays'] <= 1 or $orders_download->fields['download_count'] <= 1): 43 $zc_file_status = '<a href="' . zen_href_link(FILENAME_ORDERS, zen_get_all_get_params(array('oID', 'action')) . 'oID=' . $_GET['oID'] . '&action=edit&download_reset_on=' . $orders_download->fields['orders_products_download_id'], 'NONSSL') . '">' . zen_image(DIR_WS_IMAGES . 'icon_yellow_on.gif', IMAGE_ICON_STATUS_EXPIRED) . '</a>'; 44 break; 45 default: 46 $zc_file_status = '<a href="' . zen_href_link(FILENAME_ORDERS, zen_get_all_get_params(array('oID', 'action')) . 'oID=' . $_GET['oID'] . '&action=edit&download_reset_on=' . $orders_download->fields['orders_products_download_id'], 'NONSSL') . '">' . zen_image(DIR_WS_IMAGES . 'icon_yellow_on.gif', IMAGE_ICON_STATUS_EXPIRED) . '</a>'; 47 break; 48 break; 49 } 50 51 // if not on server show red 52 if (!zen_orders_products_downloads($orders_download->fields['orders_products_filename'])) { 53 $zc_file_status = zen_image(DIR_WS_IMAGES . 'icon_red_on.gif', IMAGE_ICON_STATUS_OFF); 54 } 55 ?> 56 <tr> 57 <td class="smallText" align="center"><?php echo $zc_file_status; ?></td> 58 <td class="smallText" align="left"><?php echo $orders_download->fields['orders_products_filename']; ?></td> 59 <td class="smallText" align="center"><?php echo $orders_download->fields['download_maxdays']; ?></td> 60 <td class="smallText" align="center"><?php echo $orders_download->fields['download_count']; ?></td> 61 </tr> 62 <?php 63 $orders_download->MoveNext(); 64 } 65 ?> 66 </table></td> 67 </tr> 68 <?php 69 } // only display if there are downloads to display 70 ?>
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 |
![]() |