Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
Real F-Manager
/
v2
/
partials
/
partials
:
my-data.ejs
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<script> function showAlert(message, status){ var alert = document.getElementById("alert") var type = status == 1 ? "alert-success": "alert-danger" var removeClass = status == 1 ? "alert-danger": "alert-success" if (alert.classList.contains(removeClass)){ alert.classList.remove(removeClass) } alert.style.display = "" alert.classList.add(type); document.getElementById("alert-text").innerText = message; } document.getElementById("alert-close").addEventListener("click", function(){ document.getElementById("alert").style.display = "none" }) var query = window.location.search.substring(1).split("&").map((v) => v.split("=")); var path = { location: window.location.origin, query: Object.fromEntries(query) }; function deleteData(type, from, obj){ var shouldDelete = window.confirm(`Are you sure you want to delete ${obj.server_name || obj.name} from your ${from}`) if (shouldDelete){ var url = path.location + "/v1?id=" + path.query.id + "&from=" + type + "&qid=" + obj.id; fetch(url, { method: "delete", headers: { "Content-Type": "application/json" }, }) .then(res=>res.json()) .then(data=>{ showAlert(data.message, data.status) if(data.status == 1){ var el = document.getElementById(type + "-" + obj.id); el?.remove(); } }).catch(err=>{ console.error("error deleting data: ", err) showAlert("An Error occurred while deleting this data.\nPlease Try Again", 2) }) } } </script>