📄 total_hours.php
字号:
$fullname = stripslashes($_POST['user_name']);$from_date = $_POST['from_date'];$to_date = $_POST['to_date'];$tmp_paginate = $_POST['tmp_paginate'];$tmp_round_time = $_POST['tmp_round_time'];$tmp_show_details = $_POST['tmp_show_details'];@$tmp_display_ip = $_POST['tmp_display_ip'];@$tmp_csv = $_POST['csv'];$fullname = addslashes($fullname);// begin post validation //if ($fullname != "All") {$query = "select empfullname, displayname from ".$db_prefix."employees where empfullname = '".$fullname."'";$result = mysql_query($query);while ($row=mysql_fetch_array($result)) {$empfullname = stripslashes("".$row['empfullname']."");$displayname = stripslashes("".$row['displayname']."");}if (!isset($empfullname)) {echo "Something is fishy here.\n"; exit;}}$fullname = stripslashes($fullname);if (($office_name != "All") && (!empty($office_name))) {$query = "select officename from ".$db_prefix."offices where officename = '".$office_name."'";$result = mysql_query($query);while ($row=mysql_fetch_array($result)) {$getoffice = "".$row['officename']."";}if (!isset($getoffice)) {echo "Something smells fishy here.\n"; exit;}}if (($group_name != "All") && (!empty($group_name))) {$query = "select groupname from ".$db_prefix."groups where groupname = '".$group_name."'";$result = mysql_query($query);while ($row=mysql_fetch_array($result)) {$getgroup = "".$row['groupname']."";}if (!isset($getgroup)) {echo "Something smells fishy here.\n"; exit;}}if ((!empty($tmp_round_time)) && ($tmp_round_time != '1') && ($tmp_round_time != '2') && ($tmp_round_time != '3') && ($tmp_round_time != '4') && ($tmp_round_time != '5')) {$evil_post = '1';if ($use_reports_password == "yes") {include '../admin/topmain.php';} else {include 'topmain.php';}echo "<table width=100% height=89% border=0 cellpadding=0 cellspacing=1>\n";echo " <tr valign=top>\n";echo " <td>\n";echo " <table width=100% height=100% border=0 cellpadding=10 cellspacing=1>\n";echo " <tr class=right_main_text>\n";echo " <td valign=top>\n";echo " <table align=center class=table_border width=60% border=0 cellpadding=0 cellspacing=3>\n";echo " <tr>\n";echo " <td class=table_rows width=20 align=center><img src='../images/icons/cancel.png' /></td><td class=table_rows_red> Choose a rounding method.</td></tr>\n";echo " </table>\n";}if (($tmp_paginate != '1') && (!empty($tmp_paginate))) {$evil_post = '1';if ($use_reports_password == "yes") {include '../admin/topmain.php';} else {include 'topmain.php';}echo "<table width=100% height=89% border=0 cellpadding=0 cellspacing=1>\n";echo " <tr valign=top>\n";echo " <td>\n";echo " <table width=100% height=100% border=0 cellpadding=10 cellspacing=1>\n";echo " <tr class=right_main_text>\n";echo " <td valign=top>\n";echo " <table align=center class=table_border width=60% border=0 cellpadding=0 cellspacing=3>\n";echo " <tr>\n";echo " <td class=table_rows width=20 align=center><img src='../images/icons/cancel.png' /></td><td class=table_rows_red> Choose \"yes\" or \"no\" to the \"<b>Paginate This Report?</b>\" question.</td></tr>\n";echo " </table>\n";}elseif (($tmp_show_details != '1') && (!empty($tmp_show_details))) {$evil_post = '1';if ($use_reports_password == "yes") {include '../admin/topmain.php';} else {include 'topmain.php';}echo "<table width=100% height=89% border=0 cellpadding=0 cellspacing=1>\n";echo " <tr valign=top>\n";echo " <td>\n";echo " <table width=100% height=100% border=0 cellpadding=10 cellspacing=1>\n";echo " <tr class=right_main_text>\n";echo " <td valign=top>\n";echo " <table align=center class=table_border width=60% border=0 cellpadding=0 cellspacing=3>\n";echo " <tr>\n";echo " <td class=table_rows width=20 align=center><img src='../images/icons/cancel.png' /></td><td class=table_rows_red> Choose \"yes\" or \"no\" to the \"<b>Show Punch-in/out Details?</b>\" question.</td></tr>\n";echo " </table>\n";}elseif (isset($tmp_display_ip)) {if (($tmp_display_ip != '1') && (!empty($tmp_display_ip))) {$evil_post = '1';if ($use_reports_password == "yes") {include '../admin/topmain.php';} else {include 'topmain.php';}echo "<table width=100% height=89% border=0 cellpadding=0 cellspacing=1>\n";echo " <tr valign=top>\n";echo " <td>\n";echo " <table width=100% height=100% border=0 cellpadding=10 cellspacing=1>\n";echo " <tr class=right_main_text>\n";echo " <td valign=top>\n";echo " <table align=center class=table_border width=60% border=0 cellpadding=0 cellspacing=3>\n";echo " <tr>\n";echo " <td class=table_rows width=20 align=center><img src='../images/icons/cancel.png' /></td><td class=table_rows_red> Choose \"yes\" or \"no\" to the \"<b>Show Punch-in/out Details?</b>\" question.</td></tr>\n";echo " </table>\n";}}elseif (isset($tmp_csv)) {if (($tmp_csv != '1') && (!empty($tmp_csv))) {$evil_post = '1';if ($use_reports_password == "yes") {include '../admin/topmain.php';} else {include 'topmain.php';}echo "<table width=100% height=89% border=0 cellpadding=0 cellspacing=1>\n";echo " <tr valign=top>\n";echo " <td>\n";echo " <table width=100% height=100% border=0 cellpadding=10 cellspacing=1>\n";echo " <tr class=right_main_text>\n";echo " <td valign=top>\n";echo " <table align=center class=table_border width=60% border=0 cellpadding=0 cellspacing=3>\n";echo " <tr>\n";echo " <td class=table_rows width=20 align=center><img src='../images/icons/cancel.png' /></td><td class=table_rows_red> Choose \"yes\" or \"no\" to the \"<b>Export to CSV?</b>\" question.</td></tr>\n";echo " </table>\n";}}if (!isset($evil_post)) {if (empty($from_date)) {$evil_post = '1';if ($use_reports_password == "yes") {include '../admin/topmain.php';} else {include 'topmain.php';}echo "<table width=100% height=89% border=0 cellpadding=0 cellspacing=1>\n";echo " <tr valign=top>\n";echo " <td>\n";echo " <table width=100% height=100% border=0 cellpadding=10 cellspacing=1>\n";echo " <tr class=right_main_text>\n";echo " <td valign=top>\n";echo " <table align=center class=table_border width=60% border=0 cellpadding=0 cellspacing=3>\n";echo " <tr>\n";echo " <td class=table_rows width=20 align=center><img src='../images/icons/cancel.png' /></td><td class=table_rows_red> A valid From Date is required.</td></tr>\n";echo " </table>\n";}elseif (!eregi ("^([0-9]?[0-9])+[-|/|.]+([0-9]?[0-9])+[-|/|.]+(([0-9]{2})|([0-9]{4}))$", $from_date, $date_regs)) {$evil_post = '1';if ($use_reports_password == "yes") {include '../admin/topmain.php';} else {include 'topmain.php';}echo "<table width=100% height=89% border=0 cellpadding=0 cellspacing=1>\n";echo " <tr valign=top>\n";echo " <td>\n";echo " <table width=100% height=100% border=0 cellpadding=10 cellspacing=1>\n";echo " <tr class=right_main_text>\n";echo " <td valign=top>\n";echo " <table align=center class=table_border width=60% border=0 cellpadding=0 cellspacing=3>\n";echo " <tr>\n";echo " <td class=table_rows width=20 align=center><img src='../images/icons/cancel.png' /></td><td class=table_rows_red> A valid From Date is required.</td></tr>\n";echo " </table>\n";} else {if ($calendar_style == "amer") {if (isset($date_regs)) {$from_month = $date_regs[1]; $from_day = $date_regs[2]; $from_year = $date_regs[3];}if ($from_month > 12 || $from_day > 31) {$evil_post = '1';if ($use_reports_password == "yes") {include '../admin/topmain.php';} else {include 'topmain.php';}echo "<table width=100% height=89% border=0 cellpadding=0 cellspacing=1>\n";echo " <tr valign=top>\n";echo " <td>\n";echo " <table width=100% height=100% border=0 cellpadding=10 cellspacing=1>\n";echo " <tr class=right_main_text>\n";echo " <td valign=top>\n";echo " <table align=center class=table_border width=60% border=0 cellpadding=0 cellspacing=3>\n";echo " <tr>\n";echo " <td class=table_rows width=20 align=center><img src='../images/icons/cancel.png' /></td><td class=table_rows_red> A valid From Date is required.</td></tr>\n";echo " </table>\n";}}elseif ($calendar_style == "euro") {if (isset($date_regs)) {$from_month = $date_regs[2]; $from_day = $date_regs[1]; $from_year = $date_regs[3];}if ($from_month > 12 || $from_day > 31) {$evil_post = '1';if ($use_reports_password == "yes") {include '../admin/topmain.php';} else {include 'topmain.php';}echo "<table width=100% height=89% border=0 cellpadding=0 cellspacing=1>\n";echo " <tr valign=top>\n";echo " <td>\n";echo " <table width=100% height=100% border=0 cellpadding=10 cellspacing=1>\n";echo " <tr class=right_main_text>\n";echo " <td valign=top>\n";echo " <table align=center class=table_border width=60% border=0 cellpadding=0 cellspacing=3>\n";echo " <tr>\n";echo " <td class=table_rows width=20 align=center><img src='../images/icons/cancel.png' /></td><td class=table_rows_red> A valid From Date is required.</td></tr>\n";echo " </table>\n";
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -