Home / v1.0
Name Modified Size InfoDownloads / Week
Parent folder
index.php 2015-04-27 3.6 kB
style.css 2015-04-26 4.4 kB
README.txt 2015-04-26 4.8 kB
database.php 2015-04-26 415 Bytes
Totals: 4 Items   13.2 kB 0
PHP Simple Timer READ ME
The script was written by Tom Reitz http://tomreitz.me and is made available to you for use, additions, changes, modifications, etc. without charge, under the GNU General Public License. eMail me at tom.reitz@me.com if you have any questions.


About this script:
Ok, so this came about because I was annoyed to NOT find an easy project timer application for the Mac nor anything easy in php…  SOOOOO, I decided to finally write one myself. I first did this in a flat file but I quickly hated this as the fwrite() append (ab, r+) and rewind() php functions don't seem to work correctly… I know a flat file SHOULD be quicker but I couldn't get it working how I wanted SO I went to an old standard of PHP / MYSQL connection allowing for everything to work how I wanted…

I'd say this is stable so I'll call it PHP Simple Timer v0.1 (my original flatfile only lasted a few days and am not releasing it it as an alpha) and was officially completed on July 4th, 2011. Happy Independence Day! 

This is even XHTML5 validated! I could have moved the css out of the script but I figured I was trying to keep the files to a minimum…
-Tom

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Installation Notes:

1. Create a NEW mysql database with user and password read and write permissions. Look in index.php and find (NOTE this is in 2 PLACES so be sure to change both):

	mysql_connect('localhost', 'databaseusername', 'databaseuserpassword');
	mysql_select_db ('databasename');

Replace databaseusername with your user name. Replace databaseuserpassword with your user password and databasename with your database name. Tried to keep it obvious so it made sense.

2.  Run included SQL command on the database (in phpmyadmin most likely in the SQL tab):

	CREATE TABLE `timetable` (
	`time_ID` int(4) NOT NULL AUTO_INCREMENT,
	`timestamp` varchar(32) NOT NULL,
	`task` varchar(64) NOT NULL,
	PRIMARY KEY (`time_ID`)
	) ENGINE=InnoDB DEFAULT CHARSET=latin1;

3. Upload files to wherever you want this to run. It is not location specific, so you could put it in public_html/mypersonalprojecttimer/ which of course would correspond with http://domain.com/mypersonalprojecttimer/ or wherever, remember this is not scripted for security so OBSCURITY is BEST so please DO NOT put it in that location.

4. Visit above URL with your private URL and simply add tasks / projects into the one blank available and hit ENTER.  Last entry will appear immediately at the bottom of the page AND at the top of the white window.  Latest entry will always appear at the top.

5. Copy the timestamp information and project notes from the white window regularly and put it in a spreadsheet and calculate your hours and INVOICE CLIENTS!

6. Occasionally go into phpmyadmin, export table for a backup, then delete the data so it doesn't grow too massive.

7. (Optional) Leave the link at the bottom. This is a FREE script so am just looking for some link love. :-D

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Things I want to add / change (in no particular order… will change them as I get annoyed with lack of functionality, whilst always keeping in mind the need to keep it SIMPLE):

	-create a subpage on my site for this script
	-separate the CSS to its own file.
	-LOG IN
	-check for security (I haven't tested this AT ALL, SO I recommend this only being used in a private location (security via obscurity!)
	-easy export tool
	-archive of daily or weekly work
	-project dropdown choice?
	-start stop buttons?
	-calculation of work by project

Revisions:
	v0.2 released on August 3rd, 2011.  I added a SIMPLE delete button. This fully TRUNCATES all data in the database table. This does NOT, I REPEAT, does NOT archive or back any of it up.  Will figure that one out next maybe. The way I am using is currently is to simply copy paste the data right out of the portal and pasting into LibreOffice and doing the calculations for billing that way.
	
	v1.0  released on April 26th, 2015  Ok, this ladies and gentlemen is fully updated. It is completely responsive for iPhone 5 portrait and landscape... need to check the other views... In this major update, I added gradient CSS3 backgrounds, bigger buttons and, at long last, I added an BACKUP button!  WOO HOO! That's right, this will backup all of your tasks into a CSV file on your computer.  Once you archived, you can then use the Delete Tasks button! Awesome.  Had a new need for this and updated everything.  Also, I cleaned up the redundencies in the code by making a separate stylesheet AND making the database connection a simple function created in separate database php page.  Hope you all enjoy!  Future roadmap will include: login/logout function, adding projects dropdown (maybe).
Source: README.txt, updated 2015-04-26