-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingle-painting.php
More file actions
235 lines (197 loc) · 7.59 KB
/
single-painting.php
File metadata and controls
235 lines (197 loc) · 7.59 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
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
<?php
include 'includes/include.inc.php';
include 'includes/header.inc.php';
include 'includes/ConnSetup.inc.php';
define('DBCONNECTION', 'mysql:host=localhost;dbname=art');
define('DBUSER', 'testuser');
define('DBPASS', 'mypassword');
?>
<main >
<?php
$img = 412;
if (isset($_GET["id"])){
$img = $_GET["id"];
}
$painting = Painting::getNewPaint($img);
function rating($rate){
echo '<a class="like">';
for ($i = 0; $i < $rate; $i++) echo '<i class="orange star icon"></i>';
echo '</a>';
}
?>
<!-- Main section about painting -->
<head>
<meta charset=utf-8>
<link href='http://fonts.googleapis.com/css?family=Merriweather' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script src="css/semantic.js"></script>
<script src="js/misc.js"></script>
<link href="css/semantic.css" rel="stylesheet" >
<link href="css/icon.css" rel="stylesheet" >
<link href="css/styles.css" rel="stylesheet">
</head>
<section class="ui segment grey100">
<div class="ui doubling stackable grid container">
<div class="nine wide column">
<?php
echo '<img src="images/art/works/medium/'.$painting->imageFileName.'.jpg" alt="..." class="ui big image" id="artwork">';
?>
<div class="ui fullscreen modal">
<div class="image content">
<?php
echo '<img src="images/art/works/large/'.$painting->imageFileName.'.jpg" alt="..." class="image" >';
?>
<div class="description">
<p></p>
</div>
</div>
</div>
</div>
<div class="seven wide column">
<!-- Main Info -->
<div class="item">
<?php
echo '<h2 class="header">'.$painting->title.'</h2>
<h3>'.$painting->artistName.'</h3>';
?>
<div class="meta">
<p>
<?php
rating(Review::PaintReview($img));
?>
</p>
<?php
echo '<p>'.$painting->excerpt.'</p>';
?>
</div>
</div>
<!-- Tabs For Details, Museum, Genre, Subjects -->
<?php include 'includes/single-tabs.inc.php'; ?>
<!-- Cart-->
<?php include 'includes/cart.inc.php'; ?>
</div> <!-- END RIGHT data Column -->
</div> <!-- END Grid -->
</section> <!-- END Main Section -->
<!-- Tabs for Description, On the Web, Reviews -->
<section class="ui doubling stackable grid container">
<div class="sixteen wide column">
<div class="ui top attached tabular menu ">
<a class="active item" data-tab="first">Description</a>
<a class="item" data-tab="second">On the Web</a>
<a class="item" data-tab="third">Reviews</a>
</div>
<div class="ui bottom attached active tab segment" data-tab="first">
<?php
echo $painting->description;
?>
</div>
<div class="ui bottom attached tab segment" data-tab="second">
<table class="ui definition very basic collapsing celled table">
<tbody>
<tr>
<td>
Wikipedia Link
</td>
<td>
<?php
echo '<a href="'.$painting->wikiLink.'#">View painting on Wikipedia</a>';
?>
</td>
</tr>
<tr>
<td>
Google Link
</td>
<td>
<?php
echo '<a href="'.$painting->googleLink.'">View painting on Google Art Project</a>';
?>
</td>
</tr>
<tr>
<td>
Google Text
</td>
<td>
<?php
echo $painting->googleDescription;
?>
</td>
</tr>
</tbody>
</table>
</div>
<div class="ui bottom attached tab segment" data-tab="third">
<div class="ui feed">
<?php
$reviews = Review::Reviews($img);
foreach($reviews as $review){
echo '
<div class="event">
<div class="content">
<div class="date">'.$review->date.'</div>
<div class="meta">';
rating($review->rating);
echo '
</div>
<div class="summary">'
.$review->comment.
'</div>
</div>
</div>
<div class="ui divider"></div>';
}
?>
</div>
</div>
</div>
</section>
<!-- Related Images -->
<section class="ui container">
<h1 class="ui dividing header">Related Works</h1>
<div class="ui stackable equal width grid ">
<div class="row">
<div class="ui fluid card">
<a href="single-painting.php?id=389" class="ui medium image"><img src="images/art/works/square-medium/097050.jpg" alt=""></a>
<div class="content">
<h4>
<span>Painting Title: Mona Lisa</span><br>
<span>Artist Name: </span>
<a href="#">Leonardo da Vinci</a>
</h4>
</div>
</div>
</div>
<div class="row">
<div class="ui fluid card">
<a href="single-painting.php?id=598" class="ui medium image"><img src="images/art/works/square-medium/141010.jpg" alt=""></a>
<div class="content">
<h4>
<span>Painting Title: Saint Margaret and the Dragon</span><br>
<span>Artist Name: </span>
<a href="#">Agnolo Gaddi</a>
</h4>
</div>
</div>
</div>
<div class="row">
<div class="ui fluid card">
<a href="single-painting.php?id=64" class="ui medium image"><img src="images/art/works/square-medium/019060.jpg" alt=""></a>
<div class="content">
<h4>
<span>Painting Title: Self Portrait With Bandaged Ear</span><br>
<span>Artist Name: </span>
<a href="#">Vincent Van Gogh</a>
</h4>
</div>
</div>
</div>
</div>
</section>
</main>
<footer class="ui black inverted segment">
<div class="ui container">footer</div>
</footer>
</body>
</html>