S2OJ/uoj/1/app/controllers/logout.php
2018-09-20 17:21:40 +08:00

13 lines
186 B
PHP

<?php
crsf_defend();
Auth::logout();
?>
<script type="text/javascript">
var prevUrl = document.referrer;
if (!prevUrl) {
prevUrl = '/';
};
window.location.href = prevUrl;
</script>