|
ZenCart_Documentation
1.5.0
http://www.collinsharper.com
|
00001 <?php 00009 $version_check_index=true; 00010 require('includes/application_top.php'); 00011 00012 $languages = zen_get_languages(); 00013 $languages_array = array(); 00014 $languages_selected = DEFAULT_LANGUAGE; 00015 for ($i = 0, $n = sizeof($languages); $i < $n; $i++) { 00016 $languages_array[] = array('id' => $languages[$i]['code'], 00017 'text' => $languages[$i]['name']); 00018 if ($languages[$i]['directory'] == $_SESSION['language']) { 00019 $languages_selected = $languages[$i]['code']; 00020 } 00021 } 00022 ?> 00023 <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> 00024 <html <?php echo HTML_PARAMS; ?>> 00025 <head> 00026 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> 00027 <title><?php echo TITLE; ?></title> 00028 <meta name="robot" content="noindex, nofollow" /> 00029 <script language="JavaScript" src="includes/menu.js" type="text/JavaScript"></script> 00030 <link href="includes/stylesheet.css" rel="stylesheet" type="text/css" /> 00031 <link rel="stylesheet" type="text/css" href="includes/cssjsmenuhover.css" media="all" id="hoverJS" /> 00032 <script type="text/javascript"> 00033 <!-- 00034 function init() 00035 { 00036 cssjsmenu('navbar'); 00037 if (document.getElementById) 00038 { 00039 var kill = document.getElementById('hoverJS'); 00040 kill.disabled = true; 00041 } 00042 } 00043 // --> 00044 </script> 00045 </head> 00046 <body onLoad="init()"> 00047 <!-- header //--> 00048 <?php require(DIR_WS_INCLUDES . 'header.php'); ?> 00049 <!-- header_eof //--> 00050 <?php 00051 00052 $customers = $db->Execute("select count(*) as count from " . TABLE_CUSTOMERS); 00053 00054 $products = $db->Execute("select count(*) as count from " . TABLE_PRODUCTS . " where products_status = '1'"); 00055 00056 $products_off = $db->Execute("select count(*) as count from " . TABLE_PRODUCTS . " where products_status = '0'"); 00057 00058 $reviews = $db->Execute("select count(*) as count from " . TABLE_REVIEWS); 00059 $reviews_pending = $db->Execute("select count(*) as count from " . TABLE_REVIEWS . " where status='0'"); 00060 00061 $newsletters = $db->Execute("select count(*) as count from " . TABLE_CUSTOMERS . " where customers_newsletter = '1'"); 00062 00063 $counter_query = "select startdate, counter from " . TABLE_COUNTER; 00064 $counter = $db->Execute($counter_query); 00065 $counter_startdate = $counter->fields['startdate']; 00066 // $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))); 00067 $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))); 00068 00069 $specials = $db->Execute("select count(*) as count from " . TABLE_SPECIALS . " where status= '0'"); 00070 $specials_act = $db->Execute("select count(*) as count from " . TABLE_SPECIALS . " where status= '1'"); 00071 $featured = $db->Execute("select count(*) as count from " . TABLE_FEATURED . " where status= '0'"); 00072 $featured_act = $db->Execute("select count(*) as count from " . TABLE_FEATURED . " where status= '1'"); 00073 $salemaker = $db->Execute("select count(*) as count from " . TABLE_SALEMAKER_SALES . " where sale_status = '0'"); 00074 $salemaker_act = $db->Execute("select count(*) as count from " . TABLE_SALEMAKER_SALES . " where sale_status = '1'"); 00075 00076 00077 ?> 00078 <div id="colone"> 00079 <div class="reportBox"> 00080 <div class="header"><?php echo BOX_TITLE_STATISTICS; ?> </div> 00081 <?php 00082 echo '<div class="row"><span class="left">' . BOX_ENTRY_COUNTER_DATE . '</span><span class="rigth"> ' . $counter_startdate_formatted . '</span></div>'; 00083 echo '<div class="row"><span class="left">' . BOX_ENTRY_COUNTER . '</span><span class="rigth"> ' . $counter->fields['counter'] . '</span></div>'; 00084 echo '<div class="row"><span class="left">' . BOX_ENTRY_CUSTOMERS . '</span><span class="rigth"> ' . $customers->fields['count'] . '</span></div>'; 00085 echo '<div class="row"><span class="left">' . BOX_ENTRY_PRODUCTS . ' </span><span class="rigth">' . $products->fields['count'] . '</span></div>'; 00086 echo '<div class="row"><span class="left">' . BOX_ENTRY_PRODUCTS_OFF . ' </span><span class="rigth">' . $products_off->fields['count'] . '</span></div>'; 00087 echo '<div class="row"><span class="left">' . BOX_ENTRY_REVIEWS . '</span><span class="rigth">' . $reviews->fields['count']. '</span></div>'; 00088 if (REVIEWS_APPROVAL=='1') { 00089 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>'; 00090 } 00091 echo '<div class="row"><span class="left">' . BOX_ENTRY_NEWSLETTERS . '</span><span class="rigth"> ' . $newsletters->fields['count']. '</span></div>'; 00092 00093 echo '<br /><div class="row"><span class="left">' . BOX_ENTRY_SPECIALS_EXPIRED . '</span><span class="rigth"> ' . $specials->fields['count']. '</span></div>'; 00094 echo '<div class="row"><span class="left">' . BOX_ENTRY_SPECIALS_ACTIVE . '</span><span class="rigth"> ' . $specials_act->fields['count']. '</span></div>'; 00095 echo '<div class="row"><span class="left">' . BOX_ENTRY_FEATURED_EXPIRED . '</span><span class="rigth"> ' . $featured->fields['count']. '</span></div>'; 00096 echo '<div class="row"><span class="left">' . BOX_ENTRY_FEATURED_ACTIVE . '</span><span class="rigth"> ' . $featured_act->fields['count']. '</span></div>'; 00097 echo '<div class="row"><span class="left">' . BOX_ENTRY_SALEMAKER_EXPIRED . '</span><span class="rigth"> ' . $salemaker->fields['count']. '</span></div>'; 00098 echo '<div class="row"><span class="left">' . BOX_ENTRY_SALEMAKER_ACTIVE . '</span><span class="rigth"> ' . $salemaker_act->fields['count']. '</span></div>'; 00099 00100 ?> 00101 </div> 00102 <div class="reportBox"> 00103 <div class="header"><?php echo BOX_TITLE_ORDERS; ?> </div> 00104 <?php $orders_contents = ''; 00105 $orders_status = $db->Execute("select orders_status_name, orders_status_id from " . TABLE_ORDERS_STATUS . " where language_id = '" . $_SESSION['languages_id'] . "'"); 00106 00107 while (!$orders_status->EOF) { 00108 $orders_pending = $db->Execute("select count(*) as count from " . TABLE_ORDERS . " where orders_status = '" . $orders_status->fields['orders_status_id'] . "'"); 00109 00110 $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>'; 00111 $orders_status->MoveNext(); 00112 } 00113 00114 echo $orders_contents; 00115 ?> 00116 </div> 00117 </div> 00118 <div id="coltwo"> 00119 <div class="reportBox"> 00120 <div class="header"><?php echo BOX_ENTRY_NEW_CUSTOMERS; ?> </div> 00121 <?php $customers = $db->Execute("select c.customers_id as customers_id, c.customers_firstname as customers_firstname, c.customers_lastname as customers_lastname, c.customers_email_address as customers_email_address, 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"); 00122 00123 while (!$customers->EOF) { 00124 $customers->fields['customers_firstname'] = zen_output_string_protected($customers->fields['customers_firstname']); 00125 $customers->fields['customers_lastname'] = zen_output_string_protected($customers->fields['customers_lastname']); 00126 echo ' <div class="row"><span class="left"><a href="' . zen_href_link(FILENAME_CUSTOMERS, 'search=' . $customers->fields['customers_email_address'] . '&origin=' . FILENAME_DEFAULT, 'NONSSL') . '" class="contentlink">'. $customers->fields['customers_firstname'] . ' ' . $customers->fields['customers_lastname'] . '</a></span><span class="rigth">' . "\n"; 00127 echo zen_date_short($customers->fields['customers_info_date_account_created']); 00128 echo ' </span></div>' . "\n"; 00129 $customers->MoveNext(); 00130 } 00131 ?> 00132 </div> 00133 00134 <div class="reportBox"> 00135 <?php 00136 $counter_query = "select startdate, counter, session_counter from " . TABLE_COUNTER_HISTORY . " order by startdate DESC limit 10"; 00137 $counter = $db->Execute($counter_query); 00138 ?> 00139 <div class="header"><?php echo sprintf(LAST_10_DAYS, $counter->RecordCount()); ?><?php echo '<span class="rigth"> ' . SESSION . ' - ' . TOTAL . '</span>'; ?></div> 00140 <?php 00141 00142 while (!$counter->EOF) { 00143 $counter_startdate = $counter->fields['startdate']; 00144 $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))); 00145 echo ' <div class="row"><span class="left">' . $counter_startdate_formatted . '</span><span class="rigth"> ' . $counter->fields['session_counter'] . ' - ' . $counter->fields['counter'] . '</span> </div>' . "\n"; 00146 $counter->MoveNext(); 00147 } 00148 ?> 00149 00150 </div> 00151 </div> 00152 <div id="colthree"> 00153 <div class="reportBox"> 00154 <div class="header"><?php echo BOX_ENTRY_NEW_ORDERS; ?> </div> 00155 <?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 and class = 'ot_total') order by orders_id DESC limit 5"); 00156 00157 while (!$orders->EOF) { 00158 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"; 00159 echo zen_date_short($orders->fields['date_purchased']); 00160 echo ' </span></div>' . "\n"; 00161 $orders->MoveNext(); 00162 } 00163 ?> 00164 </div> 00165 </div> 00166 <!-- The following copyright announcement is in compliance 00167 to section 2c of the GNU General Public License, and 00168 thus can not be removed, or can only be modified 00169 appropriately. 00170 00171 Please leave this comment intact together with the 00172 following copyright announcement. //--> 00173 00174 <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 © 2003-<?php echo date('Y'); ?> <a href="http://www.zen-cart.com" target="_blank">Zen Cart®</a></div><div class="warrantyrow"><br /><br />Zen Cart is derived from: Copyright © 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 /> 00175 </div> 00176 </body> 00177 </html> 00178 <?php require('includes/application_bottom.php'); ?>