14 Commits

Author SHA1 Message Date
392438f537 Update 'README.md' 2019-08-21 11:55:22 +00:00
Josh North
4e92330743 Upload files to 'lib' 2017-06-02 20:52:40 -04:00
Gitea
4422a1da06 Merge branch 'master' of /home/gitea/gitea-repositories/point808/yaptc 2017-06-02 20:52:40 -04:00
Josh North
80674fe40c add icon 2017-06-02 20:51:19 -04:00
Josh North
75b2ec7341 Upload files to '' 2017-06-02 20:49:54 -04:00
Josh North
c6234c6f81 Add 'logomakr-credit.html' 2017-06-02 20:49:15 -04:00
Josh North
57c97cde70 Fix readme screencaps to work on forks and local git server as well as the github mirror 2017-05-12 12:26:32 -04:00
Josh North
0eb76946eb Update 'README.md' 2017-05-12 12:23:53 -04:00
Josh North
cb40a41121 Update 'README.md' 2017-05-12 12:17:30 -04:00
7496f9f59e screencaps in doc branch orphan setup 2017-05-12 12:10:10 -04:00
Josh North
5640b51e16 Update 'README.md' 2017-05-12 12:00:44 -04:00
Josh North
1347108cd8 touch to test gh sync 2017-05-12 11:58:59 -04:00
61ce24efef ok now this is it. stupid mistakes - need a break. this one works. 2017-05-12 11:12:29 -04:00
351b9c3eeb fix language include, consolidate misc files, last alpha for now 2017-05-12 11:07:03 -04:00
28 changed files with 124 additions and 95 deletions

22
README.md Executable file → Normal file
View File

