We are selling our timesheet script for more than 12 years. We are already providing demo video, live demo, and screenshots for helping potential buyers understand our timesheet software. Even created a video for explaining about developing a timesheet software using PHP and MySQL.
I disabled the buy button on the sales page a few months back, as I thought this timesheet may not be much useful now as it was developed 12 years back. But many people contacted me to buy the timesheet even after disabling the buy button. It made me enable the buy button again. And, I updated the script to make it work with the latest PHP version (PHP 8).
After doing various analyses, I came to know that our timesheet script is much useful for many kinds of companies even though it was developed long back, and it is very inexpensive. Moreover, it comes with source code so that customers can do any kind of custom changes.
Some people asked me about Developer Guide for this timesheet software. Initially, internally we maintained Developer Guide for our timesheet software. But we found it difficult to update it continuously according to new changes made with the timesheet software. I thought not having Developer Guide is better than having an Outdated guide which can create confusion.
Anyway, as people are asking about Developer Guide, I have decided to keep Developer Guide content in this blog post. I am planning to keep only key information so that it can be updated easily.
Developer Guide for QulityPoint Timesheet Software
(updated on 17th May 2023)
It is a web-based application. We can access it from any web browser. Before installing this software, we need to make sure that the server is set up with Apache, PHP, and MySQL.
The install script is available at /install/install.php
The purpose of this install.php file is to get details (e.g MySql Db details, Siteadmin details) from users while installing the software and for creating database tables and creating config.php file with database connection details.
Apart from db connection details, we can change the Browser title text and siteadmin email id in the config.php file. And, the functions.php is included in this config file.
The config.php needs to be included in all other files.
Apart from the install folder, this script comes with the below folders.
csv -> This folder is for keeping .csv files that are created when using "Download CSV" feature from the report page. We need to make sure that this folder is having write permission to store the files. And, you can delete the old files from here.
fpdf -> Library for creating PDF report files. There won't be any need to make any changes here. If you want to use the latest version of fpdf library, you can update this folder. But you need to make sure that the latest version is not requiring any changes in the usage files.
css -> For storing stylesheet files. There will be a separate .css file for the install script.
siteadmin -> All the php files used in siteadmin login are stored in this folder.
img -> This folder is stored for keeping the logo and icon images.
jquery-autocomplete -> It is a script library for providing auto-complete feature in the drop-down/select list.
The functions.php file stores all the reused custom functions. So, need to be very careful in making any changes here. Because changing the function for one page may affect the other pages which use the same function. Though the functions are created to get inputs through function parameters/arguments, some of them are using some global variables also. So, we need to be careful in renaming any variables in other files.
header.php and footer.php are included in all the other files.
header.php is for showing key information at the top apart from showing the Menu dynamically based on usertype. selected_currpage() is used for highlighting the current page in the Menu. If you are planning to add a new entry in the menu, you have to update the selected_currpage() in the functions.php to include a new entry for the $active array, and this new $active array index for new menu entry in the header.php
check-login.php is used for checking the username and password. If the details are valid, session variables usertype and userid will be assigned with values. These session variables are used for providing different functionality for different types of users. These session variables are used in almost all files.
create_newuser.php is used for creating new admins without login, as well as for creating employees from admin login. So, this page coding is provided with many conditions. It is better to check both scenarios when making changes for one scenario to make sure it is working correctly in both situations as expected.
download_pdf.php is using fpdf.php library to create pdf report. It is linked from report.php which passes query-string parameters, like employee id, project id, start Date and end Date. Each cell attributes like width, needs to be set manually. So, it is a bit tedious and time-consuming work to make any changes here. And as explained in my previous post we need some complex logic to handle the first page with some additional information when we need to create pdf file with multiple pages.
weekly_status_entry.php is a bit complex script. So, we need to do proper testing whenever we make any changes here. CSS class names are used for doing calculations and in other functionalities. So, do any changes in class names and tables only if you are ready to make relevant changes in the javascript coding also. This page handles a lot of things, like showing the week selection feature, displaying hours data if the data is already there, handing comments, doing recalculation row-wise and column-wise whenever there is any data change in any cell, enabling/disabling submit/save/clear buttons dynamically, all showing multiple projects and non-projects. So, make any changes here only if it is really necessary.
Coding on other pages is mostly self-explanatory. Anyway, I will be updating more details here if it is needed.
For doing any page redirection, use the redirect($targetPage) function available in the functions.php. It handles redirection effectively by using both PHP-based redirection (server side) and javascript-based redirection (client side) based on whether headers are already sent or not.
No comments:
Post a Comment