-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathboardpinview.php
72 lines (66 loc) · 1.74 KB
/
boardpinview.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
<html>
<?php
session_start();
$con = mysqli_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysqli_error($con));
}
mysqli_select_db($con,"visbookmark");
if(!isset($_SESSION['name'])){
header("Location: login.php");
exit();
die();}
?>
<head>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="mycss.css" rel="stylesheet">
<script src="jquery-1.11.2.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/masonry.pkgd.min.js"></script>
</head>
<body>
<div class="topnavbar">
</div>
<div class="secondnavbar">
<div class="appearing-name-photo">
<img src="facebook_blank_face3.jpeg" width="40px" height="40px" class="img-rounded"/>   <font size="5"> <?php echo $_SESSION['uname'];?></font>
</div>
</div>
<div class="boardpincontent">
<div id="wrapper">
<?php
$whichboard = $_GET['selboard'];
$emailstore = $_SESSION['uname'];
$emailstore = stripslashes($emailstore);
$emailstore = mysqli_real_escape_string($con,$emailstore);
$sql1 ="SELECT * FROM bookmarks where bookmarkid in (select pinid from pinreference where bid='$whichboard')";
$result=mysqli_query($con,$sql1);
if (!$result)
{
die(mysqli_error($con));
}
echo "<div id='columns'>";
echo "<script>
$(document).ready( function() {
var container = $('#columns');
$('#columns').masonry({
columnWidth: 10,
itemSelector: '.pin',
isOriginLeft: true
});
}); </script>";
$count2=mysqli_num_rows($result);
if($count2 > 0)
{
while($row = mysqli_fetch_array($result))
{
echo "<div class ='pin'><a href='".$row['link']."'><img src='".$row['image']."'/></a><p>".$row['caption']."</p></div>";
}
}
echo "</div>";
?>
</div>
</div>
</body>
</html>