diff --git a/LICENSE (font-awesome) b/LICENSE (font-awesome) deleted file mode 100644 index ceac938..0000000 --- a/LICENSE (font-awesome) +++ /dev/null @@ -1,26 +0,0 @@ -The following license applies to some of the software included in this project. -================================================== - -Font License -================================================== -Applies to all desktop and webfont files in the following directory: font-awesome/fonts/. -License: SIL OFL 1.1 -URL: http://scripts.sil.org/OFL - -Code License -================================================== -Applies to all CSS and LESS files in the following directories: font-awesome/css/, font-awesome/less/, and font-awesome/scss/. -License: MIT License -URL: http://opensource.org/licenses/mit-license.html - -Documentation License -================================================== -Applies to all Font Awesome project files that are not a part of the Font or Code licenses. -License: CC BY 3.0 -URL: http://creativecommons.org/licenses/by/3.0/ - -Brand Icons -================================================== -All brand icons are trademarks of their respective owners. -The use of these trademarks does not indicate endorsement of the trademark holder by Font Awesome, nor vice versa. -Brand icons should only be used to represent the company or product to which they refer. \ No newline at end of file diff --git a/LICENSE (pure) b/LICENSE (pure) deleted file mode 100755 index ceeda51..0000000 --- a/LICENSE (pure) +++ /dev/null @@ -1,19 +0,0 @@ -The following license applies to some of the software included in this project. -================================================== - -Software License Agreement (BSD License) -Copyright 2013 Yahoo! Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -* Neither the name of the Yahoo! Inc. nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL YAHOO! INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md index 05fdd3f..2040c82 100755 --- a/README.md +++ b/README.md @@ -1,40 +1,34 @@ # YAPTC # ### About: ### -Josh North - josh.north@point808.com - 2015-02-09 -This is a basic timekeeping application that is steadily getting more complex. It may or may not work for you but I'm pretty proud of it. - -### Demo: ### -The demo username/password is admin/admin. It is fully functional with the exception of changing the admin password. -http://www.point808.com/timecard +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 ### Free for use and modification. Credit is appreciated if you do anything with it but nothing is required. ### Credits ### -* Pure (CSS styling, license included) - http://purecss.io/ +* 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 -### Status: ### -This script is (as of today, 2015-02-26) in *fully-working beta status*. - ### Theory: ### We track time in this application by punching start and end times on each record. Times are calculated using MySQL math functions in the queries. This allows us to be more flexible with granularity and time zones, etc etc. Everything else is mostly in line with standard PHP web apps. ### Requirements: ### -* PHP (I used PHP 5.5.9) +* PHP 7 working fine * MySQL (I used MySQL 5.5.41) -* Web server (I used NGINX 1.4.6) +* Web server (tested on NGINX) ### Setup Assumptions: ### * You have the above requirements met. * You are somewhat familiar with editing PHP config files (I hope). * I assume you have git installed - if not, rather than using the git-pull, download the zip from my git page. +* MAKE SURE YOUR SERVER CLOCK IS CORRECT!!! This system relies on the server time, not the client machine time. ### Setup Instructions: ### -1. Go to your webserver root as a user with write privileges (i.e. /usr/share/nginx/html) +1. Go to your webserver root as a user with write privileges (i.e. /var/www/html) 2. Decide what sub-directory you want the app in. I use "timecard" here. -3. Run the following `git clone https://github.com/joshnorth/yaptc.git timecard` +3. Download the zip release and unzip in the correct directory. 4. Change to the new directory and copy the config.inc.php.example file to config.inc.php 5. Edit the config.inc.php top section variables to suit your environment. 6. Use your MySQL management interface of choice to import the mysql.sql file to your database server. It will create a database named "yaptc". You also need to probably make a user with permissions on that database and that database alone to use in the config file so that this app does not have root mysql permissions!!! Note also - I had trouble importing with some tools. In the end, I used the mysql command line tool and just copied/pasted the text in. diff --git a/includes/functions.inc.php b/includes/functions.inc.php index 5c1a4f2..d5b2a6b 100755 --- a/includes/functions.inc.php +++ b/includes/functions.inc.php @@ -65,6 +65,7 @@ function lang($phrase){ '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' diff --git a/manualpunch.php b/manualpunch.php index d187cc8..522f59b 100755 --- a/manualpunch.php +++ b/manualpunch.php @@ -67,14 +67,16 @@ $page_count = 0; if (0 === $row_count): else: $page_count = (int)ceil($row_count / $yaptc_rowsperpage); if($page_num > $page_count): $page_num = 1; endif; endif; ?> +
+ +

- -

-

- + @@ -86,6 +88,6 @@ if (0 === $row_count): else: $page_count = (int)ceil($row_count / $yaptc_rowsper
' . $i . ' '; endif; endfor; ?>
'; for ($i = 1; $i <= $page_count; $i++): echo '
  • ' . $i . '
  • '; endfor; echo ''; ?>
    - +
    diff --git a/profile.php b/profile.php index 0013b86..d1412dd 100755 --- a/profile.php +++ b/profile.php @@ -92,7 +92,7 @@ if (0 === $row_count): else: $page_count = (int)ceil($row_count / $yaptc_rowsper - + diff --git a/reports.php b/reports.php index c4c5622..68e2cc5 100755 --- a/reports.php +++ b/reports.php @@ -11,13 +11,18 @@ else: ?> -

    Historical Reports

    -

    The drop-down below can be used to select pre-configured reports. Other reports are currently being written.

    - + +
    + +

    + +
    -
    -
    - @@ -29,8 +34,8 @@ else: ?>
    -
    - +
    +
    @@ -38,21 +43,21 @@ else: ?> -
    ' . $i . ' '; endif; endfor; ?>
    '; for ($i = 1; $i <= $page_count; $i++): echo '
  • ' . $i . '
  • '; endfor; echo ''; ?>
    +
    YearWeek#NameHours
    - +
    YearMonthNameHours
    - +
    @@ -62,6 +67,7 @@ else: ?>

    No query to display. Please select from the dropdown above...

    +

    NOT AUTHORIZED!

    diff --git a/users.php b/users.php index fd5df60..d85354d 100755 --- a/users.php +++ b/users.php @@ -178,17 +178,11 @@ if (0 === $row_count): else: $page_count = (int)ceil($row_count / $yaptc_rowsper

    - - - - - - -
    InOutNameHoursFlaggedNotes
    +
    - + @@ -199,6 +193,7 @@ if (0 === $row_count): else: $page_count = (int)ceil($row_count / $yaptc_rowsper
    ' . $i . ' '; endif; endfor; ?>
    '; for ($i = 1; $i <= $page_count; $i++): echo '
  • ' . $i . '
  • '; endfor; echo ''; ?>
    +