forked from mike-t/campfire
-
Notifications
You must be signed in to change notification settings - Fork 0
/
activity.php
116 lines (101 loc) · 3.75 KB
/
activity.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
<?php
// ====================================
// Activity
// ====================================
// displays site activity such as messages
// members and friends.
//
// Author: Michael Walton
// Updated: 06/06/2013
// ====================================
// include our custom php libraries and the page header
require $_SERVER['DOCUMENT_ROOT'].'/utils/libraries.php';
require $_SERVER['DOCUMENT_ROOT'].'/template/_header.php';
?>
<div class="row">
<!-- Recent Activity============================ -->
<div class="span10">
<div class="row">
<div class="span10">
<h2><span class="ding">:</span> Recent Activity</h2>
<p class="lead">What's been happening around your campfire?</p>
</div>
</div>
<div class="row">
<div class="span5">
<h3>Messages <small><a href="#">Post a message</a></small></h3>
<?php
// get 10 most recent messages
require $_SERVER['DOCUMENT_ROOT'].'/utils/getMessages.php';
?>
</div>
<div class="span5">
<div>
<h3>Friends</h3>
<p class="focus-content">You have no friends connected, <a href="#">add some!</a></p>
</div>
<div class="activity-block">
<h3>Badges</h3>
<p class="focus-content">You've earnt the "New Member" badge, well done!</p>
</div>
</div>
</div>
</div>
<!-- End Recent Activity======================== -->
<?php
// include the sidebar
require $_SERVER['DOCUMENT_ROOT'].'/template/_sidebar.php';
?>
</div>
<!-- end row -->
<?php
// include the page footer
require $_SERVER['DOCUMENT_ROOT'].'/template/_footer.php';
// ====================================
// showLoginForm - display's the login form
// with validation error if applicable
// ====================================
function showLoginForm($error = '') {
// format the error to match js errors
if ($error !== '') {
$error = " <div class=\"alert error\" id=\"validation-error-box_username\">
<button type=\"button\" class=\"close\" data-dismiss=\"alert\">×</button>
<strong>Error: </strong>{$error}
</div>";
}
// display the form
echo(" <div class=\"row\">
<!-- Login Form=============================== -->
<div class=\"span10\">
<h2><span class=\"ding\">6</span> Login</h2>
<p class=\"lead\">Welcome back, please enter your email and password to continue.</p>
<form name=\"login-form\" id=\"login-form\" action=\"login.php\" class=\"form-horizontal\" method=\"post\" onsubmit=\"return validateForm();\" >
<!-- Validation error messages go here -->
<div id=\"validation-error-container\">
{$error}
</div>
<!-- Email address -->
<div class=\"control-group\">
<label class=\"control-label\" for=\"username\">Email*</label>
<div class=\"controls\">
<input required type=\"email\" id=\"username\" name=\"username\" class=\"input-large\" placeholder=\"[email protected]\" onchange=\"fieldIsValid(this, 'email');\">
</div>
</div>
<!-- password field -->
<div class=\"control-group\">
<label class=\"control-label\" for=\"password\">Password*</label>
<div class=\"controls\">
<input required type=\"password\" id=\"password\" name=\"password\" class=\"input-medium\" placeholder=\"Password\" onchange=\"fieldIsValid(this, 'password');\">
</div>
</div>
<!-- Submit button -->
<div class=\"control-group\">
<div class=\"controls\">
<input type=\"submit\" value=\"Login\" class=\"btn btn-primary btn-large\">
</div>
</div>
</form>
</div>
<!-- End Login Form=========================== -->");
}
?>