Server IP : 127.0.0.2 / Your IP : 3.148.250.110 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 require_once('include/db-config.php'); $orderby = ""; $orderField = "month"; $ascOrDesc = "ASC"; if (isset($_POST['OrderField']) && isset($_POST['ascOrDesc'])) { $orderField = mysqli_real_escape_string($conn, $_POST['OrderField']); $ascOrDesc = mysqli_real_escape_string($conn, $_POST['ascOrDesc']); $orderby = "ORDER BY " . $orderField . " " . $ascOrDesc; } $sql = "SELECT CreatedDate, home_count, EGMM_count, EGMM_count_direct,PreventiveView_count,DefectView_count,ReliabilityView_count,qualityView_count,LubricationView_count,PlanningView_count FROM maintrainer_page_visits " . $orderby; $result = mysqli_query($conn, $sql); if (!$result) { die("Error fetching visit count report: " . mysqli_error($conn)); } ?> <table border="0" cellpadding="0" cellspacing="0" width="100%" align="center" class="normal_text"> <tr> <td class="tablehead"><strong>Sl#</strong></td> <td class="tablehead" nowrap="nowrap"><strong><a href="#" onClick="javascript:SortTable('CreatedDate');">Date</a></strong></td> <td class="tablehead" nowrap="nowrap"><strong><a href="#" onClick="javascript:SortTable('home_count');">Home</a></strong></td> <td class="tablehead" nowrap><strong><a href="#" onClick="javascript:SortTable('EGMM_count');">EGMM</a></strong></td> <td class="tablehead" nowrap="nowrap"><strong><a href="#" onClick="javascript:SortTable('EGMM_count_direct');">Direct EGMM</a></strong></td> <td class="tablehead" nowrap="nowrap"><strong><a href="#" onClick="javascript:SortTable('PreventiveView_count');">Preventive Maintenance</a></strong></td> <td class="tablehead" nowrap><strong><a href="#" onClick="javascript:SortTable('DefectView_count');">Defect Elimination</a></strong></td> <td class="tablehead" nowrap="nowrap"><strong><a href="#" onClick="javascript:SortTable('ReliabilityView_count');">Reliability and Fundamentals</a></strong></td> <td class="tablehead" nowrap="nowrap"><strong><a href="#" onClick="javascript:SortTable('qualityView_count');">Maintenance quality</a></strong></td> <td class="tablehead" nowrap><strong><a href="#" onClick="javascript:SortTable('LubricationView_count');">Lubrication</a></strong></td> <td class="tablehead" nowrap="nowrap"><strong><a href="#" onClick="javascript:SortTable('PlanningView_count');">Planning Book</a></strong></td> </tr> <?php while ($row = mysqli_fetch_assoc($result)) { $ID = $row['ID']; $visit_date = $row['CreatedDate']; $home_count = $row['home_count'] ? $row['home_count'] : 0; $EGMM_count = $row['EGMM_count']?$row['EGMM_count'] : 0; $EGMM_count_direct = $row['EGMM_count_direct'] ? $row['EGMM_count_direct']:0; $PreventiveView_count = $row['PreventiveView_count'] ? $row['PreventiveView_count']:0; $DefectView_count = $row['DefectView_count'] ? $row['DefectView_count']:0; $ReliabilityView_count = $row['ReliabilityView_count'] ? $row['ReliabilityView_count']:0; $qualityView_count = $row['qualityView_count'] ? $row['qualityView_count']:0; $LubricationView_count =$row['LubricationView_count'] ? $row['LubricationView_count']:0; $PlanningView_count = $row['PlanningView_count'] ? $row['PlanningView_count']:0; ?> <tr class="normal"> <td class="tabletext"><?php echo ++$i; ?></td> <td class="tabletext"><?php echo date('F', strtotime($visit_date)); ?></td> <td class="tabletext"><?php echo $home_count; ?></td> <td class="tabletext"><?php echo $EGMM_count; ?></td> <td class="tabletext"><?php echo $EGMM_count_direct; ?></td> <td class="tabletext"><?php echo $PreventiveView_count; ?></td> <td class="tabletext"><?php echo $DefectView_count; ?></td> <td class="tabletext"><?php echo $ReliabilityView_count; ?></td> <td class="tabletext"><?php echo $qualityView_count; ?></td> <td class="tabletext"><?php echo $LubricationView_count; ?></td> <td class="tabletext"><?php echo $PlanningView_count; ?></td> </tr> <tr><td colspan="11" class="tableline"></td></tr> <?php } ?> <tr><td><br><br></td></tr> </table> <style> .tabletext{ text-align: center; } </style> <?php mysqli_free_result($result); mysqli_close($conn); ?>