forked from hasith/csespn
/
admin.users.php
executable file
·140 lines (110 loc) · 4.65 KB
/
admin.users.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
<?php
require_once './global.inc.php';
verify_oauth_session_exists();
if (HttpSession::currentUser()->getOrganization()->access_level < 4) {
echo "Access denied";
die();
}
?>
<!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]-->
<?php require_once './head.inc.php'; ?>
<body>
<!--[if lt IE 7]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<?php require_once './nav.inc.php'; ?>
<div class="container clearfix">
<div id="bannerArea" class="clearfix">
<div id="bannerLeft">
<div id="example-two">
<div class="list-wrap noborder">
<div id="featured2">
<table id="usertable">
<thead>
<tr>
<th>Id</th>
<th>Name</th>
<th>LinkedIn Id</th>
<th>Company</th>
</tr>
</thead>
<tbody>
<?php
$userTools = new UserTools();
$users = $userTools->getAll();
foreach ($users as $user)
{
?>
<tr>
<td><?= $user['id'] ?></td>
<td><?= $user['name'] ?></td>
<td><?= $user['linkedin_id'] ?></td>
<td><a href="" class="companylink" data-companyid="<?= $user['company_id'] ?>" data-id="<?= $user['id'] ?>" ><?= $user['company_name'] ?></a></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div> <!-- END List Wrap -->
</div>
</div>
<div id="rightSide">
<?php
echo "We are learning PHP here";
for($i = 0; $i<5; $i++) {
echo $i." ";
};
?>
<ul id="legend">
<li class=" clearfix">
<a href="admin.users.php">Manage Users</a>
</li>
<li class=" clearfix">
<a href="admin.company.php">Manage Companies</a>
</li>
<li class=" clearfix">
<a href="admin.batches.php">Manage Batches</a>
</li>
<li class=" clearfix">
<a href="admin.events.php">Manage Events</a>
</li>
</ul>
</div>
</div>
</div>
<div id="dialog-form" title="Change Company">
<form id="create_form" method="post" action="user.create.php">
<fieldset>
<input id="userId" name="userId" type="hidden" />
<select name="companyId" id="companylist" size="10" style="width:100%" >
<?php
$companyTools = new CompanyTools();
$companies = $companyTools->getAllCompanies();
foreach ($companies as $company)
{
echo '<option value="' . $company->id . '">' . $company->name . '</option>';
}
?>
</select>
</fieldset>
</form>
</div>
<?php include_once 'scripts.inc.php'; ?>
<script type="text/javascript" src="js/admin.user.js"></script>
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->
<!--<script>
(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
e=o.createElement(i);r=o.getElementsByTagName(i)[0];
e.src='//www.google-analytics.com/analytics.js';
r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
ga('create','UA-XXXXX-X');ga('send','pageview');
</script>-->
</body>
</html>