-
Notifications
You must be signed in to change notification settings - Fork 0
/
profilepost.php
167 lines (137 loc) · 4.73 KB
/
profilepost.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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<?php include 'scripts/dbconn.php';?>
<?php include 'includes/profheader.php';?>
<?php include 'scripts/comment.php';?>
<!--profile navbar-->
<div class="navbar">
<div class="username">
<p><a href="profile.php?id=<?php echo $ID;?>"><?php echo $username; ?></a></p>
</div>
<div class="posts nav">
<a href="profilepost.php?id=<?php echo $ID;?>" class="active">Posts</a>
<?php
$cquery = mysqli_query($conn,"SELECT COUNT(user_id) as userposts FROM posts WHERE user_id='".$ID."'");
$result = mysqli_fetch_assoc($cquery);
echo '<p class="number">' .$result['userposts']. '</p>';
?>
</div>
<div class="articles nav">
<a href="profilearts.php?id=<?php echo $ID;?>">Articles</a>
<p class="number">0</p>
<?php
$cquery = mysqli_query($conn,"SELECT COUNT(user_id) as userarts FROM articles WHERE user_id='".$ID."'");
$result = mysqli_fetch_assoc($cquery);
echo '<p class="number">' .$result['userarts']. '</p>';
?>
</div>
</div>
</div>
<main>
<!--post contianer-->
<div class="post-wrapper">
<?php include 'parts/profpost.php';?>
</div>
<!--edit profile-->
<div id="showprofile">
<p id="close">X</p>
<form method="POST" enctype="multipart/form-data">
<legend>Edit Profile</legend>
<!-- <div class="group">
<label>Username</label>
<input type="text" placeholder="new username" name="username" value="<?php //echo $username ?>">
</div>
-->
<div class="group">
<label>Firstname</label>
<input type="text" name="fname" value=" <?php echo $fname ?>">
</div>
<div class="group">
<label>lastname</label>
<input type="text" name="lname" value="<?php echo $lname ?>">
</div>
<div class="group">
<label>Profile Image</label>
<div class="imgcontainer">
<img src="" onClick="triggerClick()" id="profileDisplay" class="pro">
</div>
<input type="file" name="postimg" onChange="displayImage(this)" id="profileImage">
</div>
<div class="group">
<label>Update your about :</label>
<textarea name="about" id="" cols="60" rows="5"></textarea>
</div>
<div class="group">
<label>Level</label>
<input type="text" name="level" value="">
</div>
<div class="group">
<label>Department</label>
<input type="text" name="dept" value="">
</div>
<div class="group">
<label>Nickname</label>
<input type="text" placeholder="new nickname" name="nn" value="">
</div>
<div class="group">
<label>Interest</label>
<input type="text" name="interest" value="">
</div>
<input type="submit" value="UPDATE" name="updatebio">
</form>
</div>
<!--end of edit profile-->
<!--create anevent-->
<div id="createvent">
<p id="close-event">X</p>
<form method="POST" enctype="multipart/form-data">
<legend>Create An Event</legend>
<div class="group">
<label>Event Name</label>
<input type="text" placeholder="Name of Event" name=" eventname">
</div>
<div class="group">
<label>Organisers</label>
<input type="text" name="organiser">
<input type="hidden" name="image" value="<?php echo $pp; ?>">
<input type="hidden" name="postee" value="<?php echo $username ?>">
<input type="hidden" name="userid" value="<?php echo $userId; ?>">
</div>
<div class="group">
<label>Venue</label>
<input type="text" name="venue">
</div>
<div class="group">
<label>About Event :</label>
<textarea name="aboutevent" placeholder="A short Description of Event" cols="60" rows="5"></textarea>
</div>
<div class="group">
<label>Contact</label>
<input type="tel" name="phone" placeholder="Phone Number">
</div>
<div class="group">
<label>Audience</label>
<input type="text" name="audience" placeholder="Anyone or specify Department or Course">
</div>
<div class="group">
<label>Time of Event</label>
<input type="time" name="toe">
</div>
<div class="group">
<label>Duration of Event(Start Date)</label>
<input type="date" name="startdate" placeholder="Day of event">
</div>
<div class="group">
<label>Duration of Event(End Date)</label>
<input type="date" name="enddate" placeholder="Day of event">
</div>
<input type="submit" value="CREATE EVENT" name="create_event">
</form>
</div>
<!--go home button-->
<div class="bavk">
<div class="bk">
<a href="index.php"><img src="icons/1x/outline_home_white_24dp.png" alt=""></a>
</div>
</div>
</main>
</body>
</php>