ok
Direktori : /home/importfo/public_html/physiocarephysiotherapy.co.in/admin/ |
Current File : /home/importfo/public_html/physiocarephysiotherapy.co.in/admin/editprofile.php |
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content="A fully featured admin theme which can be used to build CRM, CMS, etc."> <meta name="author" content="Coderthemes"> <link rel="shortcut icon" href="images/favicon_1.ico"> <title>Admin | Edit Profile</title> <!-- Base Css Files --> <link href="css/bootstrap.min.css" rel="stylesheet" /> <!-- Font Icons --> <link href="assets/font-awesome/css/font-awesome.min.css" rel="stylesheet" /> <link href="assets/ionicon/css/ionicons.min.css" rel="stylesheet" /> <link href="css/material-design-iconic-font.min.css" rel="stylesheet"> <!-- animate css --> <link href="css/animate.css" rel="stylesheet" /> <!-- Waves-effect --> <link href="css/waves-effect.css" rel="stylesheet"> <!-- Custom Files --> <link href="css/helper.css" rel="stylesheet" type="text/css" /> <link href="css/style.css" rel="stylesheet" type="text/css" /> <script src="js/modernizr.min.js"></script> <link href="assets/datatables/jquery.dataTables.min.css" rel="stylesheet" type="text/css" /> </head> <body class="fixed-left"> <!-- Begin page --> <div id="wrapper"> <!-- Top Bar Start --> <?php include("top.php"); ?> <!-- Top Bar End --> <!-- ========== Left Sidebar Start ========== --> <?php include("sidebar.php"); ?> <!-- Left Sidebar End --> <?php if(isset($_GET['edit'])) { $edit=$_GET['edit']; $sql="select * from admin where id='$edit'"; $res=mysqli_query($db,$sql); $row=mysqli_fetch_array($res); $img=$row['image']; } else { $edit=0; } ?> <!-- ============================================================== --> <!-- Start right Content here --> <!-- ============================================================== --> <div class="content-page"> <!-- Start content --> <div class="content"> <div class="container"> <!-- Page-Title --> <div class="row"> <div class="col-sm-12"> <h4 class="pull-left page-title">Edit Profile</h4> <ol class="breadcrumb pull-right"> <li><a href="dashboard.php">Dashboard</a></li> <li class="active">Edit Profile</li> </ol> </div> </div> <form class="form-horizontal" role="form" method="post" enctype="multipart/form-data"> <div class="row"> <div class="col-sm-12"> <div class="panel panel-default"> <div class="panel-heading"><h3 class="panel-title">PERSONAL INFORMATION</h3></div> <div class="panel-body"> <div class="form-group"> <label class="col-md-2 control-label">Full Name</label> <div class="col-md-10"> <input type="text" name="fname" class="form-control" value="<?php echo $row['name']; ?>"> </div> </div> <div class="form-group"> <label class="col-md-2 control-label">Mobile No</label> <div class="col-md-10"> <input type="text" name="contact" class="form-control" value="<?php echo $row['contact']; ?>"> </div> </div> <div class="form-group"> <label class="col-md-2 control-label">Email</label> <div class="col-md-10"> <input type="text" readonly="" name="email" class="form-control" value="<?php echo $row['email']; ?>"> </div> </div> <div class="form-group"> <label class="col-md-2 control-label">Location</label> <div class="col-md-10"> <input type="text" name="location" class="form-control" value="<?php echo $row['location']; ?>"> </div> </div> </div> <!-- panel-body --> </div> <!-- panel --> </div> <!-- col --> </div> <!-- End row --> <div class="row"> <div class="col-sm-12"> <div class="panel panel-default"> <div class="panel-heading"><h3 class="panel-title">ABOUT COMPANY</h3></div> <div class="panel-body"> <div class="form-group"> <label class="col-md-2 control-label">Description</label> <div class="col-md-10"> <textarea class="form-control" name="desc1" rows="9"><?php echo $row['desc']; ?></textarea> </div> </div> </div> <!-- panel-body --> </div> <!-- panel --> </div> <!-- col --> </div> <!-- End row --> <div class="row"> <div class="col-sm-12"> <div class="panel panel-default"> <div class="panel-heading"><h3 class="panel-title">UPLOAD PROFILE IMAGE</h3></div> <div class="panel-body"> <div class="form-group"> <label class="col-md-2 control-label">Image</label> <div class="col-md-3"> <div class="fileUpload btn btn-primary waves-effect waves-light"> <span>upload image here...</span> <input type="file" name="images" class="upload"> </div> </div> <div><img src="upload/<?php echo $row['image']; ?>" style="width: 150px;"></div> </div> <div class="form-group"> <label class="col-md-2 control-label"></label> <div class="col-md-10"> <button type="submit" name="submit" class="btn btn-purple waves-effect waves-light">Submit</button> </div> </div> </div> <!-- panel-body --> </div> <!-- panel --> </div> <!-- col --> </div> <!-- End row --> </form> <?php if(isset($_POST['submit'])) { $edit=$_GET['edit']; $fname=$_POST['fname']; $contact=$_POST['contact']; $location=$_POST['location']; $desc1=$_POST['desc1']; $images = $_FILES['images']['name']; if(!$images) { $images=$img; } else { $file_path = 'upload/'; $file_path = $file_path . basename( $_FILES['images']['name']); if(move_uploaded_file($_FILES['images']['tmp_name'], $file_path)) { } } $sqlupdate="UPDATE `admin` SET `name` = '$fname', `contact` = '$contact', `location` = '$location', `desc` = '$desc1',`image`='$images' WHERE `id` = '$edit'"; $resupdate=mysqli_query($db,$sqlupdate); if($resupdate==1) { echo '<script type="text/javascript">alert("Profile Updated Successfully..!!");window.location=\'profile.php\';</script>'; } else { echo '<script type="text/javascript">alert("Profile Not Updated ..!!");window.location=\'profile.php\';</script>'; } } ?> </div> <!-- container --> </div> <!-- content --> <?php include("footer.php") ?> </div> <!-- ============================================================== --> <!-- End Right content here --> <!-- ============================================================== --> <!-- Right Sidebar --> <!-- /Right-bar --> </div> <!-- END wrapper --> <script> var resizefunc = []; </script> <!-- jQuery --> <script src="js/jquery.min.js"></script> <script src="js/bootstrap.min.js"></script> <script src="js/waves.js"></script> <script src="js/wow.min.js"></script> <script src="js/jquery.nicescroll.js" type="text/javascript"></script> <script src="js/jquery.scrollTo.min.js"></script> <script src="assets/jquery-detectmobile/detect.js"></script> <script src="assets/fastclick/fastclick.js"></script> <script src="assets/jquery-slimscroll/jquery.slimscroll.js"></script> <script src="assets/jquery-blockui/jquery.blockUI.js"></script> <!-- CUSTOM JS --> <script src="js/jquery.app.js"></script> <script src="assets/datatables/jquery.dataTables.min.js"></script> <script src="assets/datatables/dataTables.bootstrap.js"></script> <script type="text/javascript"> $(document).ready(function() { $('#datatable').dataTable(); } ); </script> </body> </html>