* @author Alberto Basso <*****@*****.**> * @copyright Copyright © 2003-2009, Alberto Basso * @package SUMO * @category Console */ $id = isset($_GET['id']) ? $_GET['id'] : ''; $tab = sumo_get_accesspoint_info($id, 'id', FALSE); $checked['http_auth'] = $tab['http_auth'] ? " checked='checked'" : ""; $checked['filtering'] = $tab['filtering'] ? " checked='checked'" : ""; $checked['pwd_encrypt'] = $tab['pwd_encrypt'] ? " checked='checked'" : ""; $checked['change_pwd'] = $tab['change_pwd'] ? " checked='checked'" : ""; $checked['registration'] = $tab['registration'] ? " checked='checked'" : ""; $form_name = 'AddAccesspoints'; $tpl['GET:ID'] = $tab['id']; $tpl['GET:AddForm'] = sumo_get_form_req('', 'add', 'id=' . $tab['id']); $tpl['PUT:Node'] = sumo_put_node($tab['node']); $tpl['PUT:Theme'] = sumo_put_themes($tab['theme']); $tpl['PUT:Groups'] = sumo_put_accesspoint_group($tab['id']); $tpl['PUT:AddGroup'] = sumo_add_accesspoint_group(); $tpl['PUT:AddRegGroup'] = sumo_add_accesspoint_group('', 'reg_group'); $tpl['PUT:Name'] = sumo_put_accesspoint_name($form_name, sumo_get_accesspoint_name($tab['name'])); $tpl['PUT:Path'] = "<input type='text' size='35' name='path' value='" . $tab['path'] . "' />"; $tpl['PUT:HTTPAuth'] = "<input type='checkbox' name='http_auth' " . $checked['http_auth'] . " onclick='if(document.{$form_name}.http_auth.checked==true && document.{$form_name}.pwd_encrypt.disabled==false){document.{$form_name}.pwd_encrypt.checked=false;}' />"; $tpl['PUT:Filtering'] = "<input type='checkbox' name='filtering' " . $checked['filtering'] . " />"; $tpl['PUT:PwdEncrypt'] = "<input type='checkbox' name='pwd_encrypt' " . $checked['pwd_encrypt'] . " onclick='if(document.{$form_name}.pwd_encrypt.checked==true){document.{$form_name}.http_auth.checked=false;}' />"; $tpl['PUT:ChangePwd'] = "<input type='checkbox' name='change_pwd' " . $checked['change_pwd'] . " />"; $tpl['PUT:Registration'] = "<input type='checkbox' name='registration' " . $checked['registration'] . " " . "onclick='if(document.{$form_name}.registration.checked==true){document.{$form_name}.reg_group.disabled=false;}else{document.{$form_name}.reg_group.disabled=true;}' />"; $tpl['LINK:Add'] = sumo_get_action_icon("", "add"); $tpl['LINK:Edit'] = sumo_get_action_icon("", "edit"); $tpl['LINK:Remove'] = sumo_get_action_icon("", "remove"); $tpl['BUTTON:Back'] = "<input type='button' class='button-red' value='" . $language["Back"] . "' onclick='javascript:sumo_ajax_get(\"accesspoints\",\"?module=accesspoints&action=list\");'>";
$tpl['PUT:server.date_format'] = "<input type='text' size='5' name='config[server][date_format]' value='" . $conf['server']['date_format'] . "'>"; $tpl['PUT:server.time_format'] = "<input type='text' size='5' name='config[server][time_format]' value='" . $conf['server']['time_format'] . "'>"; $tpl['PUT:server.admin.name'] = "<input type='text' size='30' name='config[server][admin][name]' value='" . $conf['server']['admin']['name'] . "'>"; $tpl['PUT:server.admin.email'] = "<input type='text' size='30' name='config[server][admin][email]' value='" . $conf['server']['admin']['email'] . "'>"; $tpl['PUT:iptocountry.enabled'] = $conf['iptocountry']['enabled'] ? "<input type='checkbox' name='config[iptocountry][enabled]' checked='checked'>" : "<input type='checkbox' name='config[iptocountry][enabled]'>"; $tpl['GET:iptocountry.updater'] = "<a href='services.php?service=updater&cmd=UPDATE_IP2C' target='_new'>" . $language['iptocountry.updater'] . "</a>"; // Console $tpl['PUT:console.tip'] = $conf['console']['tip'] ? "<input type='checkbox' name='config[console][tip]' checked='checked'>" : "<input type='checkbox' name='config[console][tip]'>"; // Security $tpl['PUT:security.max_login_attempts'] = "<input type='text' size='5' name='config[security][max_login_attempts]' value='" . $conf['security']['max_login_attempts'] . "'>"; $tpl['PUT:security.banned_time'] = "<input type='text' size='5' name='config[security][banned_time]' value='" . $conf['security']['banned_time'] . "'>"; $tpl['PUT:security.access_violations'] = $conf['security']['access_violations'] ? "<input type='checkbox' name='config[security][access_violations]' checked='checked'>" : "<input type='checkbox' name='config[security][access_violations]'>"; // Accesspoints $tpl['PUT:accesspoints.stats.enabled'] = $conf['accesspoints']['stats']['enabled'] ? "<input type='checkbox' name='config[accesspoints][stats][enabled]' checked='checked'>" : "<input type='checkbox' name='config[accesspoints][stats][enabled]'>"; $tpl['PUT:accesspoints.def_name'] = sumo_put_accesspoint_name('ModifySettings', sumo_get_accesspoint_name($conf['accesspoints']['def_name'])); $tpl['PUT:accesspoints.def_group'] = sumo_put_accesspoint_group($conf['accesspoints']['def_group']); $tpl['PUT:accesspoints.def_theme'] = sumo_put_themes($conf['accesspoints']['def_theme'], 'config[accesspoints][def_theme]'); // Accounts $tpl['PUT:accounts.life'] = "<input type='text' size='5' name='config[accounts][life]' value='" . $conf['accounts']['life'] . "'>"; $tpl['PUT:accounts.registration.enabled'] = $conf['accounts']['registration']['enabled'] ? "<input type='checkbox' name='config[accounts][registration][enabled]' checked='checked'>" : "<input type='checkbox' name='config[accounts][registration][enabled]'>"; $tpl['PUT:accounts.registration.life'] = "<input type='text' size='5' name='config[accounts][registration][life]' value='" . $conf['accounts']['registration']['life'] . "'>"; $tpl['PUT:accounts.registration.notify.reg'] = $conf['accounts']['registration']['notify']['reg'] ? "<input type='checkbox' name='config[accounts][registration][notify][reg]' checked='checked'>" : "<input type='checkbox' name='config[accounts][registration][notify][reg]'>"; $tpl['PUT:accounts.registration.notify.unreg'] = $conf['accounts']['registration']['notify']['unreg'] ? "<input type='checkbox' name='config[accounts][registration][notify][unreg]' checked='checked'>" : "<input type='checkbox' name='config[accounts][registration][notify][unreg]'>"; $tpl['PUT:accounts.password.life'] = "<input type='text' size='5' name='config[accounts][password][life]' value='" . $conf['accounts']['password']['life'] . "'>"; $tpl['PUT:accounts.notify.updates'] = $conf['accounts']['notify']['updates'] ? "<input type='checkbox' name='config[accounts][notify][updates]' checked='checked'>" : "<input type='checkbox' name='config[accounts][notify][updates]'>"; $tpl['PUT:accounts.notify.status'] = $conf['accounts']['notify']['status'] ? "<input type='checkbox' name='config[accounts][notify][status]' checked='checked'>" : "<input type='checkbox' name='config[accounts][notify][status]'>"; $tpl['PUT:accounts.notify.expired'] = $conf['accounts']['notify']['expired'] ? "<input type='checkbox' name='config[accounts][notify][expired]' checked='checked'>" : "<input type='checkbox' name='config[accounts][notify][expired]'>"; // Log to file format //$tpl['PUT:logs.format'] = $conf['logs']['format'] ? $conf['logs']['format'] : "[".$SUMO['config']['server']['date_format']." ".$SUMO['config']['server']['time_format']. " O]"; // Log Manager: System $tpl['PUT:logs.system.database.enabled'] = $conf['logs']['system']['database']['enabled'] ? "<input type='checkbox' name='config[logs][system][database][enabled]' checked='checked'>" : "<input type='checkbox' name='config[logs][system][database][enabled]'>";