⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 total_hours.php

📁 网页打卡钟系统,源码提供给大家学习一下啦!希望给大家带来帮助
💻 PHP
📖 第 1 页 / 共 5 页
字号:
}if ($tmp_round_time == '3') {echo "              <tr><td class=table_rows align=left nowrap style='padding-left:15px;'><input type='radio' name='tmp_round_time' value='3'                       checked>&nbsp;To the nearest 15 minutes (1/4th of an hour)</td></tr>\n";} else {echo "              <tr><td class=table_rows align=left nowrap style='padding-left:15px;'><input type='radio' name='tmp_round_time' value='3'>&nbsp;To                       the nearest 15 minutes (1/4th of an hour)</td></tr>\n";}if ($tmp_round_time == '4') {echo "              <tr><td class=table_rows align=left nowrap style='padding-left:15px;'><input type='radio' name='tmp_round_time' value='4'                       checked>&nbsp;To the nearest 20 minutes (1/3rd of an hour)</td></tr>\n";} else {echo "              <tr><td class=table_rows align=left nowrap style='padding-left:15px;'><input type='radio' name='tmp_round_time' value='4'>&nbsp;To                       the nearest 20 minutes (1/3rd of an hour)</td></tr>\n";}if ($tmp_round_time == '5') {echo "              <tr><td class=table_rows align=left nowrap style='padding-left:15px;'><input type='radio' name='tmp_round_time' value='5'                       checked>&nbsp;To the nearest 30 minutes (1/2 of an hour)</td></tr>\n";} else {echo "              <tr><td class=table_rows align=left nowrap style='padding-left:15px;'><input type='radio' name='tmp_round_time' value='5'>&nbsp;To                       the nearest 30 minutes (1/2 of an hour)</td></tr>\n";}if (empty($tmp_round_time)) {echo "              <tr><td class=table_rows align=left nowrap style='padding-left:15px;'><input type='radio' name='tmp_round_time' value=0 checked>&nbsp;Do                       not round</td></tr>\n";} else {echo "              <tr><td class=table_rows align=left nowrap style='padding-left:15px;'><input type='radio' name='tmp_round_time' value=0>&nbsp;Do not                      round</td></tr>\n";}echo "              <tr><td height=10></td></tr>\n";echo "            </table>\n";echo "            <table align=center width=60% border=0 cellpadding=0 cellspacing=3>\n";echo "              <tr><td width=30><input type='image' name='submit' value='Edit Time' align='middle'                      src='../images/buttons/next_button.png'></td><td><a href='timeadmin.php'><img src='../images/buttons/cancel_button.png'                      border='0'></td></tr></table></form></td></tr>\n"; include '../footer.php'; exit;}// end post validation //if (!empty($from_date)) {    $from_date = "$from_month/$from_day/$from_year";    $from_timestamp = strtotime($from_date . " " . $report_start_time) - $tzo;    $from_date = $_POST['from_date'];}if (!empty($to_date)) {    $to_date = "$to_month/$to_day/$to_year";    $to_timestamp = strtotime($to_date . " " . $report_end_time) - $tzo + 60;    $to_date = $_POST['to_date'];}//if (!empty($from_date)) {$from_timestamp = strtotime($from_date . " " . $report_start_time) - $tzo;}//if (!empty($from_date)) {$to_timestamp = strtotime($to_date . " " . $report_end_time) - $tzo + 60;}//if (!empty($from_date)) {$from_timestamp = strtotime($from_date) - @$tzo;}//if (!empty($to_date)) {$to_timestamp = strtotime($to_date) + 86400 - @$tzo;}$rpt_hour = gmdate('H');$rpt_min = gmdate('i');$rpt_sec = gmdate('s');$rpt_month = gmdate('m');$rpt_day = gmdate('d');$rpt_year = gmdate('Y');$rpt_stamp = mktime ($rpt_hour, $rpt_min, $rpt_sec, $rpt_month, $rpt_day, $rpt_year);$rpt_stamp = $rpt_stamp + @$tzo;$rpt_time = date($timefmt, $rpt_stamp);$rpt_date = date($datefmt, $rpt_stamp);$tmp_fullname = stripslashes($fullname);if ((strtolower($user_or_display) == "display") && ($tmp_fullname != "All")) {$tmp_fullname = stripslashes($displayname);}if (($office_name == "All") && ($group_name == "All") && ($tmp_fullname == 'All')) {$tmp_fullname = "Offices: All --> Groups: All --> Users: All";}elseif ((empty($office_name)) && (empty($group_name)) && ($tmp_fullname == 'All'))  {$tmp_fullname = "All Users";} elseif ((empty($office_name)) && (empty($group_name)) && ($tmp_fullname != 'All'))  {$tmp_fullname = $tmp_fullname;} elseif (($office_name != "All") && ($group_name == "All") && ($tmp_fullname == 'All')) {$tmp_fullname = "Office: $office_name --> Groups: All -->  Users: All";}elseif (($office_name != "All") && ($group_name != "All") && ($tmp_fullname == 'All')) {$tmp_fullname = "Office: $office_name --> Group: $group_name -->  Users: All";}$rpt_name="$tmp_fullname";echo "<table width=80% align=center class=misc_items border=0 cellpadding=3 cellspacing=0>\n";echo "  <tr><td width=80% style='font-size:9px;color:#000000;'>Run on: $rpt_time, $rpt_date</td><td nowrap style='font-size:9px;color:#000000;'>          $rpt_name</td></tr>\n";echo "  <tr><td width=80%></td><td nowrap style='font-size:9px;color:#000000;'>Date Range: $from_date - $to_date</td></tr>\n";if (!empty($tmp_csv)) {  echo "               <tr class=notprint><td width=80%></td><td nowrap style='font-size:9px;color:#000000;'><a style='color:#27408b;font-size:9px;                         text-decoration:underline;'                         href=\"get_csv.php?rpt=hrs_wkd&display_ip=$tmp_display_ip&csv=$tmp_csv&office=$office_name&group=$group_name&fullname=$fullname&from=$from_timestamp&to=$to_timestamp&tzo=$tzo&paginate=$tmp_paginate&round=$tmp_round_time&details=$tmp_show_details&rpt_run_on=$rpt_stamp&rpt_date=$rpt_date&from_date=$from_date\">Download CSV File</a></td></tr>\n";}echo "</table>\n";echo "<table width=80% align=center class=misc_items border=0 cellpadding=3 cellspacing=0>\n";$employees_cnt = 0;$employees_empfullname = array();$employees_displayname = array();$info_cnt = 0;$info_fullname = array();$info_inout = array();$info_timestamp = array();$info_notes = array();$info_date = array();$x_info_date = array();$info_start_time = array();$info_end_time = array();$punchlist_in_or_out = array();$punchlist_punchitems = array();$secs = 0;$total_hours = 0;$row_count = 0;$page_count = 0;$punch_cnt = 0;$tmp_z = 0;// retrieve a list of users //$fullname = addslashes($fullname);if (strtolower($user_or_display) == "display") {    if (($office_name == "All") && ($group_name == "All") && ($fullname == "All")) {        $query = "select empfullname, displayname from ".$db_prefix."employees WHERE tstamp IS NOT NULL and empfullname <> 'admin'                  order by displayname asc";        $result = mysql_query($query);    } elseif ((empty($office_name)) && (empty($group_name)) && ($fullname == 'All')) {        $query = "select empfullname, displayname from ".$db_prefix."employees WHERE tstamp IS NOT NULL and empfullname <> 'admin'                  order by displayname asc";        $result = mysql_query($query);    } elseif ((empty($office_name)) && (empty($group_name)) && ($fullname != 'All')) {        $query = "select empfullname, displayname from ".$db_prefix."employees WHERE tstamp IS NOT NULL and empfullname = '".$fullname."'                   and empfullname <> 'admin' order by displayname asc";        $result = mysql_query($query);    } elseif (($office_name != "All") && ($group_name == "All") && ($fullname == "All")) {        $query = "select empfullname, displayname from ".$db_prefix."employees where office = '".$office_name."' and tstamp IS NOT NULL                   and empfullname <> 'admin' order by displayname asc";        $result = mysql_query($query);    } elseif (($office_name != "All") && ($group_name != "All") && ($fullname == "All")) {        $query = "select empfullname, displayname from ".$db_prefix."employees where office = '".$office_name."' and groups = '".$group_name."'                   and tstamp IS NOT NULL and empfullname <> 'admin' order by displayname asc";        $result = mysql_query($query);    } elseif (($office_name != "All") && ($group_name != "All") && ($fullname != "All")) {        $query = "select empfullname, displayname from ".$db_prefix."employees where office = '".$office_name."' and groups = '".$group_name."'                   and empfullname = '".$fullname."' and empfullname <> 'admin' and tstamp IS NOT NULL order by displayname asc";        $result = mysql_query($query);    }} else {    if (($office_name == "All") && ($group_name == "All") && ($fullname == "All")) {        $query = "select empfullname, displayname from ".$db_prefix."employees WHERE tstamp IS NOT NULL and empfullname <> 'admin'                   order by empfullname asc";        $result = mysql_query($query);    } elseif ((empty($office_name)) && (empty($group_name)) && ($fullname == 'All')) {        $query = "select empfullname, displayname from ".$db_prefix."employees WHERE tstamp IS NOT NULL and empfullname <> 'admin'                  order by empfullname asc";         $result = mysql_query($query);    } elseif ((empty($office_name)) && (empty($group_name)) && ($fullname != 'All')) {        $query = "select empfullname, displayname from ".$db_prefix."employees WHERE tstamp IS NOT NULL and empfullname = '".$fullname."'                   and empfullname <> 'admin' order by empfullname asc";        $result = mysql_query($query);    } elseif (($office_name != "All") && ($group_name == "All") && ($fullname == "All")) {        $query = "select empfullname, displayname from ".$db_prefix."employees where office = '".$office_name."' and tstamp IS NOT NULL                   and empfullname <> 'admin' order by empfullname asc";        $result = mysql_query($query);    } elseif (($office_name != "All") && ($group_name != "All") && ($fullname == "All")) {        $query = "select empfullname, displayname from ".$db_prefix."employees where office = '".$office_name."' and groups = '".$group_name."'                   and tstamp IS NOT NULL and empfullname <> 'admin' order by empfullname asc";        $result = mysql_query($query);    } elseif (($office_name != "All") && ($group_name != "All") && ($fullname != "All")) {        $query = "select empfullname, displayname from ".$db_prefix."employees where office = '".$office_name."' and groups = '".$group_name."'                   and empfullname = '".$fullname."' and empfullname <> 'admin' and tstamp IS NOT NULL order by empfullname asc";        $result = mysql_query($query);    }}while ($row=mysql_fetch_array($result)) {  $employees_empfullname[] = stripslashes("".$row['empfullname']."");  $employees_displayname[] = stripslashes("".$row['displayname']."");  $employees_cnt++;}for ($x=0;$x<$employees_cnt;$x++) {    $fullname = stripslashes($fullname);    if (($employees_empfullname[$x] == $fullname) || ($fullname == "All")) {    if (strtolower($user_or_display) == "display") {        echo "  <tr><td width=100% colspan=2 style=\"font-size:11px;color:#000000;border-style:solid;border-color:#888888;          border-width:0px 0px 1px 0px;\"><b>$employees_displayname[$x]</b></td></tr>\n";    } else {       echo "  <tr><td width=100% colspan=2 style=\"font-size:11px;color:#000000;border-style:solid;border-color:#888888;          border-width:0px 0px 1px 0px;\"><b>$employees_empfullname[$x]</b></td></tr>\n";    }    echo "  <tr><td width=75% nowrap align=left style='color:#27408b;'><b><u>Date</u></b></td>\n";    echo "      <td width=25% nowrap align=left style='color:#27408b;'><b><u>Hours Worked</u></b></td></tr>\n";    $row_color = $color2; // Initial row color

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -