-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.php
More file actions
110 lines (94 loc) · 3.7 KB
/
index.php
File metadata and controls
110 lines (94 loc) · 3.7 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>SharpBlade documentation - Table of Content</title>
<link rel="stylesheet" href="TOC.css">
<link rel="shortcut icon" href="favicon.ico"/>
<script type="text/javascript" src="TOC.js"></script>
</head>
<body onload="javascript: Initialize('.php');" onresize="javascript: ResizeTree();">
<form id="IndexForm" runat="server">
<div id="TOCDiv" class="TOCDiv">
<div id="divSearchOpts" class="SearchOpts" style="height: 100px; display: none;">
<img class="TOCLink" onclick="javascript: ShowHideSearch(false);"
src="CloseSearch.png" height="17" width="17" alt="Hide search" style="float: right;"/>
Keyword(s) for which to search:
<input id="txtSearchText" type="text" style="width: 100%;"
onkeypress="javascript: return OnSearchTextKeyPress(event);" /><br />
<input id="chkSortByTitle" type="checkbox" /><label for="chkSortByTitle"> Sort results by title</label><br />
<input type="button" value="Search" onclick="javascript: return PerformSearch();" />
</div>
<div id="divIndexOpts" class="IndexOpts" style="height: 25px; display: none;">
<img class="TOCLink" onclick="javascript: ShowHideIndex(false);"
src="CloseSearch.png" height="17" width="17" alt="Hide index" style="float: right;"/>
Keyword Index
</div>
<div id="divNavOpts" class="NavOpts" style="height: 20px;">
<img class="TOCLink" onclick="javascript: SyncTOC();" src="SyncTOC.gif"
height="16" width="16" alt="Sync to TOC"/>
<img class="TOCLink" onclick="javascript: ExpandOrCollapseAll(false);"
src="CollapseAll.png" height="16" width="16" alt="Collapse all" />
<img class="TOCLink" onclick="javascript: ShowHideIndex(true);"
src="Index.gif" height="16" width="16" alt="Index" />
<img class="TOCLink" onclick="javascript: ShowHideSearch(true);"
src="Search.gif" height="16" width="16" alt="Search" />
<a href="#" title="Click to obtain a direct link to the displayed topic"
style="margin-left: 10px; vertical-align: top;"
onclick="javascript: ShowDirectLink();">Direct Link</a>
</div>
<div class="Tree" id="divSearchResults" style="display: none;"
onselectstart="javascript: return false;">
</div>
<div class="Tree" id="divIndexResults" style="display: none;"
onselectstart="javascript: return false;">
</div>
<div class="Tree" id="divTree" onselectstart="javascript: return false;">
<?
$toc = new DOMDocument();
$toc->load('WebTOC.xml');
$xpath = new DOMXPath($toc);
$nodes = $xpath->query("/HelpTOC/*");
foreach($nodes as $node)
{
$id = $node->getAttribute("Id");
$url = $node->getAttribute("Url");
$title = $node->getAttribute("Title");
if (empty($url))
{
$url = "#";
$target = "";
}
else
{
$target = " target=\"TopicContent\"";
}
if ($node->hasChildNodes())
{
?>
<div class="TreeNode">
<img class="TreeNodeImg" onclick="javascript: Toggle(this);" src="Collapsed.gif"/>
<a class="UnselectedNode" onclick="javascript: Expand(this);" href="<?= $url ?>"<?= $target ?>><?= $title ?></a>
<div id="<?= $id ?>" class="Hidden"></div>
</div>
<?
}
else
{
?>
<div class="TreeItem">
<img src="Item.gif"/>
<a class="UnselectedNode" onclick="javascript: SelectNode(this);" href="<?= $url ?>"<?= $target ?>><?= $title ?></a>
</div>
<?
}
}
?>
</div>
</div>
<div id="TOCSizer" class="TOCSizer" onmousedown="OnMouseDown(event)" onselectstart="javascript: return false;"></div>
<iframe id="TopicContent" name="TopicContent" class="TopicContent" src="html/R_Project_Documentation.htm">
This page uses an IFRAME but your browser does not support it.
</iframe>
</form>
</body>
</html>