PHP Classes

File: readme

Recommend this page to a friend!
  Classes of zinsou A.A.E.Mo´se  >  PHP Realtime Clock  >  readme  >  Download  
File: readme
Role: Documentation
Content type: text/plain
Description: readme
Class: PHP Realtime Clock
Display clock or timer updated in real time
Author: By
Last change:
Date: 5 years ago
Size: 3,171 bytes


Class file image Download
Hi, Numerical clock class is a built in PHP-JS class which allows user to: -Display digital clock on his website -display a real time timer with start ,stop ,pause and resume buttons and which keep track of the time even when user reload the page without database use...You can use this class to display the same timer on all your pages. This feature is specially made for that but you can also use different timers on each page of your website -diplay a real time timer without any button and which start once user start to navigate in your page and stop automatically when user leave your page.You can use this class to display the same timer on all your pages. This feature is specially made for that. class numericalclock { protected $code1,$code2,$hide=0; public function __construct($time='',$button=0,$nothiden=1,$trueclock=false,$buttonify=''){ $time can be an array or can just be an empty string.If you specify an array, you must specify 3 index first for hour,second for minute and third for second.The timer or clock will then start from this specified time.But if it is the empty string the clock or the timer will start at 00:00:00; $button is used for specify if you want a timer with button(1) or no(0). $nothiden is above all usefull in the case of a timer without buttons.It is used to specify if you want to hide the timer to user.You may in this case keep the track of leave and enter and timer in your database then you just need to add a few line in the ajax.php file to upload the database. Put $nothiden to 0 will hide the timer or even the clock but it's not really usefull in the last case and for a timer with buttons... $trueclock is used to tell the timer if it just a simple clock or not $buttonify is used to specify for which instanceof Numerical clock class the 'timer with buttons' is... This allows to use seperate timer on different page or the same... } public function chronoscript(){ return the main js script to handle clock, timer and button; } public function displayclock() { displays the clock or the timer } } What you must generally keep in mind is: We use a lot the global variable in JS so you must read the code to know what name to choose for your JS variables in order to avoid confusion and ambigity. We use the PHP session to keep the time of the timers in memory so without S_SESSION globals you couldn't make the class keep track of anything You must know that different types of optical pointer like mouse exist so the feature without buttons could be sometimes unstable due to the user use of optical tool This is not a bug but this is above all due to the peripherics and the reactivity of the browser and even of the client computer capacities. Anyhow we will work to find some technics to correct that in the future. For a real example on how to use it see the testnumericalclock.php file. You could use the dedicated forum of phpclasses to report bugs and ask your questions or contact me personally at for feedback.