diff --git a/config.inc.php.example b/config.inc.php.example index 7633760..0a4167d 100755 --- a/config.inc.php.example +++ b/config.inc.php.example @@ -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 diff --git a/inc/LICENSE (bootstrap) b/inc/LICENSE (bootstrap) new file mode 100644 index 0000000..a80e8c2 --- /dev/null +++ b/inc/LICENSE (bootstrap) @@ -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. \ No newline at end of file diff --git a/LICENSE (fpdf) b/inc/LICENSE (fpdf) old mode 100755 new mode 100644 similarity index 100% rename from LICENSE (fpdf) rename to inc/LICENSE (fpdf) diff --git a/LICENSE (phpass) b/inc/LICENSE (phpass) old mode 100755 new mode 100644 similarity index 100% rename from LICENSE (phpass) rename to inc/LICENSE (phpass) diff --git a/LICENSE b/inc/LICENSE (yaptc) old mode 100755 new mode 100644 similarity index 100% rename from LICENSE rename to inc/LICENSE (yaptc) diff --git a/includes/footer.inc.php b/inc/footer.inc.php similarity index 100% rename from includes/footer.inc.php rename to inc/footer.inc.php diff --git a/includes/functions.inc.php b/inc/functions.inc.php similarity index 68% rename from includes/functions.inc.php rename to inc/functions.inc.php index f57a536..0697f22 100755 --- a/includes/functions.inc.php +++ b/inc/functions.inc.php @@ -1,84 +1,10 @@ '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-alpha3'; // Timezone from config date_default_timezone_set("$yaptc_timezone"); diff --git a/includes/header.inc.php b/inc/header.inc.php similarity index 100% rename from includes/header.inc.php rename to inc/header.inc.php diff --git a/includes/index.php b/inc/index.php similarity index 100% rename from includes/index.php rename to inc/index.php diff --git a/lang/en.lang.php b/lang/en.lang.php index 055515c..b44195e 100755 --- a/lang/en.lang.php +++ b/lang/en.lang.php @@ -1,11 +1,74 @@ - 'You have no recorded punches' - 'QUICK_PUNCH' => 'Quick Punch' + '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]; } ?> \ No newline at end of file diff --git a/login.php b/login.php index 5653f94..727fca8 100755 --- a/login.php +++ b/login.php @@ -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 = ' '; require_once($yaptc_inc . "header.inc.php"); @@ -43,6 +44,9 @@ endif; + + +