ESH/all_menu_assigner.php
2024-10-23 18:28:06 +05:30

106 lines
3.1 KiB
PHP

<?php include ('includes/functions.php');?>
<!doctype html>
<html lang="en">
<head>
<title>TechSyneric</title>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<style>
.btn {
border: solid red 3px;
}
body {
background-color: powderblue;
}
#parent {
display: table;
width: 100%;
}
#form {
display: table-cell;
text-align: center;
vertical-align: middle;
}
</style>
</head>
<body>
<br><br>
<div class="container" id="parent">
<div id="form">
<form method="post" action="save_all_menue.php">
<h3 style="text-align: center">ASSIGN ALL MENU FROM ONE ROLE TO OTHER</h3>
<label>from</label>
<select id='from' name='from'><?= generateOption("role_master","role_name","role_id","",'') ?>
</select>
<label>TO</label>
<select id='to' name='to'><?= generateOption("role_master","role_name","role_id","",'') ?>
</select>
<button type="submit">
Assign Menu
</button>
</form>
</div>
<div id="form2">
<form method="post" action="save_all_menue_rename.php">
<button type="submit">
All Manu name setter
</button>
</form>
</div>
</div>
<script src="//cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<script>
$("#btn").on('click', function(e) {
e.preventDefault();
var query = $("#query").val();
console.log(query);
if (query == "") {
Swal.fire("Please Enter Query");
} else {
$.ajax({
url: "dev_dbutil_execute.php",
method: "POST",
data: {
query: query
},
success: function(e) {
if (e == "yes") {
Swal.fire("Execute Successfully");
$('#formdata').trigger("reset");
} else {
Swal.fire(e);
}
}
})
}
})
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous">
</script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous">
</script>
</body>
</html>