-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure.php.inc
More file actions
61 lines (45 loc) · 1.61 KB
/
configure.php.inc
File metadata and controls
61 lines (45 loc) · 1.61 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
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
<?php
require_once('inc/startsession.php');
/////////////////////////////////////////////////////////////////////
//
// Written by Jim Garbe-- Dynamic Checksheet
//
/////////////////////////////////////////////////////////////////////
$Title="Configure";
require_once('inc/title.php');
?>
<?php
/////////////////////////////////
//Bring in functions of "chkclass.php"
/////////////////////////////////
require_once("inc/functions.php.inc");
//<!-- Access the database -->
require_once("inc/configure.inc.php");
mysql_connect(localhost,$username,$password) or die ( "Unable to log into mysql");
mysql_select_db($database) or die( "Unable to select database");
require_once('inc/appvars.php');
require_once('inc/connectvars.php');
// Generate the navigation menu
if (isset($_SESSION['username']) && ($_SESSION['status'] == 1)) {
echo ' <a href="viewprofile.php">View Profile</a><br />';
echo ' <a href="editprofile.php">Edit Profile</a><br />';
echo ' <a href="logout.php">Log Out (' . $_SESSION['username'] . ')</a>';
}
else {
echo ' <a href="login.php">Log In As An Administrator(' . $_SESSION['username'] . ').</a><br />';
echo ' <a href="signup.php">Sign Up</a>';
}
// Connect to the database
$dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
// Retrieve the user data from MySQL
$query = "SELECT user_id, first_name FROM _user WHERE first_name IS NOT NULL ORDER BY join_date DESC LIMIT 5";
$data = mysqli_query($dbc, $query);
mysqli_close($dbc);
?>
</div>
<?php
if (isset($_SESSION['user_id']) && ($_SESSION['status'] ==1)) {
}
?>
</body>
</html>