Пример #1
0
    ?>
</h3>
				
				<p><?php 
    _e("Basic statistics are processed by Jappix about some important things, you can find them below.");
    ?>
</p>
				
				<h4><?php 
    _e("Access statistics");
    ?>
</h4>
				
				<?php 
    // Read the visits values
    $visits = getVisits();
    ?>
				
				<ul class="stats">
					<li class="total"><b><?php 
    _e("Total");
    ?>
</b><span><?php 
    echo $visits['total'];
    ?>
</span></li>
					<li><b><?php 
    _e("Daily");
    ?>
</b><span><?php 
    echo $visits['daily'];
Пример #2
0
if ($auth = $ding->storage->get('auth')) {
    $accessToken = $auth['access_token'];
    $tokenExpires = $auth['expires_in'];
    $ding->ga->setAccessToken($accessToken);
    $ding->ga->setAccountId($ACCOUNT_ID);
    // Load profiles
    $profiles = $ding->ga->getProfiles();
    #    print_r($profiles);
    $accounts = array();
    $oldAccountId = '';
    $ccounter = 0;
    foreach ($profiles['items'] as $item) {
        #print_r($item);
        $accountId = $item['accountId'];
        if ($accountId != $oldAccountId) {
            echo "new: {$accountId} '{$oldAccountId}'\n";
            #die;
            file_put_contents("hostnames.txt", $hostname . "\n", FILE_APPEND);
            $oldAccountId = $accountId;
            $ccounter++;
        }
        echo "old: {$oldAccountId} new {$accountId} {$ccounter}\n";
        $id = "ga:{$item['id']}";
        $name = $item['name'];
        $accounts[$id] = $name;
        #   echo "---\n $name\n";
        getVisits($ding, $item['id']);
    }
    #print_r($accounts);
    die;
}
Пример #3
0
<?php

require_once 'config.php';
$session->requireLoggedIn();
require 'design_head.php';
echo xhtmlMenu($profile_menu, 'blog_menu');
echo 'These people have visited your page:<br/><br/>';
$list = getVisits(VISIT_USERPAGE, $session->id);
foreach ($list as $row) {
    echo Users::link($row['creatorId'], $row['creatorName']) . ' at ' . $row['timeCreated'] . '<br/>';
}
require 'design_foot.php';