-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathdtmf_stash.php
116 lines (84 loc) · 4.8 KB
/
dtmf_stash.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
<?php
// --------------------------------------------------------
// SESSION CHECK TO SEE IF USER IS LOGGED IN.
session_start();
if ((!isset($_SESSION['username'])) || (!isset($_SESSION['userID']))){
header('location: login.php'); // If they aren't logged in, send them to login page.
} elseif (!isset($_SESSION['callsign'])) {
header('location: wizard/index.php'); // If they are logged in, but they haven't set a callsign then send them to setup wizard.
} else { // If they are logged in and have set a callsign, show the page.
// --------------------------------------------------------
################################################################################
# AUTOLOAD CLASSES
require_once(rtrim($_SERVER['DOCUMENT_ROOT'], '/') . '/includes/autoloadClasses.php');
################################################################################
$pageTitle = "DTMF Reference";
include('includes/header.php');
$Database = new Database();
$settings = $Database->get_settings();
$ports = $Database->get_ports();
$ModulesClass = new Modules();
$modules = $ModulesClass->get_modules();
// Create count array for Link Groups
foreach ($ports as $curPort) {
if (isset($curPort['linkGroup']) && $curPort['linkGroup'] > 0 && $curPort['portEnabled'] == 1){
// $linkGrpCount[$curPort['linkGroup']]++;
}
}
?>
<?php if (isset($alert)) { echo $alert; } ?>
<form class="form-horizontal" role="form" action="functions/ajax_db_update.php" method="post" id="settingsUpdate" name="settingsUpdate" >
<div class="row-fluid sortable">
<div class="box span12">
<div class="box-header well" data-original-title>
<h2><i class="icon-th"></i> DTMF Reference</h2>
</div>
<div class="box-content">
<p>This provides a quick reference of available DTMF commands that can be sent to the repeater from another radio. This list will change depending on the modules that you have enabled. You may print this page for your own reference.</p>
<br>
<fieldset>
<legend>* - Force ID</legend>
<p>By pressing the star key (*), this will cause the repeater to identify.</p>
<br>
<?php if ($settings['repeaterDTMF_disable'] == 'True') { ?>
<a name="remoteDisable"></a>
<legend>Remote DMTF Disable</legend>
<p>You have chosen to enable the ability to remotely disable the transmitter via DTMF commands. This is useful for control operators to stop system abuse or to simply make the system inactive. Note that the pin your selected is part of the codes below.</p>
<p><strong><?php echo $settings['repeaterDTMF_disable_pin'] ?> + 0#</strong> - <span style="color:red;">Disable Transmitter</span> <br><em>Your code + 0 (Disable) + # (Execute Command)</em></p>
<p><strong><?php echo $settings['repeaterDTMF_disable_pin'] ?> + 1#</strong> - <span style="color:green;">Enable Transmitter</span> <br><em>Your code + 1 (Enable) + # (Execute Command)</em></p>
<p>NOTE: If a module is running while you wish to disable the transmitter, you must first disable the module OR force the disable command by prefixing with a star (*). So, the disable command would become <strong>* + <?php echo $settings['repeaterDTMF_disable_pin'] ?> + 0#</strong></p>
<br>
<?php } ?>
<?php echo $ModulesClass->display_dtmf_codes(); ?>
<legend># - Deactivate Current Module</legend>
<p>By pressing the number key (#), this will deactivate the current module. If you are in a module that has a couple levels, then the number key (#) will function like a back key.</p>
<br>
<?php
// Display link groups that should be active
if (isset($linkGrpCount)) {
echo '<legend>Links</legend>';
echo '<p>You can enable or disable linking using the codes below.</p>';
foreach ($linkGrpCount as $curLinkNum => $curLinkCount) {
if ($curLinkCount > 1) {
?>
<h4>Link Group <?php echo $curLinkNum ?></h4>
<p><strong>8<?php echo $curLinkNum ?> + 0#</strong> - <span style="color:red;">Disable Link Group <?php echo $curLinkNum ?></span> <br><em>Link Group ID + 0 (Disable) + # (Execute Command)</em></p>
<p><strong>8<?php echo $curLinkNum ?> + 1#</strong> - <span style="color:green;">Enable Link Group <?php echo $curLinkNum ?></span> <br><em>Link Group ID + 1 (Enable) + # (Execute Command)</em></p>
<?php
}
}
}
?>
<br>
</fieldset>
</div>
</div><!--/span-->
</div><!--/row-->
</form>
<?php include('includes/footer.php'); ?>
<?php
// --------------------------------------------------------
// SESSION CHECK TO SEE IF USER IS LOGGED IN.
} // close ELSE to end login check from top of page
// --------------------------------------------------------
?>