Example #1
0
$is_console = sumo_verify_is_console($tab['path']) ? true : false;
$path_console = $is_console ? $tab['path'] : sumo_get_rand_string(8);
// bad solution
// Delete
if ($SUMO['user']['group_level']['sumo'] > 4 && (!sumo_verify_is_console($tab['path']) || $tab['id'] != 1)) {
    $msg = sumo_get_simple_rand_string(4, "123456789");
    $delete = "<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['path'], htmlspecialchars(sumo_get_accesspoint_name($tab['name'], $_COOKIE['language']), ENT_QUOTES)))) . "', \n\t\t\t\t\t\t'h', 0, \n\t\t\t\t\t\t'" . base64_encode(sumo_get_form_req('', 'delete', 'id=' . $tab['id'])) . "',\n\t\t\t\t\t\t'" . base64_encode('') . "',\n\t\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\t'" . base64_encode("<input type='submit' value='" . $language['Ok'] . "' onclick='javascript:sumo_remove_window(\"msg{$msg}\");' class='button'>") . "'\n\t\t\t\t);\">" . "<img src='themes/" . $SUMO['page']['theme'] . "/images/modules/accesspoints/remove.png' vspace='4'><br>" . $language['Remove'] . "</a>" . "</div>";
} else {
    $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;
Example #2
0
    }
    //if($col[2])  $list .= " <td class='".$style."'><a href='javascript:sumo_ajax_get(\"network\",\"?module=network&action=nlist\");'>".$node[$tab['node']]['name']."</a></td>\n";
    if ($col[7]) {
        $list .= " <td class='" . $style . "' align='right'>" . $tab['ip'] . "</td>\n";
    }
    if ($col[8]) {
        $list .= " <td class='" . $style . "' align='right'>" . $tab['hostname'] . "</td>\n";
    }
    if ($col[9]) {
        $list .= " <td class='" . $style . "'><img src='applications/ip2country/flags/small/" . $flag . "' width='17' alt='" . $country[1] . "'>&nbsp;" . $country[0] . "</td>\n";
    }
    if ($col[5]) {
        $list .= " <td class='" . $style . "'>" . sumo_get_human_date($tab['connected']) . "</td>\n";
    }
    if ($col[6]) {
        $list .= " <td class='" . $style . "'>" . sumo_get_human_date($tab['expire']) . "</td>\n";
    }
    if ($col[10]) {
        $list .= " <td class='" . $style . "' width='100%'><a href='" . $tab['url'] . "' target='_blank'>" . $apname . "</a></td>\n";
    }
    if ($col[11]) {
        $list .= " <td class='" . $style . "'>" . $tab['client'] . "</td>\n";
    }
    if ($col[12]) {
        $list .= " <td class='" . $style . "' align='right'>" . sumo_get_graph($tab['activity'], $max, 2) . "</td>\n";
    }
    $list .= "</tr>\n";
}
$list .= "</table>";
$searched = $search ? $_SESSION['search_sessions_slist'] : '';
// Template Data
Example #3
0
 }
 if ($_SESSION['users']['list']['col'][10]) {
     $excel->WriteText($row, $col, $language['LastLogin']);
     $col++;
 }
 if ($_SESSION['users']['list']['col'][15]) {
     $excel->WriteText($row, $col, $language['Created']);
     $col++;
 }
 if ($_SESSION['users']['list']['col'][11]) {
     $excel->WriteText($row, $col, $language['Expire']);
 }
 while ($tab = $rs->FetchRow()) {
     $last_login = $tab['last_login'] ? sumo_get_human_date($tab['last_login']) : '';
     $created = $tab['created'] ? sumo_get_human_date($tab['created']) : '';
     $expire = $tab['day_limit'] != NULL ? sumo_get_human_date($tab['day_limit'] * 86400 + $SUMO['server']['time'], FALSE) : '';
     $username = sumo_get_formatted_username($tab['firstname'], $tab['lastname']);
     $col = 0;
     $row++;
     if ($username == '&nbsp;') {
         $username = '';
     }
     if ($_SESSION['users']['list']['col'][6]) {
         $excel->WriteNumber($row, $col, $tab['id']);
         $col++;
     }
     if ($_SESSION['users']['list']['col'][2]) {
         $excel->WriteText($row, $col, $tab['username']);
         $col++;
     }
     if ($_SESSION['users']['list']['col'][4]) {
Example #4
0
     $excel->WriteText($row, $col, $language['Created']);
     $col++;
 }
 if ($_SESSION['accesspoints']['list']['col'][14]) {
     $excel->WriteText($row, $col, $language['Updated']);
 }
 while ($tab = $rs->FetchRow()) {
     $http_auth = $tab['http_auth'] ? 'Y' : 'N';
     $filtering = $tab['filtering'] ? 'Y' : 'N';
     $pwd_encrypt = $tab['pwd_encrypt'] ? 'Y' : 'N';
     $registration = $tab['registration'] ? 'Y' : 'N';
     $change_pwd = $tab['change_pwd'] ? 'Y' : 'N';
     $group = str_replace(';', ', ', $tab['usergroup']);
     $theme = ucwords($tab['theme']);
     $created = $tab['created'] ? sumo_get_human_date($tab['created']) : '';
     $updated = $tab['updated'] ? sumo_get_human_date($tab['updated']) : '';
     $name = sumo_get_accesspoint_name($tab['name'], $_COOKIE['language']);
     $col = 0;
     $row++;
     if ($_SESSION['accesspoints']['list']['col'][4]) {
         $excel->WriteNumber($row, $col, $tab['id']);
         $col++;
     }
     if ($_SESSION['accesspoints']['list']['col'][4]) {
         $excel->WriteText($row, $col, $name);
         $col++;
     }
     if ($_SESSION['accesspoints']['list']['col'][2]) {
         $excel->WriteText($row, $col, $tab['node_name']);
         $col++;
     }
Example #5
0
}
$query1 = "SELECT * FROM " . SUMO_TABLE_BANNED . " " . $search . " ";
$query2 = $query1 . " ORDER BY " . $_SESSION['security']['banned']['col_sql'] . " " . $_SESSION['security']['banned']['mode_sql'];
$rs = $SUMO['DB']->Execute($query1);
$tot = $rs->PO_RecordCount();
$rs = $SUMO['DB']->SelectLimit($query2, $_SESSION['rows_security_banned'], $_SESSION['start_security_banned']);
$vis = $rs->PO_RecordCount();
/**
 * Create list
 */
$col = $_SESSION['security']['banned']['col'];
if ($tot > 0) {
    $list = sumo_get_table_header($table['data']['banned']);
    while ($tab = $rs->FetchRow()) {
        $ip = $search ? sumo_color_match_string($field['ip'][1], $tab['ip']) : $tab['ip'];
        $time = sumo_get_human_date($tab['time'] + $SUMO['config']['security']['banned_time'], true, true);
        $style = sumo_alternate_str('tab-row-on', 'tab-row-off');
        $list .= "<tr>\n";
        if ($col[2]) {
            $list .= " <td class='" . $style . "'>" . $ip . "</td>\n";
        }
        if ($col[3]) {
            $list .= " <td class='" . $style . "'>" . $time . "</td>\n";
        }
        if (($col[2] || $col[3]) && $enableip) {
            $list .= " <td class='" . $style . "'>" . "<a href='javascript:sumo_ajax_get(\"security\",\"?module=security&action=banned&enableip=" . $tab['id'] . "\");'>" . $language['enable'] . "</a></td>\n";
        }
        $list .= "</tr>\n";
    }
    $list .= "</table>";
} else {
Example #6
0
    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\t\t 'h', 0,\n\t\t\t\t\t\t\t '" . base64_encode(sumo_get_form_req('', 'delete', 'id=' . $tab['id'])) . "',\n\t\t\t\t\t\t\t '" . base64_encode('') . "',\n\t\t\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\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");
    }
    // on submit
    $submit = 'if(document.ModifyUsers.new_password.value!="")' . '{document.ModifyUsers.new_password.value=hex_sha1(document.ModifyUsers.new_password.value);' . 'document.ModifyUsers.renew_password.value=hex_sha1(document.ModifyUsers.renew_password.value);}';
    // ...to change password
    if (($SUMO['user']['user'] == $tab['username'] || $SUMO['user']['id'] == $tab['owner_id'] || $SUMO['user']['user'] == 'sumo') && in_array($datasource['type'], array('SUMO', 'MySQLUsers', 'Joomla15'))) {
        $tpl['PUT:NewPassword'] = "******";
        $tpl['PUT:ReNewPassword'] = "******";
        $tpl['GET:UpdateForm'] = sumo_get_form_req('', 'modify', 'id=' . $tab['id']);
    }
    // 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);
    } elseif (!$tab['pwd_updated']) {
        $tpl['GET:PwdExpiration'] = '';
    } else {
        $tpl['GET:PwdExpiration'] = $language['CannotConrolPwd'];
    }
    if ($datasource['type'] == 'SUMO') {
        $tpl['BUTTON:Save'] = '<input type="submit" class="button-green" value="' . $language["Save"] . '" onclick=\'' . $submit . '\'>';
    } else {
        $tpl['BUTTON:Save'] = '<input type="submit" class="button-green" value="' . $language["Save"] . '">';
    }
} else {
    $action_error = true;
    $tpl['MESSAGE:H'] = $language['AccessDenied'];
}
Example #7
0
        $style = sumo_alternate_str('tab-row-on', 'tab-row-off');
        if ($search) {
            $tab['ip'] = sumo_color_match_string($field['ip'][1], $tab['ip']);
        }
        $list .= "<tr>\n";
        if ($col[1]) {
            $list .= " <td class='" . $style . "' align='right'>" . "<a href='javascript:sumo_ajax_get(\"network\",\"?module=network&action=nlist\");'>" . $tab['node'] . "</a></td>\n";
        }
        if ($col[2]) {
            $list .= " <td class='" . $style . "' align='right'>" . $tab['ip'] . "</td>\n";
        }
        if ($col[3]) {
            $list .= " <td class='" . $style . "' align='right'>" . $tab['requests'] . "</td>\n";
        }
        if ($col[4]) {
            $list .= " <td class='" . $style . "'>" . sumo_get_human_date($tab['time'], TRUE, TRUE) . "</td>\n";
        }
        if ($col[2]) {
            $list .= " <td class='" . $style . "' width='100%'>&nbsp;</td>\n";
        }
        $list .= "</tr>\n";
    }
    $list .= "</table>";
} else {
    $list = "<div class='no-results'>" . $language['ConnectionsNotFound'] . "</div>";
}
$searched = $search ? $_SESSION['search_sessions_clist'] : '';
// Template Data
$tpl = array('MESSAGE:H' => $tpl['MESSAGE:H'], 'MESSAGE:M' => $tpl['MESSAGE:M'], 'MESSAGE:L' => $tpl['MESSAGE:L'], 'GET:Theme' => $SUMO['page']['theme'], 'GET:MenuModule' => $tpl['GET:MenuModule'], 'GET:ConnectionsList' => $list, 'GET:TotalRows' => number_format($tot, 0, "", "."), 'GET:StartRow' => number_format($_SESSION['start_sessions_clist'], 0, "", "."), 'GET:EndRow' => number_format($_SESSION['start_sessions_clist'] + $vis, 0, "", "."), 'GET:PagingResults' => sumo_paging_results($tot, $vis, $_SESSION['rows_sessions_clist'], 5, $_SESSION['start_sessions_clist'], 'start_sessions_clist'), 'GET:TableSettings' => sumo_get_table_settings($table['data']['clist']), 'GET:SearchForm' => sumo_get_form_search($searched), 'GET:ExportData' => '', 'GET:WindowScripts' => 'sumo_unrefresh_window("sessions");sumo_refresh_window("sessions", "clist", ' . SUMO_TIMER_CONNECTIONS . ', "index.php?module=sessions");');
$tpl['GET:Pagination'] = $tot > 0 ? $tpl['GET:StartRow'] . "..." . $tpl['GET:EndRow'] . "&nbsp;&nbsp;" . $language['of'] . "&nbsp;<b>" . $tpl['GET:TotalRows'] . "</b>" : "";
?>
Example #8
0
    // 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);
        $tpl['GET:PwdUpdated'] = sumo_get_human_date($tab['pwd_updated']);
    } else {
        if (!$tab['pwd_updated']) {
            $tpl['GET:PwdExpiration'] = $tpl['GET:PwdUpdated'] = '';
        } else {
            $tpl['GET:PwdExpiration'] = $language['CannotConrolPwd'];
            $tpl['GET:PwdUpdated'] = sumo_get_human_date($tab['pwd_updated']);
        }
    }
} else {
    $action_error = true;
    $tpl['MESSAGE:H'] = $language['AccessDenied'];
}
Example #9
0
        if ($_SESSION['security'][$submodule]['col'][3]) {
            $excel->WriteNumber($row, $col, $tab['priority']);
            $col++;
        }
        if ($_SESSION['security'][$submodule]['col'][3]) {
            $excel->WriteText($row, $col, $tab['code']);
            $col++;
        }
        if ($_SESSION['security'][$submodule]['col'][4]) {
            $excel->WriteText($row, $col, $node['name']);
            $col++;
        }
        if ($_SESSION['security'][$submodule]['col'][5]) {
            $excel->WriteText($row, $col, $tab['ip']);
            $col++;
        }
        if ($_SESSION['security'][$submodule]['col'][6]) {
            $excel->WriteText($row, $col, ucwords(strtolower($tab['country_name'])));
            $col++;
        }
        if ($_SESSION['security'][$submodule]['col'][7]) {
            $excel->WriteText($row, $col, $tab['message']);
            $col++;
        }
        if ($_SESSION['security'][$submodule]['col'][8]) {
            $excel->WriteText($row, $col, sumo_get_human_date($tab['time'], TRUE, TRUE));
        }
    }
    //stream Excel for user to download or show on browser
    $excel->SendFile();
}
Example #10
0
 * @package    SUMO
 * @category   Console
 */
