Example #1
0
     // 部门顾客数量
     $_REQUEST['role_id'] = $_SESSION['role_id'];
     $_REQUEST['shape'] = 'table';
     $_REQUEST['get'] = isset($_REQUEST['get']) ? $_REQUEST['get'] : 'show_all';
 } elseif (admin_priv('user_stats_mine', '', false)) {
     // 个人顾客数量
 }
 $res['response_action'] = 'user_stats';
 $res['shape'] = isset($_REQUEST['shape']) ? $_REQUEST['shape'] : 'table';
 if (isset($_REQUEST['role_id']) && $_REQUEST['role_id']) {
     $admin_list = admin_sales(array($_REQUEST['role_id']));
 } else {
     $admin_list = admin_sales();
 }
 $smarty->assign('admin_list', $admin_list);
 $overview_data = user_stats();
 if (empty($_REQUEST['shape'])) {
     $_REQUEST['shape'] = 'table';
 }
 switch ($_REQUEST['shape']) {
     case 'table':
         $stats_table = user_stats_table();
         $smarty->assign('stats_table', $stats_table);
         $res['main'] = $smarty->fetch('user_stats_table.htm');
         break;
     case 'pieChart':
         $stats_tag = array();
         $role_stats = array();
         foreach ($overview_data['section'] as $v) {
             $stats_tag[] = $v['role_name'];
             $role_stats[] = array('value' => $v['total'], 'name' => $v['role_name']);
Example #2
0
    $date = $HTTP_GET_VARS['daily_lookups'];
}
if (isset($HTTP_GET_VARS['user'])) {
    $action = 'user';
    $cookie = $HTTP_GET_VARS['user'];
}
if (isset($HTTP_GET_VARS['active_users'])) {
    $action = 'active_users';
}
$dict_db = new inoah_db(DBUSER, '', DBNAME, DBHOST);
if ($action == 'summary') {
    summary();
} elseif ($action == 'daily') {
    daily_stats($date);
} elseif ($action == 'daily_lookups') {
    daily_lookups_stats($date);
} elseif ($action == 'user') {
    user_stats($cookie);
} elseif ($action == 'active_users') {
    active_users_stats();
} else {
    # shouldnt happen
    summary();
}
?>


</body>
</html>

Example #3
0
?>
">Хэлэлцүүлэг</a></li>
		<li> <a href="<?php 
echo site_url('/news');
?>
">Мэдээ</a></li>
		
	</ul>
	<input type='hidden' id='cursor_x' value='0' />
	<input type='hidden' id='cursor_y' value='0' />
	<div id='banner'>
	</div>
	<div id='user_stats'>
		<div id='user_stats_right'>
			<?php 
echo user_stats();
?>
		</div>
		<div id='user_stats_left'>
			<?
				$current_url = current_url();
				$log_url = site_url('/user/login');
				if($current_user != NULL){
					echo "Logged in $current_user->login";
				}else {
				echo "<form method='post' action='$log_url'>";
					echo "<input type='hidden' name='back' value='$current_url' />";
					echo "<input type='text' name='login'><br/>";
					echo "<input type='password' name='password'><br/>";
					echo "<input type='submit' name='btn' value='Log in'>";
				echo "</form>";