Current File : /home/users/barii/public_html/finansenl.com.pl/wodki/application/views/admin/stat.php
	<div id="page">
		
		<!--  start message-blue -->
			<?php if (isset($message_ok)):?>
			<div id="message-blue">
					<table border="0" width="100%" cellpadding="0" cellspacing="0">
						<tr>
							<td class="blue-left"><?php echo $message_ok; ?>  </td>
							<td class="blue-right"><a class="close-blue"><?php echo HTML::image('static/images/table/icon_close_blue.gif');?></a></td>
						</tr>
					</table>
				</div>
			<!--  end message-blue -->
			<?php endif;?>	
			<!--  start message-red -->
			<?php if (isset($message)):?>
			<div id="message-red">
				<table border="0" width="100%" cellpadding="0" cellspacing="0">
					<tr>
						<td class="red-left">
							<?php echo $message;?>
						</td>
						<td class="red-right"><a class="close-red"><?php echo HTML::image('static_back/images/table/icon_close_red.gif');?></a></td>
					</tr>
				</table>
			</div>
			<?php endif;?>
			
			<div id="content">

				
				<div class="main">
				
				
					<div class="full_w">
				<div class="h_title">Zarządzaj</div>
				<h2>Statystyki</h2>
				
				
				<div class="entry">
					<div class="sep"></div>
				</div>
					
					<table>
					
						
						<tr>
							<td class="title" width="570">Liczba sprzedanych skryptów</td>
							<td><?php echo ORM::Factory('Order')->where('status','=', 1)->find_all()->count(); ?></td>
						</tr>
						
					<tr>
							<td class="title" width="570">Liczba niepoprawnych logowań - ADMIN</td>
							<td><?php echo ORM::Factory('Stat')->where('keyname','=','error_admin_login')->find()->value; ?></td>
						</tr>
						<tr>
							<td class="title" width="570">Liczba niepoprawnych logowań - Użytkownik</td>
							<td><?php echo ORM::Factory('Stat')->where('keyname','=','error_user_login')->find()->value; ?></td>
						</tr>
						<tr>
							<td class="title" width="570">Nieautorzyowane kopie</td>
							<td><?php echo ORM::Factory('Stat')->where('keyname','=','unauth_copy')->find()->value; ?></td>
						</tr>
						

						
						<tr>
							<td class="title" width="570">Liczba logowań</td>
							<td><?php echo $logins[0]['suma']; ?></td>
						</tr>
						<tr>
							<td class="title" width="570">Liczba użytkowników</td>
							<td><?php echo $users->count(); ?></td>
						</tr>
						<tr>
							<td class="title" width="570">Liczba wyświetleń strony</td>
							<td><?php echo $viewed->value; ?></td>
						</tr>
						</table>
						<table>
						
						<h2>Sprzedaż z PP
						</h2>
						
						<tr>
							<td class="title" width="570"></td>
							<td><?php foreach( ORM::Factory('Stat')->where('keyname','=','pp_sell')->find_all() as $pp ) : ?>
							<p>W dniu <?php echo $pp->date; ?> sprzedano <?php $f = ORM::Factory('File', $pp->file_id); echo $f->title; ?> - kupujący: <?php $u = ORM::Factory('User', $pp->user_id); echo $u->username; ?> </p>
							<?php endforeach; ?>
							</td>
						</tr>
					</table>
					
					</div>
				
				</div>
				
				
			</div>
			
		</div>