本文整理汇总了PHP中sumo_get_message函数的典型用法代码示例。如果您正苦于以下问题:PHP sumo_get_message函数的具体用法?PHP sumo_get_message怎么用?PHP sumo_get_message使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了sumo_get_message函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: MAX
*
* @version 0.5.0
* @link http://sumoam.sourceforge.net SUMO Access Manager
* @author Alberto Basso <albertobasso@users.sourceforge.net>
* @copyright Copyright © 2003-2009, Alberto Basso
* @package SUMO
* @category Console
*/
// Verify if Stats are enabled and get last update
if ($SUMO['config']['accesspoints']['stats']['enabled'] != 'on' && !$_SESSION['accesspoints']['stats']['col_sql']) {
$query = "SELECT MAX(updated) FROM " . SUMO_TABLE_ACCESSPOINTS_STATS;
$rs = $SUMO['DB']->Execute($query);
$tab = $rs->FetchRow();
$updated = sumo_get_human_date($tab[0], true, true);
$enable = "<input type='button' class='button' value='" . $language['EnableStatistics'] . "' " . "onclick='sumo_ajax_get(\"settings\",\"?module=settings&action=edit&AccessPointOptions_visibility=1\");'>";
$tpl['MESSAGE:M'] = sumo_get_message('StatisticsDisabled', array($updated, $enable));
}
sumo_set_table_settings();
// Create search query
$search = '';
if ($_SESSION['search_accesspoints_stats']) {
$field['path'] = sumo_search_composer($_SESSION['search_accesspoints_stats'], 'a.path');
$field['name'] = sumo_search_composer($_SESSION['search_accesspoints_stats'], 'a.name');
$search = $field['path'][0] && $field['name'][0] ? " WHERE (" . $field['path'][0] . " OR " . $field['name'][0] . ") " : '';
}
// Create sql query to select only groups of user
$group_query = sumo_get_group_query($search);
$operand = $search || $group_query ? ' AND ' : ' WHERE ';
$query1 = "SELECT b.node AS node, b.id_page AS id_page, a.name AS name, a.path AS path, b.access AS access, \n\t\t\t\t b.activity AS activity, b.last_login AS last_login, b.updated AS updated\n\t\t FROM " . SUMO_TABLE_ACCESSPOINTS . " a, " . SUMO_TABLE_ACCESSPOINTS_STATS . " b \n\t\t " . $search . $group_query . $operand . "\n\t\t a.id = b.id_page";
$query2 = $query1 . " ORDER BY " . $_SESSION['accesspoints']['stats']['col_sql'] . " " . $_SESSION['accesspoints']['stats']['mode_sql'];
$rs = $SUMO['DB']->CacheExecute(15, $query1);
示例2: array
*/
$validate[0] = TRUE;
// verify group name
if (!sumo_validate_group_name(trim($_POST['groupname']))) {
$validate = array(FALSE, $language['InvalidGroupName']);
}
// verify group description
if ($_POST['groupdesc'] && $validate[0]) {
if (!sumo_validate_group_desc(trim($_POST['groupdesc']))) {
$validate = array(FALSE, $language['InvalidGroupDesc']);
}
}
// verify if group already exist
if ($validate[0]) {
if (sumo_verify_group_exist(trim($_POST['groupname']))) {
$validate = array(FALSE, sumo_get_message('GroupAlreadyExist', $_POST['groupname']));
}
}
if (!$validate[0]) {
$tpl['MESSAGE:H'] = $language['GroupNotAdded'] . ": " . $validate[1];
} else {
$insert = sumo_add_group(array('usergroup' => $_POST['groupname'], 'groupdesc' => $_POST['groupdesc']));
if ($insert) {
$tpl['MESSAGE:L'] = sumo_get_message('GroupAdded', $_POST['groupname']);
$tpl['GET:WindowScripts'] = "sumo_ajax_get('groups.content','?module=groups&action=list&decoration=false');";
} else {
$tpl['MESSAGE:H'] = $language['GroupNotAdded'];
}
}
$_SESSION['action'] = 'new';
require "action.new.php";
示例3: array
<?php
/**
* SUMO MODULE: Network | Modify Local IP Address
*
* @version 0.2.10
* @link http://sumoam.sourceforge.net SUMO Access Manager
* @author Alberto Basso <albertobasso@users.sourceforge.net>
* @copyright Copyright © 2003-2009, Alberto Basso
* @package SUMO
* @category Console
*/
$data = array(array('id', $_GET['id'], 1), array('iptype', $_POST['type'], 1), array('iprange', $_POST['ip'], 1));
$validate = sumo_validate_data_network($data, TRUE);
if (!$validate[0]) {
$tpl['MESSAGE:M'] = sumo_get_message('LocalIPNotUpdated') . ":<br>" . $validate[1];
} else {
$update = sumo_update_intranet_ip_data(array('id' => $_GET['id'], 'type' => $_POST['type'], 'ip' => $_POST['ip']));
if ($update) {
$tpl['MESSAGE:L'] = sumo_get_message('LocalIPUpdated', $_POST['ip']);
} else {
$tpl['MESSAGE:H'] = sumo_get_message('LocalIPNotUpdated');
}
}
require "action.edit_localip.php";
示例4: sumo_get_user_info
* SUMO MODULE: Users | Delete User Image
*
* @version 0.3.4
* @link http://sumoam.sourceforge.net SUMO Access Manager
* @author Alberto Basso <albertobasso@users.sourceforge.net>
* @copyright Copyright © 2003-2009, Alberto Basso
* @package SUMO
* @category Console
*/
$tab = sumo_get_user_info($_GET['id'], 'id', FALSE);
if (sumo_verify_permissions(4, $tab['group'])) {
if ($SUMO['user']['id'] == $_GET['id'] || $SUMO['user']['user'] == 'sumo') {
$validate[0] = '';
// If id not exist
if (!$tab['id']) {
$tpl['MESSAGE:H'] = sumo_get_message('W00001C', $_GET['id']);
} else {
sumo_delete_user_image($_GET['id']);
}
if ($validate[0]) {
$tpl['MESSAGE:M'] = $validate[1];
}
$tpl['GET:UpdateForm'] = "<form action='?module=users&action=editimg&id=" . $tab['id'] . "' " . "name='UpdateUserImg' method='POST' enctype='multipart/form-data'>";
$tpl['IMG:User'] = "<img src='services.php?module=users&service=image&cmd=GET_USER&id=" . $tab['id'] . "' alt='" . $tab['username'] . "' class='user'>";
$tpl['PUT:UserImage'] = "<input type='hidden' name='MAX_FILE_SIZE' value='30720'>" . "<input type='file' size='20' class='file' name='user_image' >";
$tpl['GET:DeleteForm'] = "<form action='?module=users&action=deleteimg&id=" . $tab['id'] . "' name='DeleteUserImg' method='POST'>\n" . "<input type='submit' class='button' value='" . $language['Delete'] . "'>\n" . "</form>";
// Note: not using sumo_show_window() function
// because for this event a window is external
$tpl_file = SUMO_PATH_MODULE . '/templates/editimg.tpl';
if (sumo_verify_file($tpl_file)) {
$content = implode('', file($tpl_file));
示例5: sumo_get_group_info
<?php
/**
* SUMO MODULE: Groups | Delete Group
*
* @version 0.4.0
* @link http://sumoam.sourceforge.net SUMO Access Manager
* @author Alberto Basso <albertobasso@users.sourceforge.net>
* @copyright Copyright © 2003-2009, Alberto Basso
* @package SUMO
* @category Console
*/
$tab = sumo_get_group_info($_GET['id']);
$delete = sumo_delete_group($_GET['id']);
//if($delete)
$tpl['MESSAGE:L'] = sumo_get_message('GroupDeleted', $_POST['usergroup']);
//else
//$tpl['MESSAGE:H'] = $language['GroupNotDeleted'];
$_SESSION['action'] = 'list';
require "action.list.php";
示例6: array
}
// If registration enabled require reg_group
$reg_group = $_POST['registration'] ? 1 : 0;
$data = array(array('id', $_GET['id'], 1), array('node', $_POST['node'], 1), array('name', $_POST['name'], 1), array('path', $_POST['path'], 1), array('usergroup', $_POST['group'], 1), array('reg_group', $_POST['reg_group'], $reg_group), array('boolean', $_POST['http_auth'], 1), array('boolean', $_POST['filtering'], 1), array('boolean', $_POST['pwd_encrypt'], 1), array('boolean', $_POST['change_pwd'], 1), array('boolean', $_POST['registration'], 1), array('theme', $_POST['theme']));
$validate = sumo_validate_accesspoint_data($data, TRUE);
// verify if accesspoint already exist
//if(sumo_verify_accesspoint_exist($_POST['node'], $_POST['path'])) $validate = array(FALSE, sumo_get_message('I07002C', $_POST['path']));
// Verify submittedd groups with current user group
if ($validate[0]) {
$submitted_group = sumo_get_grouplevel($_POST['group'], TRUE);
$available_group = sumo_get_available_group();
for ($g = 0; $g < count($submitted_group); $g++) {
if (!in_array($submitted_group[$g], $available_group) && $submitted_group[$g]) {
//$validate = array(false, sumo_get_message('GroupNotAvailable', $submitted_group[$g]));
$validate[0] = true;
$warning = sumo_get_message('GroupNotAvailable', $submitted_group[$g]);
break;
}
}
}
if (!$validate[0]) {
$tpl['MESSAGE:H'] = $language['AccessPointNotUpdated'] . ": " . $validate[1];
} else {
$update = sumo_update_accesspoint_data(array('id' => $_GET['id'], 'node' => $_POST['node'], 'path' => $_POST['path'], 'name' => $_POST['name'], 'group' => $_POST['group'], 'reg_group' => $_POST['reg_group'], 'http_auth' => $_POST['http_auth'], 'filtering' => $_POST['filtering'], 'pwd_encrypt' => $_POST['pwd_encrypt'], 'change_pwd' => $_POST['change_pwd'], 'registration' => $_POST['registration'], 'theme' => $_POST['theme']));
if ($update && !$warning) {
$tpl['MESSAGE:L'] = $language['AccessPointUpdated'];
} elseif ($update && $warning) {
$tpl['MESSAGE:M'] = $language['AccessPointUpdated'] . " " . $warning;
} else {
$tpl['MESSAGE:H'] = $language['AccessPointNotUpdated'];
}
示例7: sumo_validate_data_network
//.........这里部分代码省略.........
if (!preg_match("/^[a-z0-9" . SUMO_REGEXP_ALLOWED_CHARS . "\\-\\_\\.\\=\\&\\/\\\\'\\ ]{4,128}\$/i", $data[$d][1])) {
$err = 'W09001C';
}
break;
case 'type':
if (!in_array($data[$d][1], sumo_get_available_datasources())) {
$err = 'W09002C';
}
break;
case 'port':
if ($data[$d][1] < 1 || $data[$d][1] > 65535) {
$err = 'W09004C';
}
break;
case 'protocol':
$protocols = array('http', 'https');
if (!in_array($data[$d][1], $protocols)) {
$err = 'W09017C';
}
break;
case 'username':
if (!preg_match('/^[a-z0-9]{3,32}$/i', $data[$d][1])) {
$err = 'W09005C';
}
break;
case 'password':
if (!preg_match('/[a-z0-9\\.\\,\\:\\;\\_\\-\\$\\!\\"\'\\/\\\\£\\%\\&\\(\\)\\=\\?\\^\\+\\*\\ ' . SUMO_REGEXP_ALLOWED_CHARS . ']{3,255}$/i', $data[$d][1])) {
$err = 'W09006C';
}
break;
case 'db_name':
if (!preg_match('/^[a-z0-9\\_]{3,32}$/i', $data[$d][1])) {
$err = 'W09007C';
}
break;
case 'db_table':
if (!preg_match('/[a-z0-9\\_]{3,255}$/i', $data[$d][1])) {
$err = 'W09008C';
}
break;
case 'enctype':
$enctype = sumo_get_datasource_enctype();
if (!in_array($data[$d][1], $enctype)) {
$err = 'W09018C';
}
break;
case 'ldap_base':
if (!preg_match('/^[a-z0-9\\.\\,\\:\\;\\_\\-\\=\\\\/\\+\\*\\ ' . SUMO_REGEXP_ALLOWED_CHARS . ']{4,255}$/i', $data[$d][1])) {
$err = 'W00027C';
}
break;
case 'iptype':
$type = array('L', 'P');
if (!in_array($data[$d][1], $type)) {
$err = 'W09010C';
}
break;
case 'host':
if (!sumo_validate_ip($data[$d][1], FALSE) && !preg_match('/[a-z0-9\\.\\_\\-]{3,128}$/i', $data[$d][1])) {
$err = 'W09011C';
}
break;
case 'hostname':
if (!preg_match('/[a-z0-9\\.\\_\\-]{3,128}$/i', $data[$d][1])) {
$err = 'W09003C';
}
break;
case 'iprange':
if (!sumo_validate_iprange($data[$d][1], FALSE)) {
$err = 'W09009C';
}
break;
case 'status':
if ($data[$d][1] != 0 && $data[$d][1] != 1) {
$err = 'W09012C';
}
break;
case 'sumo_path':
if (!preg_match("/^\\/[a-z0-9\\-\\_\\.\\/]{1,253}\\/\$/i", $data[$d][1])) {
$err = 'W09014C';
}
break;
default:
$err = 'W00019C';
break;
}
if ($err) {
break;
}
}
}
if ($message) {
return !$err ? array(TRUE, '') : array(FALSE, sumo_get_message($err));
} else {
return !$err ? true : false;
}
} else {
return false;
}
}
示例8: array
*
* @version 0.4.0
* @link http://sumoam.sourceforge.net SUMO Access Manager
* @author Alberto Basso <albertobasso@users.sourceforge.net>
* @copyright Copyright © 2003-2009, Alberto Basso
* @package SUMO
* @category Console
*/
$data = array(array('id', $_GET['id'], 1), array('dsname', $_POST['name'], 1), array('type', $_POST['type'], 1), array('hostname', $_POST['host']), array('port', $_POST['port']), array('username', $_POST['username']), array('password', $_POST['password']), array('db_name', $_POST['db_name']), array('db_table', $_POST['db_table']), array('username', $_POST['db_field_user']), array('password', $_POST['db_field_password']), array('enctype', $_POST['enctype']), array('ldap_base', $_POST['ldap_base']));
$validate = sumo_validate_data_network($data, TRUE);
if ($validate[0]) {
//
if (($_POST['type'] == 'MySQL' || $_POST['type'] == 'MySQLUsers' || $_POST['type'] == 'Postgres') && (!$_POST['db_name'] || !$_POST['db_table'] || !$_POST['db_field_user'] || !$_POST['db_field_password'])) {
$validate = array(FALSE, sumo_get_message('I09004C', $_POST['db_name']));
}
// LDAP/LDAPS
if (($_POST['type'] == 'LDAP' || $_POST['type'] == 'LDAPS' || $_POST['type'] == 'ADAM') && !$_POST['ldap_base']) {
$validate = array(FALSE, sumo_get_message('I09005C'));
}
}
if (!$validate[0]) {
$tpl['MESSAGE:H'] = sumo_get_message('DataSourceNotAdded', $_POST['name']) . ":<br>" . $validate[1];
} else {
$update = sumo_update_datasource_data(array('id' => $_GET['id'], 'name' => $_POST['name'], 'type' => $_POST['type'], 'host' => $_POST['host'], 'port' => $_POST['port'], 'username' => $_POST['username'], 'password' => $_POST['password'], 'db_name' => $_POST['db_name'], 'db_table' => $_POST['db_table'], 'db_field_user' => $_POST['db_field_user'], 'db_field_password' => $_POST['db_field_password'], 'enctype' => $_POST['enctype'], 'ldap_base' => $_POST['ldap_base']));
if ($update) {
$tpl['MESSAGE:L'] = sumo_get_message('DataSourceUpdated', $_POST['name']);
} else {
$tpl['MESSAGE:H'] = sumo_get_message('DataSourceNotUpdated', $_POST['name']);
}
}
require "action.edit_datasource.php";
示例9: array
$tpl['MESSAGE:A'] = 1;
}
break;
case 'GET_USERS_LOGOUT':
/**
* Get users logout
*/
$query = "SELECT message FROM " . SUMO_TABLE_LOG_ACCESS . "\n\t\t\t\t WHERE code='I00201X'\n\t\t\t\t \tAND\ttime >= " . ($SUMO['server']['time'] - 65);
$rs = $SUMO['DB']->Execute($query);
$users = array();
while ($tab = $rs->FetchRow()) {
// Very BAD solution (for now)!!!
$message = explode(" ", $tab['message']);
$users[] = $message[1];
}
if (!empty($users)) {
$message = sumo_get_message('UserLogout', implode(", ", $users));
$l = 'l';
$tpl['MESSAGE:A'] = 1;
}
break;
// Unknow command
// Unknow command
default:
echo "E00121X";
break;
}
// Create message
if ($message != "") {
echo "<SCRIPT>sumo_show_message('msg{$m}', '{$message}', '{$l}', \n\t\t\t\t\t\t\t\t\t'{$tpl['MESSAGE:A']}',\n\t\t\t\t\t\t\t\t\t'" . base64_encode($tpl['MESSAGE:F']) . "',\n\t\t\t\t\t\t\t\t\t'" . base64_encode($tpl['BUTTON:1']) . "',\n\t\t\t\t\t\t\t\t\t'" . base64_encode($tpl['BUTTON:2']) . "',\n\t\t\t\t\t\t\t\t\t'" . base64_encode($tpl['BUTTON:3']) . "');";
}
示例10: sumo_get_user_info
<?php
/**
* SUMO MODULE: Users | Erase
*
* @version 0.4.0
* @link http://sumoam.sourceforge.net SUMO Access Manager
* @author Alberto Basso <albertobasso@users.sourceforge.net>
* @copyright Copyright © 2003-2009, Alberto Basso
* @package SUMO
* @category Console
*/
$tab = sumo_get_user_info($_GET['id'], 'id', FALSE);
if (sumo_verify_permissions(5, $tab['group'])) {
$delete = sumo_delete_user($_GET['id']);
require "action.list.php";
if ($delete) {
$tpl['MESSAGE:L'] = sumo_get_message('UserDeleted', $tab['username']);
} else {
$tpl['MESSAGE:H'] = sumo_get_message('UserNotDeleted', $tab['username']);
}
} else {
$action_error = true;
$tpl['MESSAGE:H'] = $language['AccessDenied'];
}
示例11: array
*
* @version 0.5.0
* @link http://sumoam.sourceforge.net SUMO Access Manager
* @author Alberto Basso <albertobasso@users.sourceforge.net>
* @copyright Copyright © 2003-2009, Alberto Basso
* @package SUMO
* @category Console
*/
if ($_POST['host'] == '127.0.0.1') {
$_POST['host'] = 'localhost';
}
$data = array(array('node_name', $_POST['name'], 1), array('host', $_POST['host'], 1), array('port', $_POST['port'], 1), array('status', $_POST['status'], 1), array('protocol', $_POST['protocol'], 1), array('sumo_path', $_POST['sumo_path'], 1));
$validate = sumo_validate_data_network($data, TRUE);
// verify if node already exist
if (sumo_verify_node_exist($_POST)) {
$validate = array(FALSE, sumo_get_message('W09016C'));
}
if (!$validate[0]) {
$tpl['MESSAGE:H'] = sumo_get_message('NodeNotAdded') . ":<br>" . $validate[1];
} else {
$insert = sumo_add_node(array('name' => $_POST['name'], 'host' => $_POST['host'], 'port' => $_POST['port'], 'active' => $_POST['status'], 'protocol' => $_POST['protocol'], 'sumo_path' => $_POST['sumo_path']));
if ($insert) {
$tpl['MESSAGE:L'] = sumo_get_message('NodeAdded');
$tpl['GET:WindowScripts'] = "sumo_ajax_get('network.content','?module=network&action=nlist&decoration=false');";
} else {
$tpl['MESSAGE:H'] = sumo_get_message('NodeNotAdded');
}
}
require "action.new_node.php";
?>
示例12: sumo_validate_accesspoint_data
/**
* Validate data accesspoint
* See also sumo_validate_data() in libs/lib.core.php
*
* @author Alberto Basso
*/
function sumo_validate_accesspoint_data($data = array(), $message = FALSE)
{
$elements = count($data);
$err = FALSE;
if ($elements > 0) {
for ($d = 0; $d < $elements; $d++) {
if ($data[$d][2] == 1 || $data[$d][2] == 0 && $data[$d][1]) {
switch ($data[$d][0]) {
case 'id':
// INT = 256^4-1
if ($data[$d][1] < 1 || $data[$d][1] > 4294967296) {
$err = 'W00029C';
}
break;
case 'path':
if (!preg_match("/^(\\/)+[_\\.\\/a-z0-9-]{1,}(\\.){1}(php|php4|php5|html|htm|asp|pl|jsp){1}\$/i", $data[$d][1])) {
$err = 'W07003C';
}
break;
case 'node':
if ($data[$d][1] < 1 || $data[$d][1] > 4294967296) {
$err = 'W07004C';
}
break;
case 'name':
$languages = sumo_get_available_languages();
for ($l = 0; $l < count($languages); $l++) {
if (!preg_match("/^[-a-z0-9_\\.\\=\\&\\/\\'" . SUMO_REGEXP_ALLOWED_CHARS . " ]{5,128}\$/i", $data[$d][1][$languages[$l]])) {
$err = 'W00031C';
}
}
break;
case 'usergroup':
if (!sumo_validate_group($data[$d][1], FALSE)) {
$err = 'W07002C';
}
break;
case 'reg_group':
if (!sumo_validate_group($data[$d][1], FALSE)) {
$err = 'W07005C';
}
break;
case 'boolean':
if ($data[$d][1] != 0 && $data[$d][1] != 1) {
$err = 'W00032C';
}
break;
case 'theme':
if (!in_array($data[$d][1], sumo_get_available_themes())) {
$err = 'W00033C';
}
break;
default:
$err = 'W00019C';
break;
}
if ($err) {
break;
}
}
}
if ($message) {
return !$err ? array(TRUE, '') : array(FALSE, sumo_get_message($err));
} else {
return !$err ? TRUE : FALSE;
}
} else {
return FALSE;
}
}
示例13: sumo_get_normalized_group
*/
// Create group string
if ($_POST['group']) {
$_POST['group'] = sumo_get_normalized_group(implode(";", $_POST['group']), TRUE);
}
$_POST['path'] = sumo_get_normalized_accesspoint($_POST['path']);
// If new group exist add it
if ($_POST['newgroup']) {
$_POST['group'] = sumo_get_normalized_group($_POST['newgroup'] . ";" . $_POST['group'], TRUE);
}
// If registration enabled require reg_group
$reg_group = $_POST['registration'] ? 1 : 0;
$data = array(array('node', $_POST['node'], 1), array('name', $_POST['name'], 1), array('path', $_POST['path'], 1), array('usergroup', $_POST['group'], 1), array('reg_group', $_POST['reg_group'], $reg_group), array('boolean', $_POST['http_auth'], 1), array('boolean', $_POST['filtering'], 1), array('boolean', $_POST['pwd_encrypt'], 1), array('boolean', $_POST['change_pwd'], 1), array('boolean', $_POST['registration'], 1), array('theme', $_POST['theme']));
$validate = sumo_validate_accesspoint_data($data, TRUE);
// verify if accesspoint already exist
if (sumo_verify_accesspoint_exist($_POST['node'], $_POST['path'])) {
$validate = array(FALSE, sumo_get_message('I07002C', $_POST['path']));
}
if (!$validate[0]) {
$tpl['MESSAGE:H'] = $language['AccessPointNotAdded'] . ": " . $validate[1];
} else {
$update = sumo_add_accesspoint(array('name' => $_POST['name'], 'node' => $_POST['node'], 'path' => $_POST['path'], 'usergroup' => $_POST['group'], 'reg_group' => $_POST['reg_group'], 'http_auth' => $_POST['http_auth'], 'filtering' => $_POST['filtering'], 'pwd_encrypt' => $_POST['pwd_encrypt'], 'change_pwd' => $_POST['change_pwd'], 'registration' => $_POST['registration'], 'theme' => $_POST['theme']));
if ($update) {
$tpl['MESSAGE:L'] = $language['AccessPointAdded'];
$tpl['GET:WindowScripts'] = "sumo_ajax_get('accesspoints.content','?module=accesspoints&action=list&decoration=false');";
} else {
$tpl['MESSAGE:H'] = $language['AccessPointNotAdded'];
}
}
$_SESSION['action'] = 'new';
require "action.new.php";
示例14: sumo_get_intranet_ip_info
<?php
/**
* SUMO MODULE: Network | Erase Local IP address
*
* @version 0.4.0
* @link http://sumoam.sourceforge.net SUMO Access Manager
* @author Alberto Basso <albertobasso@users.sourceforge.net>
* @copyright Copyright © 2003-2009, Alberto Basso
* @package SUMO
* @category Console
*/
$tab = sumo_get_intranet_ip_info($_GET['id'], FALSE);
$delete = sumo_delete_intranet_ip($tab['id']);
if ($delete) {
$tpl['MESSAGE:L'] = sumo_get_message('LocalIPDeleted', $tab['ip']);
} else {
$tpl['MESSAGE:H'] = sumo_get_message('LocalIPNotDeleted', $tab['ip']);
}
$tpl['GET:MenuModule'] = sumo_get_module_menu($menu['ilist'], 'ilist');
require "action.ilist.php";
示例15: intval
<?php
/**
* SUMO MODULE: Messages | Main
*
* @version 0.4.0
* @link http://sumoam.sourceforge.net SUMO Access Manager
* @author Alberto Basso <albertobasso@users.sourceforge.net>
* @copyright Copyright © 2003-2009, Alberto Basso
* @package SUMO
* @category Console
*/
$m = intval($_GET['m']);
$msg = $_GET['msg'];
$data = explode("_", $_GET['data']);
$onclick = array('ErrorsMessages' => 'sumo_ajax_get(\'security\',\'?module=security&action=errors_list\');' . 'sumo_remove_window(\'messages' . $m . '\')', 'BannedUsers' => 'sumo_ajax_get(\'security\',\'?module=security&action=banned\');' . 'sumo_remove_window(\'messages' . $m . '\')', 'ChangePassword' => 'sumo_ajax_get(\'users\',\'?module=users&action=view&id=' . $data[0] . '\');' . 'sumo_remove_window(\'messages' . $m . '\')', 'SQLiteError' => '', 'IP2CountryEmpty' => 'sumo_ajax_get(\'settings\',\'?module=settings&action=edit\');' . 'sumo_remove_window(\'messages' . $m . '\')', 'RemoveExamplesDir' => '', 'RemoveInstallDir' => '', 'UserLogin' => 'sumo_remove_window(\'messages' . $m . '\')', 'UserLogout' => 'sumo_remove_window(\'messages' . $m . '\')', $language['Undefined'] => 'sumo_remove_window(\'messages' . $m . '\')');
$msg = in_array($msg, array_keys($onclick)) ? $msg : $language['Undefined'];
$tpl = array('GET:PageTheme' => $SUMO['page']['theme'], 'GET:WindowElement' => 'messages' . $m, 'MESSAGE' => sumo_get_message($msg, $data), 'GET:Cancel' => '<input type="button" class="button" value="' . $language['Cancel'] . '" ' . 'onclick="javascript:sumo_remove_window(\'messages' . $m . '\');">', 'GET:Ok' => '<input type="button" class="button" value="' . $language['Ok'] . '" ' . 'onclick="javascript:' . $onclick[$msg] . ';">', 'GET:Close' => '<input type="button" class="button" value="' . $language['Close'] . '" ' . 'onclick="javascript:sumo_remove_window(\'messages' . $m . '\');">');
$tpl_file = $service[$_GET['cmd']]['template'];