<label align="center"><font color="#FF0000"><?php $session->flash(); ?></font></label>		
<div align="center" class="subheading">
 <div align="left">USER ACTIVITY REPORT</div>
</div>
<br />

<div>

</div>    <br />

<div>
<form name="activity" action="<?php echo $cnfg["sitebasefolder"];?>/<?php echo $this->params["controller"];?>/<?php echo $this->params["action"];?>" method="post">
<strong>Select a user</strong>: &nbsp;
<select name="uid" onchange="document.activity.submit()">
<?php
foreach($usersList as $userval){ ?>
<option value="<?php echo $userval["User"]["id"];?>" <?php if($uid==$userval["User"]["id"]) print "selected=selected";?>>
<?php echo $userval["User"]["uname"];?></option>
<?php } ?>
</select>
</form>
<br />
<br />
</div>


<div align="left" id="item_details_admin">
				<!--items display area start -->
				          <?php if($session->check('Message.flash')) { ?><div id="okbox"><font color="#446423"><?php $session->flash(); ?></font></div><?php } ?>

				 <table width="100%"  border="0" cellspacing="0" cellpadding="0" id="items_display_area_admin_table">
				  <tr>
					<td align="left" valign="top">
					
					<table width="100%"  border="0" cellspacing="1" cellpadding="6">
					  <tr align="left" valign="middle" id="list_admin_top">
						<td class="brd-ryt brd-btm" width="3%">#</td>
						<td class="brd-ryt brd-btm"  width="3%"><strong><?php echo $paginator->sort('Order ID', 'Order.id'); ?></td>
						<td class="brd-ryt brd-btm"  width="14%"><strong><?php echo $paginator->sort('Order Date', 'Order.date'); ?></td>
						<td class="brd-ryt brd-btm"  width="15%"><strong><?php echo $paginator->sort('Name', 'Order.bill_lname'); ?></td>						
						<td class="brd-ryt brd-btm"  width="20%"><strong><?php echo $paginator->sort('Billing Address', 'Order.bill_address'); ?></td>
						<td class="brd-ryt brd-btm"  width="20%"><strong><?php echo $paginator->sort('Shipping Address', 'Order.ship_address'); ?></td>
						<td class="brd-ryt brd-btm"  width="15%"><strong><?php echo $paginator->sort('Order Status', 'Order.order_status_id'); ?> </td>
						<td width="10%" class="brd-btm"><strong><?php echo $paginator->sort('Total', 'Order.total_price'); ?></td>
					
					  </tr>
					
					
					  <?php 
						if(!empty($passedarg) && !isset($passedarg["page"]))								
						$cnt=1;
						else if(!empty($passedarg) && $passedarg["page"]==1)
						$cnt=1;
						else
						$cnt=((($passedarg["page"]-1)*($passedarg["limit"]))+1);
						if(!empty($reportdet))
						{
						  foreach($reportdet as  $data)
						{ ?> 					  
						  <tr align="left" valign="middle" id="list_admin">
							<td class="brd-ryt" ><?php echo $cnt++;?></td>
							<td class="brd-ryt" >
							<?php echo $html->link($data['Order']['id'],"/orders/details/".$data['Order']['id']); ?>
							</td>
							<td class="brd-ryt" ><?php echo Sanitize::html($data[0]['ord_date']);?></td>
							<td class="brd-ryt" ><?php echo Sanitize::html($data['Order']['bill_fname'])." ".Sanitize::html($data['Order']['bill_lname']); ?></td>
							
							<td class="brd-ryt" ><?php
							if($data['Order']['bill_address']<>'') 
							{						
							 echo $data['Order']['bill_address'].'<br>'.$data['Order']['bill_city'].",<br>".$data['Order']['bill_state'].", ".$data['Order']['bill_country'];
							 }
							  ?> <?php echo Sanitize::html($data['Order']['bill_zip']);?>
							  
							  </td>
							  
							  <td class="brd-ryt" >
							  <?php
							if($data['Order']['ship_address']<>'') 
							{						
							 echo $data['Order']['ship_address'].'<br>'.$data['Order']['ship_city'].",<br>".$data['Order']['ship_state'].", ".$data['Order']['ship_country'];
							 }
							  ?> <?php echo Sanitize::html($data['Order']['ship_zip']);?>
							  </td>
							<td class="brd-ryt" ><?php echo Sanitize::html($data['vos']['name']);?></td>
							<td><?php echo $curlogo.Sanitize::html($data['Order']['total_price']);?></td>							
							
							
						  </tr>  
					   <?php   }  ?>	
					 
					
						<tr id="list_admin">
						  <td align="center"  colspan="8">
						  <strong> <?php  echo $this->renderElement('pagination'); // Render the pagination element ?></strong> 
						  </td>
						</tr>
					 
					  <?php }  else { ?>					     
						<tr id="list_admin" >
						  <td align="center" colspan="8"><strong> No Reports Found.</strong> </td>
						</tr>				  
					  <?php } ?>
					
				</table>
				</td>
				</tr>	
				
				</table>
				
				
				 <div align="left" class="float_clear1"></div>
            </div>
            <div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif');?></div>