| Server IP : 104.21.80.248 / Your IP : 172.71.28.156 Web Server : Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30 System : Windows NT WIN-ECQAAA40806 6.2 build 9200 (Windows Server 2012 Standard Edition) i586 User : SYSTEM ( 0) PHP Version : 5.6.30 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Inetpub/www/news/ |
Upload File : |
<?php session_start();
ob_start();
include("header.php");
include("db.php");
$id = $mysqli->escape_string($_GET['id']);
$edit = $mysqli->query("SELECT * FROM users WHERE id='$id'");
$row = mysqli_fetch_array($edit);
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Register</title>
<link href="bootstrap2/css/bootstrap.min.css" rel="stylesheet">
<link href="bootstrap2/css/style.css" rel="stylesheet" >
<link href="bootstrap2/icon/css/font-awesome.min.css" rel="stylesheet" >
<script src="bootstrap2/js/jquery.min.js"></script>
<script src="bootstrap2/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="bootstrap2/fonts/thsarabunnew.css" />
<style type="text/css">
body { font-family: 'THSarabunNew', sans-serif; }
<!--
#Layer1 {
position:absolute;
left:25px;
top:10px;
width:100px;
height:99px;
z-index:1;
}
-->
</style>
</head>
<body>
<?php
// Create the function, so you can use it
function isMobile() {
return preg_match("/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i", $_SERVER["HTTP_USER_AGENT"]);
}
// If the user is on a mobile device, redirect them
if(isMobile()) {} else {
echo "<div id='Layer1'><a href='index.php'><img src='images/logo.png'></a></div>";
}
?>
<?php if(!isset($_SESSION['username'])){?>
<?php
echo "<script language=javascript>alert('คุณยังไม่ได้เข้าระบบ');</script>";
echo "<script>window.parent.location=\"index.php\"</script>";
?>
<?php }else{ ?>
<div class="panel panel-info">
<div class="panel-heading"><b>แก้ไขข้อมูล </b></div>
<div class="panel-body">
<div class="col-xs-12">
<div class="row"><br></div>
<form action="edit_user_save.php?id=<?php echo $id ;?>" method="post" name="register" >
<div class="row">
<div class="form-group">
<div class="col-xs-2" align="right">
<label class="control-label" align="right">รหัสผ่าน:</label>
</div>
<div class="col-xs-8">
<input class="form-control col-sm-8" type="password" name="password" >
</div>
</div>
</div> <div class="row"><br></div>
<div class="row">
<div class="form-group">
<div class="col-xs-2" align="right">
<label class="control-label" align="right">ชื่อ-สกุล:</label>
</div>
<div class="col-xs-8">
<input class="form-control col-sm-8" name="name" type="input" value="<?php echo $row['name'];?>" >
</div>
</div>
</div>
<div class="row"><br></div>
<div class="modal-footer">
<button type="button" onclick="goBack()" class="btn btn-default pull-left" data-dismiss="modal">ยกเลิก</button>
<button type="submit" onclick=" $('#detail').val($('.Editor-editor').php());" class="btn btn-success">บันทึก</button>
</div>
<script>
function goBack() {
window.history.back();
}
</script>
</form>
</div>
</div>
</div>
<?php } ?>
</body>
</html>