-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomment-box.php
128 lines (89 loc) · 3.98 KB
/
comment-box.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
<?php
if($_GET['pid']) {
if($user_id){
include "connect.php";
$gotosx = "SELECT username,avatar,name,hometown
FROM users
WHERE id='$user_id'
";
$goto=mysqli_query($conn, $gotosx) or die(mysql_error());
mysqli_close($conn);
$rows= mysqli_fetch_assoc($goto);
$usernames = $rows['username'];
$imagess = $rows['avatar'];
$names = $rows['name'];
$locatiano = $rows['location'];
$attach= $_GET[attach];
$sound= $_GET[sound];
$strings = ",";
$u = array('#d7052a','#40a64d', '#5540a6','#549bfe');
$well = $u[rand(0,4)];
if($attach)
{
echo"
<div class='toolbar messagebar'>
<form enctype='multipart/form-data' action='commentpost-image.php' method='POST' class='store-data list-block'>
<input type='hidden' name='post_id' value='$look'>
<input type='hidden' name='user' value='$ident'>
<input type='hidden' name='username' value='$usernames '>
<input type='hidden' name='name' value='$names'>
<input type='hidden' name='picture' value='$imagess'>
<input type='hidden' name='userid' value='$ident'>
<input type='hidden' name='location' value='$locatiano'>
<div class='toolbar-inner'>
<p> <input name='file' type='file' id='file' size='24'>
</p>
<textarea placeholder='Comment'></textarea>
<p class='buttons-row'> <input class='link send-message button button-fill' value='Comment' type='submit' name='submit' style='background-color:$well'></p>
</form>
</div>
</div>
";
}elseif($sound)
{
echo"
<div class='toolbar messagebar'>
<form enctype='multipart/form-data' action='commentpost-audio.php' method='POST' class='store-data list-block'>
<input type='hidden' name='post_id' value='$look'>
<input type='hidden' name='user' value='$ident'>
<input type='hidden' name='username' value='$usernames '>
<input type='hidden' name='name' value='$names'>
<input type='hidden' name='picture' value='$imagess'>
<input type='hidden' name='userid' value='$ident'>
<input type='hidden' name='location' value='$locatiano'>
<div class='toolbar-inner'>
<p> <input name='file' type='file' id='file' size='24'>
</p>
<textarea placeholder='Comment'></textarea>
<p class='buttons-row'> <input class='link send-message button button-fill' value='Comment' type='submit' name='submit' style='background-color:$well'></p>
</form>
</div>
</div>
";
}else{
echo"
<div class='toolbar messagebar'>
<form action='commentpost.php' method='POST' class='store-data list-block'>
<input type='hidden' name='post_id' value='$look'>
<input type='hidden' name='user' value='$ident'>
<input type='hidden' name='username' value='$usernames '>
<input type='hidden' name='name' value='$names'>
<input type='hidden' name='picture' value='$imagess'>
<input type='hidden' name='userid' value='$ident'>
<input type='hidden' name='location' value='$locatiano'>
<div class='toolbar-inner'>
<a href='post.php?pid=$look&attach=photo#postcomment' class='link icon-only'><i class='icon icon-camera'></i></a>
<!--- <a href='post.php?pid=$look&sound=photo#postcomment' class='link icon-only'><i class='material-icons'>mic</i></a> --->
<textarea placeholder='Comment' name='postcomment'></textarea>
<p class='buttons-row'> <input class='link send-message button button-fill' value='Comment' type='submit' name='post' style='background-color:$well'></p>
</form>
</div>
</div>";
}
}else{
echo"<div class='toolbar messagebar'>
<p class='buttons-row'><i class='icon f7-icons'>person</i><a href='join.php' class='button button-fill button-raised' style='background-color:teal' >Join IntelliFeed</a></p>
</div>";
}
}
?>