From f21f94d4e058d55d557a7d4be9b508e01056dc83 Mon Sep 17 00:00:00 2001 From: Josh North Date: Thu, 12 Feb 2015 00:35:00 -0500 Subject: [PATCH] more updates and date fixes --- .gitignore | 2 + config.inc.php~ | 22 -- dashboard.php | 0 dashboard.php~ | 62 ---- includes/date_time.js~ | 29 -- includes/footer.inc.php | 2 +- includes/footer.inc.php~ | 8 - includes/head.inc.php~ | 17 -- includes/header.inc.php | 4 +- includes/header.inc.php~ | 18 -- includes/index.php | 5 +- includes/index.php~ | 3 - includes/menu.inc.php | 0 includes/menu.inc.php~ | 46 --- includes/pure/index.php | 4 - includes/side-menu-old-ie.css | 0 includes/side-menu.css | 0 includes/side-menu.css~ | 281 ------------------ index.php | 2 +- index.php~ | 57 ---- {includes => lib}/date_time.js | 0 lib/index.php | 5 +- lib/phpass-0.3/c/index.php | 1 + lib/phpass-0.3/index.php | 1 + {includes => lib}/pure/HISTORY.md | 0 {includes => lib}/pure/LICENSE.md | 0 {includes => lib}/pure/README.md | 0 {includes => lib}/pure/base-context-min.css | 0 {includes => lib}/pure/base-context.css | 0 {includes => lib}/pure/base-min.css | 0 {includes => lib}/pure/base.css | 0 {includes => lib}/pure/bower.json | 0 {includes => lib}/pure/buttons-core-min.css | 0 {includes => lib}/pure/buttons-core.css | 0 {includes => lib}/pure/buttons-min.css | 0 {includes => lib}/pure/buttons.css | 0 {includes => lib}/pure/forms-min.css | 0 {includes => lib}/pure/forms-nr-min.css | 0 {includes => lib}/pure/forms-nr.css | 0 {includes => lib}/pure/forms.css | 0 {includes => lib}/pure/grids-core-min.css | 0 {includes => lib}/pure/grids-core.css | 0 {includes => lib}/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 {includes => lib}/pure/grids-responsive.css | 0 {includes => lib}/pure/grids-units-min.css | 0 {includes => lib}/pure/grids-units.css | 0 {includes => lib}/pure/grids.css | 0 lib/pure/index.php | 1 + {includes => lib}/pure/menus-core-min.css | 0 {includes => lib}/pure/menus-core.css | 0 {includes => lib}/pure/menus-min.css | 0 {includes => lib}/pure/menus-nr-min.css | 0 {includes => lib}/pure/menus-nr.css | 0 .../pure/menus-paginator-min.css | 0 {includes => lib}/pure/menus-paginator.css | 0 {includes => lib}/pure/menus.css | 0 {includes => lib}/pure/pure-min.css | 0 {includes => lib}/pure/pure-nr-min.css | 0 {includes => lib}/pure/pure-nr.css | 0 {includes => lib}/pure/pure.css | 0 {includes => lib}/pure/tables-min.css | 0 {includes => lib}/pure/tables.css | 0 {includes => lib}/ui.js | 0 login.php | 0 login.php~ | 58 ---- logout.php | 0 logout.php~ | 28 -- profile.php | 0 profile.php~ | 57 ---- register.php | 0 register.php~ | 189 ------------ time.php | 0 time.php~ | 82 ----- 76 files changed, 11 insertions(+), 973 deletions(-) create mode 100644 .gitignore delete mode 100644 config.inc.php~ mode change 100644 => 100755 dashboard.php delete mode 100644 dashboard.php~ delete mode 100644 includes/date_time.js~ mode change 100644 => 100755 includes/footer.inc.php delete mode 100644 includes/footer.inc.php~ delete mode 100644 includes/head.inc.php~ mode change 100644 => 100755 includes/header.inc.php delete mode 100644 includes/header.inc.php~ mode change 100644 => 100755 includes/index.php delete mode 100644 includes/index.php~ mode change 100644 => 100755 includes/menu.inc.php delete mode 100644 includes/menu.inc.php~ delete mode 100644 includes/pure/index.php mode change 100644 => 100755 includes/side-menu-old-ie.css mode change 100644 => 100755 includes/side-menu.css delete mode 100644 includes/side-menu.css~ mode change 100644 => 100755 index.php delete mode 100644 index.php~ rename {includes => lib}/date_time.js (100%) mode change 100644 => 100755 mode change 100644 => 100755 lib/index.php create mode 100755 lib/phpass-0.3/c/index.php create mode 100755 lib/phpass-0.3/index.php rename {includes => lib}/pure/HISTORY.md (100%) rename {includes => lib}/pure/LICENSE.md (100%) rename {includes => lib}/pure/README.md (100%) rename {includes => lib}/pure/base-context-min.css (100%) rename {includes => lib}/pure/base-context.css (100%) rename {includes => lib}/pure/base-min.css (100%) rename {includes => lib}/pure/base.css (100%) rename {includes => lib}/pure/bower.json (100%) rename {includes => lib}/pure/buttons-core-min.css (100%) rename {includes => lib}/pure/buttons-core.css (100%) rename {includes => lib}/pure/buttons-min.css (100%) rename {includes => lib}/pure/buttons.css (100%) rename {includes => lib}/pure/forms-min.css (100%) rename {includes => lib}/pure/forms-nr-min.css (100%) rename {includes => lib}/pure/forms-nr.css (100%) rename {includes => lib}/pure/forms.css (100%) rename {includes => lib}/pure/grids-core-min.css (100%) rename {includes => lib}/pure/grids-core.css (100%) rename {includes => lib}/pure/grids-min.css (100%) rename {includes => lib}/pure/grids-responsive-min.css (100%) rename {includes => lib}/pure/grids-responsive-old-ie-min.css (100%) rename {includes => lib}/pure/grids-responsive-old-ie.css (100%) rename {includes => lib}/pure/grids-responsive.css (100%) rename {includes => lib}/pure/grids-units-min.css (100%) rename {includes => lib}/pure/grids-units.css (100%) rename {includes => lib}/pure/grids.css (100%) create mode 100755 lib/pure/index.php rename {includes => lib}/pure/menus-core-min.css (100%) rename {includes => lib}/pure/menus-core.css (100%) rename {includes => lib}/pure/menus-min.css (100%) rename {includes => lib}/pure/menus-nr-min.css (100%) rename {includes => lib}/pure/menus-nr.css (100%) rename {includes => lib}/pure/menus-paginator-min.css (100%) rename {includes => lib}/pure/menus-paginator.css (100%) rename {includes => lib}/pure/menus.css (100%) rename {includes => lib}/pure/pure-min.css (100%) rename {includes => lib}/pure/pure-nr-min.css (100%) rename {includes => lib}/pure/pure-nr.css (100%) rename {includes => lib}/pure/pure.css (100%) rename {includes => lib}/pure/tables-min.css (100%) rename {includes => lib}/pure/tables.css (100%) rename {includes => lib}/ui.js (100%) mode change 100644 => 100755 mode change 100644 => 100755 login.php delete mode 100644 login.php~ mode change 100644 => 100755 logout.php delete mode 100644 logout.php~ mode change 100644 => 100755 profile.php delete mode 100644 profile.php~ mode change 100644 => 100755 register.php delete mode 100644 register.php~ mode change 100644 => 100755 time.php delete mode 100644 time.php~ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c0291d3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*~ +config.inc.php diff --git a/config.inc.php~ b/config.inc.php~ deleted file mode 100644 index 25f6418..0000000 --- a/config.inc.php~ +++ /dev/null @@ -1,22 +0,0 @@ - - diff --git a/dashboard.php b/dashboard.php old mode 100644 new mode 100755 diff --git a/dashboard.php~ b/dashboard.php~ deleted file mode 100644 index e7bd699..0000000 --- a/dashboard.php~ +++ /dev/null @@ -1,62 +0,0 @@ -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/includes/date_time.js~ b/includes/date_time.js~ deleted file mode 100644 index ba1d559..0000000 --- a/includes/date_time.js~ +++ /dev/null @@ -1,29 +0,0 @@ -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 old mode 100644 new mode 100755 index 3c86349..1dd37be --- a/includes/footer.inc.php +++ b/includes/footer.inc.php @@ -4,6 +4,6 @@ - + diff --git a/includes/footer.inc.php~ b/includes/footer.inc.php~ deleted file mode 100644 index 79248e6..0000000 --- a/includes/footer.inc.php~ +++ /dev/null @@ -1,8 +0,0 @@ -

