示例#1
0
    $delete = sumo_get_action_icon("", "remove");
}
$tpl['GET:ID'] = $tab['id'];
$tpl['GET:RegGroup'] = $tab['reg_group'];
$tpl['GET:Updated'] = sumo_get_human_date($tab['updated']);
$tpl['GET:Created'] = sumo_get_human_date($tab['created']);
$tpl['GET:UpdateForm'] = sumo_get_form_req('', 'modify', 'id=' . $tab['id']);
$tpl['GET:Created'] = sumo_get_human_date($tab['created']);
$tpl['PUT:Node'] = $tab['id'] > 1 ? sumo_put_node($tab['node']) : sumo_put_node($tab['node'], true);
$tpl['PUT:Groups'] = sumo_put_accesspoint_group($tab['id']);
$tpl['PUT:AddGroup'] = sumo_add_accesspoint_group(sumo_get_grouplevel($tab['usergroup'], true));
$tpl['PUT:AddRegGroup'] = sumo_add_accesspoint_group($tab['reg_group'], 'reg_group', $checked['reg_group']);
$tpl['PUT:Theme'] = sumo_put_themes($tab['theme']);
$tpl['PUT:Name'] = sumo_put_accesspoint_name($form_name, sumo_get_accesspoint_name($tab['name']));
$tpl['PUT:Filtering'] = "<input type='checkbox' name='filtering' " . $checked['filtering'] . ">";
$tpl['PUT:ChangePwd'] = $is_console ? "<input type='checkbox' name='change_pwd' disabled " . $checked['change_pwd'] . " />" : "<input type='checkbox' name='change_pwd' " . $checked['change_pwd'] . " />";
$tpl['PUT:Registration'] = $is_console ? "<input type='checkbox' name='registration' disabled " . $checked['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['PUT:Path'] = $tab['id'] > 1 ? "<input type='text' size='50' name='path' value='" . $tab['path'] . "' onchange='if(this.form.path.value!=\"{$path_console}\"){document.{$form_name}.filtering.disabled=false;}else{document.{$form_name}.filtering.disabled=true;}' />" : "<input type='hidden' name='path' value='" . $tab['path'] . "'><input type='text' size='50' name='path2' value='" . $tab['path'] . "' disabled>";
$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: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['LINK:Add'] = sumo_verify_permissions(5, 'sumo') ? sumo_get_action_icon("", "add", "accesspoints.content", "?module=accesspoints&action=new&decoration=false") : sumo_get_action_icon("", "add");
$tpl['LINK:Edit'] = sumo_get_action_icon("", "edit");
$tpl['LINK:Remove'] = $delete;
$tpl['BUTTON:Back'] = "<input type='button' class='button-red' value='" . $language["Back"] . "' onclick='javascript:sumo_ajax_get(\"accesspoints\",\"?module=accesspoints&action=view&id=" . $tab['id'] . "\");'>";
// Use REQUEST method because when delete a group on AP
// the command came from a link
$visibility['SecurityOptions'] = $_REQUEST['SecurityOptions_visibility'] ? true : false;
$visibility['LayoutOptions'] = $_REQUEST['LayoutOptions_visibility'] ? true : false;
$tpl['LINK:SecurityOptions'] = sumo_get_action_link($form_name, 'SecurityOptions', $visibility['SecurityOptions']);
$tpl['LINK:LayoutOptions'] = sumo_get_action_link($form_name, 'LayoutOptions', $visibility['LayoutOptions']);
示例#2
0
 $tpl['IMG:User'] = "******" . $tab['id'] . "' alt='" . $tab['username'] . "' class='user'>";
 $tpl['IMG:Language'] = "<img src='themes/" . $SUMO['page']['theme'] . "/images/flags/" . $tab['language'] . ".png' alt='" . ucwords(sumo_get_string_languages($tab['language'])) . "' class='flag' id='userflag'>";
 $tpl['LINK:AddUser'] = sumo_get_action_icon("users", "new", "users.content", "?module=users&action=new&decoration=false");
 $tpl['LINK:EditUser'] = sumo_get_action_icon("users", "edit");
 // Verify image support for refection effects
 if (function_exists('imagecreatefromjpeg') && function_exists('imagecreatefrompng') && function_exists('imagecreatefromgif')) {
     $tpl['IMG:User'] . "<br><img src='services.php?module=users&service=image&cmd=GET_USER_REFLECTION&id=" . $tab['id'] . "&fade=6&height=30%'>";
 }
 // Create sub module (to hide or show only if necessary)
 // Set sub module visibility
 // NOTE: Use REQUEST method because when delete a group
 // the command came from a link
 $visibility['AccountDetails'] = $_REQUEST['AccountDetails_visibility'] ? true : false;
 $visibility['SecurityOptions'] = $_REQUEST['SecurityOptions_visibility'] ? true : false;
 $tpl['LINK:AccountDetails'] = sumo_get_action_link('ModifyUsers', 'AccountDetails', $visibility['AccountDetails']);
 $tpl['LINK:SecurityOptions'] = sumo_get_action_link('ModifyUsers', 'SecurityOptions', $visibility['SecurityOptions']);
 // Owner
 $owner = sumo_get_user_info($tab['owner_id'], 'id', false);
 $tpl['GET:AccountCreatedBy'] = htmlspecialchars($owner['lastname'] . " " . $owner['firstname'], ENT_QUOTES) . " (" . "<a href='javascript:sumo_ajax_get(\"users.content\",\"?module=users&action=view&id=" . $owner['id'] . "&decoration=false\");'>" . $owner['user'] . "</a>)";
 // Status
 $tpl['GET:Status'] = $tab['active'] ? "<font class='status-green'>" . $language['Active'] . "</font>" : "<font class='status-red'>" . $language['Suspended'] . "</font>";
 // If it's not current user
 // Only for sumo group
 if ($SUMO['user']['user'] != $tab['username'] && (in_array('sumo', $SUMO['user']['group']) || $SUMO['user']['id'] == $tab['owner_id'])) {
     $tpl['PUT:DayLimit'] = "<input type='text' size='5' name='day_limit' value='" . $tab['day_limit'] . "' />";
     // Change status
     if ($tab['active']) {
         $tpl['PUT:Status'] = "<select name='active'>\n<option value='1'>" . $language['Enable'] . "</option>\n<option value='0'>" . $language['Disable'] . "</option>\n</select>";
     } else {
         $tpl['PUT:Status'] = "<select name='active'>\n<option value='0'>" . $language['Disable'] . "</option>\n<option value='1'>" . $language['Enable'] . "</option>\n</select>";
     }
示例#3
0
$tpl['PUT:logs.access.file.life'] = "<input type='text' size='5' name='config[logs][access][file][life]' value='" . $conf['logs']['access']['file']['life'] . "'>";
$tpl['PUT:logs.access.file.size'] = "<input type='text' size='5' name='config[logs][access][file][size]' value='" . $conf['logs']['access']['file']['size'] . "'>";
$tpl['PUT:logs.access.email.enabled'] = $conf['logs']['access']['email']['enabled'] ? "<input type='checkbox' name='config[logs][access][email][enabled]' checked='checked'>" : "<input type='checkbox' name='config[logs][access][email][enabled]'>";
// Sessions & Connections
$tpl['PUT:connections.timeout'] = "<input type='text' size='5' name='config[connections][timeout]' value='" . $conf['connections']['timeout'] . "'>";
$tpl['PUT:sessions.timeout'] = "<input type='text' size='5' name='config[sessions][timeout]' value='" . $conf['sessions']['timeout'] . "'>";
$tpl['PUT:sessions.auto_regenerate_id'] = $conf['sessions']['auto_regenerate_id'] ? "<input type='checkbox' name='config[sessions][auto_regenerate_id]' checked='checked'>" : "<input type='checkbox' name='config[sessions][auto_regenerate_id]'>";
if (SUMO_SESSIONS_REPLICA) {
    $tpl['PUT:sessions.auto_regenerate_id'] = "<input type='checkbox' name='config[sessions][auto_regenerate_id]' disabled>";
}
// Database
$tpl['PUT:database.optimize_hits'] = "<input type='text' size='5' name='config[database][optimize_hits]' value='" . $conf['database']['optimize_hits'] . "'>";
$tpl['GET:database.optimize_hits.counter'] = @file_get_contents(SUMO_PATH . '/tmp/hits/hits.' . $conf['database']['optimize_hits']);
$tpl['LINK:EditSettings'] = sumo_get_action_icon("settings", "edit");
// Set sub module visibility
$visibility['GenericOptions'] = $_REQUEST['GenericOptions_visibility'] ? true : false;
$visibility['ConsoleOptions'] = $_REQUEST['ConsoleOptions_visibility'] ? true : false;
$visibility['SecurityOptions'] = $_REQUEST['SecurityOptions_visibility'] ? true : false;
$visibility['SessionsOptions'] = $_REQUEST['SessionsOptions_visibility'] ? true : false;
$visibility['AccountsOptions'] = $_REQUEST['AccountsOptions_visibility'] ? true : false;
$visibility['LoggingOptions'] = $_REQUEST['LoggingOptions_visibility'] ? true : false;
$visibility['AccessPointOptions'] = $_REQUEST['AccessPointOptions_visibility'] ? true : false;
// see action.stats.php
$tpl['LINK:GenericOptions'] = sumo_get_action_link('ModifySettings', 'GenericOptions', $visibility['GenericOptions']);
$tpl['LINK:ConsoleOptions'] = sumo_get_action_link('ModifySettings', 'ConsoleOptions', $visibility['ConsoleOptions']);
$tpl['LINK:SecurityOptions'] = sumo_get_action_link('ModifySettings', 'SecurityOptions', $visibility['SecurityOptions']);
$tpl['LINK:SessionsOptions'] = sumo_get_action_link('ModifySettings', 'SessionsOptions', $visibility['SessionsOptions']);
$tpl['LINK:AccountsOptions'] = sumo_get_action_link('ModifySettings', 'AccountsOptions', $visibility['AccountsOptions']);
$tpl['LINK:LoggingOptions'] = sumo_get_action_link('ModifySettings', 'LoggingOptions', $visibility['LoggingOptions']);
$tpl['LINK:AccessPointOptions'] = sumo_get_action_link('ModifySettings', 'AccessPointOptions', $visibility['AccessPointOptions']);
示例#4
0
 $tpl['GET:UserAccessPages'] = sumo_get_user_accesspoints($tab['id'], TRUE);
 $tpl['GET:GroupLevel'] = sumo_get_user_grouplevel($tab['group_level']);
 $tpl['GET:Expire'] = $tab['day_limit'] != NULL ? sumo_get_human_date($tab['day_limit'] * 86400 + $SUMO['server']['time'], FALSE) : $language['Never'];
 $tpl['GET:DataSourceType'] = $datasource['name'] ? "<a href='javascript:sumo_ajax_get(\"network\",\"?module=network&action=view_datasource&id=" . $datasource['id'] . "\");'>" . $datasource['name'] . "</a>" : '';
 $tpl['GET:Email'] = "<a href='mailto:" . $tab['email'] . "' title='Send e-mail'>" . $tab['email'] . "</a>";
 $tpl['LINK:AddUser'] = sumo_get_action_icon("", "new", "users.content", "?module=users&action=new&decoration=false");
 $tpl['LINK:EditUser'] = sumo_get_action_icon("", "edit", "users.content", "?module=users&action=edit&id=" . $tab['id'] . "&decoration=false");
 $tpl['IMG:User'] = "******" . $tab['id'] . "' alt='" . $tab['username'] . "' class='user'>";
 $tpl['IMG:Language'] = "<img src='themes/" . $SUMO['page']['theme'] . "/images/flags/" . $tab['language'] . ".png' alt='" . ucwords($tab['language']) . "' class='flag'>";
 // Verify image support for refection effects
 if (function_exists('imagecreatefromjpeg') && function_exists('imagecreatefrompng') && function_exists('imagecreatefromgif')) {
     $tpl['IMG:User'] . "<br><img src='services.php?module=users&service=image&cmd=GET_USER_REFLECTION&id=" . $tab['id'] . "&fade=6&height=30%'>";
 }
 // Create sub module (to hide or show only if necessary)
 $tpl['LINK:AccountDetails'] = sumo_get_action_link('users.view', 'AccountDetails');
 $tpl['LINK:SecurityOptions'] = sumo_get_action_link('users.view', 'SecurityOptions');
 // Owner
 $owner = sumo_get_user_info($tab['owner_id'], 'id', FALSE);
 $tpl['GET:AccountCreatedBy'] = htmlspecialchars($owner['lastname'] . " " . $owner['firstname'], ENT_QUOTES) . " (" . "<a href='javascript:sumo_ajax_get(\"users.content\",\"?module=users&action=view&id=" . $owner['id'] . "&decoration=false\");'>" . $owner['user'] . "</a>)";
 // Status
 $tpl['GET:Status'] = $tab['active'] ? "<font class='status-green'>" . $language['Active'] . "</font>" : "<font class='status-red'>" . $language['Suspended'] . "</font>";
 // Remove
 if ((in_array('sumo', $SUMO['user']['group']) || sumo_verify_permissions(7, $tab['group']) || $SUMO['user']['id'] == $tab['owner_id']) && $tab['username'] != 'sumo' && $tab['username'] != $SUMO['user']['user']) {
     $msg = sumo_get_simple_rand_string(4, "123456789");
     $tpl['LINK:Remove'] = "<div class='sub-module-icon' " . "onmouseover='this.style.outline=\"1px solid #999999\";this.style.background=\"#FFFFFF\"' " . "onmouseout='this.style.outline=\"\";this.style.background=\"\"'>" . "<a href=\"javascript:sumo_show_message('msg{$msg}', '" . htmlspecialchars(sumo_get_message('AreYouSureDelete', array($tab['username'], htmlspecialchars($tab['firstname'], ENT_QUOTES), htmlspecialchars($tab['lastname'], ENT_QUOTES)))) . "', \n\t\t\t\t\t'h', 0,\n\t\t\t\t\t'" . base64_encode(sumo_get_form_req('', 'delete', 'id=' . $tab['id'])) . "',\n\t\t\t\t\t'" . base64_encode('') . "',\n\t\t\t\t\t'" . base64_encode("<input type='button' value='" . $language['Cancel'] . "' onclick='javascript:sumo_remove_window(\"msg{$msg}\");' class='button'>") . "',\n\t\t\t\t\t'" . base64_encode("<input type='submit' value='" . $language['Ok'] . "' onclick='javascript:sumo_remove_window(\"msg{$msg}\");' class='button'>") . "');\">" . "<img src='themes/" . $SUMO['page']['theme'] . "/images/modules/users/delete.png' vspace='4'><br>" . $language['Remove'] . "</a>" . "</div>";
 } else {
     $tpl['LINK:Remove'] = sumo_get_action_icon("users", "delete");
 }
 // Pwd expiration date
 if ($SUMO['config']['accounts']['password']['life'] > 0 && $datasource['type'] == 'SUMO' && $tab['pwd_updated']) {
     $tpl['GET:PwdExpiration'] = sumo_get_human_date($tab['pwd_updated'] + $SUMO['config']['accounts']['password']['life'] * 86400);
示例#5
0
$tpl['GET:logs.system.email.enabled'] = $conf['logs']['system']['email']['enabled'] ? $yes : $no;
// Log Manager: Errors
$tpl['GET:logs.errors.database.enabled'] = $conf['logs']['errors']['database']['enabled'] ? $yes : $no;
$tpl['GET:logs.errors.database.life'] = $conf['logs']['errors']['database']['life'];
$tpl['GET:logs.errors.file.enabled'] = $conf['logs']['errors']['file']['enabled'] ? $yes : $no;
$tpl['GET:logs.errors.file.life'] = $conf['logs']['errors']['file']['life'];
$tpl['GET:logs.errors.file.size'] = $conf['logs']['errors']['file']['size'];
$tpl['GET:logs.errors.email.enabled'] = $conf['logs']['errors']['email']['enabled'] ? $yes : $no;
// Log Manager: Access
$tpl['GET:logs.access.database.enabled'] = $conf['logs']['access']['database']['enabled'] ? $yes : $no;
$tpl['GET:logs.access.database.life'] = $conf['logs']['access']['database']['life'];
$tpl['GET:logs.access.file.enabled'] = $conf['logs']['access']['file']['enabled'] ? $yes : $no;
$tpl['GET:logs.access.file.life'] = $conf['logs']['access']['file']['life'];
$tpl['GET:logs.access.file.size'] = $conf['logs']['access']['file']['size'];
$tpl['GET:logs.access.email.enabled'] = $conf['logs']['access']['email']['enabled'] ? $yes : $no;
// Sessions & Connections
$tpl['GET:sessions.timeout'] = sumo_convert_sec2hms($conf['sessions']['timeout']);
$tpl['GET:connections.timeout'] = sumo_convert_sec2hms($conf['connections']['timeout']);
$tpl['GET:sessions.auto_regenerate_id'] = $conf['sessions']['auto_regenerate_id'] ? $yes : $no;
// Database
$tpl['GET:database.optimize_hits'] = $conf['database']['optimize_hits'];
$tpl['GET:database.optimize_hits.counter'] = @file_get_contents(SUMO_PATH . '/tmp/hits/hits.' . $conf['database']['optimize_hits']);
$tpl['LINK:EditSettings'] = sumo_get_action_icon("settings", "edit", "settings.content", "?module=settings&action=edit&decoration=false");
$tpl['LINK:GenericOptions'] = sumo_get_action_link('settings.view', 'GenericOptions');
$tpl['LINK:ConsoleOptions'] = sumo_get_action_link('settings.view', 'ConsoleOptions');
$tpl['LINK:SecurityOptions'] = sumo_get_action_link('settings.view', 'SecurityOptions');
$tpl['LINK:SessionsOptions'] = sumo_get_action_link('settings.view', 'SessionsOptions');
$tpl['LINK:AccountsOptions'] = sumo_get_action_link('settings.view', 'AccountsOptions');
$tpl['LINK:LoggingOptions'] = sumo_get_action_link('settings.view', 'LoggingOptions');
$tpl['LINK:AccessPointOptions'] = sumo_get_action_link('settings.view', 'AccessPointOptions');