@@ -1,12 +1,16 @@
# YAPTC #
![yaptc](../doc/yaptc.png?raw=true "yaptc")
### About: ###
Josh North - josh.north@point808.com
Basic (i.e. stupidly simple) timekeeping application. I'm working on more features but who knows if that will get released.
### License ###
### Dev: ###
*** This repository lives at https://git.point808.com and pushes to github on update.
### License: ###
Free for use and modification. Credit is appreciated if you do anything with it but nothing is required.
### Credits ###
### Credits: ###
* Bootstrap - http://getbootstrap.com
* phpass (password hashing, license included) - http://www.openwall.com/phpass/
* HUGE thank you to PHP Developers Network users "califdon", "Celauran", and "social_experiment" for their guide on login and registration systems at http://forums.devnetwork.net/viewtopic.php?f=28&t=135287&sid=f7140b48a14f50fd7f0340581442447b#p675168
@@ -36,9 +40,9 @@ We track time in this application by punching start and end times on each record
8. Go for it. Create new users, etc etc etc.
### Screenshots: ###
![Login Page] (https://git.point808.com/attachments/7381ee2d-3bb5-4430-9c37-29527f8bfa4f)
![Home Punch] (https://git.point808.com/attachments/5b762048-54cf-41bf-91b0-468f333f4bae)
![User Profile] (https://git.point808.com/attachments/4b13b0f1-d6ff-4445-93ad-6e699fdba075)
![Manage Users] (https://git.point808.com/attachments/24ab13eb-d32e-4b25-89e1-88edc2e9cbf2)
![Punch Editor] (https://git.point808.com/attachments/ec4fa0e7-caa4-46d5-ab9c-d08ea55b1eb5)
![Reports] (https://git.point808.com/attachments/dbe6fee9-f1ad-49bb-8a30-f8e568f54e64)
![Login Page](../doc/login.png?raw=true "Login Page")
![Home Punch](../doc/homepunch.png?raw=true "Home Punch")
![User Profile](../doc/profile.png?raw=true "User Profile")
![Manage Users](../doc/manageusers.png?raw=true "Manage Users")
![Punch Editor](../doc/punchedit.png?raw=true "Punch Editor")
![Reports](../doc/reports.png?raw=true "Reports")

View File

@@ -20,8 +20,8 @@ $yaptc_db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // Advanced
$yaptc_db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); // Advanced PDO handling
$_SESSION['yaptc_dir'] = $yaptc_dirpath; // Put absolute directory path in session
$_SESSION['yaptc_url'] = $yaptc_webpath; // Put absolute url path in session
$yaptc_inc = $yaptc_dirpath . 'includes/'; // Concatenate an includes directory path
$yaptc_incweb = $yaptc_webpath . 'includes/'; // Concatenate an includes url path
$yaptc_inc = $yaptc_dirpath . 'inc/'; // Concatenate an includes directory path
$yaptc_incweb = $yaptc_webpath . 'inc/'; // Concatenate an includes url path
$yaptc_lib = $yaptc_dirpath . 'lib/'; // Concatenate a lib directory path
$yaptc_libweb = $yaptc_webpath . 'lib/'; // Concatenate a lib url path
$yaptc_lang = $yaptc_dirpath . 'lang/' . $yaptc_language . 'lang.php'; // Concatenate a language url path

BIN
homepunch.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

21
inc/LICENSE (bootstrap) Normal file
View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2011-2016 Twitter, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

0
LICENSE (fpdf) → inc/LICENSE (fpdf) Executable file → Normal file
View File

0
LICENSE (phpass) → inc/LICENSE (phpass) Executable file → Normal file
View File

0
LICENSE → inc/LICENSE (yaptc) Executable file → Normal file
View File

View File

@@ -1,84 +1,10 @@
<?php
// Languages
function lang($phrase){
static $lang = array(
'ACCOUNT_INFO_HEADER' => 'Account Information',
'ACCOUNT_INFO_DESC' => 'You may make changes to your user profile below. To change your password, enter a new password twice below and press save. Minimum password length is ',
'USER_LIST_HEADER' => 'User List',
'USER_LIST_DESC' => 'Delete or Punch users from the actions column. Eventually, password resets will also be enabled.',
'PUNCH_HISTORY_HEADER' => 'Punch History',
'PUNCH_HISTORY_DESC' => 'The following is your entire punch history, most recent first.',
'NO_PUNCHES' => 'You have no recorded punches',
'NOT_AUTHORIZED' => 'Not Authorized!',
'OUT' => 'Out',
'PAGE' => 'Page',
'IN' => 'In',
'ADD_USER' => 'Add User',
'ADD_USER_DESC' => 'All fields are required! Username and email must be unique. Minimum password length is ',
'HOURS' => 'Hours',
'FLAG' => 'Flag',
'NOTES' => 'Notes',
'HOME' => 'Home',
'LOGIN' => 'Login',
'LOGOUT' => 'Logout',
'ACCOUNT' => 'Account',
'META_DESC' => 'YAPTC Timecard system is a time recording application for small businesses.',
'USERS' => 'Manage Users',
'SAVE_PUNCH_WARNING' => 'Are you sure you want to save the edit to this user punch?',
'SAVE' => 'Save',
'DELETE' => 'Delete',
'NEW' => 'New',
'NAME' => 'Name',
'CONFIRM' => 'Confirm',
'PUNCH' => 'Punch',
'NOTES_PLACEHOLDER' => 'Enter notes if needed',
'USERNAME' => 'Username',
'DELETE_WARNING' => '********* WARNING! ********** Are you SURE you want to DELETE this user AND ALL ASSOCIATED PUNCHES!?!? There is NO UNDO!',
'ACTIONS' => 'Actions',
'CREATED' => 'Created',
'MIN_PASSWORD_LENGTH' => 'Minimum password length is ',
'USERTYPE' => 'User Type',
'EDIT_PROFILE' => 'Edit Profile',
'ILLEGAL_CHARACTERS' => 'Username contains illegal characters',
'PASSWORD_NOTMATCH' => 'Passwords do not match',
'EMAIL_NOTVALID' => 'Email address not valid',
'USERNAME_NOTEMPTY' => 'Username cannot be empty',
'PASSWORD_NOTEMPTY' => 'Password cannot be empty',
'USERNAME_USED' => 'Username already in use',
'EMAIL_USED' => 'Email already in use',
'PASSWORD_NOTCONFIRMED' => 'Password must be confirmed',
'PASSWORD' => 'Password',
'USER' => 'User',
'FIRSTNAME' => 'First Name',
'LASTNAME' => 'Last Name',
'EMAIL' => 'E-Mail',
'USER_INFORMATION' => 'User Information',
'PUNCH_EDITOR' => 'Punch Edit',
'EDIT_PUNCH_HEADER' => 'User Punches',
'EDIT_PUNCH_DESC' => 'Edit or delete existing punches for users if needed. WARNING - there is NO UNDO for these actions!!!',
'PLEASE_LOG_IN' => 'Please log in to use the timecard system',
'REPORTS' => 'Reports',
'SINCE' => 'since',
'PUNCH_STATUS' => 'Punch Status',
'SERVER_TIME' => 'Server Time',
'QUICK_PUNCH_PARAGRAPH' => 'Click below to immediately punch your time. You may enter notes for your administrator to review.',
'ADVANCED_PUNCH_PARAGRAPH' => 'Click the punch button to immediately punch your time. You may also make changes to the defaults. Note that changing the punch time will result in a flag on the punch for your administrator to review.',
'YOU_HAVE_BEEN_PUNCHED' => 'You have been punched',
'REPORTS_DESC' => 'The drop-down below can be used to select pre-configured reports. Other reports are currently being written.',
'QUICK_PUNCH' => 'Quick Punch',
'SOFTWARE_VERSION' => 'Software Version',
'ADVANCED_PUNCH' => 'Advanced Punch'
);
return $lang[$phrase];
}
// Current Time
$timenow = date('Y-m-d H:i:s');
// This Version
$yaptc_version = 'yaptc_v1.0-alpha';
$yaptc_version = 'yaptc_v1.0-alpha4';
// Timezone from config
date_default_timezone_set("$yaptc_timezone");

0
mysql.sql → inc/mysql.sql Executable file → Normal file
View File

View File

@@ -2,6 +2,8 @@
session_start();
if(file_exists("config.inc.php")){
require_once("config.inc.php");
require_once($yaptc_lang);
}else{
echo "Configuration file not found - please complete setup before continuing.";
exit;

View File

@@ -1,11 +1,74 @@
<?php return array(
// Set up language strings here
'NO_PUNCHES' => 'You have no recorded punches'
'QUICK_PUNCH' => 'Quick Punch'
<?php function lang($phrase){ static $lang = array(
//
// English Language File.
//
'ACCOUNT_INFO_HEADER' => 'Account Information',
'ACCOUNT_INFO_DESC' => 'You may make changes to your user profile below. To change your password, enter a new password twice below and press save. Minimum password length is ',
'USER_LIST_HEADER' => 'User List',
'USER_LIST_DESC' => 'Delete or Punch users from the actions column. Eventually, password resets will also be enabled.',
'PUNCH_HISTORY_HEADER' => 'Punch History',
'PUNCH_HISTORY_DESC' => 'The following is your entire punch history, most recent first.',
'NO_PUNCHES' => 'You have no recorded punches',
'NOT_AUTHORIZED' => 'Not Authorized!',
'OUT' => 'Out',
'PAGE' => 'Page',
'IN' => 'In',
'ADD_USER' => 'Add User',
'ADD_USER_DESC' => 'All fields are required! Username and email must be unique. Minimum password length is ',
'HOURS' => 'Hours',
'FLAG' => 'Flag',
'NOTES' => 'Notes',
'HOME' => 'Home',
'LOGIN' => 'Login',
'LOGOUT' => 'Logout',
'ACCOUNT' => 'Account',
'META_DESC' => 'YAPTC Timecard system is a time recording application for small businesses.',
'USERS' => 'Manage Users',
'SAVE_PUNCH_WARNING' => 'Are you sure you want to save the edit to this user punch?',
'SAVE' => 'Save',
'DELETE' => 'Delete',
'NEW' => 'New',
'NAME' => 'Name',
'CONFIRM' => 'Confirm',
'PUNCH' => 'Punch',
'NOTES_PLACEHOLDER' => 'Enter notes if needed',
'USERNAME' => 'Username',
'DELETE_WARNING' => '********* WARNING! ********** Are you SURE you want to DELETE this user AND ALL ASSOCIATED PUNCHES!?!? There is NO UNDO!',
'ACTIONS' => 'Actions',
'CREATED' => 'Created',
'MIN_PASSWORD_LENGTH' => 'Minimum password length is ',
'USERTYPE' => 'User Type',
'EDIT_PROFILE' => 'Edit Profile',
'ILLEGAL_CHARACTERS' => 'Username contains illegal characters',
'PASSWORD_NOTMATCH' => 'Passwords do not match',
'EMAIL_NOTVALID' => 'Email address not valid',
'USERNAME_NOTEMPTY' => 'Username cannot be empty',
'PASSWORD_NOTEMPTY' => 'Password cannot be empty',
'USERNAME_USED' => 'Username already in use',
'EMAIL_USED' => 'Email already in use',
'PASSWORD_NOTCONFIRMED' => 'Password must be confirmed',
'PASSWORD' => 'Password',
'USER' => 'User',
'FIRSTNAME' => 'First Name',
'LASTNAME' => 'Last Name',
'EMAIL' => 'E-Mail Address',
'USER_INFORMATION' => 'User Information',
'PUNCH_EDITOR' => 'Punch Edit',
'EDIT_PUNCH_HEADER' => 'Edit Punches',
'EDIT_PUNCH_DESC' => 'Edit or delete existing punches for users if needed. WARNING - there is NO UNDO for these actions!!!',
'PLEASE_LOG_IN' => 'Please Log In',
'REPORTS' => 'Reports',
'SINCE' => 'since',
'PUNCH_STATUS' => 'Punch Status',
'SERVER_TIME' => 'Server Time',
'QUICK_PUNCH_PARAGRAPH' => 'Click below to immediately punch your time. You may enter notes for your administrator to review.',
'ADVANCED_PUNCH_PARAGRAPH' => 'Click the punch button to immediately punch your time. You may also make changes to the defaults. Note that changing the punch time will result in a flag on the punch for your administrator to review.',
'YOU_HAVE_BEEN_PUNCHED' => 'You have been punched',
'REPORTS_DESC' => 'The drop-down below can be used to select pre-configured reports. Other reports are currently being written.',
'QUICK_PUNCH' => 'Quick Punch',
'SOFTWARE_VERSION' => 'Software Version',
'ADVANCED_PUNCH' => 'Advanced Punch'
// EOF
); ?>
// END OF STRINGS
); return $lang[$phrase]; } ?>

BIN
lib/yaptc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

@@ -2,6 +2,7 @@
session_start();
require_once("config.inc.php");
require_once($yaptc_inc . "functions.inc.php");
require_once($yaptc_lang);
$yaptc_pagename = lang('LOGIN');
$yaptc_pageicon = '<i class="fa fa-sign-in"></i> ';
require_once($yaptc_inc . "header.inc.php");
@@ -43,6 +44,7 @@ endif;
<input type="password" id="password" name="password" class="form-control" placeholder="<?php echo lang('PASSWORD'); ?>" required>
<button class="btn btn-lg btn-primary btn-block" type="submit" name="login"><?php echo lang('LOGIN'); ?></button>
</form>
</div>
<!-- ********** END CONTENT ********** -->

BIN
login.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

BIN
logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

1
logomakr-credit.html Normal file
View File

@@ -0,0 +1 @@
Time graphic by <a href="http://www.flaticon.com/authors/freepik">freepik</a> from <a href="http://www.flaticon.com/">Flaticon</a> is licensed under <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0">CC BY 3.0</a>. Check out the new logo that I created on <a href="http://logomakr.com" title="Logo Maker">LogoMaker.com</a> https://logomakr.com/56vKWz56vKWz

View File

@@ -1,6 +1,8 @@
<?php
session_start();
require_once("config.inc.php");
require_once($yaptc_lang);
require_once($yaptc_inc . "functions.inc.php");
$yaptc_pagename = lang('LOGOUT');
$yaptc_pageicon = '<i class="fa fa-sign-out"></i> ';

BIN
manageusers.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

View File

@@ -1,6 +1,8 @@
<?php
session_start();
require_once("config.inc.php");
require_once($yaptc_lang);
require_once($yaptc_inc . "functions.inc.php");
$yaptc_pagename = lang('PUNCH_EDITOR');
$yaptc_pageicon = '<i class="fa fa-clock-o"></i> ';

View File

@@ -1,6 +1,8 @@
<?php
session_start();
require_once("config.inc.php");
require_once($yaptc_lang);
require_once($yaptc_inc . "functions.inc.php");
$yaptc_pagename = lang('ACCOUNT');
$yaptc_pageicon = '<i class="fa fa-cog"></i> ';

BIN
profile.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
punchedit.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

View File

@@ -1,6 +1,8 @@
<?php
session_start();
require_once("config.inc.php");
require_once($yaptc_lang);
require_once($yaptc_inc . "functions.inc.php");
$yaptc_pagename = "Reports";
$yaptc_pageicon = '<i class="fa fa-newspaper-o"></i> ';

BIN
reports.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

View File

@@ -1,6 +1,8 @@
<?php
session_start();
require_once("config.inc.php");
require_once($yaptc_lang);
require_once($yaptc_inc . "functions.inc.php");
$yaptc_pagename = lang('USERS');
$yaptc_pageicon = '<i class="fa fa-users"></i> ';