mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 03:33:25 +02:00
ddns.cgi: Drop code for wildcard support.
It seems all ddns providers removed their support for wildcards.
This commit is contained in:
@@ -62,7 +62,6 @@ $settings{'LOGIN'} = '';
|
|||||||
$settings{'PASSWORD'} = '';
|
$settings{'PASSWORD'} = '';
|
||||||
$settings{'ENABLED'} = '';
|
$settings{'ENABLED'} = '';
|
||||||
$settings{'PROXY'} = '';
|
$settings{'PROXY'} = '';
|
||||||
$settings{'WILDCARDS'} = '';
|
|
||||||
$settings{'SERVICE'} = '';
|
$settings{'SERVICE'} = '';
|
||||||
|
|
||||||
$settings{'ACTION'} = '';
|
$settings{'ACTION'} = '';
|
||||||
@@ -136,11 +135,6 @@ if ($settings{'ACTION'} eq $Lang::tr{'toggle enable disable'}) {
|
|||||||
|
|
||||||
# Update ENABLED.
|
# Update ENABLED.
|
||||||
print FILE "$temp[0],$temp[1],$temp[2],$temp[3],$temp[4],$temp[5],$temp[6],$settings{'ENABLED'}\n";
|
print FILE "$temp[0],$temp[1],$temp[2],$temp[3],$temp[4],$temp[5],$temp[6],$settings{'ENABLED'}\n";
|
||||||
|
|
||||||
} elsif ($settings{'WILDCARDS'} ne '') {
|
|
||||||
|
|
||||||
# Update WILDCARDS.
|
|
||||||
print FILE "$temp[0],$temp[1],$temp[2],$temp[3],$settings{'WILDCARDS'},$temp[5],$temp[6],$temp[7]\n";
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
@@ -170,8 +164,6 @@ if ($settings{'ACTION'} eq $Lang::tr{'toggle enable disable'}) {
|
|||||||
#
|
#
|
||||||
if (($settings{'ACTION'} eq $Lang::tr{'add'}) || ($settings{'ACTION'} eq $Lang::tr{'update'})) {
|
if (($settings{'ACTION'} eq $Lang::tr{'add'}) || ($settings{'ACTION'} eq $Lang::tr{'update'})) {
|
||||||
|
|
||||||
# XXX TODO: Check for provider which supports wildcards.
|
|
||||||
|
|
||||||
# Check if a hostname has been given.
|
# Check if a hostname has been given.
|
||||||
if ($settings{'HOSTNAME'} eq '') {
|
if ($settings{'HOSTNAME'} eq '') {
|
||||||
$errormessage = $Lang::tr{'hostname not set'};
|
$errormessage = $Lang::tr{'hostname not set'};
|
||||||
@@ -356,7 +348,6 @@ $checked{'BEHINDROUTER'}{'RED_IP'} = '';
|
|||||||
$checked{'BEHINDROUTER'}{'FETCH_IP'} = '';
|
$checked{'BEHINDROUTER'}{'FETCH_IP'} = '';
|
||||||
$checked{'BEHINDROUTER'}{$settings{'BEHINDROUTER'}} = "checked='checked'";
|
$checked{'BEHINDROUTER'}{$settings{'BEHINDROUTER'}} = "checked='checked'";
|
||||||
|
|
||||||
$checked{'WILDCARDS'}{'on'} = ($settings{'WILDCARDS'} eq '') ? '' : "checked='checked'";
|
|
||||||
$checked{'ENABLED'}{'on'} = ($settings{'ENABLED'} eq '' ) ? '' : "checked='checked'";
|
$checked{'ENABLED'}{'on'} = ($settings{'ENABLED'} eq '' ) ? '' : "checked='checked'";
|
||||||
|
|
||||||
# Show box for errormessages..
|
# Show box for errormessages..
|
||||||
@@ -453,8 +444,8 @@ print <<END
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class='base'>$Lang::tr{'enable wildcards'}</td>
|
<td class='base'></td>
|
||||||
<td><input type='checkbox' name='WILDCARDS' value='on' $checked{'WILDCARDS'}{'on'} /></td>
|
<td></td>
|
||||||
<td class='base'>$Lang::tr{'username'}:</td>
|
<td class='base'>$Lang::tr{'username'}:</td>
|
||||||
<td><input type='text' name='LOGIN' value='$settings{'LOGIN'}' /></td>
|
<td><input type='text' name='LOGIN' value='$settings{'LOGIN'}' /></td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -495,10 +486,9 @@ END
|
|||||||
print <<END
|
print <<END
|
||||||
<table width='100%' class='tbl'>
|
<table width='100%' class='tbl'>
|
||||||
<tr>
|
<tr>
|
||||||
<th width='15%' align='center' class='boldbase'><b>$Lang::tr{'service'}</b></th>
|
<th width='20%' align='center' class='boldbase'><b>$Lang::tr{'service'}</b></th>
|
||||||
<th width='25%' align='center' class='boldbase'><b>$Lang::tr{'hostname'}</b></th>
|
<th width='30%' align='center' class='boldbase'><b>$Lang::tr{'hostname'}</b></th>
|
||||||
<th width='30%' align='center' class='boldbase'><b>$Lang::tr{'domain'}</b></th>
|
<th width='30%' align='center' class='boldbase'><b>$Lang::tr{'domain'}</b></th>
|
||||||
<th width='10%' align='center' class='boldbase'><b>$Lang::tr{'wildcards'}</b></th>
|
|
||||||
<th width='20%' colspan='3' class='boldbase' align='center'><b>$Lang::tr{'action'}</b></th>
|
<th width='20%' colspan='3' class='boldbase' align='center'><b>$Lang::tr{'action'}</b></th>
|
||||||
</tr>
|
</tr>
|
||||||
END
|
END
|
||||||
@@ -513,7 +503,6 @@ close(FILE);
|
|||||||
my $ip = &General::GetDyndnsRedIP;
|
my $ip = &General::GetDyndnsRedIP;
|
||||||
my $id = 0;
|
my $id = 0;
|
||||||
my $toggle_enabled;
|
my $toggle_enabled;
|
||||||
my $toggle_wildcards;
|
|
||||||
|
|
||||||
foreach my $line (@current) {
|
foreach my $line (@current) {
|
||||||
|
|
||||||
@@ -521,19 +510,6 @@ foreach my $line (@current) {
|
|||||||
chomp(@current);
|
chomp(@current);
|
||||||
my @temp = split(/\,/,$line);
|
my @temp = split(/\,/,$line);
|
||||||
|
|
||||||
# Generate checkbox icons for wildcard.
|
|
||||||
my $gifwildcard='';
|
|
||||||
my $descwildcard='';
|
|
||||||
if ($temp[4] eq "on") {
|
|
||||||
$gifwildcard = 'on.gif';
|
|
||||||
$descwildcard = $Lang::tr{'click to disable'};
|
|
||||||
$toggle_wildcards = 'off';
|
|
||||||
} else {
|
|
||||||
$gifwildcard = 'off.gif';
|
|
||||||
$descwildcard = $Lang::tr{'click to enable'};
|
|
||||||
$toggle_wildcards = 'on';
|
|
||||||
}
|
|
||||||
|
|
||||||
# Generate value for enable/disable checkbox.
|
# Generate value for enable/disable checkbox.
|
||||||
my $sync = "<font color='blue'>";
|
my $sync = "<font color='blue'>";
|
||||||
my $gif = '';
|
my $gif = '';
|
||||||
@@ -570,13 +546,6 @@ print <<END
|
|||||||
<td align='center' $col>$sync$temp[1]</td>
|
<td align='center' $col>$sync$temp[1]</td>
|
||||||
<td align='center' $col>$sync$temp[2]</td>
|
<td align='center' $col>$sync$temp[2]</td>
|
||||||
|
|
||||||
<td align='center' $col><form method='post' action='$ENV{'SCRIPT_NAME'}'>
|
|
||||||
<input type='hidden' name='ID' value='$id'>
|
|
||||||
<input type='hidden' name='WILDCARDS' value='$toggle_wildcards'>
|
|
||||||
<input type='hidden' name='ACTION' value='$Lang::tr{'toggle enable disable'}' />
|
|
||||||
<input type='image' name='$Lang::tr{'toggle enable disable'}' src='/images/$gifwildcard' alt='$descwildcard' title='$descwildcard' />
|
|
||||||
</form></td>
|
|
||||||
|
|
||||||
<td align='center' $col><form method='post' action='$ENV{'SCRIPT_NAME'}'>
|
<td align='center' $col><form method='post' action='$ENV{'SCRIPT_NAME'}'>
|
||||||
<input type='hidden' name='ID' value='$id'>
|
<input type='hidden' name='ID' value='$id'>
|
||||||
<input type='hidden' name='ENABLED' value='$toggle_enabled'>
|
<input type='hidden' name='ENABLED' value='$toggle_enabled'>
|
||||||
|
|||||||
Reference in New Issue
Block a user