-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathsystitles.php
More file actions
executable file
·59 lines (51 loc) · 2 KB
/
Copy pathsystitles.php
File metadata and controls
executable file
·59 lines (51 loc) · 2 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
<?php
include_once './common.php';
function writeTitles($bookID, $bookTitleID, $parentID, $searchKeywords)
{
global $baseURL;
$titles = UtilityDB::getTitles($bookID, $searchKeywords, $parentID);
if(count($titles)==0)return;
echo "<div class='booktitlecontainer'>";
if(count($titles)>0){
foreach($titles as $title){
?>
<div class='booktitle'>
<div>
<?php if($title->hasChilds && strlen($searchKeywords)==0) {?>
<a href="javascript:loadTitles('home.php?page=ajaxtitles&id=<?=$bookID?>&titleid=<?=$title->id?>', 'title<?=$title->id?>');">
<img class='booktitleimg' src="images/item.png">
</a>
<?php } else { ?>
<img class='booktitleimg inactive' src="images/item.png">
<?php }?>
</div>
<div class='booktitletextarea'>
<div>
<a id="<?=$bookID/$title->id?>" href="<?="$baseURL/book/$bookTitleID/$title->pageid"?>">
<?=$title->title?>
</a>
</div>
<div id='title<?=$title->id?>' class='booktitlechilds'>
<?php if($title->hasChilds && strlen($searchKeywords)==0) {?>
<img id="load" src="images/load.gif" class='booktitleloadimg'>
<?php }?>
</div>
</div>
</div>
<?php
}
}
echo "</div>";
}
function showAjaxBody() {
$bookID = $_REQUEST["id"];
if(!is_numeric($bookID)){
$bookID = urldecode($bookID);
$bookID = replace($bookID, "_", " ");
$bookID = UtilityDB::getBookID($bookID);
}
$bookInfo = (object)UtilityDB::getBookInfo($bookID);
$bookTitleID = replace($bookInfo->title, " ", "_");
writeTitles($bookID, $bookTitleID, $_REQUEST["titleid"], "");
}
?>