-
Notifications
You must be signed in to change notification settings - Fork 4
/
troubleshooting.php
executable file
·59 lines (39 loc) · 1.75 KB
/
troubleshooting.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
<?php
require('settings.php');
$con=mysqli_connect($sql_server,$sql_username,$sql_password,"rpiwayfinding") or die("Connect failed: %s<br />". mysqli_connect_error());
$r = $rooms[0];
echo "Checking for rooms...<br /><br />";
if (is_array($r)) { echo "Found first room: {$r['name']}"; } else { echo "ERROR: No rooms found"; }
echo "<br /><br />";
echo "Checking events table...<br /><br />";
$sql_check = "SELECT * FROM events";
if ($result = mysqli_query($con, $sql_check)) {
echo "Found these results: <br />";
while ($row = mysqli_fetch_row($result)) {
echo "id: {$row[0]}, name: {$row[1]}, start: {$row[2]}, end: {$row[3]}, room: {$row[4]}<br />";
}
} else {
echo "No results found in database.<br /><br />";
echo "Attempting to gather information from the first room listed...<br />";
if ($r['type'] == 1) {
require_once('php-ews/ExchangeWebServices.php');
require_once('php-ews/EWSType.php');
require_once('php-ews/NTLMSoapClient.php');
require_once('php-ews/EWSType/FindItemType.php');
require_once('php-ews/EWSType/ItemQueryTraversalType.php');
require_once('php-ews/EWSType/ItemResponseShapeType.php');
require_once('php-ews/EWSType/DefaultShapeNamesType.php');
require_once('php-ews/EWSType/CalendarViewType.php');
require_once('php-ews/EWSType/NonEmptyArrayOfBaseFolderIdsType.php');
require_once('php-ews/EWSType/DistinguishedFolderIdType.php');
require_once('php-ews/EWSType/DistinguishedFolderIdNameType.php');
require_once('php-ews/NTLMSoapClient/Exchange.php');
include(__DIR__ . 'tests/exchange-test.php');
} else if ($r['type'] == 2) {
include(__DIR__ . 'tests/planning-center-test.php');
} else if ($r['type'] == 3) {
include(__DIR__ . 'tests/google-calendar-test.php');
} else {
//you need to make your own code.
}
}