by StenAaboHansen » Wed May 20, 2015 8:57 pm
Thanks, it works
To other, who need to create client menu entry. The code below control the IP number of the user, my WINGFTP server is behind a F5 proxy then all external users come from only one IP number. If they come from the Internet they do not have the menu entry. I they come from intranet they will see the menu entry.
<%
local tab1 = {}
if _REMOTE_IP == "xx.xx.xx.xx" then a=""; else
tab1.plugin_enabled = true
tab1.extbutton_name = "User manager"
tab1.extbutton_func = "show_mydiv1()"
tab1.extbutton_icon = "plugins/User_Adm_1/icon3.png"
tab1.need_selectfile = false
tab1.exthtml = [[ <div id="commandUser" style="position:absolute; border:0; z-index:50; top:75px;
left:500px; width:150px; height:10px; padding:1px; text-align:center;
background:#FFFFFF; display:none; onclick="hide_mydiv1()";>
<form action="http://my-server:8080/" method="get"><input type="image" src="plugins/User_Adm_1/icon3.png" alt="User Manager" ></form>
</div>
]]
tab1.extjs = [[
function show_mydiv1() { $("commandUser").style.display = "";}
function hide_mydiv1() { $("commandUser").style.display = "none";}
]]
register_plugin(tab1)
end
%>