-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtemples.php
65 lines (51 loc) · 1.58 KB
/
temples.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
65
<?php include 'header.php'; ?>
<!-- start body -->
<body onunload="">
<!-- start dotted pattern -->
<div class="bg-overlay"></div>
<!-- end dotted pattern -->
<!-- start navigation -->
<?php include('menu.php'); ?>
<!-- end navigation -->
<!-- start content wrapper -->
<div class="content page-content">
<?php
if(isset($_GET['id'])) {
$id = (int)$_GET['id'];
$t = $db->prepare("SELECT * FROM temples WHERE tid = '$id'");
$t->execute();
if($t->rowCount() == 1) {
$row = $t->fetch(PDO::FETCH_ASSOC);
$title = $row['tname'];
} else {
$title = 'Digambara Jain Temples';
}
} else {
$title = 'Digambara Jain Temples';
}
?>
<div class="page-title">
<h1><span><?php echo $title; ?></span></h1>
</div>
<div class="divider clear"></div>
<div class="inner-content">
<?php if ($title == 'Digambara Jain Temples') { ?>
<h4>List of All Digambar Jain Temples is given Below. Click on the name to see more information</h4>
<input id="searchTemples" name="searchBox" type="text" class="fullWidth" />
<div id="searchResults" class="hoverImg"></div>
<script type="text/javascript" src="js/searchTemples.js"></script>
<?php
} else {
$t2 = $db->prepare("SELECT * FROM idols WHERE templeid = '$id'");
$t2->execute();
echo '<h2>Idols</h2>
<ol>';
while($row2 = $t2->fetch(PDO::FETCH_ASSOC)) {
echo '<li><a href="idols.php?id='.$row2['idolid'].'">'.$row2['tirthankar'].'</a></li>';
}
echo '</ol>';
}
?>
</div>
</div><!-- end content wrapper -->
<?php include 'footer.php'; ?>