-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathauthorDes.php
151 lines (131 loc) · 4.43 KB
/
authorDes.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
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<?php
session_start();
$name = $_GET['name'];
require_once "home/homeDb.php";
$sql = "SELECT * FROM authortb WHERE author_name='$name'";
$result = $con->query($sql);
$row = $result;
while ($rows = $result->fetch_assoc()) {
$since = $rows['author_since'];
$name = $rows['author_name'];
$image = $rows['author_image'];
$dis = $rows['author_description'];
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Authors</title>
<link rel="stylesheet" href="./styles/footer.css">
<link rel="stylesheet" href="./styles/navbar.css">
<link rel="stylesheet" href="./styles/authors.css">
<!--font awsome-->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" integrity="sha512-iBBXm8fW90+nuLcSKlbmrPcLa0OT92xO1BIsZ+ywDWZCvqsWgccV3gFoRBv0z+8dLJgyAHIhR35VZc2oM/gI1w==" crossorigin="anonymous" />
<link rel="stylesheet" href="./styles/home_style.css">
<link rel="stylesheet" href="./styles/footer.css">
<link rel="stylesheet" href="./styles/navbar.css" />
<link rel="icon" type="image/ico" href="./Image/logo1.ico">
<?php require_once "head.php" ?>
</head>
<style>
body {
background-image: url(Image/background4.jpg);
width: 100%;
height: 100%;
background-size: cover;
background-position: center center;
background-repeat: no-repeat;
background-attachment: fixed;
}
</style>
<body>
<header>
<?php require_once "nav.php" ?>
</header>
<br>
<!--Author dsctiption-->
<div class="container">
<div class="row justify-content-center">
<h2 class="text-center"><?= htmlentities($name) ?></h2>
</div>
<div class="row">
<div class="col-sm-4">
<div class="card h-75">
<img src="<?= htmlentities($image) ?>" class="img-fluid" alt="books">
</div>
</div>
<div class="col-sm-8">
<div class="card h-75" id="abtcard">
<div class="card-body">
<p class="card-text"><?= htmlentities($dis) ?></p><br>
<div class="text-center">
<button type="button" class="btn btn-outline-dark">See more</button>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<!--header2-->
<div class="container">
<h4>Other books by the author</h4>
</div>
<div class="container-fluid">
<hr>
</div>
<!--other books-->
<?php
require_once("./home/homeDb.php");
require_once("./home/item-component.php");
//Create instance of createdb class
// $database=new CreateDb("Productdb", "productb");
?>
<div class="container">
<div class="row text-center py-5">
<?php
$sql = "SELECT * FROM productb WHERE product_author='$name'";
$result = mysqli_query($con, $sql);
// $result = $database->getData();
if (mysqli_num_rows($result) > 0) {
while ($row = mysqli_fetch_assoc($result)) {
component($row['product_name'], $row['product_price'], $row['second_price'], $row['product_image'], $row['id']);
}
}
?>
</div>
</div>
<!--header3-->
<div class="container-fluid">
<div class="header" id="header2">
<h5>Top Authors</h5>
</div>
</div>
<div class="container-fluid">
<hr>
</div>
<!--top author-->
<?php require_once("./home/author-component.php");
require_once("./home/homeDb.php"); ?>
<!--testing-->
<div class="container">
<div class="row text-center py-5">
<?php
$sql = "SELECT * FROM authortb";
$result = mysqli_query($con, $sql);
// $result = $database->getData();
if (mysqli_num_rows($result) > 0) {
while ($row = mysqli_fetch_assoc($result)) {
component1($row['author_name'], $row['author_since'], $row['author_image'], $row['id']);
}
}
?>
</div>
</div>
<?php require_once "script.php" ?>
<?php require_once "footer.php" ?>
</body>
</html>