Server IP : 127.0.0.2 / Your IP : 3.139.108.138 Web Server : Apache/2.4.18 (Ubuntu) System : User : www-data ( ) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/admin/ |
Upload File : |
<?php ob_start(); session_start(); require_once('session-check.php'); require_once('include/db-config.php'); $sql = "SELECT assigned_month_no, assigned_year, sum(mts_spend) as mts_spend, sum(hrs_spend) as hrs_spend, count(*) as total FROM maintrainer_hrs_worked group by assigned_month_no, assigned_year order by assigned_year desc, assigned_month_no desc"; $result=mysqli_query($conn,$sql); ?> <!DOCTYPE html> <HTML> <HEAD> <TITLE>Joel Levitt, maintenance management, maintenance management consulting, tpms</TITLE> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <link href="css/style.css" type="text/css" rel="stylesheet"> <style type="text/css"> table { color: #FFFFFF; font-family: Arial, Verdana } .normal { background-color: #323232 } .normalActive { background-color:#000000;} </style> </HEAD> <BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0> <!-- ImageReady Slices (maintrainer_slice2.jpg) --> <TABLE WIDTH="100%" BORDER=0 CELLPADDING=0 CELLSPACING=0 align="center"> <?php include_once('include/include_header.php'); ?> <TR> <TD width="100%" align="center"> <table border="0" cellpadding="0" cellspacing="0" width="100%" align="center" class="body_bg" style="border-color:"> <tr> <td class="content_bg" valign="top"> <table border="0" cellpadding="0" cellspacing="0" width="100%" align="center"> <tr> <td style="height:40px;"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td class="mainhead" valign="top" align="left" width="70%"> <?php if(isset($_GET['r'])) if($_GET['r'] == '1') { echo "<font class='success-text'><b>You have successfully inserted new record.</b></font>"; } else if($_GET['r'] == '2') { echo "<font class='success-text'><b>You have successfully updated the details.</b></font>"; } else if($_GET['r'] == '0') { echo "<font class='error-text'><b>You have successfully deleted a record.</b></font>"; } else if($_GET['r'] == '-1') { echo "<font class='error-text'><b>File not Deleted.</b></font>"; } ?> </td> <td align="right" class="other_link" width="30%"><a href="assign-new-task.php"><b>Assign new task</b></a></td> </tr> <tr><td height="10"></td></tr> </table> </td> </tr> <?php while($row=mysqli_fetch_array($result)) { $assigned_month_no = $row['assigned_month_no']; $assigned_year = $row['assigned_year']; $hrs_spend = $row['hrs_spend'] * 60; $mts_spend = $row['mts_spend'] + $hrs_spend; //$hrs_spend = $row['hrs_spend']; //$mts_spend = $row['mts_spend']; $total = $row['total']; $month_name = ""; if($assigned_month_no == "1") $month_name = "January"; else if($assigned_month_no == "2") $month_name = "February"; else if($assigned_month_no == "3") $month_name = "March"; else if($assigned_month_no == "4") $month_name = "April"; else if($assigned_month_no == "5") $month_name = "May"; else if($assigned_month_no == "6") $month_name = "June"; else if($assigned_month_no == "7") $month_name = "July"; else if($assigned_month_no == "8") $month_name = "August"; else if($assigned_month_no == "9") $month_name = "September"; else if($assigned_month_no == "10") $month_name = "October"; else if($assigned_month_no == "11") $month_name = "November"; else if($assigned_month_no == "12") $month_name = "December"; $mts = 0; $hrs = 0; $mts = $mts_spend%60; //echo "mts = ".$mts; $hrs = (int)($mts_spend - $mts) / 60; //echo " hrs = ".$hrs; ?> <tr> <td> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td class="mainhead" valign="top" align="left" width="50%"><?php echo $month_name." ".$assigned_year; ?></td> <td align="right" class="normal_text" width="50%">Total completed and assigned Task: <?php echo number_format($hrs,0)." Hrs : ".$mts." Mts."; ?></td> </tr> <tr><td height="10"></td></tr> </table> <table border="0" cellpadding="0" cellspacing="0" width="100%" align="center" class="normal_text"> <tr> <td class="tablehead" width="5%"><strong>Sl#</strong></td> <td class="tablehead" width="5%"><strong>Priority</strong></td> <td class="tablehead" width="10%" nowrap><strong>Status</strong></td> <td class="tablehead" width="30%" nowrap="nowrap"><strong>Client Message</strong></td> <td class="tablehead" width="25%" nowrap><strong>Developer Note</strong></td> <td class="tablehead" width="15%" nowrap><strong>Hrs Worked/Expected</strong></td> <td class="tablehead" width="10%" align="right"><strong>Options</strong></td> </tr> <?php $sql2="SELECT hrs_worked_id, task_details, hrs_spend, mts_spend, work_status, developer_note, PriorityLevel FROM maintrainer_hrs_worked where assigned_year = ".$assigned_year." and assigned_month_no = ".$assigned_month_no." order by PriorityLevel"; $result2=mysqli_query($conn,$sql2); $i=0; while($row2=mysqli_fetch_array($result2)) { $hrs_worked_id = $row2['hrs_worked_id']; $task_details = $row2['task_details']; $hrs_spend = $row2['hrs_spend']; $mts_spend = $row2['mts_spend']; $work_status = $row2['work_status']; $developer_note = $row2['developer_note']; $PriorityLevel = $row2['PriorityLevel']; if($PriorityLevel == "1") $PriorityLevel = "Critical"; else if($PriorityLevel == "2") $PriorityLevel = "High"; else if($PriorityLevel == "3") $PriorityLevel = "Medium"; else if($PriorityLevel == "4") $PriorityLevel = "Low"; else $PriorityLevel = ""; ?> <tr onMouseOver="this.className='normalActive'" onMouseOut="this.className='normal'" class="normal"> <td class="tabletext" valign="top" <?php if($work_status == "Completed") { ?>style="background-color: #4AA02C; color:black"<?php } ?>><?php echo ++$i;?></td> <td class="tabletext" valign="top" <?php if($work_status == "Completed") { ?>style="background-color: #4AA02C; color:black"<?php } ?>><?php echo $PriorityLevel;?></td> <td class="tabletext" valign="top" <?php if($work_status == "Completed") { ?>style="background-color: #4AA02C; color:black"<?php } ?>><?php echo $work_status;?></td> <td class="tabletext" valign="top" <?php if($work_status == "Completed") { ?>style="background-color: #4AA02C; color:black"<?php } ?>><?php echo $task_details; ?></td> <td class="tabletext" valign="top" <?php if($work_status == "Completed") { ?>style="background-color: #4AA02C; color:black"<?php } ?>><font class="duplicate"><?php echo $developer_note;?></font></td> <td class="tabletext" valign="top" <?php if($work_status == "Completed") { ?>style="background-color: #4AA02C; color:black"<?php } ?>><?php echo $hrs_spend.":".$mts_spend;?> </td> <td align="right" class="edit-del-link" valign="top" <?php if($work_status == "Completed") { ?>style="background-color: #4AA02C; color:black"<?php } ?>> <?php //if($work_status != "Completed") { ?> <a href="hrs_worked-edit.php?id=<?php echo $hrs_worked_id; ?>">edit</a> | <a onClick="return confirm('Are you sure you want to delete?')" href="hrs_worked-delete.php?id=<?php echo $hrs_worked_id ;?>">delete</a> <?php //} ?> </td> </tr> <tr><td colspan="9" class="tableline"></td></tr> <?php } ?> <tr><td height="50"></td></tr> </table> </td> </tr> <?php } ?> </table> </td> </tr> </table> </TD> </TR> <?php include_once('include/include_footer.php'); ?> </TABLE> <!-- End ImageReady Slices --> </BODY> </HTML>