-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaccount.manager.php
More file actions
33 lines (33 loc) · 1.86 KB
/
account.manager.php
File metadata and controls
33 lines (33 loc) · 1.86 KB
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
<?php
if(isset($_SESSION['username'])){
logged();
}
else{
sign_in();
}
function logged(){
echo '<div class="dropdown dropleft">
<img src="./assets/img/avatars/'.$_SESSION['userimage'].'" data-toggle="dropdown" height="30px" width="30px" style="position: fixed; top: 10px; right: 10px; border-radius: 50%;">
<div class="dropdown-menu dropdown-menu-left card-4" style="margin-top: 50px;!important; width: 100px !important;">
<span class="dropdown-item-text" href="#" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis"><strong>'.$_SESSION['username'].'</strong></span>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="./?page=loggedin">Dashboard</a>
<a class="dropdown-item" href="./upload-sample.php">Upload Sample</a>
<a class="dropdown-item" href="./uploadQuestions.php">Upload Questions</a>
<a class="dropdown-item" href="./user-profile.php">Account Info</a>
<a class="dropdown-item" href="./?page=settings">Settings</a>
<a class="dropdown-item" href="./?page=logout">Logout</a>
</div>
</div>';
}
function sign_in(){
echo '<div class="dropdown dropleft">
<img src="./assets/img/user-general.svg" data-toggle="dropdown" height="30px" width="30px" style="position: fixed; top: 10px; right: 10px;">
<div class="dropdown-menu dropdown-menu-left card-4" style="margin-top: 50px;!important; width: 100px !important;">
<span class="dropdown-item-text" href="#"><strong>Guest Account</strong></span>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="./?page=signup">Sign up</a>
<a class="dropdown-item" href="./?page=signin">Sign in</a>
</div>
</div>';
}