From e65ba7741cc0f7def418f419d0fa8ecf2d7d291d Mon Sep 17 00:00:00 2001 From: Josh North Date: Wed, 11 Feb 2015 23:52:11 -0500 Subject: [PATCH] Updated to include pure, major major major overhaul --- LICENSE | 0 README.md | 3 +- config.inc.php | 22 ++ config.inc.php~ | 22 ++ config.php | 11 - dashboard.php | 62 ++++ dashboard.php~ | 62 ++++ db.php | 207 ------------- images/icons/Add Appointment.png | Bin images/icons/Add Green Button.png | Bin images/icons/Add To Favorite.png | Bin images/icons/Add.png | Bin images/icons/Appointment Cool.png | Bin images/icons/Appointment Urgent.png | Bin images/icons/Audio CD.png | Bin images/icons/Audio Document.png | Bin images/icons/Backup Green Button.png | Bin images/icons/Bandwidth.png | Bin images/icons/Blue Ball.png | Bin images/icons/CD.png | Bin images/icons/Cancel Red Button.png | Bin images/icons/Clear Green Button.png | Bin images/icons/Coherence.png | Bin images/icons/Desktop.png | Bin images/icons/Discussion.png | Bin images/icons/Document.png | Bin images/icons/Donate.png | Bin images/icons/Eject Blue Button.png | Bin images/icons/Export To Audio Document.png | Bin images/icons/Export To Document.png | Bin images/icons/Export To Movie Document.png | Bin images/icons/Export To Picture Document.png | Bin images/icons/Favorite.png | Bin images/icons/Forward Mail.png | Bin images/icons/Fullscreen.png | Bin images/icons/Gear Alt.png | Bin images/icons/Gear.png | Bin images/icons/Get Document.png | Bin images/icons/Get Info Blue Button.png | Bin images/icons/Get Info Purple Button.png | Bin images/icons/Get Mail.png | Bin images/icons/Green Ball.png | Bin images/icons/Grey Ball.png | Bin images/icons/Help Blue Button.png | Bin images/icons/Help Purple Button.png | Bin images/icons/History.png | Bin images/icons/Import Audio Document.png | Bin images/icons/Import Document.png | Bin images/icons/Import Movie Document.png | Bin images/icons/Import Picture Document.png | Bin images/icons/Internet History.png | Bin images/icons/Mail.png | Bin images/icons/Menu Item.png | Bin images/icons/Menu.png | Bin images/icons/Minus Green Button.png | Bin images/icons/Minus Red Button.png | Bin images/icons/Movie CD.png | Bin images/icons/Movie Document.png | Bin images/icons/Mr. Bomb.png | Bin images/icons/Network.png | Bin images/icons/New Document.png | Bin images/icons/New Mail.png | Bin images/icons/Orange Ball.png | Bin images/icons/Pause All.png | Bin images/icons/Pause Blue Button.png | Bin images/icons/Pause Green Button.png | Bin images/icons/Pause.png | Bin images/icons/Picture CD.png | Bin images/icons/Picture Document.png | Bin images/icons/Play All.png | Bin images/icons/Play Blue Button.png | Bin images/icons/Play Green Button.png | Bin images/icons/Play.png | Bin images/icons/Plugin Green Button.png | Bin images/icons/Purple Ball.png | Bin images/icons/Record Button.png | Bin images/icons/Record Red Button.png | Bin images/icons/Red Ball.png | Bin images/icons/Remove Appointment.png | Bin images/icons/Remove Document.png | Bin images/icons/Remove.png | Bin images/icons/Rename Document.png | Bin images/icons/Run.png | Bin images/icons/Send Document.png | Bin images/icons/Send Mail.png | Bin images/icons/Smiley Blue.png | Bin images/icons/Smiley Sad Blue.png | Bin images/icons/Smiley Sad.png | Bin images/icons/Smiley Star Pink.png | Bin images/icons/Smiley Star Sad.png | Bin images/icons/Smiley Star.png | Bin images/icons/Smiley.png | Bin images/icons/Spotlight Blue Button.png | Bin images/icons/Star.png | Bin images/icons/Stop All.png | Bin images/icons/Stop Green Button.png | Bin images/icons/Stop Red Button.png | Bin images/icons/Stop.png | Bin images/icons/Terminal.png | Bin images/icons/Transfer Document.png | Bin images/icons/Transfer.png | Bin images/icons/Trash Empty.png | Bin images/icons/Trash Full.png | Bin images/icons/Universal Binary.png | Bin images/icons/Unread Mail Alt.png | Bin images/icons/Unread Mail.png | Bin images/icons/User.png | Bin images/icons/Users.png | Bin images/icons/Web Browser.png | Bin images/icons/Write Document.png | Bin images/icons/Yellow Ball.png | Bin images/icons/iChat Alt.png | Bin images/icons/iChat.png | Bin includes/date_time.js | 29 ++ includes/date_time.js~ | 29 ++ includes/footer.inc.php | 9 + includes/footer.inc.php~ | 8 + includes/head.inc.php~ | 17 ++ includes/header.inc.php | 17 ++ includes/header.inc.php~ | 18 ++ includes/index.php | 4 + includes/index.php~ | 3 + includes/menu.inc.php | 45 +++ includes/menu.inc.php~ | 46 +++ {pure => includes/pure}/HISTORY.md | 0 {pure => includes/pure}/LICENSE.md | 0 {pure => includes/pure}/README.md | 0 {pure => includes/pure}/base-context-min.css | 0 {pure => includes/pure}/base-context.css | 0 {pure => includes/pure}/base-min.css | 0 {pure => includes/pure}/base.css | 0 {pure => includes/pure}/bower.json | 0 {pure => includes/pure}/buttons-core-min.css | 0 {pure => includes/pure}/buttons-core.css | 0 {pure => includes/pure}/buttons-min.css | 0 {pure => includes/pure}/buttons.css | 0 {pure => includes/pure}/forms-min.css | 0 {pure => includes/pure}/forms-nr-min.css | 0 {pure => includes/pure}/forms-nr.css | 0 {pure => includes/pure}/forms.css | 0 {pure => includes/pure}/grids-core-min.css | 0 {pure => includes/pure}/grids-core.css | 0 {pure => includes/pure}/grids-min.css | 0 .../pure}/grids-responsive-min.css | 0 .../pure}/grids-responsive-old-ie-min.css | 0 .../pure}/grids-responsive-old-ie.css | 0 {pure => includes/pure}/grids-responsive.css | 0 {pure => includes/pure}/grids-units-min.css | 0 {pure => includes/pure}/grids-units.css | 0 {pure => includes/pure}/grids.css | 0 includes/pure/index.php | 4 + {pure => includes/pure}/menus-core-min.css | 0 {pure => includes/pure}/menus-core.css | 0 {pure => includes/pure}/menus-min.css | 0 {pure => includes/pure}/menus-nr-min.css | 0 {pure => includes/pure}/menus-nr.css | 0 .../pure}/menus-paginator-min.css | 0 {pure => includes/pure}/menus-paginator.css | 0 {pure => includes/pure}/menus.css | 0 {pure => includes/pure}/pure-min.css | 0 {pure => includes/pure}/pure-nr-min.css | 0 {pure => includes/pure}/pure-nr.css | 0 {pure => includes/pure}/pure.css | 0 {pure => includes/pure}/tables-min.css | 0 {pure => includes/pure}/tables.css | 0 includes/side-menu-old-ie.css | 259 ++++++++++++++++ includes/side-menu.css | 206 +++++++++++++ includes/side-menu.css~ | 281 ++++++++++++++++++ includes/ui.js | 35 +++ index.php | 62 +++- index.php~ | 57 ++++ lib/index.php | 4 + lib/phpass-0.3/PasswordHash.php | 253 ++++++++++++++++ lib/phpass-0.3/c/Makefile | 21 ++ lib/phpass-0.3/c/crypt_private.c | 106 +++++++ lib/phpass-0.3/test.php | 72 +++++ login.php | 58 ++++ login.php~ | 58 ++++ logout.php | 28 ++ logout.php~ | 28 ++ profile.php | 57 ++++ profile.php~ | 57 ++++ register.php | 199 +++++++++++++ register.php~ | 189 ++++++++++++ response.php | 111 ------- time.php | 78 +++++ time.php~ | 82 +++++ 187 files changed, 2581 insertions(+), 338 deletions(-) mode change 100644 => 100755 LICENSE mode change 100644 => 100755 README.md create mode 100644 config.inc.php create mode 100644 config.inc.php~ delete mode 100644 config.php create mode 100644 dashboard.php create mode 100644 dashboard.php~ delete mode 100644 db.php mode change 100644 => 100755 images/icons/Add Appointment.png mode change 100644 => 100755 images/icons/Add Green Button.png mode change 100644 => 100755 images/icons/Add To Favorite.png mode change 100644 => 100755 images/icons/Add.png mode change 100644 => 100755 images/icons/Appointment Cool.png mode change 100644 => 100755 images/icons/Appointment Urgent.png mode change 100644 => 100755 images/icons/Audio CD.png mode change 100644 => 100755 images/icons/Audio Document.png mode change 100644 => 100755 images/icons/Backup Green Button.png mode change 100644 => 100755 images/icons/Bandwidth.png mode change 100644 => 100755 images/icons/Blue Ball.png mode change 100644 => 100755 images/icons/CD.png mode change 100644 => 100755 images/icons/Cancel Red Button.png mode change 100644 => 100755 images/icons/Clear Green Button.png mode change 100644 => 100755 images/icons/Coherence.png mode change 100644 => 100755 images/icons/Desktop.png mode change 100644 => 100755 images/icons/Discussion.png mode change 100644 => 100755 images/icons/Document.png mode change 100644 => 100755 images/icons/Donate.png mode change 100644 => 100755 images/icons/Eject Blue Button.png mode change 100644 => 100755 images/icons/Export To Audio Document.png mode change 100644 => 100755 images/icons/Export To Document.png mode change 100644 => 100755 images/icons/Export To Movie Document.png mode change 100644 => 100755 images/icons/Export To Picture Document.png mode change 100644 => 100755 images/icons/Favorite.png mode change 100644 => 100755 images/icons/Forward Mail.png mode change 100644 => 100755 images/icons/Fullscreen.png mode change 100644 => 100755 images/icons/Gear Alt.png mode change 100644 => 100755 images/icons/Gear.png mode change 100644 => 100755 images/icons/Get Document.png mode change 100644 => 100755 images/icons/Get Info Blue Button.png mode change 100644 => 100755 images/icons/Get Info Purple Button.png mode change 100644 => 100755 images/icons/Get Mail.png mode change 100644 => 100755 images/icons/Green Ball.png mode change 100644 => 100755 images/icons/Grey Ball.png mode change 100644 => 100755 images/icons/Help Blue Button.png mode change 100644 => 100755 images/icons/Help Purple Button.png mode change 100644 => 100755 images/icons/History.png mode change 100644 => 100755 images/icons/Import Audio Document.png mode change 100644 => 100755 images/icons/Import Document.png mode change 100644 => 100755 images/icons/Import Movie Document.png mode change 100644 => 100755 images/icons/Import Picture Document.png mode change 100644 => 100755 images/icons/Internet History.png mode change 100644 => 100755 images/icons/Mail.png mode change 100644 => 100755 images/icons/Menu Item.png mode change 100644 => 100755 images/icons/Menu.png mode change 100644 => 100755 images/icons/Minus Green Button.png mode change 100644 => 100755 images/icons/Minus Red Button.png mode change 100644 => 100755 images/icons/Movie CD.png mode change 100644 => 100755 images/icons/Movie Document.png mode change 100644 => 100755 images/icons/Mr. Bomb.png mode change 100644 => 100755 images/icons/Network.png mode change 100644 => 100755 images/icons/New Document.png mode change 100644 => 100755 images/icons/New Mail.png mode change 100644 => 100755 images/icons/Orange Ball.png mode change 100644 => 100755 images/icons/Pause All.png mode change 100644 => 100755 images/icons/Pause Blue Button.png mode change 100644 => 100755 images/icons/Pause Green Button.png mode change 100644 => 100755 images/icons/Pause.png mode change 100644 => 100755 images/icons/Picture CD.png mode change 100644 => 100755 images/icons/Picture Document.png mode change 100644 => 100755 images/icons/Play All.png mode change 100644 => 100755 images/icons/Play Blue Button.png mode change 100644 => 100755 images/icons/Play Green Button.png mode change 100644 => 100755 images/icons/Play.png mode change 100644 => 100755 images/icons/Plugin Green Button.png mode change 100644 => 100755 images/icons/Purple Ball.png mode change 100644 => 100755 images/icons/Record Button.png mode change 100644 => 100755 images/icons/Record Red Button.png mode change 100644 => 100755 images/icons/Red Ball.png mode change 100644 => 100755 images/icons/Remove Appointment.png mode change 100644 => 100755 images/icons/Remove Document.png mode change 100644 => 100755 images/icons/Remove.png mode change 100644 => 100755 images/icons/Rename Document.png mode change 100644 => 100755 images/icons/Run.png mode change 100644 => 100755 images/icons/Send Document.png mode change 100644 => 100755 images/icons/Send Mail.png mode change 100644 => 100755 images/icons/Smiley Blue.png mode change 100644 => 100755 images/icons/Smiley Sad Blue.png mode change 100644 => 100755 images/icons/Smiley Sad.png mode change 100644 => 100755 images/icons/Smiley Star Pink.png mode change 100644 => 100755 images/icons/Smiley Star Sad.png mode change 100644 => 100755 images/icons/Smiley Star.png mode change 100644 => 100755 images/icons/Smiley.png mode change 100644 => 100755 images/icons/Spotlight Blue Button.png mode change 100644 => 100755 images/icons/Star.png mode change 100644 => 100755 images/icons/Stop All.png mode change 100644 => 100755 images/icons/Stop Green Button.png mode change 100644 => 100755 images/icons/Stop Red Button.png mode change 100644 => 100755 images/icons/Stop.png mode change 100644 => 100755 images/icons/Terminal.png mode change 100644 => 100755 images/icons/Transfer Document.png mode change 100644 => 100755 images/icons/Transfer.png mode change 100644 => 100755 images/icons/Trash Empty.png mode change 100644 => 100755 images/icons/Trash Full.png mode change 100644 => 100755 images/icons/Universal Binary.png mode change 100644 => 100755 images/icons/Unread Mail Alt.png mode change 100644 => 100755 images/icons/Unread Mail.png mode change 100644 => 100755 images/icons/User.png mode change 100644 => 100755 images/icons/Users.png mode change 100644 => 100755 images/icons/Web Browser.png mode change 100644 => 100755 images/icons/Write Document.png mode change 100644 => 100755 images/icons/Yellow Ball.png mode change 100644 => 100755 images/icons/iChat Alt.png mode change 100644 => 100755 images/icons/iChat.png create mode 100644 includes/date_time.js create mode 100644 includes/date_time.js~ create mode 100644 includes/footer.inc.php create mode 100644 includes/footer.inc.php~ create mode 100644 includes/head.inc.php~ create mode 100644 includes/header.inc.php create mode 100644 includes/header.inc.php~ create mode 100644 includes/index.php create mode 100644 includes/index.php~ create mode 100644 includes/menu.inc.php create mode 100644 includes/menu.inc.php~ rename {pure => includes/pure}/HISTORY.md (100%) mode change 100644 => 100755 rename {pure => includes/pure}/LICENSE.md (100%) mode change 100644 => 100755 rename {pure => includes/pure}/README.md (100%) mode change 100644 => 100755 rename {pure => includes/pure}/base-context-min.css (100%) mode change 100644 => 100755 rename {pure => includes/pure}/base-context.css (100%) mode change 100644 => 100755 rename {pure => includes/pure}/base-min.css (100%) mode change 100644 => 100755 rename {pure => includes/pure}/base.css (100%) mode change 100644 => 100755 rename {pure => includes/pure}/bower.json (100%) mode change 100644 => 100755 rename {pure => includes/pure}/buttons-core-min.css (100%) mode change 100644 => 100755 rename {pure => includes/pure}/buttons-core.css (100%) mode change 100644 => 100755 rename {pure => includes/pure}/buttons-min.css (100%) mode change 100644 => 100755 rename {pure => includes/pure}/buttons.css (100%) mode change 100644 => 100755 rename {pure => includes/pure}/forms-min.css (100%) mode change 100644 => 100755 rename {pure => includes/pure}/forms-nr-min.css (100%) mode change 100644 => 100755 rename {pure => includes/pure}/forms-nr.css (100%) mode change 100644 => 100755 rename {pure => includes/pure}/forms.css (100%) mode change 100644 => 100755 rename {pure => includes/pure}/grids-core-min.css (100%) mode change 100644 => 100755 rename {pure => includes/pure}/grids-core.css (100%) mode change 100644 => 100755 rename {pure => includes/pure}/grids-min.css (100%) mode change 100644 => 100755 rename {pure => includes/pure}/grids-responsive-min.css (100%) mode change 100644 => 100755 rename {pure => includes/pure}/grids-responsive-old-ie-min.css (100%) mode change 100644 => 100755 rename {pure => includes/pure}/grids-responsive-old-ie.css (100%) mode change 100644 => 100755 rename {pure => includes/pure}/grids-responsive.css (100%) mode change 100644 => 100755 rename {pure => includes/pure}/grids-units-min.css (100%) mode change 100644 => 100755 rename {pure => includes/pure}/grids-units.css (100%) mode change 100644 => 100755 rename {pure => includes/pure}/grids.css (100%) mode change 100644 => 100755 create mode 100644 includes/pure/index.php rename {pure => includes/pure}/menus-core-min.css (100%) mode change 100644 => 100755 rename {pure => includes/pure}/menus-core.css (100%) mode change 100644 => 100755 rename {pure => includes/pure}/menus-min.css (100%) mode change 100644 => 100755 rename {pure => includes/pure}/menus-nr-min.css (100%) mode change 100644 => 100755 rename {pure => includes/pure}/menus-nr.css (100%) mode change 100644 => 100755 rename {pure => includes/pure}/menus-paginator-min.css (100%) mode change 100644 => 100755 rename {pure => includes/pure}/menus-paginator.css (100%) mode change 100644 => 100755 rename {pure => includes/pure}/menus.css (100%) mode change 100644 => 100755 rename {pure => includes/pure}/pure-min.css (100%) mode change 100644 => 100755 rename {pure => includes/pure}/pure-nr-min.css (100%) mode change 100644 => 100755 rename {pure => includes/pure}/pure-nr.css (100%) mode change 100644 => 100755 rename {pure => includes/pure}/pure.css (100%) mode change 100644 => 100755 rename {pure => includes/pure}/tables-min.css (100%) mode change 100644 => 100755 rename {pure => includes/pure}/tables.css (100%) mode change 100644 => 100755 create mode 100644 includes/side-menu-old-ie.css create mode 100644 includes/side-menu.css create mode 100644 includes/side-menu.css~ create mode 100644 includes/ui.js create mode 100644 index.php~ create mode 100644 lib/index.php create mode 100755 lib/phpass-0.3/PasswordHash.php create mode 100755 lib/phpass-0.3/c/Makefile create mode 100755 lib/phpass-0.3/c/crypt_private.c create mode 100755 lib/phpass-0.3/test.php create mode 100644 login.php create mode 100644 login.php~ create mode 100644 logout.php create mode 100644 logout.php~ create mode 100644 profile.php create mode 100644 profile.php~ create mode 100644 register.php create mode 100644 register.php~ delete mode 100644 response.php create mode 100644 time.php create mode 100644 time.php~ diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 index 972cb6a..528f87a --- a/README.md +++ b/README.md @@ -4,5 +4,6 @@ Yet Another PHP Time Card # Credits: Default icon pack - Oliver Charavel "Sekkyumu" at http://sekkyumu.deviantart.com/ (http://sekkyumu.deviantart.com/art/Developpers-Icons-63052312) - +Pure CSS - http://purecss.io/ +PHPass - http://www.openwall.com/phpass/ diff --git a/config.inc.php b/config.inc.php new file mode 100644 index 0000000..d545698 --- /dev/null +++ b/config.inc.php @@ -0,0 +1,22 @@ + + diff --git a/config.inc.php~ b/config.inc.php~ new file mode 100644 index 0000000..25f6418 --- /dev/null +++ b/config.inc.php~ @@ -0,0 +1,22 @@ + + diff --git a/config.php b/config.php deleted file mode 100644 index 73973d2..0000000 --- a/config.php +++ /dev/null @@ -1,11 +0,0 @@ - diff --git a/dashboard.php b/dashboard.php new file mode 100644 index 0000000..389e57f --- /dev/null +++ b/dashboard.php @@ -0,0 +1,62 @@ +prepare($query); + $stmt->execute(array(':id' => $_SESSION['user_id'])); + $user = $stmt->fetchObject(); + echo 'You may make changes to your user profile below if you wish. Updates will take effect immediately on pressing "Save".'; + echo '
'; + echo '
'; + echo ''; + echo "username\" value=\"$user->username\" id=\"username\" name=\"username\" readonly>"; + echo ''; + echo "created\" value=\"$user->created\" id=\"created\" name=\"created\" readonly>"; + echo ''; + echo "usertype\" value=\"$user->usertype\" id=\"usertype\" name=\"usertype\" readonly>"; + echo ''; + echo "firstname\" id=\"firstname\" name=\"firstname\">"; + echo ''; + echo "lastname\" id=\"lastname\" name=\"lastname\">"; + echo ''; + echo "email\" id=\"username\" name=\"username\">"; + echo '
'; + echo ''; + echo '
'; + +// end logged-in content + } + + //************************ CONTENT END ************************ + // Load footer + require_once($yaptc_inc . "footer.inc.php"); +?> diff --git a/dashboard.php~ b/dashboard.php~ new file mode 100644 index 0000000..e7bd699 --- /dev/null +++ b/dashboard.php~ @@ -0,0 +1,62 @@ +prepare($query); + $stmt->execute(array(':id' => $_SESSION['user_id'])); + $user = $stmt->fetchObject(); + echo 'You may make changes to your user profile below if you wish. Updates will take effect immediately on pressing "Save".'; + echo '
'; + echo '
'; + echo ''; + echo "username\" value=\"$user->username\" id=\"username\" name=\"username\" readonly>"; + echo ''; + echo "created\" value=\"$user->created\" id=\"created\" name=\"created\" readonly>"; + echo ''; + echo "usertype\" value=\"$user->usertype\" id=\"usertype\" name=\"usertype\" readonly>"; + echo ''; + echo "firstname\" id=\"firstname\" name=\"firstname\">"; + echo ''; + echo "lastname\" id=\"lastname\" name=\"lastname\">"; + echo ''; + echo "email\" id=\"username\" name=\"username\">"; + echo '
'; + echo ''; + echo '
'; + +// end logged-in content + } + + //************************ CONTENT END ************************ + // Load footer + require_once($yaptc_inc . "footer.inc.php"); +?> diff --git a/db.php b/db.php deleted file mode 100644 index 1474462..0000000 --- a/db.php +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - -Ajax Add/Delete a Record with jQuery Fade In/Fade Out - - - - - - - - - - - - - -
- - - -
- - - - - - - -
- -
- - - - - - diff --git a/images/icons/Add Appointment.png b/images/icons/Add Appointment.png old mode 100644 new mode 100755 diff --git a/images/icons/Add Green Button.png b/images/icons/Add Green Button.png old mode 100644 new mode 100755 diff --git a/images/icons/Add To Favorite.png b/images/icons/Add To Favorite.png old mode 100644 new mode 100755 diff --git a/images/icons/Add.png b/images/icons/Add.png old mode 100644 new mode 100755 diff --git a/images/icons/Appointment Cool.png b/images/icons/Appointment Cool.png old mode 100644 new mode 100755 diff --git a/images/icons/Appointment Urgent.png b/images/icons/Appointment Urgent.png old mode 100644 new mode 100755 diff --git a/images/icons/Audio CD.png b/images/icons/Audio CD.png old mode 100644 new mode 100755 diff --git a/images/icons/Audio Document.png b/images/icons/Audio Document.png old mode 100644 new mode 100755 diff --git a/images/icons/Backup Green Button.png b/images/icons/Backup Green Button.png old mode 100644 new mode 100755 diff --git a/images/icons/Bandwidth.png b/images/icons/Bandwidth.png old mode 100644 new mode 100755 diff --git a/images/icons/Blue Ball.png b/images/icons/Blue Ball.png old mode 100644 new mode 100755 diff --git a/images/icons/CD.png b/images/icons/CD.png old mode 100644 new mode 100755 diff --git a/images/icons/Cancel Red Button.png b/images/icons/Cancel Red Button.png old mode 100644 new mode 100755 diff --git a/images/icons/Clear Green Button.png b/images/icons/Clear Green Button.png old mode 100644 new mode 100755 diff --git a/images/icons/Coherence.png b/images/icons/Coherence.png old mode 100644 new mode 100755 diff --git a/images/icons/Desktop.png b/images/icons/Desktop.png old mode 100644 new mode 100755 diff --git a/images/icons/Discussion.png b/images/icons/Discussion.png old mode 100644 new mode 100755 diff --git a/images/icons/Document.png b/images/icons/Document.png old mode 100644 new mode 100755 diff --git a/images/icons/Donate.png b/images/icons/Donate.png old mode 100644 new mode 100755 diff --git a/images/icons/Eject Blue Button.png b/images/icons/Eject Blue Button.png old mode 100644 new mode 100755 diff --git a/images/icons/Export To Audio Document.png b/images/icons/Export To Audio Document.png old mode 100644 new mode 100755 diff --git a/images/icons/Export To Document.png b/images/icons/Export To Document.png old mode 100644 new mode 100755 diff --git a/images/icons/Export To Movie Document.png b/images/icons/Export To Movie Document.png old mode 100644 new mode 100755 diff --git a/images/icons/Export To Picture Document.png b/images/icons/Export To Picture Document.png old mode 100644 new mode 100755 diff --git a/images/icons/Favorite.png b/images/icons/Favorite.png old mode 100644 new mode 100755 diff --git a/images/icons/Forward Mail.png b/images/icons/Forward Mail.png old mode 100644 new mode 100755 diff --git a/images/icons/Fullscreen.png b/images/icons/Fullscreen.png old mode 100644 new mode 100755 diff --git a/images/icons/Gear Alt.png b/images/icons/Gear Alt.png old mode 100644 new mode 100755 diff --git a/images/icons/Gear.png b/images/icons/Gear.png old mode 100644 new mode 100755 diff --git a/images/icons/Get Document.png b/images/icons/Get Document.png old mode 100644 new mode 100755 diff --git a/images/icons/Get Info Blue Button.png b/images/icons/Get Info Blue Button.png old mode 100644 new mode 100755 diff --git a/images/icons/Get Info Purple Button.png b/images/icons/Get Info Purple Button.png old mode 100644 new mode 100755 diff --git a/images/icons/Get Mail.png b/images/icons/Get Mail.png old mode 100644 new mode 100755 diff --git a/images/icons/Green Ball.png b/images/icons/Green Ball.png old mode 100644 new mode 100755 diff --git a/images/icons/Grey Ball.png b/images/icons/Grey Ball.png old mode 100644 new mode 100755 diff --git a/images/icons/Help Blue Button.png b/images/icons/Help Blue Button.png old mode 100644 new mode 100755 diff --git a/images/icons/Help Purple Button.png b/images/icons/Help Purple Button.png old mode 100644 new mode 100755 diff --git a/images/icons/History.png b/images/icons/History.png old mode 100644 new mode 100755 diff --git a/images/icons/Import Audio Document.png b/images/icons/Import Audio Document.png old mode 100644 new mode 100755 diff --git a/images/icons/Import Document.png b/images/icons/Import Document.png old mode 100644 new mode 100755 diff --git a/images/icons/Import Movie Document.png b/images/icons/Import Movie Document.png old mode 100644 new mode 100755 diff --git a/images/icons/Import Picture Document.png b/images/icons/Import Picture Document.png old mode 100644 new mode 100755 diff --git a/images/icons/Internet History.png b/images/icons/Internet History.png old mode 100644 new mode 100755 diff --git a/images/icons/Mail.png b/images/icons/Mail.png old mode 100644 new mode 100755 diff --git a/images/icons/Menu Item.png b/images/icons/Menu Item.png old mode 100644 new mode 100755 diff --git a/images/icons/Menu.png b/images/icons/Menu.png old mode 100644 new mode 100755 diff --git a/images/icons/Minus Green Button.png b/images/icons/Minus Green Button.png old mode 100644 new mode 100755 diff --git a/images/icons/Minus Red Button.png b/images/icons/Minus Red Button.png old mode 100644 new mode 100755 diff --git a/images/icons/Movie CD.png b/images/icons/Movie CD.png old mode 100644 new mode 100755 diff --git a/images/icons/Movie Document.png b/images/icons/Movie Document.png old mode 100644 new mode 100755 diff --git a/images/icons/Mr. Bomb.png b/images/icons/Mr. Bomb.png old mode 100644 new mode 100755 diff --git a/images/icons/Network.png b/images/icons/Network.png old mode 100644 new mode 100755 diff --git a/images/icons/New Document.png b/images/icons/New Document.png old mode 100644 new mode 100755 diff --git a/images/icons/New Mail.png b/images/icons/New Mail.png old mode 100644 new mode 100755 diff --git a/images/icons/Orange Ball.png b/images/icons/Orange Ball.png old mode 100644 new mode 100755 diff --git a/images/icons/Pause All.png b/images/icons/Pause All.png old mode 100644 new mode 100755 diff --git a/images/icons/Pause Blue Button.png b/images/icons/Pause Blue Button.png old mode 100644 new mode 100755 diff --git a/images/icons/Pause Green Button.png b/images/icons/Pause Green Button.png old mode 100644 new mode 100755 diff --git a/images/icons/Pause.png b/images/icons/Pause.png old mode 100644 new mode 100755 diff --git a/images/icons/Picture CD.png b/images/icons/Picture CD.png old mode 100644 new mode 100755 diff --git a/images/icons/Picture Document.png b/images/icons/Picture Document.png old mode 100644 new mode 100755 diff --git a/images/icons/Play All.png b/images/icons/Play All.png old mode 100644 new mode 100755 diff --git a/images/icons/Play Blue Button.png b/images/icons/Play Blue Button.png old mode 100644 new mode 100755 diff --git a/images/icons/Play Green Button.png b/images/icons/Play Green Button.png old mode 100644 new mode 100755 diff --git a/images/icons/Play.png b/images/icons/Play.png old mode 100644 new mode 100755 diff --git a/images/icons/Plugin Green Button.png b/images/icons/Plugin Green Button.png old mode 100644 new mode 100755 diff --git a/images/icons/Purple Ball.png b/images/icons/Purple Ball.png old mode 100644 new mode 100755 diff --git a/images/icons/Record Button.png b/images/icons/Record Button.png old mode 100644 new mode 100755 diff --git a/images/icons/Record Red Button.png b/images/icons/Record Red Button.png old mode 100644 new mode 100755 diff --git a/images/icons/Red Ball.png b/images/icons/Red Ball.png old mode 100644 new mode 100755 diff --git a/images/icons/Remove Appointment.png b/images/icons/Remove Appointment.png old mode 100644 new mode 100755 diff --git a/images/icons/Remove Document.png b/images/icons/Remove Document.png old mode 100644 new mode 100755 diff --git a/images/icons/Remove.png b/images/icons/Remove.png old mode 100644 new mode 100755 diff --git a/images/icons/Rename Document.png b/images/icons/Rename Document.png old mode 100644 new mode 100755 diff --git a/images/icons/Run.png b/images/icons/Run.png old mode 100644 new mode 100755 diff --git a/images/icons/Send Document.png b/images/icons/Send Document.png old mode 100644 new mode 100755 diff --git a/images/icons/Send Mail.png b/images/icons/Send Mail.png old mode 100644 new mode 100755 diff --git a/images/icons/Smiley Blue.png b/images/icons/Smiley Blue.png old mode 100644 new mode 100755 diff --git a/images/icons/Smiley Sad Blue.png b/images/icons/Smiley Sad Blue.png old mode 100644 new mode 100755 diff --git a/images/icons/Smiley Sad.png b/images/icons/Smiley Sad.png old mode 100644 new mode 100755 diff --git a/images/icons/Smiley Star Pink.png b/images/icons/Smiley Star Pink.png old mode 100644 new mode 100755 diff --git a/images/icons/Smiley Star Sad.png b/images/icons/Smiley Star Sad.png old mode 100644 new mode 100755 diff --git a/images/icons/Smiley Star.png b/images/icons/Smiley Star.png old mode 100644 new mode 100755 diff --git a/images/icons/Smiley.png b/images/icons/Smiley.png old mode 100644 new mode 100755 diff --git a/images/icons/Spotlight Blue Button.png b/images/icons/Spotlight Blue Button.png old mode 100644 new mode 100755 diff --git a/images/icons/Star.png b/images/icons/Star.png old mode 100644 new mode 100755 diff --git a/images/icons/Stop All.png b/images/icons/Stop All.png old mode 100644 new mode 100755 diff --git a/images/icons/Stop Green Button.png b/images/icons/Stop Green Button.png old mode 100644 new mode 100755 diff --git a/images/icons/Stop Red Button.png b/images/icons/Stop Red Button.png old mode 100644 new mode 100755 diff --git a/images/icons/Stop.png b/images/icons/Stop.png old mode 100644 new mode 100755 diff --git a/images/icons/Terminal.png b/images/icons/Terminal.png old mode 100644 new mode 100755 diff --git a/images/icons/Transfer Document.png b/images/icons/Transfer Document.png old mode 100644 new mode 100755 diff --git a/images/icons/Transfer.png b/images/icons/Transfer.png old mode 100644 new mode 100755 diff --git a/images/icons/Trash Empty.png b/images/icons/Trash Empty.png old mode 100644 new mode 100755 diff --git a/images/icons/Trash Full.png b/images/icons/Trash Full.png old mode 100644 new mode 100755 diff --git a/images/icons/Universal Binary.png b/images/icons/Universal Binary.png old mode 100644 new mode 100755 diff --git a/images/icons/Unread Mail Alt.png b/images/icons/Unread Mail Alt.png old mode 100644 new mode 100755 diff --git a/images/icons/Unread Mail.png b/images/icons/Unread Mail.png old mode 100644 new mode 100755 diff --git a/images/icons/User.png b/images/icons/User.png old mode 100644 new mode 100755 diff --git a/images/icons/Users.png b/images/icons/Users.png old mode 100644 new mode 100755 diff --git a/images/icons/Web Browser.png b/images/icons/Web Browser.png old mode 100644 new mode 100755 diff --git a/images/icons/Write Document.png b/images/icons/Write Document.png old mode 100644 new mode 100755 diff --git a/images/icons/Yellow Ball.png b/images/icons/Yellow Ball.png old mode 100644 new mode 100755 diff --git a/images/icons/iChat Alt.png b/images/icons/iChat Alt.png old mode 100644 new mode 100755 diff --git a/images/icons/iChat.png b/images/icons/iChat.png old mode 100644 new mode 100755 diff --git a/includes/date_time.js b/includes/date_time.js new file mode 100644 index 0000000..c6e40f3 --- /dev/null +++ b/includes/date_time.js @@ -0,0 +1,29 @@ +function date_time(id) +{ + date = new Date; + year = date.getFullYear(); + month = date.getMonth(); + months = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'); + d = date.getDate(); + day = date.getDay(); + days = new Array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'); + h = date.getHours(); + if(h<10) + { + h = "0"+h; + } + m = date.getMinutes(); + if(m<10) + { + m = "0"+m; + } + s = date.getSeconds(); + if(s<10) + { + s = "0"+s; + } + result = ''+days[day]+' '+months[month]+' '+d+' '+year+' '+h+':'+m+':'+s; + document.getElementById(id).innerHTML = result; + setTimeout('date_time("'+id+'");','1000'); + return true; +} diff --git a/includes/date_time.js~ b/includes/date_time.js~ new file mode 100644 index 0000000..ba1d559 --- /dev/null +++ b/includes/date_time.js~ @@ -0,0 +1,29 @@ +function date_time(id) +{ + date = new Date; + year = date.getFullYear(); + month = date.getMonth(); + months = new Array('January', 'February', 'March', 'April', 'May', 'June', 'Jully', 'August', 'September', 'October', 'November', 'December'); + d = date.getDate(); + day = date.getDay(); + days = new Array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'); + h = date.getHours(); + if(h<10) + { + h = "0"+h; + } + m = date.getMinutes(); + if(m<10) + { + m = "0"+m; + } + s = date.getSeconds(); + if(s<10) + { + s = "0"+s; + } + result = ''+days[day]+' '+months[month]+' '+d+' '+year+' '+h+':'+m+':'+s; + document.getElementById(id).innerHTML = result; + setTimeout('date_time("'+id+'");','1000'); + return true; +} diff --git a/includes/footer.inc.php b/includes/footer.inc.php new file mode 100644 index 0000000..3c86349 --- /dev/null +++ b/includes/footer.inc.php @@ -0,0 +1,9 @@ + +
+

Server Time:

+
+ + + + + diff --git a/includes/footer.inc.php~ b/includes/footer.inc.php~ new file mode 100644 index 0000000..79248e6 --- /dev/null +++ b/includes/footer.inc.php~ @@ -0,0 +1,8 @@ +

+

Server Time:
+

+ + + + + diff --git a/includes/head.inc.php~ b/includes/head.inc.php~ new file mode 100644 index 0000000..4751fd6 --- /dev/null +++ b/includes/head.inc.php~ @@ -0,0 +1,17 @@ + + + + + + + <?php echo $yaptc_appname . " : " . $yaptc_pagename; ?> + + + + + + + + diff --git a/includes/header.inc.php b/includes/header.inc.php new file mode 100644 index 0000000..22f54f8 --- /dev/null +++ b/includes/header.inc.php @@ -0,0 +1,17 @@ + + + + + + +<?php echo $yaptc_company . ">" . $yaptc_appname . ">" . $yaptc_pagename; ?> + + + + + + + + diff --git a/includes/header.inc.php~ b/includes/header.inc.php~ new file mode 100644 index 0000000..5435356 --- /dev/null +++ b/includes/header.inc.php~ @@ -0,0 +1,18 @@ + + + + + + +<?php echo $yaptc_company . ">" . $yaptc_appname . ">" . $yaptc_pagename; ?> + + + + + + + + + diff --git a/includes/index.php b/includes/index.php new file mode 100644 index 0000000..623034f --- /dev/null +++ b/includes/index.php @@ -0,0 +1,4 @@ + diff --git a/includes/index.php~ b/includes/index.php~ new file mode 100644 index 0000000..763940a --- /dev/null +++ b/includes/index.php~ @@ -0,0 +1,3 @@ + diff --git a/includes/menu.inc.php b/includes/menu.inc.php new file mode 100644 index 0000000..2ed3b35 --- /dev/null +++ b/includes/menu.inc.php @@ -0,0 +1,45 @@ +
+ + + + + + + + +
+ +
+

+

+
+ +
diff --git a/includes/menu.inc.php~ b/includes/menu.inc.php~ new file mode 100644 index 0000000..d25c110 --- /dev/null +++ b/includes/menu.inc.php~ @@ -0,0 +1,46 @@ +
+ + + + + + + + +
+ +
+

+

+
+ +
diff --git a/pure/HISTORY.md b/includes/pure/HISTORY.md old mode 100644 new mode 100755 similarity index 100% rename from pure/HISTORY.md rename to includes/pure/HISTORY.md diff --git a/pure/LICENSE.md b/includes/pure/LICENSE.md old mode 100644 new mode 100755 similarity index 100% rename from pure/LICENSE.md rename to includes/pure/LICENSE.md diff --git a/pure/README.md b/includes/pure/README.md old mode 100644 new mode 100755 similarity index 100% rename from pure/README.md rename to includes/pure/README.md diff --git a/pure/base-context-min.css b/includes/pure/base-context-min.css old mode 100644 new mode 100755 similarity index 100% rename from pure/base-context-min.css rename to includes/pure/base-context-min.css diff --git a/pure/base-context.css b/includes/pure/base-context.css old mode 100644 new mode 100755 similarity index 100% rename from pure/base-context.css rename to includes/pure/base-context.css diff --git a/pure/base-min.css b/includes/pure/base-min.css old mode 100644 new mode 100755 similarity index 100% rename from pure/base-min.css rename to includes/pure/base-min.css diff --git a/pure/base.css b/includes/pure/base.css old mode 100644 new mode 100755 similarity index 100% rename from pure/base.css rename to includes/pure/base.css diff --git a/pure/bower.json b/includes/pure/bower.json old mode 100644 new mode 100755 similarity index 100% rename from pure/bower.json rename to includes/pure/bower.json diff --git a/pure/buttons-core-min.css b/includes/pure/buttons-core-min.css old mode 100644 new mode 100755 similarity index 100% rename from pure/buttons-core-min.css rename to includes/pure/buttons-core-min.css diff --git a/pure/buttons-core.css b/includes/pure/buttons-core.css old mode 100644 new mode 100755 similarity index 100% rename from pure/buttons-core.css rename to includes/pure/buttons-core.css diff --git a/pure/buttons-min.css b/includes/pure/buttons-min.css old mode 100644 new mode 100755 similarity index 100% rename from pure/buttons-min.css rename to includes/pure/buttons-min.css diff --git a/pure/buttons.css b/includes/pure/buttons.css old mode 100644 new mode 100755 similarity index 100% rename from pure/buttons.css rename to includes/pure/buttons.css diff --git a/pure/forms-min.css b/includes/pure/forms-min.css old mode 100644 new mode 100755 similarity index 100% rename from pure/forms-min.css rename to includes/pure/forms-min.css diff --git a/pure/forms-nr-min.css b/includes/pure/forms-nr-min.css old mode 100644 new mode 100755 similarity index 100% rename from pure/forms-nr-min.css rename to includes/pure/forms-nr-min.css diff --git a/pure/forms-nr.css b/includes/pure/forms-nr.css old mode 100644 new mode 100755 similarity index 100% rename from pure/forms-nr.css rename to includes/pure/forms-nr.css diff --git a/pure/forms.css b/includes/pure/forms.css old mode 100644 new mode 100755 similarity index 100% rename from pure/forms.css rename to includes/pure/forms.css diff --git a/pure/grids-core-min.css b/includes/pure/grids-core-min.css old mode 100644 new mode 100755 similarity index 100% rename from pure/grids-core-min.css rename to includes/pure/grids-core-min.css diff --git a/pure/grids-core.css b/includes/pure/grids-core.css old mode 100644 new mode 100755 similarity index 100% rename from pure/grids-core.css rename to includes/pure/grids-core.css diff --git a/pure/grids-min.css b/includes/pure/grids-min.css old mode 100644 new mode 100755 similarity index 100% rename from pure/grids-min.css rename to includes/pure/grids-min.css diff --git a/pure/grids-responsive-min.css b/includes/pure/grids-responsive-min.css old mode 100644 new mode 100755 similarity index 100% rename from pure/grids-responsive-min.css rename to includes/pure/grids-responsive-min.css diff --git a/pure/grids-responsive-old-ie-min.css b/includes/pure/grids-responsive-old-ie-min.css old mode 100644 new mode 100755 similarity index 100% rename from pure/grids-responsive-old-ie-min.css rename to includes/pure/grids-responsive-old-ie-min.css diff --git a/pure/grids-responsive-old-ie.css b/includes/pure/grids-responsive-old-ie.css old mode 100644 new mode 100755 similarity index 100% rename from pure/grids-responsive-old-ie.css rename to includes/pure/grids-responsive-old-ie.css diff --git a/pure/grids-responsive.css b/includes/pure/grids-responsive.css old mode 100644 new mode 100755 similarity index 100% rename from pure/grids-responsive.css rename to includes/pure/grids-responsive.css diff --git a/pure/grids-units-min.css b/includes/pure/grids-units-min.css old mode 100644 new mode 100755 similarity index 100% rename from pure/grids-units-min.css rename to includes/pure/grids-units-min.css diff --git a/pure/grids-units.css b/includes/pure/grids-units.css old mode 100644 new mode 100755 similarity index 100% rename from pure/grids-units.css rename to includes/pure/grids-units.css diff --git a/pure/grids.css b/includes/pure/grids.css old mode 100644 new mode 100755 similarity index 100% rename from pure/grids.css rename to includes/pure/grids.css diff --git a/includes/pure/index.php b/includes/pure/index.php new file mode 100644 index 0000000..623034f --- /dev/null +++ b/includes/pure/index.php @@ -0,0 +1,4 @@ + diff --git a/pure/menus-core-min.css b/includes/pure/menus-core-min.css old mode 100644 new mode 100755 similarity index 100% rename from pure/menus-core-min.css rename to includes/pure/menus-core-min.css diff --git a/pure/menus-core.css b/includes/pure/menus-core.css old mode 100644 new mode 100755 similarity index 100% rename from pure/menus-core.css rename to includes/pure/menus-core.css diff --git a/pure/menus-min.css b/includes/pure/menus-min.css old mode 100644 new mode 100755 similarity index 100% rename from pure/menus-min.css rename to includes/pure/menus-min.css diff --git a/pure/menus-nr-min.css b/includes/pure/menus-nr-min.css old mode 100644 new mode 100755 similarity index 100% rename from pure/menus-nr-min.css rename to includes/pure/menus-nr-min.css diff --git a/pure/menus-nr.css b/includes/pure/menus-nr.css old mode 100644 new mode 100755 similarity index 100% rename from pure/menus-nr.css rename to includes/pure/menus-nr.css diff --git a/pure/menus-paginator-min.css b/includes/pure/menus-paginator-min.css old mode 100644 new mode 100755 similarity index 100% rename from pure/menus-paginator-min.css rename to includes/pure/menus-paginator-min.css diff --git a/pure/menus-paginator.css b/includes/pure/menus-paginator.css old mode 100644 new mode 100755 similarity index 100% rename from pure/menus-paginator.css rename to includes/pure/menus-paginator.css diff --git a/pure/menus.css b/includes/pure/menus.css old mode 100644 new mode 100755 similarity index 100% rename from pure/menus.css rename to includes/pure/menus.css diff --git a/pure/pure-min.css b/includes/pure/pure-min.css old mode 100644 new mode 100755 similarity index 100% rename from pure/pure-min.css rename to includes/pure/pure-min.css diff --git a/pure/pure-nr-min.css b/includes/pure/pure-nr-min.css old mode 100644 new mode 100755 similarity index 100% rename from pure/pure-nr-min.css rename to includes/pure/pure-nr-min.css diff --git a/pure/pure-nr.css b/includes/pure/pure-nr.css old mode 100644 new mode 100755 similarity index 100% rename from pure/pure-nr.css rename to includes/pure/pure-nr.css diff --git a/pure/pure.css b/includes/pure/pure.css old mode 100644 new mode 100755 similarity index 100% rename from pure/pure.css rename to includes/pure/pure.css diff --git a/pure/tables-min.css b/includes/pure/tables-min.css old mode 100644 new mode 100755 similarity index 100% rename from pure/tables-min.css rename to includes/pure/tables-min.css diff --git a/pure/tables.css b/includes/pure/tables.css old mode 100644 new mode 100755 similarity index 100% rename from pure/tables.css rename to includes/pure/tables.css diff --git a/includes/side-menu-old-ie.css b/includes/side-menu-old-ie.css new file mode 100644 index 0000000..06bd084 --- /dev/null +++ b/includes/side-menu-old-ie.css @@ -0,0 +1,259 @@ +body { + color: #777; +} + +.pure-img-responsive { + max-width: 100%; + height: auto; +} + +/* +Add transition to containers so they can push in and out. +*/ + +#layout, +#menu, +.menu-link { + -webkit-transition: all 0.2s ease-out; + -moz-transition: all 0.2s ease-out; + -ms-transition: all 0.2s ease-out; + -o-transition: all 0.2s ease-out; + transition: all 0.2s ease-out; +} + +/* +This is the parent `
` that contains the menu and the content area. +*/ + +#layout { + position: relative; + padding-left: 0; +} + +#layout.active { + position: relative; + left: 150px; +} + +#layout.active #menu { + left: 150px; + width: 150px; +} + +#layout.active .menu-link { + left: 150px; +} + +/* +The content `
` is where all your content goes. +*/ + +.content { + margin: 0 auto; + padding: 0 2em; + max-width: 800px; + margin-bottom: 50px; + line-height: 1.6em; +} + +.header { + margin: 0; + color: #333; + text-align: center; + padding: 2.5em 2em 0; + border-bottom: 1px solid #eee; +} + +.header h1 { + margin: 0.2em 0; + font-size: 3em; + font-weight: 300; +} + +.header h2 { + font-weight: 300; + color: #ccc; + padding: 0; + margin-top: 0; +} + +.content-subhead { + margin: 50px 0 20px 0; + font-weight: 300; + color: #888; +} + +/* +The `#menu` `
` is the parent `
` that contains the `.pure-menu` that +appears on the left side of the page. +*/ + +#menu { + margin-left: -150px; + /* "#menu" width */ + width: 150px; + position: fixed; + top: 0; + left: 0; + bottom: 0; + z-index: 1000; + /* so the menu or its navicon stays above all content */ + background: #191818; + overflow-y: auto; + -webkit-overflow-scrolling: touch; +} + +/* + All anchors inside the menu should be styled like this. + */ + +#menu a { + color: #999; + border: none; + padding: 0.6em 0 0.6em 0.6em; +} + +/* + Remove all background/borders, since we are applying them to #menu. + */ + +#menu .pure-menu, +#menu .pure-menu ul { + border: none; + background: transparent; +} + +/* + Add that light border to separate items into groups. + */ + +#menu .pure-menu ul, +#menu .pure-menu .menu-item-divided { + border-top: 1px solid #333; +} + +/* + Change color of the anchor links on hover/focus. + */ + +#menu .pure-menu li a:hover, +#menu .pure-menu li a:focus { + background: #333; +} + +/* + This styles the selected menu item `
  • `. + */ + +#menu .pure-menu-selected, +#menu .pure-menu-heading { + background: #1f8dd6; +} + +/* + This styles a link within a selected menu item `
  • `. + */ + +#menu .pure-menu-selected a { + color: #fff; +} + +/* + This styles the menu heading. + */ + +#menu .pure-menu-heading { + font-size: 110%; + color: #fff; + margin: 0; +} + +/* -- Dynamic Button For Responsive Menu -------------------------------------*/ + +/* +The button to open/close the Menu is custom-made and not part of Pure. Here's +how it works: +*/ + +/* +`.menu-link` represents the responsive menu toggle that shows/hides on +small screens. +*/ + +.menu-link { + position: fixed; + display: block; + /* show this only on small screens */ + top: 0; + left: 0; + /* "#menu width" */ + background: #000; + background: rgba(0,0,0,0.7); + font-size: 10px; + /* change this value to increase/decrease button size */ + z-index: 10; + width: 2em; + height: auto; + padding: 2.1em 1.6em; +} + +.menu-link:hover, +.menu-link:focus { + background: #000; +} + +.menu-link span { + position: relative; + display: block; +} + +.menu-link span, +.menu-link span:before, +.menu-link span:after { + background-color: #fff; + width: 100%; + height: 0.2em; +} + +.menu-link span:before, +.menu-link span:after { + position: absolute; + margin-top: -0.6em; + content: " "; +} + +.menu-link span:after { + margin-top: 0.6em; +} + +/* -- Responsive Styles (Media Queries) ------------------------------------- */ + +/* +Hides the menu at `48em`, but modify this based on your app's needs. +*/ + +.header, +.content { + padding-left: 2em; + padding-right: 2em; +} + +#layout { + padding-left: 150px; + /* left col width "#menu" */ + left: 0; +} + +#menu { + left: 150px; +} + +.menu-link { + position: fixed; + left: 150px; + display: none; +} + +#layout.active .menu-link { + left: 150px; +} diff --git a/includes/side-menu.css b/includes/side-menu.css new file mode 100644 index 0000000..e017617 --- /dev/null +++ b/includes/side-menu.css @@ -0,0 +1,206 @@ +body { + color:#777; +} +.pure-img-responsive { + max-width:100%; + height: auto; +} +/*Add transition to containers so they can push in and out.*/ +#layout,#menu,.menu-link { + -webkit-transition:all 0.2s ease-out; + -moz-transition:all 0.2s ease-out; + -ms-transition:all 0.2s ease-out; + -o-transition:all 0.2s ease-out; + transition: all 0.2s ease-out; +} +/*This is the parent `
    ` that contains the menu and the content area.*/ +#layout { + position:relative; + padding-left:0; +} +#layout.active { + position:relative; + left:150px; +} +#layout.active #menu { + left:150px; + width:150px; +} +#layout.active .menu-link { + left: 150px; +} +/*The content `
    ` is where all your content goes.*/ +.content { + margin:0 auto; + padding:0 2em; + max-width:800px; + margin-bottom:50px; + line-height:1.6em; +} +.header { + margin:0; + color:#333; + text-align:center; + padding:2.5em 2em 0; + border-bottom:1px solid #eee; +} +.header h1 { + margin:0.2em 0; + font-size:3em; + font-weight:300; +} +.header h2 { + font-weight:300; + color:#ccc; + padding:0; + margin-top:0; +} +.content-subhead { + margin:50px 0 20px 0; + font-weight:300; + color: #888; +} +/*The `#menu` `
    ` is the parent `
    ` that contains the `.pure-menu` thatappears on the left side of the page.*/ +#menu { + margin-left:-150px; + /* "#menu" width */ + width:150px; + position:fixed; + top:0; + left:0; + bottom:0; + z-index:1000; + /* so the menu or its navicon stays above all content */ + background:#191818; + overflow-y:auto; + -webkit-overflow-scrolling:touch; +} +/* All anchors inside the menu should be styled like this. */ +#menu a { + color:#999; + border:none; + padding: 0.6em 0 0.6em 0.6em; +} +/* Remove all background/borders,since we are applying them to #menu. */ +#menu .pure-menu,#menu .pure-menu ul { + border:none; + background: transparent; +} +/* Add that light border to separate items into groups. */ +#menu .pure-menu ul,#menu .pure-menu .menu-item-divided { + border-top: 1px solid #333; +} +/* Change color of the anchor links on hover/focus. */ +#menu .pure-menu li a:hover,#menu .pure-menu li a:focus { + background: #333; +} +/* This styles the selected menu item `
  • `. */ +#menu .pure-menu-selected,#menu .pure-menu-heading { + background: #1f8dd6; +} +/* This styles a link within a selected menu item `
  • `. */ +#menu .pure-menu-selected a { + color: #fff; +} +/* This styles the menu heading. */ +#menu .pure-menu-heading { + font-size:110%; + color:#fff; + margin: 0; +} +/* -- Dynamic Button For Responsive Menu -------------------------------------*/ +/*The button to open/close the Menu is custom-made and not part of Pure. Here'show it works:*/ +/*`.menu-link` represents the responsive menu toggle that shows/hides onsmall screens.*/ +.menu-link { + position:fixed; + display:block; + /* show this only on small screens */ + top:0; + left:0; + /* "#menu width" */ + background:#000; + background:rgba(0,0,0,0.7); + font-size:10px; + /* change this value to increase/decrease button size */ + z-index:10; + width:2em; + height:auto; + padding:2.1em 1.6em; +} +.menu-link:hover,.menu-link:focus { + background:#000; +} +.menu-link span { + position:relative; + display:block; +} +.menu-link span,.menu-link span:before,.menu-link span:after { + background-color:#fff; + width:100%; + height:0.2em; +} +.menu-link span:before,.menu-link span:after { + position:absolute; + margin-top:-0.6em; + content:" "; +} +.menu-link span:after { + margin-top: 0.6em; +} +/* -- Responsive Styles (Media Queries) ------------------------------------- */ +/*Hides the menu at `48em`,but modify this based on your app's needs.*/ +@media (min-width:48em) { + .header,.content { + padding-left:2em; + padding-right: 2em; + } + #layout { + padding-left:150px; + /* left col width "#menu" */ + left:0; + } + #menu { + left:150px; + } + .menu-link { + position:fixed; + left:150px; + display:none; + } + #layout.active .menu-link { + left:150px; + } +} +.button-success,.button-error,.button-warning,.button-secondary { + color:white; + border-radius:4px; + text-shadow:0 1px 1px rgba(0,0,0,0.2); +} +.button-success { + background:rgb(28,184,65); + /* this is a green */ +} +.button-error { + background:rgb(202,60,60); + /* this is a maroon */ +} +.button-warning { + background:rgb(223,117,20); + /* this is an orange */ +} +.button-secondary { + background:rgb(66,184,221); + /* this is a light blue */ +} +.button-xsmall { + font-size:70%; +} +.button-small { + font-size:85%; +} +.button-large { + font-size:110%; +} +.button-xlarge { + font-size: 125%; +} diff --git a/includes/side-menu.css~ b/includes/side-menu.css~ new file mode 100644 index 0000000..ec9429c --- /dev/null +++ b/includes/side-menu.css~ @@ -0,0 +1,281 @@ + +body { + color: #777; +} + + +.pure-img-responsive { + max-width: 100%; + height: auto; +} + +/* +Add transition to containers so they can push in and out. +*/ +#layout, +#menu, +.menu-link { + -webkit-transition: all 0.2s ease-out; + -moz-transition: all 0.2s ease-out; + -ms-transition: all 0.2s ease-out; + -o-transition: all 0.2s ease-out; + transition: all 0.2s ease-out; +} + +/* +This is the parent `
    ` that contains the menu and the content area. +*/ +#layout { + position: relative; + padding-left: 0; +} + #layout.active { + position: relative; + left: 150px; + } + #layout.active #menu { + left: 150px; + width: 150px; + } + + #layout.active .menu-link { + left: 150px; + } +/* +The content `
    ` is where all your content goes. +*/ +.content { + margin: 0 auto; + padding: 0 2em; + max-width: 800px; + margin-bottom: 50px; + line-height: 1.6em; +} + +.header { + margin: 0; + color: #333; + text-align: center; + padding: 2.5em 2em 0; + border-bottom: 1px solid #eee; + } + .header h1 { + margin: 0.2em 0; + font-size: 3em; + font-weight: 300; + } + .header h2 { + font-weight: 300; + color: #ccc; + padding: 0; + margin-top: 0; + } + +.content-subhead { + margin: 50px 0 20px 0; + font-weight: 300; + color: #888; +} + + + +/* +The `#menu` `
    ` is the parent `
    ` that contains the `.pure-menu` that +appears on the left side of the page. +*/ + +#menu { + margin-left: -150px; /* "#menu" width */ + width: 150px; + position: fixed; + top: 0; + left: 0; + bottom: 0; + z-index: 1000; /* so the menu or its navicon stays above all content */ + background: #191818; + overflow-y: auto; + -webkit-overflow-scrolling: touch; +} + /* + All anchors inside the menu should be styled like this. + */ + #menu a { + color: #999; + border: none; + padding: 0.6em 0 0.6em 0.6em; + } + + /* + Remove all background/borders, since we are applying them to #menu. + */ + #menu .pure-menu, + #menu .pure-menu ul { + border: none; + background: transparent; + } + + /* + Add that light border to separate items into groups. + */ + #menu .pure-menu ul, + #menu .pure-menu .menu-item-divided { + border-top: 1px solid #333; + } + /* + Change color of the anchor links on hover/focus. + */ + #menu .pure-menu li a:hover, + #menu .pure-menu li a:focus { + background: #333; + } + + /* + This styles the selected menu item `
  • `. + */ + #menu .pure-menu-selected, + #menu .pure-menu-heading { + background: #1f8dd6; + } + /* + This styles a link within a selected menu item `
  • `. + */ + #menu .pure-menu-selected a { + color: #fff; + } + + /* + This styles the menu heading. + */ + #menu .pure-menu-heading { + font-size: 110%; + color: #fff; + margin: 0; + } + +/* -- Dynamic Button For Responsive Menu -------------------------------------*/ + +/* +The button to open/close the Menu is custom-made and not part of Pure. Here's +how it works: +*/ + +/* +`.menu-link` represents the responsive menu toggle that shows/hides on +small screens. +*/ +.menu-link { + position: fixed; + display: block; /* show this only on small screens */ + top: 0; + left: 0; /* "#menu width" */ + background: #000; + background: rgba(0,0,0,0.7); + font-size: 10px; /* change this value to increase/decrease button size */ + z-index: 10; + width: 2em; + height: auto; + padding: 2.1em 1.6em; +} + + .menu-link:hover, + .menu-link:focus { + background: #000; + } + + .menu-link span { + position: relative; + display: block; + } + + .menu-link span, + .menu-link span:before, + .menu-link span:after { + background-color: #fff; + width: 100%; + height: 0.2em; + } + + .menu-link span:before, + .menu-link span:after { + position: absolute; + margin-top: -0.6em; + content: " "; + } + + .menu-link span:after { + margin-top: 0.6em; + } + + +/* -- Responsive Styles (Media Queries) ------------------------------------- */ + +/* +Hides the menu at `48em`, but modify this based on your app's needs. +*/ +@media (min-width: 48em) { + + .header, + .content { + padding-left: 2em; + padding-right: 2em; + } + + #layout { + padding-left: 150px; /* left col width "#menu" */ + left: 0; + } + #menu { + left: 150px; + } + + .menu-link { + position: fixed; + left: 150px; + display: none; + } + + #layout.active .menu-link { + left: 150px; + } +} + + .button-success, + .button-error, + .button-warning, + .button-secondary { + color: white; + border-radius: 4px; + text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); + } + + .button-success { + background: rgb(28, 184, 65); /* this is a green */ + } + + .button-error { + background: rgb(202, 60, 60); /* this is a maroon */ + } + + .button-warning { + background: rgb(223, 117, 20); /* this is an orange */ + } + + .button-secondary { + background: rgb(66, 184, 221); /* this is a light blue */ + } + + .button-xsmall { + font-size: 70%; + } + + .button-small { + font-size: 85%; + } + + .button-large { + font-size: 110%; + } + + .button-xlarge { + font-size: 125%; + } diff --git a/includes/ui.js b/includes/ui.js new file mode 100644 index 0000000..acc38a0 --- /dev/null +++ b/includes/ui.js @@ -0,0 +1,35 @@ +(function (window, document) { + + var layout = document.getElementById('layout'), + menu = document.getElementById('menu'), + menuLink = document.getElementById('menuLink'); + + function toggleClass(element, className) { + var classes = element.className.split(/\s+/), + length = classes.length, + i = 0; + + for(; i < length; i++) { + if (classes[i] === className) { + classes.splice(i, 1); + break; + } + } + // The className is not found + if (length === classes.length) { + classes.push(className); + } + + element.className = classes.join(' '); + } + + menuLink.onclick = function (e) { + var active = 'active'; + + e.preventDefault(); + toggleClass(layout, active); + toggleClass(menu, active); + toggleClass(menuLink, active); + }; + +}(this, this.document)); diff --git a/index.php b/index.php index 434a6cd..08c9c76 100644 --- a/index.php +++ b/index.php @@ -1,8 +1,54 @@ - - -Timecard - - - - - +You are not logged in!!!"; +} +else +{ + +$userid = $_SESSION['user_id']; +$result = $sql->prepare("SELECT punches.id as punchid, users.id as user, punchtypes.id as typeid, punchtypes.punchname as type, punches.time as time, punches.notes as notes, punches.modified as modified FROM punches INNER JOIN users ON punches.userid = users.id INNER JOIN punchtypes ON punches.punchtypeid = punchtypes.id WHERE users.id = $userid ORDER BY punches.id DESC LIMIT 1"); +$result->execute(); +$last = $result->fetchObject(); +echo "

    Current Status

    "; +echo "

    You have been Punched $last->type since $last->time.

    "; +echo "

    Quick Punch

    "; +echo "

    Clicking the button below will immediately enter a new punch for you depending on your current status. Any notes you enter will be attached to the punch for your administrator to review.

    "; +echo "
    "; +echo "
    "; +echo ""; +echo "
    "; +if ($last->typeid=="00000000001") { + //$result = $sql->prepare("INSERT INTO punches (userid, punchtypeid, time) VALUES ($userid, "00000000002", NOW())"); + //$result->execute(); + //$punch = $result->fetchObject(); +echo ""; + } else { +echo ""; +} +echo "
    "; +echo "
    "; +echo "
    "; + + + + + + + } + +//********** END CONTENT **********// +require_once($yaptc_inc . "footer.inc.php"); +?> diff --git a/index.php~ b/index.php~ new file mode 100644 index 0000000..2f749c8 --- /dev/null +++ b/index.php~ @@ -0,0 +1,57 @@ +You are not logged in!!!"; +} +else +{ + +$userid = $_SESSION['user_id']; +$result = $sql->prepare("SELECT punches.id as punchid, users.id as user, punchtypes.id as typeid, punchtypes.punchname as type, punches.time as time, punches.notes as notes, punches.modified as modified FROM punches INNER JOIN users ON punches.userid = users.id INNER JOIN punchtypes ON punches.punchtypeid = punchtypes.id WHERE users.id = $userid ORDER BY punches.id DESC LIMIT 1"); +$result->execute(); +$last = $result->fetchObject(); +echo "

    Current Status

    "; +echo "

    You have been Punched $last->type since $last->time.

    "; +echo "

    Quick Punch

    "; +echo "

    Clicking the button below will immediately enter a new punch for you depending on your current status. Any notes you enter will be attached to the punch for your administrator to review.

    "; +echo "
    "; +echo "
    "; +echo ""; +echo "
    "; + + +if ($last->typeid=="00000000001") { + //$result = $sql->prepare("INSERT INTO punches (userid, punchtypeid, time) VALUES ($userid, "00000000002", NOW())"); + //$result->execute(); + //$punch = $result->fetchObject(); +echo ""; + } else { +echo ""; +} + +echo "
    "; +echo "
    "; +echo "
    "; + + + + + + + } + +//********** END CONTENT **********// +require_once($yaptc_inc . "footer.inc.php"); +?> diff --git a/lib/index.php b/lib/index.php new file mode 100644 index 0000000..623034f --- /dev/null +++ b/lib/index.php @@ -0,0 +1,4 @@ + diff --git a/lib/phpass-0.3/PasswordHash.php b/lib/phpass-0.3/PasswordHash.php new file mode 100755 index 0000000..12958c7 --- /dev/null +++ b/lib/phpass-0.3/PasswordHash.php @@ -0,0 +1,253 @@ + in 2004-2006 and placed in +# the public domain. Revised in subsequent years, still public domain. +# +# There's absolutely no warranty. +# +# The homepage URL for this framework is: +# +# http://www.openwall.com/phpass/ +# +# Please be sure to update the Version line if you edit this file in any way. +# It is suggested that you leave the main version number intact, but indicate +# your project name (after the slash) and add your own revision information. +# +# Please do not change the "private" password hashing method implemented in +# here, thereby making your hashes incompatible. However, if you must, please +# change the hash type identifier (the "$P$") to something different. +# +# Obviously, since this code is in the public domain, the above are not +# requirements (there can be none), but merely suggestions. +# +class PasswordHash { + var $itoa64; + var $iteration_count_log2; + var $portable_hashes; + var $random_state; + + function PasswordHash($iteration_count_log2, $portable_hashes) + { + $this->itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; + + if ($iteration_count_log2 < 4 || $iteration_count_log2 > 31) + $iteration_count_log2 = 8; + $this->iteration_count_log2 = $iteration_count_log2; + + $this->portable_hashes = $portable_hashes; + + $this->random_state = microtime(); + if (function_exists('getmypid')) + $this->random_state .= getmypid(); + } + + function get_random_bytes($count) + { + $output = ''; + if (is_readable('/dev/urandom') && + ($fh = @fopen('/dev/urandom', 'rb'))) { + $output = fread($fh, $count); + fclose($fh); + } + + if (strlen($output) < $count) { + $output = ''; + for ($i = 0; $i < $count; $i += 16) { + $this->random_state = + md5(microtime() . $this->random_state); + $output .= + pack('H*', md5($this->random_state)); + } + $output = substr($output, 0, $count); + } + + return $output; + } + + function encode64($input, $count) + { + $output = ''; + $i = 0; + do { + $value = ord($input[$i++]); + $output .= $this->itoa64[$value & 0x3f]; + if ($i < $count) + $value |= ord($input[$i]) << 8; + $output .= $this->itoa64[($value >> 6) & 0x3f]; + if ($i++ >= $count) + break; + if ($i < $count) + $value |= ord($input[$i]) << 16; + $output .= $this->itoa64[($value >> 12) & 0x3f]; + if ($i++ >= $count) + break; + $output .= $this->itoa64[($value >> 18) & 0x3f]; + } while ($i < $count); + + return $output; + } + + function gensalt_private($input) + { + $output = '$P$'; + $output .= $this->itoa64[min($this->iteration_count_log2 + + ((PHP_VERSION >= '5') ? 5 : 3), 30)]; + $output .= $this->encode64($input, 6); + + return $output; + } + + function crypt_private($password, $setting) + { + $output = '*0'; + if (substr($setting, 0, 2) == $output) + $output = '*1'; + + $id = substr($setting, 0, 3); + # We use "$P$", phpBB3 uses "$H$" for the same thing + if ($id != '$P$' && $id != '$H$') + return $output; + + $count_log2 = strpos($this->itoa64, $setting[3]); + if ($count_log2 < 7 || $count_log2 > 30) + return $output; + + $count = 1 << $count_log2; + + $salt = substr($setting, 4, 8); + if (strlen($salt) != 8) + return $output; + + # We're kind of forced to use MD5 here since it's the only + # cryptographic primitive available in all versions of PHP + # currently in use. To implement our own low-level crypto + # in PHP would result in much worse performance and + # consequently in lower iteration counts and hashes that are + # quicker to crack (by non-PHP code). + if (PHP_VERSION >= '5') { + $hash = md5($salt . $password, TRUE); + do { + $hash = md5($hash . $password, TRUE); + } while (--$count); + } else { + $hash = pack('H*', md5($salt . $password)); + do { + $hash = pack('H*', md5($hash . $password)); + } while (--$count); + } + + $output = substr($setting, 0, 12); + $output .= $this->encode64($hash, 16); + + return $output; + } + + function gensalt_extended($input) + { + $count_log2 = min($this->iteration_count_log2 + 8, 24); + # This should be odd to not reveal weak DES keys, and the + # maximum valid value is (2**24 - 1) which is odd anyway. + $count = (1 << $count_log2) - 1; + + $output = '_'; + $output .= $this->itoa64[$count & 0x3f]; + $output .= $this->itoa64[($count >> 6) & 0x3f]; + $output .= $this->itoa64[($count >> 12) & 0x3f]; + $output .= $this->itoa64[($count >> 18) & 0x3f]; + + $output .= $this->encode64($input, 3); + + return $output; + } + + function gensalt_blowfish($input) + { + # This one needs to use a different order of characters and a + # different encoding scheme from the one in encode64() above. + # We care because the last character in our encoded string will + # only represent 2 bits. While two known implementations of + # bcrypt will happily accept and correct a salt string which + # has the 4 unused bits set to non-zero, we do not want to take + # chances and we also do not want to waste an additional byte + # of entropy. + $itoa64 = './ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; + + $output = '$2a$'; + $output .= chr(ord('0') + $this->iteration_count_log2 / 10); + $output .= chr(ord('0') + $this->iteration_count_log2 % 10); + $output .= '$'; + + $i = 0; + do { + $c1 = ord($input[$i++]); + $output .= $itoa64[$c1 >> 2]; + $c1 = ($c1 & 0x03) << 4; + if ($i >= 16) { + $output .= $itoa64[$c1]; + break; + } + + $c2 = ord($input[$i++]); + $c1 |= $c2 >> 4; + $output .= $itoa64[$c1]; + $c1 = ($c2 & 0x0f) << 2; + + $c2 = ord($input[$i++]); + $c1 |= $c2 >> 6; + $output .= $itoa64[$c1]; + $output .= $itoa64[$c2 & 0x3f]; + } while (1); + + return $output; + } + + function HashPassword($password) + { + $random = ''; + + if (CRYPT_BLOWFISH == 1 && !$this->portable_hashes) { + $random = $this->get_random_bytes(16); + $hash = + crypt($password, $this->gensalt_blowfish($random)); + if (strlen($hash) == 60) + return $hash; + } + + if (CRYPT_EXT_DES == 1 && !$this->portable_hashes) { + if (strlen($random) < 3) + $random = $this->get_random_bytes(3); + $hash = + crypt($password, $this->gensalt_extended($random)); + if (strlen($hash) == 20) + return $hash; + } + + if (strlen($random) < 6) + $random = $this->get_random_bytes(6); + $hash = + $this->crypt_private($password, + $this->gensalt_private($random)); + if (strlen($hash) == 34) + return $hash; + + # Returning '*' on error is safe here, but would _not_ be safe + # in a crypt(3)-like function used _both_ for generating new + # hashes and for validating passwords against existing hashes. + return '*'; + } + + function CheckPassword($password, $stored_hash) + { + $hash = $this->crypt_private($password, $stored_hash); + if ($hash[0] == '*') + $hash = crypt($password, $stored_hash); + + return $hash == $stored_hash; + } +} + +?> diff --git a/lib/phpass-0.3/c/Makefile b/lib/phpass-0.3/c/Makefile new file mode 100755 index 0000000..fe48917 --- /dev/null +++ b/lib/phpass-0.3/c/Makefile @@ -0,0 +1,21 @@ +# +# Written by Solar Designer and placed in the public domain. +# See crypt_private.c for more information. +# +CC = gcc +LD = $(CC) +RM = rm -f +CFLAGS = -Wall -O2 -fomit-frame-pointer -funroll-loops +LDFLAGS = -s +LIBS = -lcrypto + +all: crypt_private-test + +crypt_private-test: crypt_private-test.o + $(LD) $(LDFLAGS) $(LIBS) crypt_private-test.o -o $@ + +crypt_private-test.o: crypt_private.c + $(CC) -c $(CFLAGS) crypt_private.c -DTEST -o $@ + +clean: + $(RM) crypt_private-test* diff --git a/lib/phpass-0.3/c/crypt_private.c b/lib/phpass-0.3/c/crypt_private.c new file mode 100755 index 0000000..6abc05b --- /dev/null +++ b/lib/phpass-0.3/c/crypt_private.c @@ -0,0 +1,106 @@ +/* + * This code exists for the sole purpose to serve as another implementation + * of the "private" password hashing method implemened in PasswordHash.php + * and thus to confirm that these password hashes are indeed calculated as + * intended. + * + * Other uses of this code are discouraged. There are much better password + * hashing algorithms available to C programmers; one of those is bcrypt: + * + * http://www.openwall.com/crypt/ + * + * Written by Solar Designer in 2005 and placed in + * the public domain. + * + * There's absolutely no warranty. + */ + +#include +#include + +#ifdef TEST +#include +#endif + +static char *itoa64 = + "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; + +static void encode64(char *dst, char *src, int count) +{ + int i, value; + + i = 0; + do { + value = (unsigned char)src[i++]; + *dst++ = itoa64[value & 0x3f]; + if (i < count) + value |= (unsigned char)src[i] << 8; + *dst++ = itoa64[(value >> 6) & 0x3f]; + if (i++ >= count) + break; + if (i < count) + value |= (unsigned char)src[i] << 16; + *dst++ = itoa64[(value >> 12) & 0x3f]; + if (i++ >= count) + break; + *dst++ = itoa64[(value >> 18) & 0x3f]; + } while (i < count); +} + +char *crypt_private(char *password, char *setting) +{ + static char output[35]; + MD5_CTX ctx; + char hash[MD5_DIGEST_LENGTH]; + char *p, *salt; + int count_log2, length, count; + + strcpy(output, "*0"); + if (!strncmp(setting, output, 2)) + output[1] = '1'; + + if (strncmp(setting, "$P$", 3)) + return output; + + p = strchr(itoa64, setting[3]); + if (!p) + return output; + count_log2 = p - itoa64; + if (count_log2 < 7 || count_log2 > 30) + return output; + + salt = setting + 4; + if (strlen(salt) < 8) + return output; + + length = strlen(password); + + MD5_Init(&ctx); + MD5_Update(&ctx, salt, 8); + MD5_Update(&ctx, password, length); + MD5_Final(hash, &ctx); + + count = 1 << count_log2; + do { + MD5_Init(&ctx); + MD5_Update(&ctx, hash, MD5_DIGEST_LENGTH); + MD5_Update(&ctx, password, length); + MD5_Final(hash, &ctx); + } while (--count); + + memcpy(output, setting, 12); + encode64(&output[12], hash, MD5_DIGEST_LENGTH); + + return output; +} + +#ifdef TEST +int main(int argc, char **argv) +{ + if (argc != 3) return 1; + + puts(crypt_private(argv[1], argv[2])); + + return 0; +} +#endif diff --git a/lib/phpass-0.3/test.php b/lib/phpass-0.3/test.php new file mode 100755 index 0000000..2f4a41c --- /dev/null +++ b/lib/phpass-0.3/test.php @@ -0,0 +1,72 @@ +HashPassword($correct); + +print 'Hash: ' . $hash . "\n"; + +$check = $t_hasher->CheckPassword($correct, $hash); +if ($check) $ok++; +print "Check correct: '" . $check . "' (should be '1')\n"; + +$wrong = 'test12346'; +$check = $t_hasher->CheckPassword($wrong, $hash); +if (!$check) $ok++; +print "Check wrong: '" . $check . "' (should be '0' or '')\n"; + +unset($t_hasher); + +# Force the use of weaker portable hashes. +$t_hasher = new PasswordHash(8, TRUE); + +$hash = $t_hasher->HashPassword($correct); + +print 'Hash: ' . $hash . "\n"; + +$check = $t_hasher->CheckPassword($correct, $hash); +if ($check) $ok++; +print "Check correct: '" . $check . "' (should be '1')\n"; + +$check = $t_hasher->CheckPassword($wrong, $hash); +if (!$check) $ok++; +print "Check wrong: '" . $check . "' (should be '0' or '')\n"; + +# A correct portable hash for 'test12345'. +# Please note the use of single quotes to ensure that the dollar signs will +# be interpreted literally. Of course, a real application making use of the +# framework won't store password hashes within a PHP source file anyway. +# We only do this for testing. +$hash = '$P$9IQRaTwmfeRo7ud9Fh4E2PdI0S3r.L0'; + +print 'Hash: ' . $hash . "\n"; + +$check = $t_hasher->CheckPassword($correct, $hash); +if ($check) $ok++; +print "Check correct: '" . $check . "' (should be '1')\n"; + +$check = $t_hasher->CheckPassword($wrong, $hash); +if (!$check) $ok++; +print "Check wrong: '" . $check . "' (should be '0' or '')\n"; + +if ($ok == 6) + print "All tests have PASSED\n"; +else + print "Some tests have FAILED\n"; + +?> diff --git a/login.php b/login.php new file mode 100644 index 0000000..88a47eb --- /dev/null +++ b/login.php @@ -0,0 +1,58 @@ +You are already logged in..."; +} +else +{ +echo "

    User Login

    "; + echo "
    "; + echo "
    "; + echo ""; + echo ""; + echo ""; + echo ""; + echo "
    "; + echo ""; + echo "
    "; +require_once($yaptc_lib . "phpass-0.3/PasswordHash.php"); + $hasher = new PasswordHash(8, FALSE); + if (!empty($_POST)) { + $query = "SELECT id, password, UNIX_TIMESTAMP(created) AS salt, firstname, lastname FROM users WHERE username = :username"; + $stmt = $sql->prepare($query); + $stmt->execute(array(':username' => $_POST['username'])); + $user = $stmt->fetchObject(); + if ($user && $user->password == $hasher->CheckPassword($_POST['password'], $user->password)) { + session_regenerate_id(); + $_SESSION['user_id'] = $user->id; + $_SESSION['loggedIn'] = TRUE; + $_SESSION['signature'] = md5($user->id . $_SERVER['HTTP_USER_AGENT']); + $_SESSION['firstname'] = $user->firstname; + $_SESSION['lastname'] = $user->lastname; + session_write_close(); + echo "Login successful..."; + header("Location: index.php"); + + } + else + { +header ("Refresh:3; url=login.php", true, 303); +echo "

    Login failed, please try again...

    "; + } + } + + } + + +//********** END CONTENT **********// +require_once($yaptc_inc . "footer.inc.php"); +?> diff --git a/login.php~ b/login.php~ new file mode 100644 index 0000000..e3bab81 --- /dev/null +++ b/login.php~ @@ -0,0 +1,58 @@ +You are already logged in..."; +} +else +{ +echo "

    User Login

    "; + echo '
    '; + echo '
    '; + echo ''; + echo ''; + echo ''; + echo ''; + echo '
    '; + echo ''; + echo '
    '; +require_once($yaptc_lib . "phpass-0.3/PasswordHash.php"); + $hasher = new PasswordHash(8, FALSE); + if (!empty($_POST)) { + $query = "SELECT id, password, UNIX_TIMESTAMP(created) AS salt, firstname, lastname FROM users WHERE username = :username"; + $stmt = $sql->prepare($query); + $stmt->execute(array(':username' => $_POST['username'])); + $user = $stmt->fetchObject(); + if ($user && $user->password == $hasher->CheckPassword($_POST['password'], $user->password)) { + session_regenerate_id(); + $_SESSION['user_id'] = $user->id; + $_SESSION['loggedIn'] = TRUE; + $_SESSION['signature'] = md5($user->id . $_SERVER['HTTP_USER_AGENT']); + $_SESSION['firstname'] = $user->firstname; + $_SESSION['lastname'] = $user->lastname; + session_write_close(); + echo "Login successful..."; + header("Location: index.php"); + + } + else + { +header ("Refresh:3; url=login.php", true, 303); +echo "

    Login failed, please try again...

    "; + } + } + + } + + +//********** END CONTENT **********// +require_once($yaptc_inc . "footer.inc.php"); +?> diff --git a/logout.php b/logout.php new file mode 100644 index 0000000..132f434 --- /dev/null +++ b/logout.php @@ -0,0 +1,28 @@ +You have successfully logged out..."; +} +else +{ +session_start(); +session_unset(); +session_destroy(); +header ("Location: login.php"); +} + +//********** END CONTENT **********// +require_once($yaptc_inc . "footer.inc.php"); +?> diff --git a/logout.php~ b/logout.php~ new file mode 100644 index 0000000..6939161 --- /dev/null +++ b/logout.php~ @@ -0,0 +1,28 @@ +You have successfully logged out..."; +} +else +{ +session_start(); +session_unset(); +session_destroy(); +header ("Location: login.php"); +} + +//********** END CONTENT **********// +require_once($yaptc_inc . "footer.inc.php"); +?> diff --git a/profile.php b/profile.php new file mode 100644 index 0000000..268bf70 --- /dev/null +++ b/profile.php @@ -0,0 +1,57 @@ +prepare($query); + $stmt->execute(array(':id' => $_SESSION['user_id'])); + $user = $stmt->fetchObject(); + echo 'You may make changes to your user profile below if you wish. Updates will take effect immediately on pressing "Save".'; + echo '
    '; + echo '
    '; + echo ''; + echo "username\" value=\"$user->username\" id=\"username\" name=\"username\" readonly>"; + echo ''; + echo "created\" value=\"$user->created\" id=\"created\" name=\"created\" readonly>"; + echo ''; + echo "usertype\" value=\"$user->usertype\" id=\"usertype\" name=\"usertype\" readonly>"; + echo ''; + echo "firstname\" id=\"firstname\" name=\"firstname\">"; + echo ''; + echo "lastname\" id=\"lastname\" name=\"lastname\">"; + echo ''; + echo "email\" id=\"username\" name=\"username\">"; + echo '
    '; + echo ''; + echo '
    '; + } + + //************************ CONTENT END ************************ + // Load footer + require_once($yaptc_inc . "footer.inc.php"); +?> diff --git a/profile.php~ b/profile.php~ new file mode 100644 index 0000000..46a7e0f --- /dev/null +++ b/profile.php~ @@ -0,0 +1,57 @@ +prepare($query); + $stmt->execute(array(':id' => $_SESSION['user_id'])); + $user = $stmt->fetchObject(); + echo 'You may make changes to your user profile below if you wish. Updates will take effect immediately on pressing "Save".'; + echo '
    '; + echo '
    '; + echo ''; + echo "username\" value=\"$user->username\" id=\"username\" name=\"username\" readonly>"; + echo ''; + echo "created\" value=\"$user->created\" id=\"created\" name=\"created\" readonly>"; + echo ''; + echo "usertype\" value=\"$user->usertype\" id=\"usertype\" name=\"usertype\" readonly>"; + echo ''; + echo "firstname\" id=\"firstname\" name=\"firstname\">"; + echo ''; + echo "lastname\" id=\"lastname\" name=\"lastname\">"; + echo ''; + echo "email\" id=\"username\" name=\"username\">"; + echo '
    '; + echo ''; + echo '
    '; + } + + //************************ CONTENT END ************************ + // Load footer + require_once($yaptc_inc . "footer.inc.php"); +?> diff --git a/register.php b/register.php new file mode 100644 index 0000000..8051a7f --- /dev/null +++ b/register.php @@ -0,0 +1,199 @@ +prepare($query); + $stmt->execute(array( + ':username' => $_POST['username'], + ':email' => $email + )); + + /** + * There may well be more than one point of failure, but all we really need + * is the first one. + */ + $existing = $stmt->fetchObject(); + + if ($existing) + { + if ($existing->username == $_POST['username']) + { + $errors['username'] = "That username is already in use."; + } + if ($existing->email == $email) + { + $errors['email'] = "That email address is already in use."; + } + } +} + +/** + * If the form has been submitted and no errors were detected, we can proceed + * to account creation. + */ +if (!empty($_POST) && empty($errors)) +{ + /** + * Hash password before storing in database + */ + $hasher = new PasswordHash(8, FALSE); + $password = $hasher->HashPassword($_POST['password']); + + /** + * I'm going to mention it again because it's important; if you aren't using + * prepared statements, be sure to escape your data before passing it to + * your query. + */ + $query = "INSERT INTO users (username, password, email, created) + VALUES (:username, :password, :email, NOW())"; + $stmt = $sql->prepare($query); + $success = $stmt->execute(array( + ':username' => $_POST['username'], + ':password' => $password, + ':email' => $_POST['email'], + )); + + if ($success) + { + $message = "Account created."; + } + else + { + $errors['registration'] = "Account could not be created. Please try again later."; + } +} + +?> + + + + + + User Registration + + + +

    + + + + +

    + + +
    +
    + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + +
    +
    + + diff --git a/register.php~ b/register.php~ new file mode 100644 index 0000000..656756d --- /dev/null +++ b/register.php~ @@ -0,0 +1,189 @@ +real_escape_string($_POST['username']); + $email = $sql->real_escape_string($email); + + /** + * Check that the username and email aren't already in our database. + * + * Note also the absence of SELECT * + * Grab the columns you need, nothing more. + */ + $query = "SELECT username, email + FROM users + WHERE username = '{$username}' OR email = '{$email}'"; + $result = $sql->query($query); + + /** + * There may well be more than one point of failure, but all we really need + * is the first one. + */ + $existing = $result->fetch_object(); + + if ($existing) + { + if ($existing->username == $_POST['username']) + { + $errors['username'] = "That username is already in use."; + } + if ($existing->email == $email) + { + $errors['email'] = "That email address is already in use."; + } + } +} + +/** + * If the form has been submitted and no errors were detected, we can proceed + * to account creation. + */ +if (!empty($_POST) && empty($errors)) +{ + /** + * Hash password before storing in database + */ + $hasher = new PasswordHash(8, FALSE); + $password = $hasher->HashPassword($_POST['password']); + + $query = "INSERT INTO users (username, password, email, created) + VALUES ('{$username}', '{$password}', '{$email}', NOW())"; + $success = $sql->query($query); + + if ($success) + { + $message = "Account created."; + } + else + { + $errors['registration'] = "Account could not be created. Please try again later."; + } +} + +?> + + + + + + User Registration + + + +

    + + + + +

    + + +
    +
    + + + + +
    + + + + + +
    + + + + + +
    + + + + + +
    + + +
    +
    + + diff --git a/response.php b/response.php deleted file mode 100644 index 8c651c7..0000000 --- a/response.php +++ /dev/null @@ -1,111 +0,0 @@ -0) - -{ //check $_POST["content_txt"] is not empty - - - - //sanitize post value, PHP filter FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH Strip tags, encode special characters. - - $contentToSave = filter_var($_POST["content_txt"],FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH); - - - - // Insert sanitize string in record - - $insert_row = $mysqli->query("INSERT INTO yaptc_punchtypes(name) VALUES('".$contentToSave."')"); - - - - if($insert_row) - - { - - //Record was successfully inserted, respond result back to index page - - $my_id = $mysqli->insert_id; //Get ID of last inserted row from MySQL - - echo '
  • '; - - echo ''; - - echo $contentToSave.'
  • '; - - $mysqli->close(); //close db connection - - - - }else{ - - - - //header('HTTP/1.1 500 '.mysql_error()); //display sql errors.. must not output sql errors in live mode. - - header('HTTP/1.1 500 Looks like mysql error, could not insert record!'); - - exit(); - - } - - - -} - -elseif(isset($_POST["recordToDelete"]) && strlen($_POST["recordToDelete"])>0 && is_numeric($_POST["recordToDelete"])) - -{ //do we have a delete request? $_POST["recordToDelete"] - - - - //sanitize post value, PHP filter FILTER_SANITIZE_NUMBER_INT removes all characters except digits, plus and minus sign. - - $idToDelete = filter_var($_POST["recordToDelete"],FILTER_SANITIZE_NUMBER_INT); - - - - //try deleting record using the record ID we received from POST - - $delete_row = $mysqli->query("DELETE FROM yaptc_punchtypes WHERE id=".$idToDelete); - - - - if(!$delete_row) - - { - - //If mysql delete query was unsuccessful, output error - - header('HTTP/1.1 500 Could not delete record!'); - - exit(); - - } - - $mysqli->close(); //close db connection - -} - -else - -{ - - //Output error - - header('HTTP/1.1 500 Error occurred, Could not process request!'); - - exit(); - -} - -?> diff --git a/time.php b/time.php new file mode 100644 index 0000000..b9788be --- /dev/null +++ b/time.php @@ -0,0 +1,78 @@ +prepare("SELECT punches.id as punchid, users.id as user, punchtypes.punchname as type, punches.time as time, punches.notes as notes, punches.modified as modified FROM punches INNER JOIN users ON punches.userid = users.id INNER JOIN punchtypes ON punches.punchtypeid = punchtypes.id WHERE users.id = $userid ORDER BY punches.id DESC LIMIT 1"); +$result->execute(); +$last = $result->fetchObject(); +echo "You have been punched $last->type since $last->time."; + + +// eventually i will get these in one query - for now this is separate to show all punches vs the last punch and status +$result = $sql->prepare("SELECT punches.id as punchid, users.id as user, punchtypes.punchname as type, punches.time as time, punches.notes as notes, punches.modified as modified FROM punches INNER JOIN users ON punches.userid = users.id INNER JOIN punchtypes ON punches.punchtypeid = punchtypes.id WHERE users.id = $userid ORDER BY punches.id DESC"); +$result->execute(); + + +echo ''; +echo ''; +echo ''; +echo ''; +echo ''; +echo ''; +echo ''; +echo ''; +echo ''; +echo ''; +while ($row = $result->fetch(PDO::FETCH_ASSOC)) +{ +$time = $row['time']; +$type = $row['type']; +$changed = $row['modified']; +if ($changed == "1") {$chg="YES";} else {$chg="NO";} +$notes = $row['notes']; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +} +echo ''; +echo '
    TimeTypeChangedNotes
    $time$type$chg$notes
    '; + + + +// end logged-in content + } + + //************************ CONTENT END ************************ + // Load footer + require_once($yaptc_inc . "footer.inc.php"); +?> diff --git a/time.php~ b/time.php~ new file mode 100644 index 0000000..a051314 --- /dev/null +++ b/time.php~ @@ -0,0 +1,82 @@ +prepare("SELECT punches.id as punchid, users.id as user, punchtypes.punchname as type, punches.time as time, punches.notes as notes, punches.modified as modified FROM punches INNER JOIN users ON punches.userid = users.id INNER JOIN punchtypes ON punches.punchtypeid = punchtypes.id WHERE users.id = $userid ORDER BY punches.id DESC LIMIT 1"); +$result->execute(); +$last = $result->fetchObject(); +echo "You have been punched $last->type since $last->time."; + + +// eventually i will get these in one query - for now this is separate to show all punches vs the last punch and status +$result = $sql->prepare("SELECT punches.id as punchid, users.id as user, punchtypes.punchname as type, punches.time as time, punches.notes as notes, punches.modified as modified FROM punches INNER JOIN users ON punches.userid = users.id INNER JOIN punchtypes ON punches.punchtypeid = punchtypes.id WHERE users.id = $userid ORDER BY punches.id DESC"); +$result->execute(); + + +echo ''; +echo ''; +echo ''; +echo ''; +echo ''; +echo ''; +echo ''; +echo ''; +echo ''; +echo ''; +while ($row = $result->fetch(PDO::FETCH_ASSOC)) +{ +$time = $row['time']; +$type = $row['type']; +$changed = $row['modified']; +if ($changed == "1") {$chg="YES";} else {$chg="NO";} +$notes = $row['notes']; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +echo ""; +} +echo ''; +echo '
    TimeTypeChangedNotes
    $time$type$chg$notes
    '; + + + + + + + +// end logged-in content + } + + //************************ CONTENT END ************************ + // Load footer + require_once($yaptc_inc . "footer.inc.php"); +?>