-
Notifications
You must be signed in to change notification settings - Fork 0
/
member.php
executable file
·217 lines (205 loc) · 6.47 KB
/
member.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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
<?php
# Begin output buffering
ob_start();
# Include Code
include("assets/member.inc.php");
# Is an Action set?
if(isset($_GET['action']))
{
$action=$_GET['action'];
}
else
{
$action=NULL;
}
if($action=='')
{
$member->LoggedIn();
$title='Secure Page';
$content=$member->showPrivHeader().
'<article class="boxcontainer">
<div class="boxcontainerlabel">ToDo</div>
<div class="boxcontainercontent">
<ul>
<li>Recode chat box to use Ajax</li>
<li>Change "status" text if email is old</li>
<li>Add text highlighting in search</li>
<li>Explode search terms</li>
<li>Create and store config values in a config table</li>
<li>Create foreign key relationships between database tables</li>
<li>Fix "Last Replier" when merging emails</li>
</ul>
</div>
<div class="boxcontainerlabel">ChangeLog</div>
<div class="boxcontainercontent">
<p>Legend:</p>
<ul>
<li>* -> Security Fix</li>
<li># -> Issue Fix</li>
<li>+ -> Addition</li>
<li>^ -> Change</li>
<li>- -> Removed</li>
<li>! -> Note</li>
</ul>
<p>19-April-2013 Michael Delle (Draven) <[email protected]></p>
<ul>
<li>+ Users Online to the left side of the Hub.</li>
<li>+ Last Active in Users -> Click a user.</li>
</ul>
</div>
</article>'.$member->showPrivFooter();
}
elseif($action=='logout')
{
$member->logout();
}
elseif($action=='preferences')
{
$member->LoggedIn();
$title='Preferences';
$content=$member->showPrivHeader().$member->preferences().$member->showPrivFooter();
}
elseif($action=='change-settings')
{
$member->LoggedIn();
$title='Account-Settings';
$content=$member->showPrivHeader().$member->changeSettings().$member->showPrivFooter();
}
elseif($action=='change-password')
{
$member->LoggedIn();
$title='Change Password';
$content=$member->showPrivHeader().$member->changePassword().$member->showPrivFooter();
}
elseif($action=='register')
{
$title='Create an account';
$content=$member->showPubHeader().$member->register().$member->showPubFooter();
}
elseif($action=='recover-password')
{
$title='Recover your password';
$content=$member->showPubHeader().$member->recoverPassword().$member->showPubFooter();
}
elseif($action=='reset-password')
{
$member->LoggedIn();
$title='Reset your password';
$content=$member->showPrivHeader().$member->resetPassword().$member->showPrivFooter();
}
elseif($action=='verification')
{
$title='Your account has been verified';
$content=$member->showPubHeader().$member->verification().$member->showPubFooter();
}
elseif($action=="forum")
{
$member->LoggedIn();
$title='Forum';
$content=$member->showPrivHeader().$forum->viewForum().$member->showPrivFooter();
}
elseif($action=="forum_topics")
{
$member->LoggedIn();
$title='Forum';
$content=$member->showPrivHeader().$forum->viewTopics().$member->showPrivFooter();
}
elseif($action=="forum_posts" || $action=="forum_edit")
{
$member->LoggedIn();
$title='Forum';
$content=$member->showPrivHeader().$forum->viewPosts().$member->showPrivFooter();
}
elseif($action=="search")
{
$member->LoggedIn();
$title='Search';
$content=$member->showPrivHeader().$Search->processSearch().$member->showPrivFooter();
}
elseif($action=="policies")
{
$member->LoggedIn();
$title='Policies';
$content=$member->showPrivHeader().
'<article class="boxcontainer">
<div class="boxcontainerlabel">Policies</div>
<div class="boxcontainercontent">
<strong>***Remember to close the ticket when the question is resolved***</strong><br>
<strong>***Be polite***</strong><br><br>';
$get_policies=$member->getPolicies();
foreach($get_policies as $policy)
{
$content.='
<strong>'.nl2br($policy['question']).'</strong><br>
'.($policy['clipboard']=="Yes" ? '<pre class="html">'.$policy['response'].'</pre><br>' : nl2br($policy['response']).'<br><br><br>');
}
$content.='
</div>
</article>
<script type="text/javascript" src="assets/js/vendor/jquery.zclip.min.js"></script>
<script type="text/javascript" src="assets/js/vendor/jquery.snippet.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("pre.html").snippet("html",{style:\'print\',clipboard:\'assets/js/vendor/ZeroClipboard.swf\',showNum:false});
});
</script>'.$member->showPrivFooter();
}
else
{
$title='Please authenticate yourself';
$content=$member->showPubHeader().$member->login().$member->showPubFooter();
}
?>
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title><?php echo $title; ?></title>
<meta name="viewport" content="width=device-width">
<?php
$arr=$member->removeParameters($_SERVER['REQUEST_URI']);
if(!isset($arr['action']))
{
$arr['action']="";
}
else
{
$arr['action']="?action=".$arr['action'];
}
if($_SERVER['REQUEST_URI']=="/hub/member.php?action=login" || $_SERVER['REQUEST_URI']=="/hub/member.php?action=recover-password" || $_SERVER['PHP_SELF'].$arr['action']=="/hub/member.php?action=verification")
{
?>
<link rel="stylesheet" href="assets/css/reset.css">
<link rel="stylesheet" href="assets/css/style.css">
<?php
}
else
{
?>
<link rel="stylesheet" href="assets/css/normalize.css">
<link rel="stylesheet" href="assets/css/main.css">
<?php
}
?>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="assets/js/vendor/jquery-1.8.0.min.js"><\/script>')</script>
<script src="assets/js/jquery.badbrowser.js"></script>
<script src="assets/js/plugins.js"></script>
<script src="assets/js/main.js"></script>
<script src="assets/js/vendor/modernizr-2.6.1.min.js"></script>
</head>
<body class="bodymain">
<!--[if lt IE 7]>
<p class="chromeframe">You are using an outdated browser. <a href="http://browsehappy.com/">Upgrade your browser today</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to better experience this site.</p>
<![endif]-->
<?php echo $content; ?>
</body>
</html>
<?php
# Send the buffer to the user's browser.
ob_end_flush();
?>