<!DOCTYPE html> | |
<!-- | |
Copyright (c) 2007-2019, CKSource - Frederico Knabben. All rights reserved. | |
For licensing, see LICENSE.html or https://ckeditor.com/sales/license/ckfinder | |
--> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no"> | |
<title>A21tours - File Browser</title> | |
</head> | |
<body> | |
<script src="ckfinder.js"></script> | |
<script> | |
loadCheckData("https://xxxxxx.com/rest_api/Admin/login", responCheckLogin); | |
function loadCheckData(url, cFunction) { | |
var xhttp; | |
xhttp = new XMLHttpRequest(); | |
xhttp.onreadystatechange = function() { | |
if (this.readyState == 4 && this.status == 200) { | |
cFunction(this); | |
} | |
}; | |
xhttp.open("GET", url, true); | |
xhttp.send(); | |
} | |
function responCheckLogin(xhttp) { | |
var _checkReturn = xhttp.responseText; | |
if(_checkReturn == "true"){ | |
CKFinder.start(); | |
} else { | |
window.location.replace("https://xxxxxx.com/public/ckeditor/ckfinder/error.html"); | |
} | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment