-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfriendboarddata.php
57 lines (51 loc) · 1.45 KB
/
friendboarddata.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
<?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();}
echo "<div id='columns'>";
echo "<script>
$(document).ready( function() {
var container = $('#columns');
$('#columns').masonry({
columnWidth: 10,
itemSelector: '.board',
isOriginLeft: true
});
$('#del').click(function() {
console.log('clicked');
});
}); </script>";
$emailstore = $_SESSION['friendname'];
$emailstore = stripslashes($emailstore);
$emailstore = mysqli_real_escape_string($con,$emailstore);
$sql1 ="SELECT * FROM boards where owner='sys' or owner='$emailstore'";
$result=mysqli_query($con,$sql1);
if (!$result)
{
die(mysqli_error($con));
}
$count2=mysqli_num_rows($result);
if($count2 > 0)
{
while($row = mysqli_fetch_array($result))
{
if($row['owner']=="sys")
{
echo "<div class ='board'><a href='boardpinview.php?selboard=".$row['boardid']."'><img src='".$row['boardpicture']."' id='firstboard'/></a><p>".$row['boardcaption']."</p></div>";
}
else
{
echo "<div class ='board'><a href='boardpinview.php?selboard=".$row['boardid']."'><img src='".$row['boardpicture']."' id='firstboard'/></a><p>".$row['boardcaption']."</p></div>";
}
}
}
echo "</div>";
?>