From 60adc79cfe57d17d0727bd41cbcce755233b97b3 Mon Sep 17 00:00:00 2001 From: jim-p Date: Thu, 7 Apr 2011 12:09:34 -0400 Subject: Misc shared key export fixes. --- .../vpn_openvpn_export_shared.php | 25 ++++++++++++---------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/config/openvpn-client-export/vpn_openvpn_export_shared.php b/config/openvpn-client-export/vpn_openvpn_export_shared.php index 95cc37bd..60bd09d4 100644 --- a/config/openvpn-client-export/vpn_openvpn_export_shared.php +++ b/config/openvpn-client-export/vpn_openvpn_export_shared.php @@ -58,6 +58,7 @@ foreach($a_server as $sindex => $server) { $name = "Shared Key Server {$prot}:{$port}"; $ras_serverent['index'] = $sindex; $ras_serverent['name'] = $name; + $ras_serverent['mode'] = $server['mode']; $ras_server[] = $ras_serverent; } @@ -159,7 +160,7 @@ var servers = new Array(); servers[] = new Array(); servers[][0] = ''; servers[][1] = new Array(); -servers[][2] = '';; +servers[][2] = ''; function download_begin(act) { @@ -213,7 +214,7 @@ function download_begin(act) { } var dlurl; - dlurl = "/vpn_openvpn_export.php?act=" + act; + dlurl = "/vpn_openvpn_export_shared.php?act=" + act; dlurl += "&srvid=" + servers[index][0]; dlurl += "&useaddr=" + useaddr; if (useproxy) { @@ -237,15 +238,17 @@ function server_changed() { var index = document.getElementById("server").selectedIndex; - var row = table.insertRow(table.rows.length); - var cell0 = row.insertCell(0); - var cell1 = row.insertCell(1); - cell0.className = "listlr"; - cell0.innerHTML = "Other Shared Key OS Client"; - cell1.className = "listr"; - cell1.innerHTML = "Configuration"; - cell1.innerHTML += " / "; - cell1.innerHTML += "Configuration archive"; + if (servers[index][2] == 'p2p_shared_key') { + var row = table.insertRow(table.rows.length); + var cell0 = row.insertCell(0); + var cell1 = row.insertCell(1); + cell0.className = "listlr"; + cell0.innerHTML = "Other Shared Key OS Client"; + cell1.className = "listr"; + cell1.innerHTML = "Configuration"; + cell1.innerHTML += "
"; + cell1.innerHTML += "Configuration archive"; + } } function useaddr_changed(obj) { -- cgit v1.2.3