加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
document.php 1.16 KB
一键复制 编辑 原始数据 按行查看 历史
BLumia 提交于 2017-04-16 20:48 . document page and l18n improvement
<?php
session_start();
//Vars
require_once('./include/setting_oj.inc.php');
require_once('./include/Parsedown.php');
//Prepares
$useThisFile = "FAQ.md";
$atThisPath = "./pages/documents/";
$processingFileName = "";
$content = "Failed to load document or document not exist.";
if(isset($_REQUEST['f']) && trim($_REQUEST['f'])!="") {
$processingFileName = $_REQUEST['f'];
} else {
$processingFileName = "FAQ";
}
if(is_file("{$atThisPath}custom/{$processingFileName}.{$OJ_LANGUAGE}.md")) {
$atThisPath = "{$atThisPath}custom/";
$useThisFile = "{$processingFileName}.{$OJ_LANGUAGE}.md";
} else if(is_file("{$atThisPath}custom/{$processingFileName}.md")) {
$atThisPath = "{$atThisPath}custom/";
$useThisFile = "{$processingFileName}.md";
} else if(is_file("{$atThisPath}{$processingFileName}.{$OJ_LANGUAGE}.md")) {
$useThisFile = "{$processingFileName}.{$OJ_LANGUAGE}.md";
} else if (is_file("{$atThisPath}{$processingFileName}.md")) {
$useThisFile = "{$processingFileName}.md";
}
if (is_file("{$atThisPath}{$useThisFile}")) {
$content = file_get_contents("{$atThisPath}{$useThisFile}");
}
//Page Includes
require("./pages/document.php");
?>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化