Revision c946d721
Added by Steve Beaver over 8 years ago
| src/usr/local/www/services_checkip.php | ||
|---|---|---|
| 35 | 35 |
$a_checkipservice = &$config['checkipservices']['checkipservice']; |
| 36 | 36 |
|
| 37 | 37 |
$dirty = false; |
| 38 |
if ($_GET['act'] == "del") {
|
|
| 39 |
unset($a_checkipservice[$_GET['id']]);
|
|
| 38 |
if ($_POST['act'] == "del") {
|
|
| 39 |
unset($a_checkipservice[$_POST['id']]);
|
|
| 40 | 40 |
$dirty = true; |
| 41 |
} else if ($_GET['act'] == "toggle") {
|
|
| 42 |
if ($a_checkipservice[$_GET['id']]) {
|
|
| 43 |
if (isset($a_checkipservice[$_GET['id']]['enable'])) {
|
|
| 44 |
unset($a_checkipservice[$_GET['id']]['enable']);
|
|
| 41 |
} else if ($_POST['act'] == "toggle") {
|
|
| 42 |
if ($a_checkipservice[$_POST['id']]) {
|
|
| 43 |
if (isset($a_checkipservice[$_POST['id']]['enable'])) {
|
|
| 44 |
unset($a_checkipservice[$_POST['id']]['enable']);
|
|
| 45 | 45 |
} else {
|
| 46 |
$a_checkipservice[$_GET['id']]['enable'] = true;
|
|
| 46 |
$a_checkipservice[$_POST['id']]['enable'] = true;
|
|
| 47 | 47 |
} |
| 48 | 48 |
$dirty = true; |
| 49 |
} else if ($_GET['id'] == count($a_checkipservice)) {
|
|
| 49 |
} else if ($_POST['id'] == count($a_checkipservice)) {
|
|
| 50 | 50 |
if (isset($config['checkipservices']['disable_factory_default'])) {
|
| 51 | 51 |
unset($config['checkipservices']['disable_factory_default']); |
| 52 | 52 |
} else {
|
| ... | ... | |
| 130 | 130 |
<a class="fa fa-pencil <?=$visibility?>" title="<?=gettext('Edit service')?>" href="services_checkip_edit.php?id=<?=$i?>"></a>
|
| 131 | 131 |
<?php if (isset($checkipservice['enable'])) {
|
| 132 | 132 |
?> |
| 133 |
<a class="fa fa-ban" title="<?=gettext('Disable service')?>" href="?act=toggle&id=<?=$i?>"></a>
|
|
| 133 |
<a class="fa fa-ban" title="<?=gettext('Disable service')?>" href="?act=toggle&id=<?=$i?>" usepost></a>
|
|
| 134 | 134 |
<?php } else {
|
| 135 | 135 |
?> |
| 136 |
<a class="fa fa-check-square-o" title="<?=gettext('Enable service')?>" href="?act=toggle&id=<?=$i?>"></a>
|
|
| 136 |
<a class="fa fa-check-square-o" title="<?=gettext('Enable service')?>" href="?act=toggle&id=<?=$i?>" usepost></a>
|
|
| 137 | 137 |
<?php } |
| 138 | 138 |
?> |
| 139 |
<a class="fa fa-trash <?=$visibility?>" title="<?=gettext('Delete service')?>" href="services_checkip.php?act=del&id=<?=$i?>"></a>
|
|
| 139 |
<a class="fa fa-trash <?=$visibility?>" title="<?=gettext('Delete service')?>" href="services_checkip.php?act=del&id=<?=$i?>" usepost></a>
|
|
| 140 | 140 |
</td> |
| 141 | 141 |
</tr> |
| 142 | 142 |
<?php |
| ... | ... | |
| 162 | 162 |
'as a string in the following format: ') . |
| 163 | 163 |
'<pre>Current IP Address: x.x.x.x</pre>' . |
| 164 | 164 |
gettext( |
| 165 |
'The first (highest in list) enabled check ip service will be used to ' .
|
|
| 165 |
'The first (highest in list) enabled check ip service will be used to ' . |
|
| 166 | 166 |
'check IP addresses for Dynamic DNS services, and ' . |
| 167 | 167 |
'RFC 2136 entries that have the "Use public IP" option enabled.') . |
| 168 | 168 |
'<br/><br/>' |
Also available in: Unified diff
GET/POST conversion - services part 1