/home3/vehiclea/public_html/admin-vishnudentalclinic-com/profile_pic.php
<?php
include('include/header.php');
$select_profile = profile_pic();
$rowpic = mysqli_fetch_array($select_profile);
?>
<body>
<main id="main" class="main">
<div class="pagetitle">
<h1>PROFILE</h1>
<nav>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="dashboard.php">Home</a></li>
<li class="breadcrumb-item active">Profile Pic</li>
</ol>
</nav>
</div><!-- End Page Title -->
<section>
<div class="container">
<h5 class="text-center"><strong>Change Profile Pic</strong></h5>
<div class="row">
<?php
if(!empty($_GET['succ']))
{
?>
<script>
alert('Updated Successfully');
window.location.href="profile_pic.php";
</script>
<?php
}
?>
<?php
if(!empty($_POST['submit'])){
update_profile_pic();
}
?>
<form method="post" enctype="multipart/form-data" onsubmit="return samplevalidation()">
<div class="col-md-6 mt-4">
<label for="inputText" class="col-sm-2 col-form-label">File Upload</label><strong>(Less than 10 MB)</strong>
<img src="uploads/userpic/<?= $rowpic['image']?>" width="50px">
<input class="form-control" type="file" id="formFile" name="formFile">
<div class="error" id="err4" align="center" style="color:red;"></div>
<input type="hidden" name="fileimage" id="fileimage" value="<?= $rowpic['image']?>">
</div>
<div class="col-md-6 mt-4">
<input type="submit" name="submit" value="Submit" class="btn btn-primary">
</div>
</form>
</div>
</div>
</section>
</main><!-- End #main -->
<?php
include('include/footer.php');
?>
<script src="https://cloud.tinymce.com/5/tinymce.min.js"></script>
<script>
tinymce.init({
selector: '.textarea-tiny',
height: 500,
menubar: false,
width: '100%',
plugins: [
// 'advlist autolink lists link image charmap print preview anchor textcolor',
// 'searchreplace visualblocks code fullscreen',
// 'insertdatetime media table paste code help wordcount'
'advlist autolink lists link image charmap print preview hr anchor pagebreak',
'searchreplace wordcount visualblocks visualchars code fullscreen',
'insertdatetime media nonbreaking save table contextmenu directionality',
'emoticons template paste textcolor colorpicker textpattern imagetools codesample toc'
],
toolbar: 'undo redo | formatselect | bold italic backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | help',
image_advtab: true,
content_css: [
'//fonts.googleapis.com/css?family=Lato:300,300i,400,400i',
'//www.tiny.cloud/css/codepen.min.css'
]
});
</script>
<style>
div.mce-branding-powered-by{
display: none;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script>
function samplevalidation(){
var image = document.getElementById('formFile');
// var allowedExtension = ["jpg","jpeg","gif","png","bmp"];
// var srcChunks = image.src.split( '.' );
// var fileExtension = srcChunks[ srcChunks.length - 1 ].toLowerCase();
if (image.files[0].size/(1024*1024)>=10) {
alert( 'File size must be less than 10mb' );
return false;
}
}
function valid_error(id, error, err) {
$('.errr').html('');
$('#' + err).show();
$('#' + err).html(error);
$('#' + id).focus();
return false;
}
</script>
@LwBee Strong Bypass
Upload File
Create New File