]> git.pld-linux.org Git - packages/bbclone.git/blame - bbclone.txt
- blocker for webapps migrate
[packages/bbclone.git] / bbclone.txt
CommitLineData
626eb440 1Simple example
2----------------
3
4You must add to top of your files:
5
6<?php
7 define("_BBC_PAGE_NAME", $title);
8 define("_BBCLONE_DIR", "/usr/share/bbclone/");
9 define("COUNTER", _BBCLONE_DIR."mark_page.php");
10 if (is_readable(COUNTER)) include_once(COUNTER);
11?>
12where $title is uniqued name for pages
13
14We can use "access.php" as regular inclusion for other documents as well,
15if we specify the path to it. The following example demostrates,
16how we could display the total amount of visits:
17
18<?php
19//------ Display Total Unique ----------------------
20require("/usr/share/bbclone/var/access.php");
21$totalvisits = $access["stat"]["totalvisits"];
22$totalcount = $access["stat"]["totalcount"];
23$visitorsmonth = $access["time"]["month"][date("n")-1];
24$visitorstoday = $access["time"]["wday"][date("w")];
25$wday = $access["time"]["wday"];
26
27echo "Total Visits&nbsp;&nbsp;".$totalcount."<br />";
28echo "Visitors Today&nbsp;&nbsp;".$visitorstoday."<br />";
29?>
This page took 0.056517 seconds and 4 git commands to generate.