Server IP : 108.163.255.210 / Your IP : 3.15.186.27 Web Server : Apache System : Linux blossom.urlnameserver.com 3.10.0-1160.80.1.el7.x86_64 #1 SMP Tue Nov 8 15:48:59 UTC 2022 x86_64 User : ( 1172) PHP Version : 7.2.34 Disable Function : eval,escapeshellarg,proc_close,proc_get_status,proc_nice,proc_open,symlink,system,pcntl_exec,getrusage,chown,chgp,closelog,openlog,syslog,define_syslog_variables,php_ini_loaded_file,getservbyname,getservbyport,posix_getgid,posix_getgrgid,proc_terminate,pfsockopen,apache_child_terminate,posix_mkfifo,posix_setpgid,posix_setuid,hypot,pg_host,pos,posix_access,posix_getcwd,posix_getservbyname,myshellexec,getpid,posix_getsid,posix_isatty,posix_kill,posix_mknod,posix_setgid,posix_setsid,posix_setuid,posix_times,posix_uname,ps_fill,posix_getpwuid,global,ini_restore,zip_open,zip_read,rar_open,bzopen,bzread,bzwrite,apache_get_modules,apache_get_version,phpversionphpinfo,php_ini_scanned_files,get_current_user,disk_total_space,diskfreespace,leak,imap_list,hypo,filedump,safe_mode,getmygid,apache_getenv,apache_setenv,bzread,bzwrite,bzopen,phpini,higlight_file,dos_conv,get_cwd,er_log,cmd,e_name,vdir,get_dir,only_read,ftok,ftpexec,posix_getpwnam,mysql_list_dbs,disk_free_space,session_save_path,confirm_phpdoc_compiled,zip_entry_rea,php_u,psockopen,crack_opendict,crack_getlastmessage,crack_closedict,crack_check,fpassthru,posix_get_last_error,posix_getlogin,posix_getgroups,posix_strerror,posix_getrlimit,posix_getpgrp,posix_getgrnam,pos,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/unilinki/public_html/payroll/admin/ |
Upload File : |
<?php session_start(); //check if user i slogin or not. If the user is not login redirect it to login.php if(!isset($_SESSION["adminuser"]) || $_SESSION["adminuser"]=="") { header("Location:login.php"); exit; } if ($_SESSION['role_id']=="2" || $_SESSION['role_id']=="3" || $_SESSION['role_id']=="4" || $_SESSION['role_id']=="5"){ echo "<script>window.location='../index.php' </script>"; exit(); } //require database connection file and it's supporting file. require_once("../include/db.php"); $obj=new query_execution(); $uid=md5(uniqid(rand())); if($_POST) { if( count($_POST['ids']) > 0) { $strDelIds = implode(",",$_POST['ids']); // Make a user's Staus Active inactive if($_POST['Submit'] == 'Active') { $sqlChk = " select admin_id from admin where admin_id in ($strDelIds) and status= 'no' "; $isInactive = getSingleResult($sqlChk); if($isInactive == '') { $_SESSION['sess_msg'] = " Selected User(s) are already active "; } else { $sqlA = " update admin set status = 'yes' where admin_id in ($strDelIds) "; executeQuery($sqlA); $_SESSION['sess_msg'] = " Action Performed Successfully On Selected Records "; } } if($_POST['Submit'] == 'Inactive') { $sqlChk = " select admin_id from admin where admin_id in ($strDelIds) and status = 'yes' "; $isInactive = getSingleResult($sqlChk); if($isInactive == '') { $_SESSION['sess_msg'] = " Selected User(s) are already inactive "; } else { $sqlI = " update admin set status='no' where admin_id in ($strDelIds) "; executeQuery($sqlI); $_SESSION['sess_msg'] = " Action Performed Successfully On Selected Records "; } } //Delete a User or users if($_POST['Submit'] == 'Delete') { $chkdel=$_POST["ids"]; for($k=0;$k<count($chkdel);$k++){ if($obj->execute("delete from admin where admin_id='$chkdel[$k] '")) { } $_SESSION['sess_msg'] = " Selected User(s) Deleted Successfully "; } } ?> <script language="javascript"> // location.href="manage_user.php?page=<?php echo $_REQUEST['page']?>&uid=<?php echo $uid?>"; </script> <?php } else { //$_SESSION['sess_msg'] = " Please select at least one check box to perform desired action. "; } } $sort = $_GET['sort']; $sortby = $_GET['sortby']; $tableName="`cl-pl_data`"; $targetpage = "pl_report.php"; $limit = 30; $query = "SELECT COUNT(*) as num FROM $tableName"; $total_pages = mysql_fetch_array(mysql_query($query)) or die(mysql_error()); $total_pages = $total_pages[num]; $stages = 3; $page = mysql_escape_string($_GET['page']); if($page){ $start = ($page - 1) * $limit; }else{ $start = 0; } if($_POST['Month']=="Month wise") { $date112="where `pf`='".$_POST['pf']."'"; } // Get page data if($sort == '') { $query1 = "SELECT * FROM $tableName $date112 ORDER BY sno DESC "; } else { $query1 = "SELECT * FROM $tableName $date112 ORDER BY $sortby $sort LIMIT $start, $limit "; } $rs_sql = mysql_query($query1) or die("error1".mysql_error()); $tot_sql=mysql_num_rows($rs_sql); // Initial page num setup if ($page == 0){$page = 1;} $prev = $page - 1; $next = $page + 1; $lastpage = ceil($total_pages/$limit); $LastPagem1 = $lastpage - 1; $paginate = ''; if($lastpage > 1) { $paginate .= "<div class='paginate'>"; // Previous if ($page > 1){ $paginate.= "<a href='$targetpage?page=$prev&uid=".$uid."'>Previous</a>"; }else{ $paginate.= "<span class='disabled'>Previous</span>"; } // Pages if ($lastpage < 7 + ($stages * 2)) // Not enough pages to breaking it up { for ($counter = 1; $counter <= $lastpage; $counter++) { $_SESSION['counter']=$counter; if ($counter == $page){ $paginate.= "<span class='current'>$counter</span>"; }else{ $paginate.= "<a href='$targetpage?page=$counter&uid=".$uid."'>$counter</a>";} } } elseif($lastpage > 5 + ($stages * 2)) // Enough pages to hide a few? { // Beginning only hide later pages if($page < 1 + ($stages * 2)) { for ($counter = 1; $counter < 4 + ($stages * 2); $counter++) { if ($counter == $page){ $paginate.= "<span class='current'>$counter</span>"; }else{ $paginate.= "<a href='$targetpage?page=$counter&uid=".$uid."'>$counter</a>";} } $paginate.= "..."; $paginate.= "<a href='$targetpage?page=$LastPagem1&uid=".$uid."'>$LastPagem1</a>"; $paginate.= "<a href='$targetpage?page=$lastpage&uid=".$uid."'>$lastpage</a>"; } // Middle hide some front and some back elseif($lastpage - ($stages * 2) > $page && $page > ($stages * 2)) { $paginate.= "<a href='$targetpage?page=1&uid=".$uid."&view=yes'>1</a>"; $paginate.= "<a href='$targetpage?page=2&uid=".$uid."&view=yes'>2</a>"; $paginate.= "..."; for ($counter = $page - $stages; $counter <= $page + $stages; $counter++) { if ($counter == $page){ $paginate.= "<span class='current'>$counter</span>"; }else{ $paginate.= "<a href='$targetpage?page=$counter&uid=".$uid."'>$counter</a>";} } $paginate.= "..."; $paginate.= "<a href='$targetpage?page=$LastPagem1&uid=".$uid."'>$LastPagem1</a>"; $paginate.= "<a href='$targetpage?page=$lastpage&uid=".$uid."'>$lastpage</a>"; } // End only hide early pages else { $paginate.= "<a href='$targetpage?page=1&uid=".$uid."'>1</a>"; $paginate.= "<a href='$targetpage?page=2&uid=".$uid."'>2</a>"; $paginate.= "..."; for ($counter = $lastpage - (2 + ($stages * 2)); $counter <= $lastpage; $counter++) { if ($counter == $page){ $paginate.= "<span class='current'>$counter</span>"; }else{ $paginate.= "<a href='$targetpage?page=$counter&uid=".$uid."'>$counter</a>";} } } } // Next if ($page < $counter - 1){ $paginate.= "<a href='$targetpage?page=$next&uid=".$uid."'>Next</a>"; }else{ $paginate.= "<span class='disabled'>Next</span>"; } $paginate.= "</div>"; } require_once("header.php"); ?> <script language="JavaScript"> function checkall(objForm) { //alert(objForm); len = objForm.elements.length; var i=0; for( i=0 ; i<len ; i++) { if (objForm.elements[i].type=='checkbox') objForm.elements[i].checked=objForm.check_all.checked; } } function del_prompt(comb) { if(comb=='Delete') { if(confirm ("Are you sure you want to delete Record(s)")) { document.frm_del.submit(); } else { return false; } } } </script> <script> $(function() { $( "#datepicker" ).datepicker(); }); </script> <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"> <script src="//code.jquery.com/jquery-1.10.2.js"></script> <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script> <link rel="stylesheet" href="/resources/demos/style.css"> <script type="text/javascript"> // When the document is ready $(document).ready(function () { $('#startDate').datepicker({ format: "mm/yyyy", viewMode: "months", minViewMode: "months" }); }); </script> <!----header ends--> <!-- Left side column. contains the logo and sidebar --> <?php require_once("left.php"); ?> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> <h1>PL Report</h1> <ol class="breadcrumb"> <li><a href="dashboard.php"><i class="fa fa-dashboard"></i> Home</a></li> <li class="active">PL Report<li> </ol> </section> <!-- Main content --> <section class="content"> <div class="row"> <div class="col-xs-12"> <div class="box"> <div class="box-header"> <h3 class="box-title">View</h3> </div><!-- /.box-header --> <div class="box-body"> <form name="" action="" method="post"> <table class="table table-bordered table-hover"> <tr> <td> <input type="text" name="pf" placeholder="Enter PF Number" class="form-control" required /></td> <td><input type="submit" name="Month" value="Month wise" class="btn btn-info pull-left" /></td> </tr> </table> </form> </div> <div class="box-body"> <form name="frm_del" method="post" > <table id="example1" class="table table-bordered table-hover"> <thead> <?php if($_SESSION['sess_msg'] != ''){?> <tr align="center" bgcolor="#FF000"> <td height="25" colspan="12" class="blue_txt"><?php echo $_SESSION['sess_msg']; $_SESSION['sess_msg'] = '';?></td> </tr> <?php }elseif($_REQUEST['action']=='add'){ ?> <tr align="center" bgcolor="#00FFFF"> <td height="25" colspan="12" class="blue_txt"><?php echo "User Added Successfully"; ?></td> </tr> <?php }elseif($_REQUEST['action']=='notadd'){ ?> <tr align="center" bgcolor="#FF000"> <td height="25" colspan="12" class="blue_txt"><?php echo "User Not Added"; ?></td> </tr> <?php }elseif($_REQUEST['action']=='duplicate'){ ?> <tr align="center" bgcolor="#FF000"> <td height="25" colspan="12" class="blue_txt"><?php echo "Duplicate User" ;?></td> </tr> <?php }elseif($_REQUEST['action']=='update'){ ?> <tr align="center" bgcolor="#00FFFF"> <td height="25" colspan="12" class="blue_txt"><?php echo "User updated Successfully" ;?></td> </tr> <?php }elseif($_REQUEST['action']=='notupdate'){ ?> <tr align="center" bgcolor="#FF000"> <td height="25" colspan="12" class="blue_txt"><?php echo "User not Update" ;?></td> </tr> <?php }?> <?php $select_emp=mysql_query("select name,company,d_o_j from employee where pf='".$_POST['pf']."'"); $se=mysql_fetch_array($select_emp);?> <tr> <th>Name- <?php echo $se['name']; ?></th> <th>DOJ-(<?php echo $se['d_o_j']; ?>) Location-(<?php echo $se['company']; ?>)</th> </tr> <tr> <th>Year</th> <th>CL (Avalable)</th> </tr> </thead> <?php if($tot_sql != 0){ ?> <tbody> <?php $select_fix_data=mysql_query("select * from fix_cl_pl_data where uid='".$_POST['pf']."' && type='pl'"); while($line_fix=mysql_fetch_array($select_fix_data)) { ?> <tr> <td><?php echo $line_fix['month']; ?></td> <td><?php echo $line_fix['number']; ?></td> </tr> <?php }?> <?php $sel=mysql_query("select `pl` from `cl-pl_data` where `pf`='".$_POST['pf']."'"); $sl=mysql_fetch_array($sel); $start = $month = strtotime('2016/09/01')."<br>"; $end = strtotime(date('Y/m/01')); while($month <= $end) { $cl_pl_data_aug1="08/2016"; $cl_pl_data_aug="2016-08-01"; $date_var=date('27/m/Y', $month); $date_var_new=date('m/Y', $month); $date_new = str_replace('/', '-', $date_var); $con_date=strtotime($date_new); $startTimeStamp = strtotime($cl_pl_data_aug); $endTimeStamp = $con_date; $timeDiff = abs($endTimeStamp - $startTimeStamp); $numberDays = $timeDiff/86400; $numberDays = intval($numberDays); $tot_cl_days =round($numberDays/24); $select_leave_mng=mysql_query("select * from leave_management where uid='".$_POST['pf']."' && type='PL' && `month`='$date_var_new'"); $slm=mysql_fetch_array($select_leave_mng); $leave_array[]=$slm['number']; $sum= array_sum($leave_array); ?> <tr> <td><?php echo date('m/Y', $month), PHP_EOL; ?></td> <td><?php echo $tot_cl_days+$sl['pl']-$sum;?></td> </tr> <?Php $month = strtotime("+1 month", $month);} ?> </tbody> <?php }else{?> <tbody> <tr align="center"> <td colspan="8">Sorry, currently there are no <span class="white_bold_big">Record </span> present.</td> </tr> </tbody> <?php }?> </tfoot> </table> </form> </div><!-- /.box-body --> </div><!-- /.box --> </div><!-- /.col --> </div><!-- /.row --> </section><!-- /.content --> </div><!-- /.content-wrapper --> <?php require_once("footer.php"); ?>