if (sumo_verify_permissions(5, $SUMO['user']['group'])) {
    $tpl['PUT:User'] = "******" . $_POST['user'] . "'>";
    $tpl['PUT:FirstName'] = "<input type='text' size='35' name='firstname' value='" . htmlspecialchars($_POST['firstname'], ENT_QUOTES) . "'>";
    $tpl['PUT:LastName'] = "<input type='text' size='35' name='lastname' value='" . htmlspecialchars($_POST['lastname'], ENT_QUOTES) . "'>";
    $tpl['PUT:Email'] = "<input type='text' size='35' name='email' value='" . $_POST['email'] . "'>";
    $tpl['PUT:DayLimit'] = "<input type='text' size='3' name='day_limit' value='" . $SUMO['config']['accounts']['life'] . "'>";
    $tpl['PUT:NewPassword'] = "******";
    $tpl['PUT:ReNewPassword'] = "******";
    $tpl['PUT:IP'] = "<textarea rows='2' cols='40' name='ip'>" . $_POST['ip'] . "</textarea>";
    $tpl['PUT:AddGroupLevel'] = sumo_add_user_grouplevel('AddUsers');
    $tpl['PUT:Language'] = sumo_get_available_languages(1, 0, $_COOKIE['language']);
    $tpl['PUT:DataSourceType'] = sumo_put_datasource();
    $tpl['GET:AddForm'] = sumo_get_form_req('', 'add', '', 'POST', 'onsubmit=\'if(document.AddUsers.new_password.value!=""){document.AddUsers.new_password.value=hex_sha1(document.AddUsers.new_password.value);' . 'document.AddUsers.renew_password.value=hex_sha1(document.AddUsers.renew_password.value);}\'');
    // Status
    $tpl['GET:Status'] = "<font class='status-green'>" . $language['Active'] . "</font>";
    $tpl['IMG:Status'] = "<img src='themes/" . $SUMO['page']['theme'] . "/images/modules/users/user_on.gif' align='middle'>";
    $tpl['PUT:Status'] = "<select name='active'>\n<option value='1'>" . $language['Enable'] . "</option>\n<option value='0'>" . $language['Disable'] . "</option>\n</select>";
    // Pwd expiration date
    if ($SUMO['config']['accounts']['password']['life'] > 0) {
        $tpl['GET:PwdExpiration'] = sumo_get_human_date($SUMO['server']['time'] + $SUMO['config']['accounts']['password']['life'] * 86400);
    }
    $tpl['LINK:AddUser'] = sumo_get_action_icon("users", "new");
    $tpl['LINK:EditUser'] = sumo_get_action_icon("users", "edit");
    $tpl['LINK:Remove'] = sumo_get_action_icon("users", "delete");
} else {
    $action_error = true;
    $tpl['MESSAGE:H'] = $language['AccessDenied'];
}
Example #11
0
        if ($col[2]) {
            $list .= " <td {$style} align='center'><img src='themes/" . $SUMO['page']['theme'] . "/images/modules/security/priority_" . $tab['priority'] . ".gif' class='log-priority' alt='" . $tab['priority'] . "'></td>\n";
        }
        if ($col[3]) {
            $list .= " <td {$style} align='right'>" . $tab['code'] . "</td>\n";
        }
        if ($col[4]) {
            $list .= " <td {$style} align='right'>" . $node['name'] . "</td>\n";
        }
        if ($col[5]) {
            $list .= " <td {$style} align='right'>" . $tab['ip'] . "</td>\n";
        }
        if ($col[6]) {
            $list .= " <td {$style} align='right'>" . ucwords(strtolower($tab['country_name'])) . "</td>\n";
        }
        if ($col[7]) {
            $list .= " <td {$style} width='100%'>" . $tab['message'] . "</td>\n";
        }
        if ($col[8]) {
            $list .= " <td {$style} align='right'>" . sumo_get_human_date($tab['time'], TRUE, TRUE) . "</td>\n";
        }
        $list .= "</tr>\n";
    }
    $list .= "</table>";
} else {
    $list = "<div class='no-results'>" . $language['LogsNotFound'] . "</div>";
}
$searched = $search ? $_SESSION['search_security_' . $action] : '';
// Template Data
$tpl = array('MESSAGE:H' => $tpl['MESSAGE:H'], 'MESSAGE:M' => $tpl['MESSAGE:M'], 'MESSAGE:L' => $tpl['MESSAGE:L'], 'GET:MenuModule' => $tpl['GET:MenuModule'], 'GET:MessagesList' => $list, 'GET:TotalRows' => number_format($tot, 0, "", "."), 'GET:StartRow' => number_format($_SESSION['start_security_' . $action], 0, "", "."), 'GET:EndRow' => number_format($_SESSION['start_security_' . $action] + $vis, 0, "", "."), 'GET:PagingResults' => sumo_paging_results($tot, $vis, $_SESSION['rows_security_' . $action], 5, $_SESSION['start_security_' . $action], 'start_security_' . $action), 'GET:TableSettings' => sumo_get_table_settings($table['data'][$action]), 'GET:SearchForm' => sumo_get_form_search($searched), 'GET:ExportData' => sumo_get_export_data(), 'GET:WindowScripts' => 'sumo_unrefresh_window("security");' . 'sumo_refresh_window("security", "' . $action . '", ' . SUMO_TIMER_LOGS . ', "index.php?module=security");');
$tpl['GET:Pagination'] = $tot > 0 ? $tpl['GET:StartRow'] . "..." . $tpl['GET:EndRow'] . "&nbsp;&nbsp;" . $language['of'] . "&nbsp;<b>" . $tpl['GET:TotalRows'] . "</b>" : "";
Example #12
0
            $list .= " <td class='" . $style . "' align='right'>" . number_format($tab['access'], 0, '', '.') . "</td>\n";
        }
        if ($_SESSION['accesspoints']['stats']['col'][5]) {
            $list .= " <td class='" . $style . "'>" . sumo_get_graph($tab['access'], $max_access, 2) . "</td>\n";
        }
        if ($_SESSION['accesspoints']['stats']['col'][6]) {
            $list .= " <td class='" . $style . "' align='right'>" . number_format($tab['activity'], 0, '', '.') . "</td>\n";
        }
        if ($_SESSION['accesspoints']['stats']['col'][6]) {
            $list .= " <td class='" . $style . "'>" . sumo_get_graph($tab['activity'], $max_activity, 2) . "</td>\n";
        }
        if ($_SESSION['accesspoints']['stats']['col'][7]) {
            $list .= " <td class='" . $style . "' align='right'>" . sumo_get_human_date($tab['last_login']) . "</td>\n";
        }
        if ($_SESSION['accesspoints']['stats']['col'][8]) {
            $list .= " <td class='" . $style . "' align='right'>" . sumo_get_human_date($tab['updated']) . "</td>\n";
        }
        $list .= "</tr>\n";
    }
    $list .= "</table>";
} else {
    if ($SUMO['config']['accesspoints']['stats']['enabled']) {
        $list = "<div class='no-results'>" . $language['NoStatsForAccesspoints'] . "</div>";
    }
    #else
    #	$list = "<div class='no-results'>".$language['StatisticsDisabled']."</div>";
}
$searched = $search ? $_SESSION['search_accesspoints_stats'] : '';
// Template Data
$tpl = array('GET:MenuModule' => $tpl['GET:MenuModule'], 'MESSAGE:M' => $tpl['MESSAGE:M'], 'MESSAGE:A' => 1, 'GET:AccessPointsList' => $list, 'GET:TotalRows' => number_format($tot, 0, "", "."), 'GET:StartRow' => number_format($_SESSION['start_accesspoints_stats'], 0, "", "."), 'GET:EndRow' => number_format($_SESSION['start_accesspoints_stats'] + $vis, 0, "", "."), 'GET:PagingResults' => sumo_paging_results($tot, $vis, $_SESSION['rows_accesspoints_stats'], 5, $_SESSION['start_accesspoints_stats'], 'start_accesspoints_stats'), 'GET:TableSettings' => sumo_get_table_settings($table['data']['stats']), 'GET:SearchForm' => sumo_get_form_search($searched), 'GET:ExportData' => '', 'GET:WindowScripts' => 'sumo_unrefresh_window("accesspoints");' . 'sumo_refresh_window("accesspoints", "stats", ' . SUMO_TIMER_APSTATS . ', "index.php?module=accesspoints");');
$tpl['GET:Pagination'] = $tot > 0 ? $tpl['GET:StartRow'] . "..." . $tpl['GET:EndRow'] . "&nbsp;&nbsp;" . $language['of'] . "&nbsp;<b>" . $tpl['GET:TotalRows'] . "</b>" : "";