增加列表
This commit is contained in:
@@ -20,4 +20,39 @@ foreach ($folders as $folder) {
|
|||||||
}
|
}
|
||||||
sort($folder);
|
sort($folder);
|
||||||
sort($files);
|
sort($files);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-3">
|
||||||
|
<div class="list-group">
|
||||||
|
<?php foreach ($files as $file): ?>
|
||||||
|
<a href="?file=<?php echo urlencode($file); ?>" class="list-group-item list-group-item-action">
|
||||||
|
<?php echo htmlspecialchars($file); ?>
|
||||||
|
</a>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-9">
|
||||||
|
<div class="content">
|
||||||
|
<?php
|
||||||
|
if (isset($_GET['file'])) {
|
||||||
|
$file = $_GET['file'];
|
||||||
|
$filePath = dirname(__FILE__) . '/' . $file;
|
||||||
|
if (file_exists($filePath) && is_readable($filePath)) {
|
||||||
|
if (pathinfo($filePath, PATHINFO_EXTENSION) == 'php') {
|
||||||
|
include $filePath;
|
||||||
|
} else {
|
||||||
|
echo file_get_contents($filePath);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo '<p>File not found or not readable.</p>';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo '<p>Select a file from the list.</p>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -12,6 +12,4 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<?php include("template/$OJ_TEMPLATE/footer.php"); ?>
|
<?php include("template/$OJ_TEMPLATE/footer.php"); ?>
|
||||||
<script type="text/javascript" src="include/react/react.min.js"></script>
|
|
||||||
<script type="text/javascript" src="include/react/react-dom.min.js"></script>
|
|
||||||
25
web/include/babel.min.js
vendored
Normal file
25
web/include/babel.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user