-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocument.php
More file actions
82 lines (73 loc) · 2.1 KB
/
Copy pathdocument.php
File metadata and controls
82 lines (73 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?php
$version = !empty($_GET["version"] )? $_GET["version"] : '1.0';
$documentId = !empty($_GET["doc"]) ? $_GET["doc"] : 'intro';
$dirPath = 'document/' . $version;
$contentFile = $dirPath . '/_contents.php';
$pathFile = $dirPath . '/' . $documentId . '.php';
$navFile = $dirPath . '/content/' . $documentId . '.php';
?>
<!DOCTYPE html>
<html>
<head>
<title>文档 - Rexdb ORM</title>
<?php
$basePath = '';
include_once('include/import.php');
?>
<link rel="stylesheet" href="<?php echo $basePath;?>ui/css/document-1.0.2.css" type="text/css"></link>
<script type="text/javascript" src="<?php $basePath;?>ui/js/docs.min-1.0.2.js"></script>
<script>
var basePath = '<?php $dirPath;?>';
$(document).ready(function(){
//调整图片资源URI
$('div[role=\'main\'] img').each(function(){
var src = $(this).attr('data-src');
if(src.indexOf('http') != 0){
$(this).attr('src', basePath + '/' + src);
$(this).parent().after($(this));
}
});
//文档总目录
var href = window.location.href;
var uri = href.substr(href.indexOf('document.php'));
var a = $('#learning').find('a[href=\''+uri+'\']');
if(a.length == 0) a = $('#learning a:first');
a.before('<blockquote>'+a.html()+'</blockquote>').remove();
});
</script>
</head>
<body>
<?php
$activeMenu = 'document';
include_once('include/navbar.php');
?>
<section id="header" class="top-div">
<div class="container doc-content">
<div class="row" style="margin-top: 20px; margin-bottom: 30px">
<div class="col-md-12">
<h3>文档目录</h3>
<?php include_once($contentFile); ?>
</div>
</div>
</div>
</section>
<div class="container">
<div class="row">
<div class="col-md-9" role="main">
<?php
include_once($pathFile);
?>
</div>
<div class="col-md-3" role="complementary">
<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm">
<?php
include_once($navFile);
?>
<a class="back-to-top" href="#user-content-top">返回顶部</a>
</nav>
</div>
</div>
</div>
<?php include_once('include/footer.php'); ?>
</body>
</html>