\n";
echo "  |
@@ -390,85 +403,29 @@
// determine who the authenticated user is for audit log
- if (isset($_SESSION['valid_user'])) {
+ if (isset($_SESSION['valid_user']))
+ {
$user = $_SESSION['valid_user'];
- } elseif (isset($_SESSION['time_admin_valid_user'])) {
- $user = $_SESSION['time_admin_valid_user'];
- } else {
- $user = "";
}
- // configure current time to insert for audit log
+ elseif (isset($_SESSION['time_admin_valid_user']))
+ {
+ $user = $_SESSION['time_admin_valid_user'];
+ }
- $time = time();
- $time_hour = gmdate('H', $time);
- $time_min = gmdate('i', $time);
- $time_sec = gmdate('s', $time);
- $time_month = gmdate('m', $time);
- $time_day = gmdate('d', $time);
- $time_year = gmdate('Y', $time);
- $time_tz_stamp = mktime($time_hour, $time_min, $time_sec, $time_month, $time_day, $time_year);
+ else {
+ $user = "";
+ }
// this needs to be changed later
$post_why = "";
for ($x = 0; $x < $final_num_rows; $x++) {
- // begin post validation //
-
- $final_username[$x] = stripslashes($final_username[$x]);
- $tmp_username = stripslashes($tmp_username);
-
- $final_username[$x] = stripslashes($final_username[$x]);
- if ($final_username[$x] != $tmp_username) {
- echo "Something is fishy here.\n";
- exit;
- }
- //if ((strlen($final_mysql_timestamp[$x]) != "10") || (!is_integer($final_mysql_timestamp[$x]))) {echo "Something is fishy here.\n"; exit;}
-
- $query_sel = "select * from " . $db_prefix . "punchlist where punchitems = '" . $final_inout[$x] . "'";
- $result_sel = mysql_query($query_sel);
-
- while ($row = mysql_fetch_array($result_sel)) {
- $punchitems = "" . $row['punchitems'] . "";
- }
- mysql_free_result($result_sel);
- if (!isset($punchitems)) {
- echo "Something is fishy here.\n";
- exit;
- }
-
- $final_notes[$x] = ereg_replace("[^[:alnum:] \,\.\?-]", "", $final_notes[$x]);
- $final_username[$x] = addslashes($final_username[$x]);
-
- $query5 = "select * from " . $db_prefix . "info where (fullname = '" . $final_username[$x] . "') and (timestamp = '" . $final_mysql_timestamp[$x] . "') and
- (`inout` = '" . $final_inout[$x] . "') and (notes = '" . $final_notes[$x] . "')";
- $result5 = mysql_query($query5);
- @$tmp_num_rows = mysql_num_rows($result5);
-
- if ((isset($tmp_num_rows)) && (@$tmp_num_rows != '1')) {
- echo "Something is fishy here.\n";
- exit;
- }
-
- // end post validation //
-
$row_color = ($row_count % 2) ? $color1 : $color2;
if (@$delete_time_checkbox[$x] == '1') {
- // begin post validation //
-
- $tmp_time[$x] = date("$timefmt", $final_mysql_timestamp[$x] + $tzo);
- if ($tmp_time[$x] != $final_time[$x]) {
- echo "Something is fishy here.\n";
- exit;
- }
-
- // end post validation //
-
- //if (!get_magic_quotes_gpc()) {$final_username[$x] = addslashes($final_username[$x]);}
-
$query = "select * from " . $db_prefix . "employees where empfullname = '" . $final_username[$x] . "'";
$result = mysql_query($query);
@@ -504,11 +461,11 @@
if (strtolower($ip_logging) == "yes") {
$query6 = "insert into " . $db_prefix . "audit (modified_by_ip, modified_by_user, modified_when, modified_from, modified_to, modified_why, user_modified) values
- ('" . $connecting_ip . "', '" . $user . "', '" . $time_tz_stamp . "', '" . $final_mysql_timestamp[$x] . "', '0', '" . $post_why . "', '" . $final_username[$x] . "')";
+ ('" . $connecting_ip . "', '" . $user . "', UNIX_TIMESTAMP(), '" . $final_mysql_timestamp[$x] . "', '0', '" . $post_why . "', '" . $final_username[$x] . "')";
$result6 = mysql_query($query6);
} else {
$query6 = "insert into " . $db_prefix . "audit (modified_by_user, modified_when, modified_from, modified_to, modified_why, user_modified) values
- ('" . $user . "', '" . $time_tz_stamp . "', '" . $final_mysql_timestamp[$x] . "', '0', '" . $post_why . "', '" . $final_username[$x] . "')";
+ ('" . $user . "', UNIX_TIMESTAMP(), '" . $final_mysql_timestamp[$x] . "', '0', '" . $post_why . "', '" . $final_username[$x] . "')";
$result6 = mysql_query($query6);
}
@@ -534,17 +491,17 @@
// begin post validation //
if ($_POST['tmp_var'] != '1') {
- echo "Something is fishy here.\n";
+ echo "Something is fishy here E.\n";
exit;
}
$tmp_calc = intval($calc);
$tmp_timestamp = intval($timestamp);
if ((strlen($tmp_calc) != "10") || (!is_integer($tmp_calc))) {
- echo "Something is fishy here.\n";
+ echo "Something is fishy here F.\n";
exit;
}
if ((strlen($tmp_timestamp) != "10") || (!is_integer($tmp_timestamp))) {
- echo "Something is fishy here.\n";
+ echo "Something is fishy here G.\n";
exit;
}
@@ -635,18 +592,9 @@
} else {
- // configure timestamp to insert/update //
-
- if ($calendar_style == "euro") {
- // $post_date = "$day/$month/$year";
- @$post_date = "$month/$day/$year";
- } elseif ($calendar_style == "amer") {
- @$post_date = "$month/$day/$year";
- }
-
+ $post_date = "$month/$day/$year";
$row_count = '0';
- $timestamp = strtotime($post_date) - @$tzo;
- //$calc = $timestamp + 86400 - @$tzo;
+ $timestamp = strtotime($post_date);
$calc = $timestamp + 86400;
$post_username = stripslashes($post_username);
$post_displayname = stripslashes($post_displayname);
diff --git a/admin/timeedit.php b/admin/timeedit.php
index b10f39e..5ed8bc7 100644
--- a/admin/timeedit.php
+++ b/admin/timeedit.php
@@ -587,17 +587,6 @@
$user = "";
}
- // configure current time to insert for audit log
-
- $time = time();
- $time_hour = gmdate('H', $time);
- $time_min = gmdate('i', $time);
- $time_sec = gmdate('s', $time);
- $time_month = gmdate('m', $time);
- $time_day = gmdate('d', $time);
- $time_year = gmdate('Y', $time);
- $time_tz_stamp = mktime($time_hour, $time_min, $time_sec, $time_month, $time_day, $time_year);
-
// this needs to be changed later
$post_why = "";
@@ -654,12 +643,12 @@
if (strtolower($ip_logging) == "yes") {
$query4 = "insert into " . $db_prefix . "audit (modified_by_ip, modified_by_user, modified_when, modified_from, modified_to, modified_why, user_modified) values
- ('" . $connecting_ip . "', '" . $user . "', '" . $time_tz_stamp . "', '" . $final_mysql_timestamp[$x] . "', '" . $new_tstamp[$x] . "', '" . $post_why . "',
+ ('" . $connecting_ip . "', '" . $user . "', UNIX_TIMESTAMP(), '" . $final_mysql_timestamp[$x] . "', '" . $new_tstamp[$x] . "', '" . $post_why . "',
'" . $final_username[$x] . "')";
$result4 = mysql_query($query4);
} else {
$query4 = "insert into " . $db_prefix . "audit (modified_by_user, modified_when, modified_from, modified_to, modified_why, user_modified) values
- ('" . $user . "', '" . $time_tz_stamp . "', '" . $final_mysql_timestamp[$x] . "', '" . $new_tstamp[$x] . "', '" . $post_why . "', '" . $final_username[$x] . "')";
+ ('" . $user . "', UNIX_TIMESTAMP(), '" . $final_mysql_timestamp[$x] . "', '" . $new_tstamp[$x] . "', '" . $post_why . "', '" . $final_username[$x] . "')";
$result4 = mysql_query($query4);
}
diff --git a/config.inc.php b/config.example.inc.php
similarity index 99%
rename from config.inc.php
rename to config.example.inc.php
index bd0d2a1..a649205 100644
--- a/config.inc.php
+++ b/config.example.inc.php
@@ -325,7 +325,7 @@
$use_server_tz = "no";
-/* If you are using PHP 5.1+ and do not have access to chance your php.ini config file then
+/* If you are using PHP 5.1+ and do not have access to change your php.ini config file then
uncomment the following line and change it to the correct time zone. */
//date_default_timezone_set("America/St_Johns");
diff --git a/header.php b/header.php
index c3692aa..fa52a34 100644
--- a/header.php
+++ b/header.php
@@ -69,6 +69,8 @@
echo "\n";
echo "\n";
+if(file_exists(__DIR__ . '/css/override.css') )
+ echo "\n";
// set refresh rate for each page //
diff --git a/install.sh b/install.sh
new file mode 100755
index 0000000..0b81861
--- /dev/null
+++ b/install.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+cd `dirname "$0"`
+
+cp config.example.inc.php config.inc.php
\ No newline at end of file
diff --git a/leftmain.php b/leftmain.php
index 5b6f994..2230711 100644
--- a/leftmain.php
+++ b/leftmain.php
@@ -469,17 +469,6 @@ class=misc_items style='padding-left:0px;padding-right:0px;' tabindex=5>\n";
@@ -539,15 +528,15 @@ class=misc_items style='padding-left:0px;padding-right:0px;' tabindex=5>\n";
diff --git a/reports/header_get_reports.php b/reports/header_get_reports.php
index be02c7c..82d67f2 100644
--- a/reports/header_get_reports.php
+++ b/reports/header_get_reports.php
@@ -3,6 +3,8 @@
echo "\n";
echo "\n";
+if(file_exists(__DIR__ . '/../css/override.css') )
+ echo "\n";
echo "\n";
echo "\n";
echo "\n";
diff --git a/reports/header_post_reports.php b/reports/header_post_reports.php
index 7e1fe31..abecd8e 100644
--- a/reports/header_post_reports.php
+++ b/reports/header_post_reports.php
@@ -3,6 +3,8 @@
echo "\n";
echo "\n";
+if(file_exists(__DIR__ . '/../css/override.css') )
+ echo "\n";
echo "\n";
echo "\n";
echo "\n";
|