diff --git a/config.inc.php.example b/config.inc.php.example index b50cf08..ecd3c63 100755 --- a/config.inc.php.example +++ b/config.inc.php.example @@ -7,7 +7,7 @@ $yaptc_appname = 'Timecard System'; // Program name to display in $yaptc_company = 'Widgets, Inc.'; // Your company name $yaptc_db = new PDO('mysql:host=localhost;dbname=YOUR_DATABASE;charset=utf8', 'YOUR_USER', 'YOUR_PASSWORD'); // Database connection string $yaptc_adminmsg = ''; // Message will display on all pages! - +$yaptc_allowadvancedpunch = 'yes'; // Should we allow users to make manual punch entries? set to yes or no diff --git a/punchlog.php b/punchlog.php index 3a16e45..a785f4d 100755 --- a/punchlog.php +++ b/punchlog.php @@ -19,7 +19,9 @@ $result = $yaptc_db->prepare("SELECT punches.id as punchid, users.id as user, pu $result->execute(); $last = $result->fetchObject(); -// Let's build the page - this is the header with current status +// Let's build the page - this is the header with current status IF allowed +if ($yaptc_allowadvancedpunch == 'yes'): + echo "
You do not appear to have any punches on record.
"; @@ -92,7 +94,7 @@ header('Location: '.$_SERVER['PHP_SELF']); // Close out the form... echo ""; echo ""; - +endif; echo "Below is your full punch history, sorted newest to oldest.
";