diff --git a/e107_plugins/alt_auth/alt_auth_adminmenu.php b/e107_plugins/alt_auth/alt_auth_adminmenu.php index e4d367141..2fca4f895 100755 --- a/e107_plugins/alt_auth/alt_auth_adminmenu.php +++ b/e107_plugins/alt_auth/alt_auth_adminmenu.php @@ -131,14 +131,14 @@ function alt_auth_get_field_list($tableType, $frm, $parm, $asCheckboxes = FALSE) { if (varsettrue($v['showAll']) || varsettrue($v[$tableType])) { - $ret .= ""; + $ret .= ""; if ($v['optional'] == FALSE) $ret .= '* '; $ret .= $v['prompt'].':'; if (isset($v['help'])) { $ret .= "
".$v['help'].""; } - $ret .= ""; + $ret .= ""; // $fieldname = $tableType.'_'.$v['optname']; $fieldname = $tableType.'_xf_'.$f; // Name of the input box $value = varset($v['default'],''); @@ -267,10 +267,11 @@ function alt_auth_get_db_fields($prefix, $frm, $parm, $fields = 'server|uname|pw { if (in_array($fn,$opts)) { - $ret .= "".$cf['prompt']; - if ($cf['help']) $ret .= "
".$cf['help'].""; - $ret .= ""; + $ret .= "".$cf['prompt']; + + $ret .= ""; $ret .= $frm -> form_text($prefix.'_'.$cf['fieldname'], $cf['size'], $parm[$prefix.'_'.$cf['fieldname']], $cf['max_size']); + if ($cf['help']) $ret .= "
".$cf['help'].""; $ret .= "\n"; } } @@ -376,7 +377,7 @@ function altAuthGetParams($prefix) function alt_auth_test_form($prefix, $frm) { $text = $frm -> form_open('post', e_SELF, 'testform'); - $text .= " + $text .= "
"; if (isset($_POST['testauth'])) @@ -397,13 +398,13 @@ function alt_auth_test_form($prefix, $frm) $log_result = $_login->login($val_name, $_POST['passtovalidate'], $pass_vars, ($val_name == '')); } - $text .= "".LAN_ALT_48; if ($val_name) { $text .= "
".LAN_ALT_49.$val_name.'
'.LAN_ALT_50; if (varset($_POST['passtovalidate'],'')) $text .= str_repeat('*',strlen($_POST['passtovalidate'])); else $text .= LAN_ALT_51; } - $text .= "
"; } - $text .= ""; - $text .= ""; $text .= ""; $text .= "
".LAN_ALT_42."
".LAN_ALT_48; + $text .= "
"; + $text .= ""; switch ($log_result) { case AUTH_SUCCESS : @@ -439,16 +440,17 @@ function alt_auth_test_form($prefix, $frm) $text .= "
".LAN_ALT_33.""; + $text .= "
".LAN_ALT_33.""; $text .= $frm->form_text('nametovalidate', 35, '', 120); $text .= "
".LAN_ALT_34.""; + $text .= "
".LAN_ALT_34.""; $text .= $frm->form_password('passtovalidate', 35, '', 120); $text .= "
"; - $text .= $frm->form_button("submit", 'testauth', LAN_ALT_47); +// $text .= $frm->form_button("submit", 'testauth', LAN_ALT_47); + $text .= e107::getForm()->admin_button('testauth', LAN_ALT_47,'other'); $text .= "
"; diff --git a/e107_plugins/alt_auth/alt_auth_conf.php b/e107_plugins/alt_auth/alt_auth_conf.php index c3cb039a4..fc03fcf0f 100755 --- a/e107_plugins/alt_auth/alt_auth_conf.php +++ b/e107_plugins/alt_auth/alt_auth_conf.php @@ -35,6 +35,7 @@ if(!getperms('P') || !e107::isInstalled('alt_auth')) exit(); } require_once(e_HANDLER.'form_handler.php'); +$frm = e107::getForm(); require_once(e_ADMIN.'auth.php'); include_lan(e_PLUGIN.'alt_auth/languages/'.e_LANGUAGE.'/admin_alt_auth.php'); define('ALT_AUTH_ACTION', 'main'); @@ -113,7 +114,7 @@ if(isset($message)) $text = "
- +
@@ -159,13 +160,14 @@ $text .= "
-
- +
". +$frm->admin_button('updateprefs',LAN_UPDATE,'update')."
"; +$ns = e107::getRender(); -e107::getRender()->tablerender(LAN_ALT_3, $text); +$ns->tablerender(LAN_ALT_3, $text); if ($euf->userCount) @@ -201,7 +203,8 @@ if ($euf->userCount) } $text .= "
- +".$frm->admin_button('updateeufs',LAN_UPDATE,'update')." +
diff --git a/e107_plugins/alt_auth/e107db_conf.php b/e107_plugins/alt_auth/e107db_conf.php index 60db1005e..9eca8de8c 100644 --- a/e107_plugins/alt_auth/e107db_conf.php +++ b/e107_plugins/alt_auth/e107db_conf.php @@ -54,19 +54,19 @@ function show_e107db_form() $frm = new form; $text = $frm -> form_open('post', e_SELF); - $text .= " + $text .= "
"; - $text .= ""; $text .= alt_auth_get_db_fields('e107db', $frm, $parm, 'server|uname|pwd|db|prefix|classfilt'); - $text .= ""; @@ -76,7 +76,8 @@ function show_e107db_form() $text .= alt_auth_get_field_list('e107db',$frm, $parm, TRUE); $text .= "
".LAN_ALT_26.""; + $text .= "
".LAN_ALT_26.""; $text .= E107DB_LAN_1; $text .= "
".E107DB_LAN_9.""; + $text .= "
".E107DB_LAN_9.""; $text .= altAuthGetPasswordSelector('e107db_password_method', $frm, $parm['e107db_password_method'], FALSE); $text .= "
"; - $text .= $frm -> form_button("submit", "update", LAN_ALT_UPDATESET); + $text .= e107::getForm()->admin_button("update", LAN_UPDATE,'update'); +// $text .= $frm -> form_button("submit", "update", LAN_ALT_UPDATESET); $text .= '
'; $text .= $frm -> form_close(); diff --git a/e107_plugins/alt_auth/importdb_conf.php b/e107_plugins/alt_auth/importdb_conf.php index 2a2e1600e..72092d536 100644 --- a/e107_plugins/alt_auth/importdb_conf.php +++ b/e107_plugins/alt_auth/importdb_conf.php @@ -55,14 +55,14 @@ function show_importdb_form() $frm = new form; $text = $frm -> form_open('post', e_SELF); - $text .= " + $text .= "
"; - $text .= ""; + $text .= ""; $text .= ""; $text .= "
".IMPORTDB_LAN_11."
".IMPORTDB_LAN_11."
".IMPORTDB_LAN_9.""; $text .= altAuthGetPasswordSelector('importdb_password_method', $frm, $parm['importdb_password_method'], TRUE); @@ -70,7 +70,7 @@ function show_importdb_form() $text .= "
"; - $text .= $frm -> form_button("submit", "update", LAN_ALT_UPDATESET); + $text .= e107::getForm()->admin_button("update", LAN_UPDATE,'update'); $text .= "
"; $text .= $frm -> form_close(); diff --git a/e107_plugins/alt_auth/ldap_conf.php b/e107_plugins/alt_auth/ldap_conf.php index 5edb618db..ba427e275 100755 --- a/e107_plugins/alt_auth/ldap_conf.php +++ b/e107_plugins/alt_auth/ldap_conf.php @@ -29,6 +29,7 @@ include_lan(e_PLUGIN.'alt_auth/languages/'.e_LANGUAGE.'/admin_alt_auth.php'); define('ALT_AUTH_ACTION', 'ldap'); require_once(e_PLUGIN.'alt_auth/alt_auth_adminmenu.php'); +$mes = e107::getMessage(); $server_types[1] = 'LDAP'; $server_types[2] = 'ActiveDirectory'; @@ -46,7 +47,8 @@ if($_POST['update']) if(!function_exists('ldap_connect')) { - $message .= "

".LDAPLAN_11."

"; + // $message .= "

".LDAPLAN_11."

"; + $mes->addWarning(LDAPLAN_11); } @@ -64,8 +66,8 @@ $current_filter = "(&(cn=[USERNAME]){$ldap['ldap_edirfilter']})"; $frm = new form; $text = $frm -> form_open('post',e_SELF); -$text .= ""; -$text .= "
".LDAPLAN_12.""; +$text .= ""; +$text .= ""; -$text .= ""; -$text .= ""; -$text .= ""; -$text .= ""; -$text .= ""; -$text .= ""; -$text .= ""; @@ -115,13 +117,15 @@ $text .= "
".LDAPLAN_9."
".htmlentities($curre $text .= alt_auth_get_field_list('ldap',$frm, $ldap, FALSE); $text .= "
"; $text .= "
".LDAPLAN_12.""; $text .= $frm -> form_select_open("ldap_servertype"); foreach($server_types as $v) { @@ -75,25 +77,25 @@ foreach($server_types as $v) $text .= $frm -> form_select_close(); $text .= "
".LDAPLAN_1.""; +$text .= "
".LDAPLAN_1.""; $text .= $frm -> form_text("ldap_server", 35, $ldap['ldap_server'], 120); $text .= "
".LDAPLAN_2.""; +$text .= "
".LDAPLAN_2.""; $text .= $frm -> form_text("ldap_basedn", 35, $ldap['ldap_basedn'], 120); $text .= "
".LDAPLAN_14.""; +$text .= "
".LDAPLAN_14.""; $text .= $frm -> form_text("ldap_ou", 35, $ldap['ldap_ou'], 60); $text .= "
".LDAPLAN_3.""; +$text .= "
".LDAPLAN_3.""; $text .= $frm -> form_text("ldap_user", 35, $ldap['ldap_user'], 120); $text .= "
".LDAPLAN_4.""; +$text .= "
".LDAPLAN_4.""; $text .= $frm -> form_text("ldap_passwd", 35, $ldap['ldap_passwd'], 120); $text .= "
".LDAPLAN_5.""; +$text .= "
".LDAPLAN_5.""; $text .= $frm -> form_select_open("ldap_version"); foreach($ldap_ver as $v) @@ -105,7 +107,7 @@ foreach($ldap_ver as $v) $text .= $frm -> form_select_close(); $text .= "
".LDAPLAN_7."
".LDAPLAN_8."
"; +$text .= "
".LDAPLAN_7."
".LDAPLAN_8."
"; $text .= $frm -> form_text('ldap_edirfilter', 35, $ldap['ldap_edirfilter'], 120); $text .= "
".LDAPLAN_9."
".htmlentities($current_filter)."
"; -$text .= $frm -> form_button('submit', 'update', LDAPLAN_13); + +$text .= e107::getForm()->admin_button("update", LAN_UPDATE,'update'); +//$text .= $frm -> form_button('submit', 'update', LDAPLAN_13); $text .= "
\n"; $text .= $frm -> form_close(); -e107::getRender()->tablerender(LDAPLAN_6,$text); +e107::getRender()->tablerender(LDAPLAN_6, $mes->render(). $text); e107::getRender()->tablerender(LAN_ALT_40.LAN_ALT_41,alt_auth_test_form('ldap',$frm)); require_once(e_ADMIN.'footer.php'); diff --git a/e107_plugins/alt_auth/otherdb_conf.php b/e107_plugins/alt_auth/otherdb_conf.php index 37c6d62cf..f3bae2fc9 100644 --- a/e107_plugins/alt_auth/otherdb_conf.php +++ b/e107_plugins/alt_auth/otherdb_conf.php @@ -54,14 +54,14 @@ function show_otherdb_form() $frm = new form; $text = $frm -> form_open("post", e_SELF); - $text .= ""; + $text .= "
"; - $text .= ""; $text .= alt_auth_get_db_fields('otherdb', $frm, $parm, 'server|uname|pwd|db|table|ufield|pwfield|salt'); - $text .= "'; $text .= '
".LAN_ALT_26.""; + $text .= "
".LAN_ALT_26.""; $text .= OTHERDB_LAN_15; $text .= "
".OTHERDB_LAN_9.""; + $text .= "
".OTHERDB_LAN_9.""; $text .= altAuthGetPasswordSelector('otherdb_password_method', $frm, $parm['otherdb_password_method'], TRUE); @@ -72,7 +72,7 @@ function show_otherdb_form() $text .= alt_auth_get_field_list('otherdb',$frm, $parm, FALSE); $text .= "
"; - $text .= $frm -> form_button('submit', 'update', LAN_ALT_UPDATESET); + $text .= e107::getForm()->admin_button("update", LAN_UPDATE,'update'); $text .= '
'; @@ -92,4 +92,4 @@ function otherdb_conf_adminmenu() alt_auth_adminmenu(); } -?> +?> \ No newline at end of file diff --git a/e107_plugins/alt_auth/radius_conf.php b/e107_plugins/alt_auth/radius_conf.php index be627be16..b4ba9b216 100644 --- a/e107_plugins/alt_auth/radius_conf.php +++ b/e107_plugins/alt_auth/radius_conf.php @@ -24,17 +24,20 @@ include_lan(e_PLUGIN.'alt_auth/languages/'.e_LANGUAGE.'/admin_radius_conf.php'); include_lan(e_PLUGIN.'alt_auth/languages/'.e_LANGUAGE.'/admin_alt_auth.php'); define("ALT_AUTH_ACTION", "radius"); require_once(e_PLUGIN."alt_auth/alt_auth_adminmenu.php"); +$mes = e107::getMessage(); $message = ''; if($_POST['update']) { - $message .= alt_auth_post_options('radius'); + // $message .= alt_auth_post_options('radius'); + $mes->addSuccess(alt_auth_post_options('radius')); } if (!extension_loaded('radius')) { - $message .= "

".LAN_RADIUS_11."

"; + // $message .= "

".LAN_RADIUS_11."

"; + $mes->addWarning(LAN_RADIUS_11); } @@ -53,12 +56,12 @@ while($row = $sql->db_Fetch()) $frm = new form; $text = $frm -> form_open("post",e_SELF); -$text .= ""; -$text .= "
".LAN_RADIUS_01.""; +$text .= ""; +$text .= ""; -$text .= ""; @@ -70,13 +73,14 @@ if ($tmp) } $text .= ""; $text .= "
".LAN_RADIUS_01.""; $text .= $frm -> form_text("radius_server", 35, $radius['radius_server'], 120); $text .= "
".LAN_RADIUS_02.""; +$text .= "
".LAN_RADIUS_02.""; $text .= $frm -> form_text('radius_secret', 35, $radius['radius_secret'], 200); $text .= "
"; -$text .= $frm -> form_button("submit", "update", LAN_ALT_2); +// $text .= $frm -> form_button("submit", "update", LAN_ALT_2); +$text .= e107::getForm()->admin_button("update", LAN_UPDATE,'update'); $text .= "
"; $text .= $frm -> form_close(); -$ns -> tablerender(LAN_RADIUS_06,$text); +$ns -> tablerender(LAN_RADIUS_06, $mes->render() . $text); $ns->tablerender(LAN_ALT_40.LAN_ALT_41,alt_auth_test_form('radius',$frm)); require_once(e_ADMIN."footer.php");