[ Index ]
 

Code source de Zen Cart E-Commerce Shopping Cart 1.3.7.1

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/admin/ -> index.php (source)

   1  <?php
   2  //

   3  // +----------------------------------------------------------------------+

   4  // |zen-cart Open Source E-commerce                                       |

   5  // +----------------------------------------------------------------------+

   6  // | Copyright (c) 2006 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: index.php 5454 2006-12-29 20:10:17Z drbyte $

  21  //

  22    $version_check_index=true;
  23    require ('includes/application_top.php');
  24  
  25    $languages = zen_get_languages();
  26    $languages_array = array();
  27    $languages_selected = DEFAULT_LANGUAGE;
  28    for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
  29      $languages_array[] = array('id' => $languages[$i]['code'],
  30                                 'text' => $languages[$i]['name']);
  31      if ($languages[$i]['directory'] == $language) {
  32        $languages_selected = $languages[$i]['code'];
  33      }
  34    }
  35  ?>
  36  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  37  <html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?>>
  38  <head>
  39  <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
  40  <title><?php echo TITLE; ?></title>
  41  <script language="JavaScript" src="includes/menu.js" type="text/JavaScript"></script>
  42  <link href="includes/stylesheet.css" rel="stylesheet" type="text/css" />
  43  <link rel="stylesheet" type="text/css" href="includes/cssjsmenuhover.css" media="all" id="hoverJS" />
  44  <script type="text/javascript">
  45    <!--
  46    function init()
  47    {
  48      cssjsmenu('navbar');
  49      if (document.getElementById)
  50      {
  51        var kill = document.getElementById('hoverJS');
  52        kill.disabled = true;
  53      }
  54    }
  55    // -->

  56  </script>
  57  </head>
  58  <body onload="init()">
  59  <!-- header //-->
  60  <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
  61  <!-- header_eof //-->
  62   <?php
  63  
  64    $customers = $db->Execute("select count(*) as count from " . TABLE_CUSTOMERS);
  65  
  66    $products = $db->Execute("select count(*) as count from " . TABLE_PRODUCTS . " where products_status = '1'");
  67  
  68    $products_off = $db->Execute("select count(*) as count from " . TABLE_PRODUCTS . " where products_status = '0'");
  69  
  70    $reviews = $db->Execute("select count(*) as count from " . TABLE_REVIEWS);
  71    $reviews_pending = $db->Execute("select count(*) as count from " . TABLE_REVIEWS . " where status='0'");
  72  
  73    $newsletters = $db->Execute("select count(*) as count from " . TABLE_CUSTOMERS . " where customers_newsletter = '1'");
  74  
  75    $counter_query = "select startdate, counter from " . TABLE_COUNTER;
  76    $counter = $db->Execute($counter_query);
  77    $counter_startdate = $counter->fields['startdate'];
  78  //  $counter_startdate_formatted = strftime(DATE_FORMAT_LONG, mktime(0, 0, 0, substr($counter_startdate, 4, 2), substr($counter_startdate, -2), substr($counter_startdate, 0, 4)));

  79    $counter_startdate_formatted = strftime(DATE_FORMAT_SHORT, mktime(0, 0, 0, substr($counter_startdate, 4, 2), substr($counter_startdate, -2), substr($counter_startdate, 0, 4)));
  80  
  81    $specials = $db->Execute("select count(*) as count from " . TABLE_SPECIALS . " where status= '0'");
  82    $specials_act = $db->Execute("select count(*) as count from " . TABLE_SPECIALS . " where status= '1'");
  83    $featured = $db->Execute("select count(*) as count from " . TABLE_FEATURED . " where status= '0'");
  84    $featured_act = $db->Execute("select count(*) as count from " . TABLE_FEATURED . " where status= '1'");
  85    $salemaker = $db->Execute("select count(*) as count from " . TABLE_SALEMAKER_SALES . " where sale_status = '0'");
  86    $salemaker_act = $db->Execute("select count(*) as count from " . TABLE_SALEMAKER_SALES . " where sale_status = '1'");
  87  
  88  
  89  ?>
  90  <div id="colone">
  91  <div class="reportBox">
  92  <div class="header"><?php echo BOX_TITLE_STATISTICS; ?> </div>
  93  <?php
  94      echo '<div class="row"><span class="left">' . BOX_ENTRY_COUNTER_DATE . '</span><span class="rigth"> ' . $counter_startdate_formatted . '</span></div>';
  95      echo '<div class="row"><span class="left">' . BOX_ENTRY_COUNTER . '</span><span class="rigth"> ' . $counter->fields['counter'] . '</span></div>';
  96      echo '<div class="row"><span class="left">' . BOX_ENTRY_CUSTOMERS . '</span><span class="rigth"> ' . $customers->fields['count'] . '</span></div>';
  97      echo '<div class="row"><span class="left">' . BOX_ENTRY_PRODUCTS . ' </span><span class="rigth">' . $products->fields['count'] . '</span></div>';
  98      echo '<div class="row"><span class="left">' . BOX_ENTRY_PRODUCTS_OFF . ' </span><span class="rigth">' . $products_off->fields['count'] . '</span></div>';
  99      echo '<div class="row"><span class="left">' . BOX_ENTRY_REVIEWS . '</span><span class="rigth">' . $reviews->fields['count']. '</span></div>';
 100      if (REVIEWS_APPROVAL=='1') {
 101        echo '<div class="row"><span class="left"><a href="' . zen_href_link(FILENAME_REVIEWS, 'status=1', 'NONSSL') . '">' . BOX_ENTRY_REVIEWS_PENDING . '</a></span><span class="rigth">' . $reviews_pending->fields['count']. '</span></div>';
 102      }
 103      echo '<div class="row"><span class="left">' . BOX_ENTRY_NEWSLETTERS . '</span><span class="rigth"> ' . $newsletters->fields['count']. '</span></div>';
 104  
 105      echo '<br /><div class="row"><span class="left">' . BOX_ENTRY_SPECIALS_EXPIRED . '</span><span class="rigth"> ' . $specials->fields['count']. '</span></div>';
 106      echo '<div class="row"><span class="left">' . BOX_ENTRY_SPECIALS_ACTIVE . '</span><span class="rigth"> ' . $specials_act->fields['count']. '</span></div>';
 107      echo '<div class="row"><span class="left">' . BOX_ENTRY_FEATURED_EXPIRED . '</span><span class="rigth"> ' . $featured->fields['count']. '</span></div>';
 108      echo '<div class="row"><span class="left">' . BOX_ENTRY_FEATURED_ACTIVE . '</span><span class="rigth"> ' . $featured_act->fields['count']. '</span></div>';
 109      echo '<div class="row"><span class="left">' . BOX_ENTRY_SALEMAKER_EXPIRED . '</span><span class="rigth"> ' . $salemaker->fields['count']. '</span></div>';
 110      echo '<div class="row"><span class="left">' . BOX_ENTRY_SALEMAKER_ACTIVE . '</span><span class="rigth"> ' . $salemaker_act->fields['count']. '</span></div>';
 111  
 112  ?>
 113   </div>
 114   <div class="reportBox">
 115     <div class="header"><?php echo BOX_TITLE_ORDERS; ?> </div>
 116    <?php   $orders_contents = '';
 117    $orders_status = $db->Execute("select orders_status_name, orders_status_id from " . TABLE_ORDERS_STATUS . " where language_id = '" . $_SESSION['languages_id'] . "'");
 118  
 119    while (!$orders_status->EOF) {
 120      $orders_pending = $db->Execute("select count(*) as count from " . TABLE_ORDERS . " where orders_status = '" . $orders_status->fields['orders_status_id'] . "'");
 121  
 122      $orders_contents .= '<div class="row"><span class="left"><a href="' . zen_href_link(FILENAME_ORDERS, 'selected_box=customers&status=' . $orders_status->fields['orders_status_id'], 'NONSSL') . '">' . $orders_status->fields['orders_status_name'] . '</a>:</span><span class="rigth"> ' . $orders_pending->fields['count'] . '</span>   </div>';
 123      $orders_status->MoveNext();
 124    }
 125  
 126    echo $orders_contents;
 127  ?>
 128    </div>
 129  </div>
 130  <div id="coltwo">
 131  <div class="reportBox">
 132  <div class="header"><?php echo BOX_ENTRY_NEW_CUSTOMERS; ?> </div>
 133    <?php  $customers = $db->Execute("select c.customers_id as customers_id, c.customers_firstname as customers_firstname, c.customers_lastname as customers_lastname, a.customers_info_date_account_created as customers_info_date_account_created, a.customers_info_id from " . TABLE_CUSTOMERS . " c left join " . TABLE_CUSTOMERS_INFO . " a on c.customers_id = a.customers_info_id order by a.customers_info_date_account_created DESC limit 5");
 134  
 135    while (!$customers->EOF) {
 136      echo '              <div class="row"><span class="left"><a href="' . zen_href_link(FILENAME_CUSTOMERS, 'search=' . $customers->fields['customers_lastname'] . '&origin=' . FILENAME_DEFAULT, 'NONSSL') . '" class="contentlink">'. $customers->fields['customers_firstname'] . ' ' . $customers->fields['customers_lastname'] . '</a></span><span class="rigth">' . "\n";
 137      echo zen_date_short($customers->fields['customers_info_date_account_created']);
 138      echo '              </span></div>' . "\n";
 139      $customers->MoveNext();
 140    }
 141  ?>
 142  </div>
 143  
 144   <div class="reportBox">
 145  <?php
 146    $counter_query = "select startdate, counter, session_counter from " . TABLE_COUNTER_HISTORY . " order by startdate DESC limit 10";
 147    $counter = $db->Execute($counter_query);
 148  ?>
 149     <div class="header"><?php echo sprintf(LAST_10_DAYS, $counter->RecordCount()); ?><?php echo '<span class="rigth"> &nbsp;&nbsp;&nbsp;' . SESSION . ' - ' . TOTAL . '</span>'; ?></div>
 150    <?php
 151  
 152    while (!$counter->EOF) {
 153      $counter_startdate = $counter->fields['startdate'];
 154      $counter_startdate_formatted = strftime(DATE_FORMAT_SHORT, mktime(0, 0, 0, substr($counter_startdate, 4, 2), substr($counter_startdate, -2), substr($counter_startdate, 0, 4)));
 155      echo '              <div class="row"><span class="left">' . $counter_startdate_formatted . '</span><span class="rigth"> ' . $counter->fields['session_counter'] . ' - ' . $counter->fields['counter'] . '</span>   </div>' . "\n";
 156      $counter->MoveNext();
 157    }
 158  ?>
 159  
 160  </div>
 161  </div>
 162  <div id="colthree">
 163  <div class="reportBox">
 164  <div class="header"><?php echo BOX_ENTRY_NEW_ORDERS; ?> </div>
 165    <?php  $orders = $db->Execute("select o.orders_id as orders_id, o.customers_name as customers_name, o.customers_id, o.date_purchased as date_purchased, o.currency, o.currency_value, ot.class, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id) where class = 'ot_total' order by orders_id DESC limit 5");
 166  
 167    while (!$orders->EOF) {
 168      echo '              <div class="row"><span class="left"><a href="' . zen_href_link(FILENAME_ORDERS, 'oID=' . $orders->fields['orders_id'] . '&origin=' . FILENAME_DEFAULT, 'NONSSL') . '" class="contentlink"> ' . $orders->fields['customers_name'] . '</a></span><span class="center">' . $orders->fields['order_total'] . '</span><span class="rigth">' . "\n";
 169      echo zen_date_short($orders->fields['date_purchased']);
 170      echo '              </span></div>' . "\n";
 171      $orders->MoveNext();
 172    }
 173  ?>
 174  </div>
 175  </div>
 176  <!-- The following copyright announcement is in compliance
 177  to section 2c of the GNU General Public License, and
 178  thus can not be removed, or can only be modified
 179  appropriately.
 180  
 181  Please leave this comment intact together with the
 182  following copyright announcement. //-->
 183  
 184  <div class="copyrightrow"><a href="http://www.zen-cart.com" target="_blank"><img src="images/small_zen_logo.gif" alt="Zen Cart:: the art of e-commerce" border="0" /></a><br /><br />E-Commerce Engine Copyright &copy; 2003-<?php echo date('Y'); ?> <a href="http://www.zen-cart.com" target="_blank">Zen Cart&trade;</a></div><div class="warrantyrow"><br /><br />Zen Cart is derived from: Copyright &copy; 2003 osCommerce<br />This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;<br />without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE<br />and is redistributable under the <a href="http://www.zen-cart.com/license/2_0.txt" target="_blank">GNU General Public License</a><br />
 185  </div>
 186  </body>
 187  </html>
 188  <?php require ('includes/application_bottom.php'); ?>


Généré le : Mon Nov 26 16:45:43 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics