-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathsysauthor.php
executable file
·63 lines (45 loc) · 1.59 KB
/
sysauthor.php
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
<?php
include_once './common.php';
$authorID = $_REQUEST["id"];
if(!is_numeric($authorID)){
$authorID = urldecode($authorID);
$authorID = replace($authorID, "_", " ");
$authorID = UtilityDB::getAuthorID($authorID);
}
$authorInfo = (object)UtilityDB::getAuthorInfo($authorID);
$pageTitle = $pageTitle." - ".$authorInfo->name;
function showBody(){
global $authorID;
global $authorInfo;
echo "<div class='mainareatitle'><h2>نبذة عن المؤلف</h2></div>";
echo "<div class='pagearea'>";
if($authorInfo->birthhigriyear>=0){
echo "<p><span class='separator'>سنة المولد (هجري)</span> : $authorInfo->birthhigriyear</p>";
}
if($authorInfo->deathhigriyear>=0){
echo "<p><span class='highlight'>سنة الوفاة (هجري)</span> : $authorInfo->deathhigriyear</p>";
}
echo "$authorInfo->information";
$books = UtilityDB::getBooks("", -1, $authorID);
echo "</div>";
generateSocial("$baseURL/author/$authorID");
echo "<div class='mainareatitle'><h2>مؤلفاته</h2></div>";
foreach($books as $id=>$title){
$titleID = replace($title, " ", "_");
$title = shortText($title, 40);
echo "<div class='book boxitem'><h2><a href='/book/$titleID'>$title</a></h2></div>";
}
}
function showMainBar() {
global $authorInfo;
?>
<div class="mainbarsection">
<h1>
<a class='redlink' href='/authors'>المؤلفون</a>
<span class="highlight"> / </span>
<?=$authorInfo->name?>
</h1>
</div>
<?php
}
?>