-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcustomers.php
More file actions
49 lines (43 loc) · 1.03 KB
/
customers.php
File metadata and controls
49 lines (43 loc) · 1.03 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
<!doctype html>
<html>
<head>
<title>Customers</title>
<link rel="stylesheet" href="styles/bootstrap.css" />
</head>
<body>
<h3>My customers</h3>
<table class="table table-striped">
<thead>
<tr>
<th>Own Id</th>
<th>billwerk Id</th>
<th>Name</th>
<th>Created At</th>
</tr>
</thead>
<tbody>
<?php
include 'config.php';
$m = new MongoClient($GLOBALS['mongodb'],array(
"connect" => TRUE
));
//$m = new MongoClient();
$db = $m->$GLOBALS['dbname'];
$c_customers = $db->customers;
$cursor = $c_customers->find();
foreach ($cursor as $doc)
{
?>
<tr>
<td><?php echo @(string)$doc['_id']; ?></td>
<td><?php echo @$doc['Id']; ?></td>
<td><a href="/portal.php?contractid=<?php echo @$doc['contractid']; ?>"><?php echo @$doc['CustomerName']; ?></a></td>
<td><?php echo @$doc['CreatedAt']; ?></td>
</tr>
<?php
}
?>
</tbody>
</table>
</body>
</html>