X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fxnet.php;h=4fceb214105a1c3f6fad2227c9ebfc12e790cdd1;hb=414e606a70777593d76a55b5d3f070037bad3d80;hp=66972df9c42d40ff92ebda175614eec23fa01e2a;hpb=4a8a1e0a0c0f0ede05ba5b4485add0e2ee7bf5cd;p=platal.git diff --git a/modules/xnet.php b/modules/xnet.php index 66972df..4fceb21 100644 --- a/modules/xnet.php +++ b/modules/xnet.php @@ -72,7 +72,7 @@ class XnetModule extends PLModule function handler_admin(&$page) { - new_admin_page('xnet/admin.tpl'); + $page->changeTpl('xnet/admin.tpl'); if (Get::has('del')) { $res = XDB::query('SELECT id, nom, mail_domain @@ -200,8 +200,11 @@ class XnetModule extends PLModule function handler_autologin(&$page) { + $allkeys = func_get_args(); + unset($allkeys[0]); + $url = join('/',$allkeys); header("Content-type: text/javascript; charset=utf-8"); - echo '$.ajax({ url: "index?forceXml=1", dataType: "xml", success: function(xml) { $("body").empty(); $("body",xml).prependTo("body"); }});'; + echo '$.ajax({ url: "'.$url.'?forceXml=1", dataType: "xml", success: function(xml) { $("body",xml).insertBefore("body"); $("body:eq(1)").remove(); }});'; exit; } }