Don't display addon address if there is no users

This commit is contained in:
Gregory Soutade 2013-10-19 09:04:02 +02:00
parent 875b48899c
commit 30dc0f9b0c

View File

@ -108,17 +108,13 @@ else
echo "</select>\n"; echo "</select>\n";
echo ' <b>Master key </b> <input id="see_password" type="password" name="mkey"/>'; echo ' <b>Master key </b> <input id="see_password" type="password" name="mkey"/>';
echo "<input name=\"see\" type=\"submit\" value=\"See\" onclick=\"if (document.getElementById('see_password').value == '') return true; a=document.getElementById('selected_user') ; return derive_mkey(a.options[a.selectedIndex].value, 'see_password') ;\"/>" . "\n"; echo "<input name=\"see\" type=\"submit\" value=\"See\" onclick=\"if (document.getElementById('see_password').value == '') return true; a=document.getElementById('selected_user') ; return derive_mkey(a.options[a.selectedIndex].value, 'see_password') ;\"/>" . "\n";
}
if ($_SERVER['HTTPS'] == "")
echo "<div id=\"addon_address\">Current addon address is : http://" . $_SERVER['SERVER_NAME'] . "/" . $user . "</div>\n";
else
echo "<div id=\"addon_address\">Current addon address is : https://" . $_SERVER['SERVER_NAME'] . "/" . $user . "</div>\n";}
?> ?>
</form> </form>
<?php
global $user;
if ($_SERVER['HTTPS'] == "")
echo "<div id=\"addon_address\">Current addon address is : http://" . $_SERVER['SERVER_NAME'] . "/" . $user . "</div>\n";
else
echo "<div id=\"addon_address\">Current addon address is : https://" . $_SERVER['SERVER_NAME'] . "/" . $user . "</div>\n";
?>
<div id="passwords"> <div id="passwords">
<?php <?php
global $user; global $user;