1
0
mirror of https://github.com/e107inc/e107.git synced 2025-02-13 11:04:38 +01:00
php-e107/e107_plugins/alt_auth/radius_conf.php

95 lines
2.6 KiB
PHP
Raw Normal View History

<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
2009-11-18 01:06:08 +00:00
| Copyright (C) 2008-2009 e107 Inc (e107.org)
| http://e107.org
2009-11-18 01:06:08 +00:00
|
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/alt_auth/radius_conf.php,v $
2010-02-10 18:18:01 +00:00
| $Revision$
| $Date$
| $Author$
+----------------------------------------------------------------------------+
*/
$eplug_admin = true;
require_once("../../class2.php");
require_once(e_ADMIN."auth.php");
require_once(e_HANDLER."form_handler.php");
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");
2012-11-28 01:26:18 -08:00
$mes = e107::getMessage();
$message = '';
if($_POST['update'])
{
2012-11-28 01:26:18 -08:00
// $message .= alt_auth_post_options('radius');
$mes->addSuccess(alt_auth_post_options('radius'));
}
if (!extension_loaded('radius'))
{
2012-11-28 01:26:18 -08:00
// $message .= "<br /><br /><div style='color:#f00; font-weight:bold'>".LAN_RADIUS_11."</div><br />";
$mes->addWarning(LAN_RADIUS_11);
}
if($message)
{
$ns->tablerender("","<div style='text-align:center;'>".$message."</div>");
}
$sql -> db_Select("alt_auth", "*", "auth_type = 'radius' ");
while($row = $sql->db_Fetch())
{
$radius[$row['auth_parmname']] = base64_decode(base64_decode($row['auth_parmval'])); // Encoding is new for 0.8
}
$frm = new form;
$text = $frm -> form_open("post",e_SELF);
2012-11-28 01:26:18 -08:00
$text .= "<table class='table adminform'>";
$text .= "<tr><td>".LAN_RADIUS_01."</td><td>";
$text .= $frm -> form_text("radius_server", 35, $radius['radius_server'], 120);
$text .= "</td></tr>";
2012-11-28 01:26:18 -08:00
$text .= "<tr><td>".LAN_RADIUS_02."</td><td>";
$text .= $frm -> form_text('radius_secret', 35, $radius['radius_secret'], 200);
$text .= "</td></tr>";
$tmp = alt_auth_get_field_list('radius',$frm, $ldap, FALSE);
if ($tmp)
{
$text .= "<tr><td class='forumheader2' colspan='2'>".LAN_ALT_27."</td></tr>".$tmp;
unset($tmp);
}
$text .= "<tr><td class='forumheader' colspan='2' style='text-align:center;'>";
2012-11-28 01:26:18 -08:00
// $text .= $frm -> form_button("submit", "update", LAN_ALT_2);
$text .= e107::getForm()->admin_button("update", LAN_UPDATE,'update');
$text .= "</td></tr>";
$text .= "</table>";
$text .= $frm -> form_close();
2012-11-28 01:26:18 -08:00
$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");
function radius_conf_adminmenu()
{
alt_auth_adminmenu();
}
?>