Ejemplo n.º 1
0
function call_visitors_text()
{
    global $tool;
    include_once 'inc/functions/resort_tools.php';
    if (!user_has_access($tool)) {
        echo "Sorry, this page is restricted to ORKFiA Staff";
        include_game_down();
        exit;
    }
    $stats = new Count_visitors();
    ?>
<h2>Visitor statistics (<?php 
    echo $_SERVER['HTTP_HOST'];
    ?>
)</h2>
<table class="medium" cellspacing="0" cellpadding="0">
  <tr class="header">
    <th colspan="4">Overall</th>
  </tr>
  <tr class="subheader">
    <th>Type</th>
    <th>Date</th>
    <th>Type</th    >
    <td>#</td>
  </tr>
  <tr class="data">
    <th width="20%">First visit at </th>
    <td class="left" width="35%"><?php 
    echo $stats->first_last_visit("first");
    ?>
</td>
    <td width="20%">Visits today: </td>
    <td><?php 
    echo $stats->show_visits_today();
    ?>
</td>
  </tr>
  <tr class="data">
    <th>Last visit at </th>
    <td class="left"><?php 
    echo $stats->first_last_visit("last");
    ?>
</td>
    <td>Total visits: </td>
    <td><?php 
    echo $stats->show_all_visits();
    ?>
</td>
  </tr>
  <tr class="data">
    <th nowrap>Daily average (month) </th>
	<td class="left"><?php 
    echo $stats->average_visits_day(date("m"), date("Y"));
    ?>
</td>
	<td nowrap>Most  visits a day: </td>
	<td><?php 
    echo $stats->show_max_visited_day();
    ?>
</td>
  </tr>
</table>
<?php 
    echo $stats->stats_country();
    echo $stats->stats_totals();
    echo $stats->stats_top_referer(20);
    echo $stats->stats_monthly(date("m"), date("Y"));
    ?>

<?php 
}
Ejemplo n.º 2
0
<?php

include $DOCUMENT_ROOT . "/classes/count_visitors/count_visitors_class.php";
$stats = new Count_visitors();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Show Visitors (test application)</title>
</head>
<body>
<h1>Visitor statistics (example)</h1>
<table width="480" border="1" cellspacing="2" cellpadding="2">
  <tr>
    <td width="20%">First visit at: </td>
    <td width="35%"><?php 
echo $stats->first_last_visit("first");
?>
</td>
    <td width="20%">Visits today: </td>
    <td><?php 
echo $stats->show_visits_today();
?>
</td>
  </tr>
  <tr>
    <td>Last visit at: </td>
    <td><?php 
echo $stats->first_last_visit("last");
?>
Ejemplo n.º 3
0
<?php

include $_SERVER['DOCUMENT_ROOT'] . "/count_visitors/count_visitors_class.php";
//classes is the map where the class file is stored
// create a new instance of the count_visitors class.
$my_visitors = new Count_visitors();
$my_visitors->delay = 1;
// how often (in hours) a visitor is registered in the database (default = 1 hour)
$my_visitors->insert_new_visit();
// That's all, the validation is with this method, too.
echo $my_visitors->show_all_visits();
echo $my_visitors->stats_monthly(02, 2011);
// will show the visits in November 2004 in a daily format
echo $my_visitors->IMG;
Ejemplo n.º 4
0
<?php

//echo $_SERVER['DOCUMENT_ROOT'];
include "count_visitors_class.php";
//classes is the map where the class file is stored
// create a new instance of the count_visitors class.
$my_visitors = new Count_visitors();
//$my_visitors->delay = 1; // how often (in hours) a visitor is registered in the database (default = 1 hour)
//$my_visitors->insert_new_visit(); // That's all, the validation is with this method, too.
#echo $my_visitors->show_all_visits();
#echo $my_visitors->stats_monthly(02, 2011); // will show the visits in November 2004 in a daily format
echo $my_visitors->stats_totals();
echo $my_visitors->stats_country();
?>

Ejemplo n.º 5
0
        // Force users to visit the tribe page at login
        $page = 'motd';
        $page_text = 'include_' . $page . '_text';
    }
    // Seed The Random Value That will be used Throughout the pages
    mt_srand((double) microtime() * 1000000);
    // Check if tribe has updates
    include_once 'inc/functions/update.php';
    check_to_update($userid);
} elseif ($cat == 'main' && $page == 'main') {
    //==========================================================================
    // Visitor logging on the front page                Martel, October 05, 2006
    //==========================================================================
    include "inc/classes/count_visitors_class.php";
    // create a new instance of the count_visitors class.
    $my_visitors = new Count_visitors();
    $my_visitors->delay = 720;
    // how often (in hours) a visitor is registered
    $my_visitors->insert_new_visit();
    // That's all
}
//==============================================================================
// Initiate the upper part of main page / ingame layout
//==============================================================================
$page_up();
//==============================================================================
// Check if the requested file exist
//==============================================================================
if (!file_exists('inc/pages/' . $page . '.inc.php')) {
    include_once 'inc/pages/logout.inc.php';
    include_logout_text();