-

Server Time:
-

- - - - - diff --git a/includes/head.inc.php~ b/includes/head.inc.php~ deleted file mode 100644 index 4751fd6..0000000 --- a/includes/head.inc.php~ +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - <?php echo $yaptc_appname . " : " . $yaptc_pagename; ?> - - - - - - - - diff --git a/includes/header.inc.php b/includes/header.inc.php old mode 100644 new mode 100755 index 22f54f8..30054b0 --- a/includes/header.inc.php +++ b/includes/header.inc.php @@ -5,8 +5,8 @@ <?php echo $yaptc_company . ">" . $yaptc_appname . ">" . $yaptc_pagename; ?> - - + + diff --git a/includes/header.inc.php~ b/includes/header.inc.php~ deleted file mode 100644 index 5435356..0000000 --- a/includes/header.inc.php~ +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - -<?php echo $yaptc_company . ">" . $yaptc_appname . ">" . $yaptc_pagename; ?> - - - - - - - - - diff --git a/includes/index.php b/includes/index.php old mode 100644 new mode 100755 index 623034f..201ab4d --- a/includes/index.php +++ b/includes/index.php @@ -1,4 +1 @@ - + diff --git a/includes/index.php~ b/includes/index.php~ deleted file mode 100644 index 763940a..0000000 --- a/includes/index.php~ +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/includes/menu.inc.php b/includes/menu.inc.php old mode 100644 new mode 100755 diff --git a/includes/menu.inc.php~ b/includes/menu.inc.php~ deleted file mode 100644 index d25c110..0000000 --- a/includes/menu.inc.php~ +++ /dev/null @@ -1,46 +0,0 @@ -
- - - - - - - - -
- -
-

