1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-22 14:13:03 +02:00

Issue #84 - review/tidy up alt_auth plugin.

Further testing needed.
This commit is contained in:
SteveD
2013-01-21 22:08:48 +00:00
parent 25da842c5e
commit 5457247787
14 changed files with 2599 additions and 2489 deletions

View File

@@ -31,9 +31,62 @@ require_once(e_PLUGIN.'alt_auth/alt_auth_adminmenu.php');
require_once(e_PLUGIN.'alt_auth/extended_password_handler.php');
class alt_auth_otherdb extends alt_auth_admin
{
public function __construct()
{
}
public function showForm()
{
$ns = e107::getRender();
$parm = $this->altAuthGetParams('otherdb');
$frm = new form;
$text = $frm -> form_open("post", e_SELF);
$text .= "<table class='table adminform'>";
$text .= "<tr><td>".LAN_ALT_26."</td><td>";
$text .= OTHERDB_LAN_15;
$text .= "</td></tr>";
$text .= $this->alt_auth_get_db_fields('otherdb', $frm, $parm, 'server|uname|pwd|db|table|ufield|pwfield|salt');
$text .= "<tr><td>".OTHERDB_LAN_9."</td><td>";
$text .= $this->altAuthGetPasswordSelector('otherdb_password_method', $frm, $parm['otherdb_password_method'], TRUE);
$text .= "</td></tr>";
$text .= "<tr><td class='forumheader2' colspan='2'>".LAN_ALT_27."</td></tr>";
$text .= $this->alt_auth_get_field_list('otherdb',$frm, $parm, FALSE);
$text .= "<tr><td class='forumheader' colspan='2' style='text-align:center;'>";
$text .= e107::getForm()->admin_button("update", LAN_UPDATE,'update');
$text .= '</td></tr>';
$text .= '</table>';
$text .= $frm -> form_close();
$ns -> tablerender(OTHERDB_LAN_10, $text);
$ns->tablerender(LAN_ALT_40.LAN_ALT_41, $this->alt_auth_test_form('otherdb',$frm));
}
}
$otherdbAdmin = new alt_auth_otherdb();
if(vartrue($_POST['update']))
{
$message = alt_auth_post_options('otherdb');
$message = $otherdbAdmin->alt_auth_post_options('otherdb');
}
@@ -43,45 +96,8 @@ if(vartrue($message))
}
$otherdbAdmin->showForm($mes);
show_otherdb_form();
function show_otherdb_form()
{
$ns = e107::getRender();
$parm = altAuthGetParams('otherdb');
$frm = new form;
$text = $frm -> form_open("post", e_SELF);
$text .= "<table class='table adminform'>";
$text .= "<tr><td>".LAN_ALT_26."</td><td>";
$text .= OTHERDB_LAN_15;
$text .= "</td></tr>";
$text .= alt_auth_get_db_fields('otherdb', $frm, $parm, 'server|uname|pwd|db|table|ufield|pwfield|salt');
$text .= "<tr><td>".OTHERDB_LAN_9."</td><td>";
$text .= altAuthGetPasswordSelector('otherdb_password_method', $frm, $parm['otherdb_password_method'], TRUE);
$text .= "</td></tr>";
$text .= "<tr><td class='forumheader2' colspan='2'>".LAN_ALT_27."</td></tr>";
$text .= alt_auth_get_field_list('otherdb',$frm, $parm, FALSE);
$text .= "<tr><td class='forumheader' colspan='2' style='text-align:center;'>";
$text .= e107::getForm()->admin_button("update", LAN_UPDATE,'update');
$text .= '</td></tr>';
$text .= '</table>';
$text .= $frm -> form_close();
$ns -> tablerender(OTHERDB_LAN_10, $text);
$ns->tablerender(LAN_ALT_40.LAN_ALT_41,alt_auth_test_form('otherdb',$frm));
}
require_once(e_ADMIN.'footer.php');