/home3/vehiclea/public_html/admin-appleiitfoundationschools-com/addRolesEdit.php
<?php
session_start();
$_SESSION['active'] = 'addrole';
include('include/header.php');
if(!empty($_GET['edit'])){
$select_role = executework("SELECT * FROM add_roles where id = '".$_GET['edit']."'");
$row = mysqli_fetch_array($select_role);
}
if(!empty($_POST['submit']))
{
$update_date = executework("UPDATE add_roles set role_name = '".strtoupper($_POST['add_roles'])."',update_date='".date('Y-m-d H:i:s')."' where id = '".$_POST['edit_data']."'");
redirect("addrole.php?upd=1");
}
?>
<main id="main" class="main">
<div class="pagetitle">
<h1>Apple IIT Schools</h1>
<nav>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="index.php">Home</a></li>
<li class="breadcrumb-item ">Edit Roles</li>
</ol>
</nav>
</div>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css">
<section class="section">
<div class="row">
<div class="col-lg-12">
<div class="card">
<div class="card-body">
<h5 class="card-title">Edit Roles</h5>
<form method="post" onsubmit=" return book_validation()">
<div class="row">
<div class="col-md-4">
<label class="form-label">Edit Role</label>
<input id="add_roles" name="add_roles" value="<?= $row['role_name']?>" class="form-control" placeholder="Enter Add Roles">
</div>
<input type="hidden" name="edit_data" value="<?= $row['id']?>">
<div class="mt-4">
<input type="submit" class="btn" value="Edit" name="submit" style="background-color: #69F0AE; color: #000000;">
<a href="addrole.php" style="background-color:#7E57C2; color: #ffff;" class="btn">Back</a>
</div>
</form>
<br>
</div>
</div>
</div>
</div>
</div>
</section>
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
</main>
<script>
function book_validation()
{
var add_roles = $('#add_roles').val();
if(add_roles == '')
{
swal('Please Enter Role Names');
return false;
}
else{
return true;
}
}
</script>
<script>
function confirmDelete(userid,username,branch)
{
if (userid != '') {
var x = confirm('Are you sure to Delete '+branch+' '+username+ '?');
if(x){
$.ajax({
url : "delete.php",
data : {userid : userid},
type : 'POST',
success : function(response) {
if(response ==1){
$('#succ').hide();
$('#update').hide();
$('#fail').hide();
$('#delete_data').show();
window.location.href = "addUser.php";
}
}
});
}
}
}
</script>
<style>
.fa-eye{
position: absolute;
right: 40px;
margin-top: -30px;
}
</style>
<script>
var state = false;
function toggle()
{
if(state){
document.getElementById("password").setAttribute("type","password");
state = false;
}
else{
document.getElementById("password").setAttribute("type","text");
state = true;
}
}
</script>
<?php include('include/footer.php'); ?>
@LwBee Strong Bypass
Upload File
Create New File