-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpage.timelord.php
69 lines (57 loc) · 2.94 KB
/
page.timelord.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
<?php
//Check if user is "logged in"
if (!defined('FREEPBX_IS_AUTH')) { die('No direct script access allowed'); }
// check to see if user has automatic updates enabled in FreePBX settings
$cm =& cronmanager::create($db);
$online_updates = $cm->updates_enabled() ? true : false;
// check dev site to see if new version of module is available
if ($online_updates && $foo = lenny_vercheck()) {
print "<br>A <b>new version of this module is available</b> from the <a target='_blank' href='http://pbxossa.org'>PBX Open Source Software Alliance</a><br>";
}
//if submitting form, update database
if(isset($_POST['submit'])) {
timelord_store(1,$_POST);
needreload();
redirect_standard();
}
// to add right navigation menu enclose output in <div class="rnav"> </div>
/* echo '<div class="rnav">';
echo "menu items";
echo '</div>';
*/
$config = timelord_settings();
?>
<h2>FreePbx Timeord Module</h2>
<form autocomplete="off" name="edit" action="<?php $_SERVER['PHP_SELF'] ?>" method="post" >
<table>
<tr>
<td colspan="2">
<?php echo _('This module is used to provide an IVR voice interface to an installation of the php timeclock project.'); ?>
</td>
</tr>
<tr><td colspan="2"><h5>Module Config<hr></h5></td></tr>
<tr>
<td><a href="#" class="info"><?php echo _("PHP Timeclock Host")?><span><?php echo _("FQDN or IP address to the server hosting the php timeclock software")?></span></a></td>
<td><input type="text" name="host" size=40 value="<?php echo htmlspecialchars(isset($config[0]['host']) ? $config[0]['host'] : ''); ?>" ></td>
</tr>
<tr>
<td><a href="#" class="info"><?php echo _("PHP Timeclock MySQL User")?><span><?php echo _("MySQL username to access the php timeclock database")?></span></a></td>
<td><input type="text" name="user" size=40 value="<?php echo htmlspecialchars(isset($config[0]['user']) ? $config[0]['user'] : ''); ?>" ></td>
</tr>
<tr>
<td><a href="#" class="info"><?php echo _("Password")?><span><?php echo _("Password for MySQL username")?></span></a></td>
<td><input type="text" name="password" size=40 value="<?php echo htmlspecialchars(isset($config[0]['password']) ? $config[0]['password'] : ''); ?>" ></td>
</tr>
<tr>
<td><a href="#" class="info"><?php echo _("Database name")?><span><?php echo _("Name of database where PHP Timclock data is stored")?></span></a></td>
<td><input type="text" name="database" size=40 value="<?php echo htmlspecialchars(isset($config[0]['database']) ? $config[0]['database'] : ''); ?>" ></td>
</tr>
<tr>
<td><a href="#" class="info"><?php echo _("Table Prefix")?><span><?php echo _("If php timeclock was configured with a table prefiex, enter it here")?></span></a></td>
<td><input type="text" name="tableprefix" size=40 value="<?php echo htmlspecialchars(isset($config[0]['tableprefix']) ? $config[0]['tableprefix'] : ''); ?>" ></td>
</tr>
<tr>
<td colspan="2"><br><h6><input name="submit" type="submit" value="<?php echo _("Submit Changes")?>" ></h6></td>
</tr>
</table>
</form>