-
Notifications
You must be signed in to change notification settings - Fork 0
/
authors.php
64 lines (53 loc) · 1.91 KB
/
authors.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
63
64
<?php
require_once("includes/global.php");
require_once("includes/include_lconfig.php");
require_once("includes/functions_lib.php");
$letter = substr($_GET['letter'] ?? '',0,1);
$xrf_page_subtitle = "Authors beginning with " . $letter;
require_once("includes/header.php");
?><div align="center"><table width="100%"><tr><td align="center">Authors:
<a href="authors.php?letter=A">A</a>
<a href="authors.php?letter=B">B</a>
<a href="authors.php?letter=C">C</a>
<a href="authors.php?letter=D">D</a>
<a href="authors.php?letter=E">E</a>
<a href="authors.php?letter=F">F</a>
<a href="authors.php?letter=G">G</a>
<a href="authors.php?letter=H">H</a>
<a href="authors.php?letter=I">I</a>
<a href="authors.php?letter=J">J</a>
<a href="authors.php?letter=K">K</a>
<a href="authors.php?letter=L">L</a>
<a href="authors.php?letter=M">M</a>
<a href="authors.php?letter=N">N</a>
<a href="authors.php?letter=O">O</a>
<a href="authors.php?letter=P">P</a>
<a href="authors.php?letter=Q">Q</a>
<a href="authors.php?letter=R">R</a>
<a href="authors.php?letter=S">S</a>
<a href="authors.php?letter=T">T</a>
<a href="authors.php?letter=U">U</a>
<a href="authors.php?letter=V">V</a>
<a href="authors.php?letter=W">W</a>
<a href="authors.php?letter=X">X</a>
<a href="authors.php?letter=Y">Y</a>
<a href="authors.php?letter=Z">Z</a></td></tr></table></div><?php
if ($letter != "")
$ltrstr = " WHERE name LIKE '" . $letter . "%'";
else
$ltrstr = "";
$query = "SELECT * FROM l_authors$ltrstr ORDER BY name, years";
$result = mysqli_query($xrf_db, $query);
$num=mysqli_num_rows($result);
echo "<table width=\"100%\">";
$qq=0;
while ($qq < $num) {
$id = xrf_mysql_result($result,$qq,"id");
$name = xrf_mysql_result($result,$qq,"name");
$years = xrf_mysql_result($result,$qq,"years");
echo "<tr><td>$id</td><td><a href=\"search_results.php?author=$id\">$name $years</a></td></tr>";
$qq++;
}
echo "</table>";
require_once("includes/footer.php");
?>