]> git.pld-linux.org Git - packages/bbclone.git/blob - bbclone.txt
- blocker for webapps migrate
[packages/bbclone.git] / bbclone.txt
1 Simple example
2 ----------------
3
4 You 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 ?>
12 where $title is uniqued name for pages
13
14 We can use "access.php" as regular inclusion for other documents as well,
15 if we specify the path to it. The following example demostrates,
16 how we could display the total amount of visits:
17
18 <?php                                                                                                          
19 //------ Display Total Unique ----------------------                                                           
20 require("/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
27 echo "Total Visits&nbsp;&nbsp;".$totalcount."<br />";
28 echo "Visitors Today&nbsp;&nbsp;".$visitorstoday."<br />";
29 ?>
This page took 0.047586 seconds and 3 git commands to generate.