-

-
- -
diff --git a/includes/pure/index.php b/includes/pure/index.php deleted file mode 100644 index 623034f..0000000 --- a/includes/pure/index.php +++ /dev/null @@ -1,4 +0,0 @@ - diff --git a/includes/side-menu-old-ie.css b/includes/side-menu-old-ie.css old mode 100644 new mode 100755 diff --git a/includes/side-menu.css b/includes/side-menu.css old mode 100644 new mode 100755 diff --git a/includes/side-menu.css~ b/includes/side-menu.css~ deleted file mode 100644 index ec9429c..0000000 --- a/includes/side-menu.css~ +++ /dev/null @@ -1,281 +0,0 @@ - -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/index.php b/index.php old mode 100644 new mode 100755 index 08c9c76..1e8c310 --- a/index.php +++ b/index.php @@ -23,7 +23,7 @@ $result = $sql->prepare("SELECT punches.id as punchid, users.id as user, punchty $result->execute(); $last = $result->fetchObject(); echo "

    Current Status

    "; -echo "

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

    "; +echo "

    You have been Punched $last->type since " . date('g:i a \o\n M jS, Y', strtotime($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 "
    "; diff --git a/index.php~ b/index.php~ deleted file mode 100644 index 2f749c8..0000000 --- a/index.php~ +++ /dev/null @@ -1,57 +0,0 @@ -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/includes/date_time.js b/lib/date_time.js old mode 100644 new mode 100755 similarity index 100% rename from includes/date_time.js rename to lib/date_time.js diff --git a/lib/index.php b/lib/index.php old mode 100644 new mode 100755 index 623034f..201ab4d --- a/lib/index.php +++ b/lib/index.php @@ -1,4 +1 @@ - + diff --git a/lib/phpass-0.3/c/index.php b/lib/phpass-0.3/c/index.php new file mode 100755 index 0000000..bc21425 --- /dev/null +++ b/lib/phpass-0.3/c/index.php @@ -0,0 +1 @@ + diff --git a/lib/phpass-0.3/index.php b/lib/phpass-0.3/index.php new file mode 100755 index 0000000..4f3e70b --- /dev/null +++ b/lib/phpass-0.3/index.php @@ -0,0 +1 @@ + diff --git a/includes/pure/HISTORY.md b/lib/pure/HISTORY.md similarity index 100% rename from includes/pure/HISTORY.md rename to lib/pure/HISTORY.md diff --git a/includes/pure/LICENSE.md b/lib/pure/LICENSE.md similarity index 100% rename from includes/pure/LICENSE.md rename to lib/pure/LICENSE.md diff --git a/includes/pure/README.md b/lib/pure/README.md similarity index 100% rename from includes/pure/README.md rename to lib/pure/README.md diff --git a/includes/pure/base-context-min.css b/lib/pure/base-context-min.css similarity index 100% rename from includes/pure/base-context-min.css rename to lib/pure/base-context-min.css diff --git a/includes/pure/base-context.css b/lib/pure/base-context.css similarity index 100% rename from includes/pure/base-context.css rename to lib/pure/base-context.css diff --git a/includes/pure/base-min.css b/lib/pure/base-min.css similarity index 100% rename from includes/pure/base-min.css rename to lib/pure/base-min.css diff --git a/includes/pure/base.css b/lib/pure/base.css similarity index 100% rename from includes/pure/base.css rename to lib/pure/base.css diff --git a/includes/pure/bower.json b/lib/pure/bower.json similarity index 100% rename from includes/pure/bower.json rename to lib/pure/bower.json diff --git a/includes/pure/buttons-core-min.css b/lib/pure/buttons-core-min.css similarity index 100% rename from includes/pure/buttons-core-min.css rename to lib/pure/buttons-core-min.css diff --git a/includes/pure/buttons-core.css b/lib/pure/buttons-core.css similarity index 100% rename from includes/pure/buttons-core.css rename to lib/pure/buttons-core.css diff --git a/includes/pure/buttons-min.css b/lib/pure/buttons-min.css similarity index 100% rename from includes/pure/buttons-min.css rename to lib/pure/buttons-min.css diff --git a/includes/pure/buttons.css b/lib/pure/buttons.css similarity index 100% rename from includes/pure/buttons.css rename to lib/pure/buttons.css diff --git a/includes/pure/forms-min.css b/lib/pure/forms-min.css similarity index 100% rename from includes/pure/forms-min.css rename to lib/pure/forms-min.css diff --git a/includes/pure/forms-nr-min.css b/lib/pure/forms-nr-min.css similarity index 100% rename from includes/pure/forms-nr-min.css rename to lib/pure/forms-nr-min.css diff --git a/includes/pure/forms-nr.css b/lib/pure/forms-nr.css similarity index 100% rename from includes/pure/forms-nr.css rename to lib/pure/forms-nr.css diff --git a/includes/pure/forms.css b/lib/pure/forms.css similarity index 100% rename from includes/pure/forms.css rename to lib/pure/forms.css diff --git a/includes/pure/grids-core-min.css b/lib/pure/grids-core-min.css similarity index 100% rename from includes/pure/grids-core-min.css rename to lib/pure/grids-core-min.css diff --git a/includes/pure/grids-core.css b/lib/pure/grids-core.css similarity index 100% rename from includes/pure/grids-core.css rename to lib/pure/grids-core.css diff --git a/includes/pure/grids-min.css b/lib/pure/grids-min.css similarity index 100% rename from includes/pure/grids-min.css rename to lib/pure/grids-min.css diff --git a/includes/pure/grids-responsive-min.css b/lib/pure/grids-responsive-min.css similarity index 100% rename from includes/pure/grids-responsive-min.css rename to lib/pure/grids-responsive-min.css diff --git a/includes/pure/grids-responsive-old-ie-min.css b/lib/pure/grids-responsive-old-ie-min.css similarity index 100% rename from includes/pure/grids-responsive-old-ie-min.css rename to lib/pure/grids-responsive-old-ie-min.css diff --git a/includes/pure/grids-responsive-old-ie.css b/lib/pure/grids-responsive-old-ie.css similarity index 100% rename from includes/pure/grids-responsive-old-ie.css rename to lib/pure/grids-responsive-old-ie.css diff --git a/includes/pure/grids-responsive.css b/lib/pure/grids-responsive.css similarity index 100% rename from includes/pure/grids-responsive.css rename to lib/pure/grids-responsive.css diff --git a/includes/pure/grids-units-min.css b/lib/pure/grids-units-min.css similarity index 100% rename from includes/pure/grids-units-min.css rename to lib/pure/grids-units-min.css diff --git a/includes/pure/grids-units.css b/lib/pure/grids-units.css similarity index 100% rename from includes/pure/grids-units.css rename to lib/pure/grids-units.css diff --git a/includes/pure/grids.css b/lib/pure/grids.css similarity index 100% rename from includes/pure/grids.css rename to lib/pure/grids.css diff --git a/lib/pure/index.php b/lib/pure/index.php new file mode 100755 index 0000000..4f3e70b --- /dev/null +++ b/lib/pure/index.php @@ -0,0 +1 @@ + diff --git a/includes/pure/menus-core-min.css b/lib/pure/menus-core-min.css similarity index 100% rename from includes/pure/menus-core-min.css rename to lib/pure/menus-core-min.css diff --git a/includes/pure/menus-core.css b/lib/pure/menus-core.css similarity index 100% rename from includes/pure/menus-core.css rename to lib/pure/menus-core.css diff --git a/includes/pure/menus-min.css b/lib/pure/menus-min.css similarity index 100% rename from includes/pure/menus-min.css rename to lib/pure/menus-min.css diff --git a/includes/pure/menus-nr-min.css b/lib/pure/menus-nr-min.css similarity index 100% rename from includes/pure/menus-nr-min.css rename to lib/pure/menus-nr-min.css diff --git a/includes/pure/menus-nr.css b/lib/pure/menus-nr.css similarity index 100% rename from includes/pure/menus-nr.css rename to lib/pure/menus-nr.css diff --git a/includes/pure/menus-paginator-min.css b/lib/pure/menus-paginator-min.css similarity index 100% rename from includes/pure/menus-paginator-min.css rename to lib/pure/menus-paginator-min.css diff --git a/includes/pure/menus-paginator.css b/lib/pure/menus-paginator.css similarity index 100% rename from includes/pure/menus-paginator.css rename to lib/pure/menus-paginator.css diff --git a/includes/pure/menus.css b/lib/pure/menus.css similarity index 100% rename from includes/pure/menus.css rename to lib/pure/menus.css diff --git a/includes/pure/pure-min.css b/lib/pure/pure-min.css similarity index 100% rename from includes/pure/pure-min.css rename to lib/pure/pure-min.css diff --git a/includes/pure/pure-nr-min.css b/lib/pure/pure-nr-min.css similarity index 100% rename from includes/pure/pure-nr-min.css rename to lib/pure/pure-nr-min.css diff --git a/includes/pure/pure-nr.css b/lib/pure/pure-nr.css similarity index 100% rename from includes/pure/pure-nr.css rename to lib/pure/pure-nr.css diff --git a/includes/pure/pure.css b/lib/pure/pure.css similarity index 100% rename from includes/pure/pure.css rename to lib/pure/pure.css diff --git a/includes/pure/tables-min.css b/lib/pure/tables-min.css similarity index 100% rename from includes/pure/tables-min.css rename to lib/pure/tables-min.css diff --git a/includes/pure/tables.css b/lib/pure/tables.css similarity index 100% rename from includes/pure/tables.css rename to lib/pure/tables.css diff --git a/includes/ui.js b/lib/ui.js old mode 100644 new mode 100755 similarity index 100% rename from includes/ui.js rename to lib/ui.js diff --git a/login.php b/login.php old mode 100644 new mode 100755 diff --git a/login.php~ b/login.php~ deleted file mode 100644 index e3bab81..0000000 --- a/login.php~ +++ /dev/null @@ -1,58 +0,0 @@ -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 old mode 100644 new mode 100755 diff --git a/logout.php~ b/logout.php~ deleted file mode 100644 index 6939161..0000000 --- a/logout.php~ +++ /dev/null @@ -1,28 +0,0 @@ -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 old mode 100644 new mode 100755 diff --git a/profile.php~ b/profile.php~ deleted file mode 100644 index 46a7e0f..0000000 --- a/profile.php~ +++ /dev/null @@ -1,57 +0,0 @@ -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 old mode 100644 new mode 100755 diff --git a/register.php~ b/register.php~ deleted file mode 100644 index 656756d..0000000 --- a/register.php~ +++ /dev/null @@ -1,189 +0,0 @@ -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/time.php b/time.php old mode 100644 new mode 100755 diff --git a/time.php~ b/time.php~ deleted file mode 100644 index a051314..0000000 --- a/time.php~ +++ /dev/null @@ -1,82 +0,0 @@ -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"); -?>