summaryrefslogtreecommitdiffstats
path: root/frontends/php
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-04-03 10:24:46 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-04-03 10:24:46 +0000
commitf76c30e882c1ab030b91dbe4ea8581c2b2c6ef05 (patch)
tree82d0cc4a1d306007378843e1ee2aacf9b29e9b21 /frontends/php
parentd61b888e2947cc92766cac05abe6f8a238038269 (diff)
downloadzabbix-f76c30e882c1ab030b91dbe4ea8581c2b2c6ef05.tar.gz
zabbix-f76c30e882c1ab030b91dbe4ea8581c2b2c6ef05.tar.xz
zabbix-f76c30e882c1ab030b91dbe4ea8581c2b2c6ef05.zip
- added "remove all" option in dashboard menus (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5584 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php')
-rw-r--r--frontends/php/actionconf.php4
-rw-r--r--frontends/php/dashboard.php2
-rw-r--r--frontends/php/include/actions.inc.php2
-rw-r--r--frontends/php/include/blocks.inc.php79
-rw-r--r--frontends/php/include/forms.inc.php6
-rw-r--r--frontends/php/include/items.inc.php3
-rw-r--r--frontends/php/include/locales/en_gb.inc.php1
-rw-r--r--frontends/php/include/maps.inc.php6
-rw-r--r--frontends/php/include/profiles.inc.php4
-rw-r--r--frontends/php/include/screens.inc.php14
-rw-r--r--frontends/php/js/common.js2
-rw-r--r--frontends/php/map.php2
-rw-r--r--frontends/php/maps.php2
-rw-r--r--frontends/php/popup.php10
-rw-r--r--frontends/php/screenconf.php8
-rw-r--r--frontends/php/screenedit.php2
-rw-r--r--frontends/php/screens.php16
-rw-r--r--frontends/php/sysmap.php2
-rw-r--r--frontends/php/sysmaps.php4
19 files changed, 116 insertions, 53 deletions
diff --git a/frontends/php/actionconf.php b/frontends/php/actionconf.php
index 06f9b9ad..49065bb6 100644
--- a/frontends/php/actionconf.php
+++ b/frontends/php/actionconf.php
@@ -84,7 +84,7 @@ include_once "include/page_header.php";
check_fields($fields);
validate_sort_and_sortorder();
- if(isset($_REQUEST['actionid']) && !action_accessiable($_REQUEST['actionid'], PERM_READ_WRITE))
+ if(isset($_REQUEST['actionid']) && !action_accessible($_REQUEST['actionid'], PERM_READ_WRITE))
{
access_deny();
}
@@ -354,7 +354,7 @@ include_once "include/page_header.php";
order_by('a.name,a.status','a.actionid'));
while($action_data = DBfetch($db_actions))
{
- if(!action_accessiable($action_data['actionid'], PERM_READ_WRITE)) continue;
+ if(!action_accessible($action_data['actionid'], PERM_READ_WRITE)) continue;
$conditions=array();
$db_conditions = DBselect('select * from conditions where actionid='.$action_data['actionid'].
diff --git a/frontends/php/dashboard.php b/frontends/php/dashboard.php
index 2c75791c..302e9663 100644
--- a/frontends/php/dashboard.php
+++ b/frontends/php/dashboard.php
@@ -146,7 +146,7 @@ include_once "include/page_header.php";
echo 'dashboard_submenu["menu_sysmaps"] = '.zbx_jsvalue(make_sysmap_submenu()).';';
}
}
- if(in_array($_REQUEST['favobj'],array('screenid','slideid'))){
+ if(in_array($_REQUEST['favobj'],array('screenid','slideshowid'))){
$result = false;
if('add' == $_REQUEST['action']){
$result = add2favorites('web.favorite.screenids',$_REQUEST['favid'],$_REQUEST['favobj']);
diff --git a/frontends/php/include/actions.inc.php b/frontends/php/include/actions.inc.php
index e50b51f6..ec9f54e8 100644
--- a/frontends/php/include/actions.inc.php
+++ b/frontends/php/include/actions.inc.php
@@ -22,7 +22,7 @@ include_once 'include/discovery.inc.php';
?>
<?php
- function action_accessiable($actionid,$perm){
+ function action_accessible($actionid,$perm){
global $USER_DETAILS;
$result = false;
diff --git a/frontends/php/include/blocks.inc.php b/frontends/php/include/blocks.inc.php
index 53cec68c..f6071658 100644
--- a/frontends/php/include/blocks.inc.php
+++ b/frontends/php/include/blocks.inc.php
@@ -19,7 +19,10 @@
**/
?>
<?php
+require_once "include/graphs.inc.php";
require_once "include/screens.inc.php";
+require_once "include/maps.inc.php";
+
// Author: Aly
function make_favorite_graphs($available_hosts=false){
@@ -51,7 +54,8 @@ function make_favorite_graphs($available_hosts=false){
}
else{
if(!$graph = get_graph_by_graphid($resourceid)) continue;
-
+ if(!graph_accessible($resourceid)) continue;
+
$result = get_hosts_by_graphid($resourceid);
$ghost = DBFetch($result);
@@ -85,8 +89,9 @@ function make_favorite_screens(){
$fav_screens = get4favorites('web.favorite.screenids');
foreach($fav_screens['id'] as $key => $resourceid){
- if('slideid' == $fav_screens['resource'][$key]){
+ if('slideshowid' == $fav_screens['resource'][$key]){
if(!$slide = get_slideshow_by_slideshowid($resourceid)) continue;
+ if(!slideshow_accessible($resourceid, PERM_READ_ONLY)) continue;
$link = new CLink($slide['name'],'screens.php?config=1&elementid='.$resourceid);
$link->SetTarget('blank');
@@ -99,6 +104,7 @@ function make_favorite_screens(){
}
else{
if(!$screen = get_screen_by_screenid($resourceid)) continue;
+ if(!screen_accessible($resourceid, PERM_READ_ONLY)) continue;
$link = new CLink($screen['name'],'screens.php?config=0&elementid='.$resourceid);
$link->SetTarget('blank');
@@ -133,7 +139,8 @@ function make_favorite_maps(){
foreach($fav_sysmaps['id'] as $key => $resourceid){
if(!$sysmap = get_sysmap_by_sysmapid($resourceid)) continue;
-
+ if(!sysmap_accessible($resourceid,PERM_READ_ONLY)) continue;
+
$link = new CLink($sysmap['name'],'maps.php?sysmapid='.$resourceid);
$link->SetTarget('blank');
@@ -887,11 +894,13 @@ function make_graph_menu(&$menu,&$submenu){
function make_graph_submenu(){
$graphids = array();
-
+
$fav_graphs = get4favorites('web.favorite.graphids');
foreach($fav_graphs['id'] as $key => $resourceid){
if('itemid' == $fav_graphs['resource'][$key]){
if(!$item = get_item_by_itemid($resourceid)) continue;
+
+ $item_added = true;
$host = get_host_by_itemid($resourceid);
$item["description"] = item_description($item["description"],$item["key_"]);
@@ -905,10 +914,12 @@ function make_graph_submenu(){
}
else{
if(!$graph = get_graph_by_graphid($resourceid)) continue;
+
+ $graph_added = true;
$result = get_hosts_by_graphid($resourceid);
$ghost = DBFetch($result);
-
+
$graphids[] = array(
'name' => $ghost['host'].':'.$graph['name'],
'favobj'=> 'graphid',
@@ -917,6 +928,24 @@ function make_graph_submenu(){
);
}
}
+
+ if(isset($graph_added)){
+ $graphids[] = array(
+ 'name' => S_REMOVE.SPACE.S_ALL.SPACE.S_GRAPHS,
+ 'favobj'=> 'graphid',
+ 'favid' => 0,
+ 'action'=> 'remove'
+ );
+ }
+
+ if(isset($item_added)){
+ $graphids[] = array(
+ 'name' => S_REMOVE.SPACE.S_ALL.SPACE.S_SIMPLE_GRAPHS,
+ 'favobj'=> 'itemid',
+ 'favid' => 0,
+ 'action'=> 'remove'
+ );
+ }
return $graphids;
}
@@ -957,6 +986,15 @@ function make_sysmap_submenu(){
);
}
+ if(!empty($sysmapids)){
+ $sysmapids[] = array(
+ 'name' => S_REMOVE.SPACE.S_ALL.SPACE.S_MAPS,
+ 'favobj'=> 'sysmapid',
+ 'favid' => 0,
+ 'action'=> 'remove'
+ );
+ }
+
return $sysmapids;
}
@@ -1000,20 +1038,22 @@ function make_screen_submenu(){
$fav_screens = get4favorites('web.favorite.screenids');
foreach($fav_screens['id'] as $key => $resourceid){
- if('slides' == $fav_screens['resource'][$key]){
+ if('slideshowid' == $fav_screens['resource'][$key]){
if(!$slide = get_slideshow_by_slideshowid($resourceid)) continue;
-
+ $slide_added = true;
+
$screenids[] = array(
'name' => $slide['name'],
- 'favobj'=> 'slideid',
+ 'favobj'=> 'slideshowid',
'favid' => $resourceid,
'action'=> 'remove'
);
}
else{
- if(!$screen = get_screen_by_screenid($resourceid)) continue;
-
+ if(!$screen = get_screen_by_screenid($resourceid)) continue;
+ $screen_added = true;
+
$screenids[] = array(
'name' => $screen['name'],
'favobj'=> 'screenid',
@@ -1023,6 +1063,25 @@ function make_screen_submenu(){
}
}
+
+ if(isset($screen_added)){
+ $screenids[] = array(
+ 'name' => S_REMOVE.SPACE.S_ALL.SPACE.S_SCREENS,
+ 'favobj'=> 'screenid',
+ 'favid' => 0,
+ 'action'=> 'remove'
+ );
+ }
+
+ if(isset($slide_added)){
+ $screenids[] = array(
+ 'name' => S_REMOVE.SPACE.S_ALL.SPACE.S_SLIDES,
+ 'favobj'=> 'slideshowid',
+ 'favid' => 0,
+ 'action'=> 'remove'
+ );
+ }
+
return $screenids;
}
diff --git a/frontends/php/include/forms.inc.php b/frontends/php/include/forms.inc.php
index b5abd8a7..edae641f 100644
--- a/frontends/php/include/forms.inc.php
+++ b/frontends/php/include/forms.inc.php
@@ -3772,7 +3772,7 @@ include_once 'include/discovery.inc.php';
' WHERE s.sysmapid='.$resourceid);
while($row=DBfetch($result)){
- if(!sysmap_accessiable($row['sysmapid'],PERM_READ_ONLY)) continue;
+ if(!sysmap_accessible($row['sysmapid'],PERM_READ_ONLY)) continue;
$row['node_name'] = isset($row['node_name']) ? '('.$row['node_name'].') ' : '';
$caption = $row['node_name'].$row['name'];
@@ -3878,7 +3878,7 @@ include_once 'include/discovery.inc.php';
' WHERE s.screenid='.$resourceid);
while($row=DBfetch($result)){
- if(!screen_accessiable($row['screenid'], PERM_READ_ONLY)) continue;
+ if(!screen_accessible($row['screenid'], PERM_READ_ONLY)) continue;
if(check_screen_recursion($_REQUEST['screenid'],$row['screenid'])) continue;
$row['node_name'] = isset($row['node_name']) ? '('.$row['node_name'].') ' : '';
@@ -4907,7 +4907,7 @@ include_once 'include/discovery.inc.php';
' order by node_name,s.name');
while($db_map = DBfetch($db_maps))
{
- if(!sysmap_accessiable($db_map["sysmapid"],PERM_READ_ONLY)) continue;
+ if(!sysmap_accessible($db_map["sysmapid"],PERM_READ_ONLY)) continue;
$node_name = isset($db_map['node_name']) ? '('.$db_map['node_name'].') ' : '';
$cmbMaps->AddItem($db_map["sysmapid"],$node_name.$db_map["name"]);
}
diff --git a/frontends/php/include/items.inc.php b/frontends/php/include/items.inc.php
index e56eda39..45233964 100644
--- a/frontends/php/include/items.inc.php
+++ b/frontends/php/include/items.inc.php
@@ -889,6 +889,7 @@
function get_items_data_overview($groupid,$view_style=null)
{
global $USER_DETAILS;
+ $available_hosts = get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_ONLY, null, null, get_current_nodeid());
if(is_null($view_style)) $view_style = get_profile('web.overview.view.style',STYLE_TOP);
@@ -906,7 +907,7 @@ COpt::profiling_start('prepare data');
' i.description, t.priority, i.valuemapid, t.value as tr_value, t.triggerid '.
' from hosts h,items i left join functions f on f.itemid=i.itemid left join triggers t on t.triggerid=f.triggerid '.
$group_where.
- ' h.hostid in ('.get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_ONLY, null, null, get_current_nodeid()).') '.
+ ' h.hostid in ('.$available_hosts.') '.
' and h.status='.HOST_STATUS_MONITORED.' and h.hostid=i.hostid and i.status='.ITEM_STATUS_ACTIVE.
' order by i.description,i.itemid');
diff --git a/frontends/php/include/locales/en_gb.inc.php b/frontends/php/include/locales/en_gb.inc.php
index 7b8bfd5e..25de5be1 100644
--- a/frontends/php/include/locales/en_gb.inc.php
+++ b/frontends/php/include/locales/en_gb.inc.php
@@ -1083,6 +1083,7 @@
'S_RIGHTS_OF_RESOURCES'=> 'User rights',
'S_NO_RESOURCES_DEFINED'=> 'No resources defined',
'S_SIMPLE_GRAPH'=> 'Simple graph',
+ 'S_SIMPLE_GRAPHS'=> 'Simple graphs',
'S_SIMPLE_GRAPH_BIG'=> 'SIMPLE GRAPH',
'S_GRAPH_NAME'=> 'Graph name',
'S_WIDTH'=> 'Width',
diff --git a/frontends/php/include/maps.inc.php b/frontends/php/include/maps.inc.php
index 098484ed..6c7c24e6 100644
--- a/frontends/php/include/maps.inc.php
+++ b/frontends/php/include/maps.inc.php
@@ -66,7 +66,7 @@
}
/*
- * Function: sysmap_accessiable
+ * Function: sysmap_accessible
*
* Description:
* Check permission for map
@@ -77,7 +77,7 @@
* Eugene Grigorjev
*
*/
- function sysmap_accessiable($sysmapid,$perm)
+ function sysmap_accessible($sysmapid,$perm)
{
global $USER_DETAILS;
@@ -99,7 +99,7 @@
}
break;
case SYSMAP_ELEMENT_TYPE_MAP:
- $result &= sysmap_accessiable($se_data['elementid'], PERM_READ_ONLY);
+ $result &= sysmap_accessible($se_data['elementid'], PERM_READ_ONLY);
break;
case SYSMAP_ELEMENT_TYPE_TRIGGER:
if(DBfetch(DBselect('SELECT triggerid FROM triggers WHERE triggerid='.$se_data['elementid']))){
diff --git a/frontends/php/include/profiles.inc.php b/frontends/php/include/profiles.inc.php
index f308430e..3289b71b 100644
--- a/frontends/php/include/profiles.inc.php
+++ b/frontends/php/include/profiles.inc.php
@@ -203,13 +203,15 @@ function rm4favorites($favobj,$favid,$favcnt=null,$resource=null){
$resource = (is_null($resource))?0:$resource;
$favcnt = (is_null($favcnt))?0:$favcnt;
+
+ if($favid == 0) $favcnt = ZBX_FAVORITES_ALL;
foreach($favorites as $key => $value){
if(((bccomp($favid,$value) == 0) || ($favid == 0)) && ($fav_rsrc[$key] == $resource)){
if($favcnt < 1){
unset($favorites[$key]);
unset($fav_rsrc[$key]);
- if($favcnt > ZBX_FAVORITES_ALL) break;
+ if($favcnt > ZBX_FAVORITES_ALL) break; // foreach
}
}
$favcnt--;
diff --git a/frontends/php/include/screens.inc.php b/frontends/php/include/screens.inc.php
index af344d78..65da8df3 100644
--- a/frontends/php/include/screens.inc.php
+++ b/frontends/php/include/screens.inc.php
@@ -22,7 +22,7 @@
require_once "include/actions.inc.php";
?>
<?php
- function screen_accessiable($screenid,$perm)
+ function screen_accessible($screenid,$perm)
{
global $USER_DETAILS;
@@ -64,10 +64,10 @@
unset($itemid);
break;
case SCREEN_RESOURCE_MAP:
- $result &= sysmap_accessiable($ac_data['resourceid'], PERM_READ_ONLY);
+ $result &= sysmap_accessible($ac_data['resourceid'], PERM_READ_ONLY);
break;
case SCREEN_RESOURCE_SCREEN:
- $result &= screen_accessiable($ac_data['resourceid'],PERM_READ_ONLY);
+ $result &= screen_accessible($ac_data['resourceid'],PERM_READ_ONLY);
break;
case SCREEN_RESOURCE_SERVER_INFO:
case SCREEN_RESOURCE_HOSTS_INFO:
@@ -222,7 +222,7 @@
// editmode: 0 - view with actions, 1 - edit mode, 2 - view without any actions
function get_screen($screenid, $editmode, $effectiveperiod=NULL)
{
- if(!screen_accessiable($screenid, $editmode ? PERM_READ_WRITE : PERM_READ_ONLY))
+ if(!screen_accessible($screenid, $editmode ? PERM_READ_WRITE : PERM_READ_ONLY))
access_deny();
if(is_null($effectiveperiod))
@@ -550,7 +550,7 @@
return $table;
}
- function slideshow_accessiable($slideshowid, $perm)
+ function slideshow_accessible($slideshowid, $perm)
{
$result = false;
@@ -561,7 +561,7 @@
$db_slides = DBselect('select distinct screenid from slides where slideshowid='.$slideshowid);
while($slide_data = DBfetch($db_slides))
{
- if( !($result = screen_accessiable($slide_data["screenid"], PERM_READ_ONLY)) ) break;
+ if( !($result = screen_accessible($slide_data["screenid"], PERM_READ_ONLY)) ) break;
}
}
return $result;
@@ -574,7 +574,7 @@
function validate_slide($slide)
{
- if(!screen_accessiable($slide["screenid"], PERM_READ_ONLY)) return false;
+ if(!screen_accessible($slide["screenid"], PERM_READ_ONLY)) return false;
if( !is_numeric($slide['delay']) ) return false;
diff --git a/frontends/php/js/common.js b/frontends/php/js/common.js
index e8f16f41..22580d4d 100644
--- a/frontends/php/js/common.js
+++ b/frontends/php/js/common.js
@@ -129,7 +129,7 @@ function add2favorites(favobj,favid){
{
'method': 'post',
'parameters':params,
- 'onSuccess': function(resp){ alert(resp.responseText);},//alert(resp.responseText);
+ 'onSuccess': function(resp){ },//alert(resp.responseText);
'onFailure': function(){ document.location = uri.getPath()+'?'+Object.toQueryString(params); }
}
);
diff --git a/frontends/php/map.php b/frontends/php/map.php
index b4d8c6e7..4f0888ec 100644
--- a/frontends/php/map.php
+++ b/frontends/php/map.php
@@ -40,7 +40,7 @@ include_once "include/page_header.php";
check_fields($fields);
?>
<?php
- if(!sysmap_accessiable($_REQUEST["sysmapid"],PERM_READ_ONLY))
+ if(!sysmap_accessible($_REQUEST["sysmapid"],PERM_READ_ONLY))
{
access_deny();
}
diff --git a/frontends/php/maps.php b/frontends/php/maps.php
index 697a2d6a..2a01f1f8 100644
--- a/frontends/php/maps.php
+++ b/frontends/php/maps.php
@@ -94,7 +94,7 @@ include_once "include/page_header.php";
' WHERE '.DBin_node('sysmapid').
' ORDER BY name');
while($row=DBfetch($result)){
- if(!sysmap_accessiable($row["sysmapid"],PERM_READ_ONLY))
+ if(!sysmap_accessible($row["sysmapid"],PERM_READ_ONLY))
continue;
if(!isset($all_maps[0]))
diff --git a/frontends/php/popup.php b/frontends/php/popup.php
index 8c52c6e7..b426bbd0 100644
--- a/frontends/php/popup.php
+++ b/frontends/php/popup.php
@@ -1067,7 +1067,7 @@ include_once "include/page_header.php";
$result=DBselect($sql);
while($row=DBfetch($result)){
- if(!sysmap_accessiable($row["sysmapid"],PERM_READ_ONLY)) continue;
+ if(!sysmap_accessible($row["sysmapid"],PERM_READ_ONLY)) continue;
$row['node_name'] = isset($row['node_name']) ? '('.$row['node_name'].') ' : '';
$name = $row['node_name'].$row['name'];
@@ -1158,7 +1158,7 @@ include_once "include/page_header.php";
$result = DBselect('select slideshowid,name from slideshows where '.DBin_node('slideshowid',$nodeid).' order by name');
while($row=DBfetch($result)){
- if(!slideshow_accessiable($row["slideshowid"], PERM_READ_ONLY))
+ if(!slideshow_accessible($row["slideshowid"], PERM_READ_ONLY))
continue;
$name = new CLink($row["name"],"#","action");
@@ -1190,7 +1190,7 @@ include_once "include/page_header.php";
$result = DBselect('select screenid,name from screens where '.DBin_node('screenid',$nodeid).' order by name');
while($row=DBfetch($result))
{
- if(!screen_accessiable($row["screenid"], PERM_READ_ONLY))
+ if(!screen_accessible($row["screenid"], PERM_READ_ONLY))
continue;
$name = new CLink($row["name"],"#","action");
@@ -1226,9 +1226,9 @@ include_once "include/page_header.php";
' ORDER BY s.name');
while($row=DBfetch($result))
{
- if(!screen_accessiable($row["screenid"], PERM_READ_ONLY))
+ if(!screen_accessible($row["screenid"], PERM_READ_ONLY))
continue;
- if(!screen_accessiable($row['screenid'], PERM_READ_ONLY)) continue;
+ if(!screen_accessible($row['screenid'], PERM_READ_ONLY)) continue;
if(check_screen_recursion($_REQUEST['screenid'],$row['screenid'])) continue;
$row['node_name'] = isset($row['node_name']) ? '('.$row['node_name'].') ' : '';
diff --git a/frontends/php/screenconf.php b/frontends/php/screenconf.php
index ae69d999..a27f127e 100644
--- a/frontends/php/screenconf.php
+++ b/frontends/php/screenconf.php
@@ -78,7 +78,7 @@ include_once "include/page_header.php";
{
if(isset($_REQUEST["screenid"]))
{
- if(!screen_accessiable($_REQUEST["screenid"], PERM_READ_WRITE))
+ if(!screen_accessible($_REQUEST["screenid"], PERM_READ_WRITE))
access_deny();
}
@@ -126,7 +126,7 @@ include_once "include/page_header.php";
{
if(isset($_REQUEST['slideshowid']))
{
- if(!slideshow_accessiable($_REQUEST['slideshowid'], PERM_READ_WRITE))
+ if(!slideshow_accessible($_REQUEST['slideshowid'], PERM_READ_WRITE))
access_deny();
}
@@ -258,7 +258,7 @@ include_once "include/page_header.php";
order_by('s.name,s_size','s.screenid'));
while($row=DBfetch($result)){
- if(!screen_accessiable($row["screenid"], PERM_READ_WRITE)) continue;
+ if(!screen_accessible($row["screenid"], PERM_READ_WRITE)) continue;
$table->AddRow(array(
new CLink($row["name"],"?config=0&form=update&screenid=".$row["screenid"],
@@ -296,7 +296,7 @@ include_once "include/page_header.php";
while($slide_data = DBfetch($db_slides))
{
- if(!slideshow_accessiable($slide_data['slideshowid'], PERM_READ_WRITE)) continue;
+ if(!slideshow_accessible($slide_data['slideshowid'], PERM_READ_WRITE)) continue;
$table->AddRow(array(
new CLink($slide_data['name'],'?config=1&form=update&slideshowid='.$slide_data['slideshowid'],
diff --git a/frontends/php/screenedit.php b/frontends/php/screenedit.php
index 519df18a..f86168ec 100644
--- a/frontends/php/screenedit.php
+++ b/frontends/php/screenedit.php
@@ -68,7 +68,7 @@ include_once "include/page_header.php";
if(isset($_REQUEST["screenid"]))
{
- if(!screen_accessiable($_REQUEST["screenid"], PERM_READ_WRITE))
+ if(!screen_accessible($_REQUEST["screenid"], PERM_READ_WRITE))
access_deny();
$screen = get_screen_by_screenid($_REQUEST["screenid"]);
diff --git a/frontends/php/screens.php b/frontends/php/screens.php
index 96666d8b..bcb2014b 100644
--- a/frontends/php/screens.php
+++ b/frontends/php/screens.php
@@ -75,7 +75,7 @@ include_once "include/page_header.php";
check_fields($fields);
if(isset($_REQUEST['favobj'])){
- if(in_array($_REQUEST['favobj'],array('screenid','slideid'))){
+ if(in_array($_REQUEST['favobj'],array('screenid','slideshowid'))){
$result = false;
if('add' == $_REQUEST['action']){
$result = add2favorites('web.favorite.screenids',$_REQUEST['favid'],$_REQUEST['favobj']);
@@ -149,7 +149,7 @@ include_once "include/page_header.php";
' order by name'
);
while($row=DBfetch($result)){
- if(!screen_accessiable($row["elementid"], PERM_READ_ONLY))
+ if(!screen_accessible($row["elementid"], PERM_READ_ONLY))
continue;
$cmbElements->AddItem(
@@ -167,7 +167,7 @@ include_once "include/page_header.php";
' order by name'
);
while($row=DBfetch($result)){
- if(!slideshow_accessiable($row["elementid"], PERM_READ_ONLY))
+ if(!slideshow_accessible($row["elementid"], PERM_READ_ONLY))
continue;
$cmbElements->AddItem(
@@ -185,12 +185,12 @@ include_once "include/page_header.php";
if(isset($elementid)){
if(0 == $config){
- if(!screen_accessiable($elementid, PERM_READ_ONLY))
+ if(!screen_accessible($elementid, PERM_READ_ONLY))
access_deny();
$element = get_screen_by_screenid($elementid);
}
else{
- if(!slideshow_accessiable($elementid, PERM_READ_ONLY))
+ if(!slideshow_accessible($elementid, PERM_READ_ONLY))
access_deny();
$element = get_slideshow_by_slideshowid($elementid);
}
@@ -200,15 +200,15 @@ include_once "include/page_header.php";
if($_REQUEST["fullscreen"]==0) $url .= "&fullscreen=1";
$text[] = array(nbsp(" / "),new CLink($element["name"], $url));
- if(infavorites('web.favorite.screenids',$elementid,(0 == $config)?'screenid':'slideid')){
+ if(infavorites('web.favorite.screenids',$elementid,(0 == $config)?'screenid':'slideshowid')){
$icon = new CDiv(SPACE,'iconminus');
$icon->AddOption('title',S_REMOVE_FROM.' '.S_FAVORITES);
- $icon->AddAction('onclick',new CScript("javascript: rm4favorites('".((0 == $config)?'screenid':'slideid')."','".$elementid."',0);"));
+ $icon->AddAction('onclick',new CScript("javascript: rm4favorites('".((0 == $config)?'screenid':'slideshowid')."','".$elementid."',0);"));
}
else{
$icon = new CDiv(SPACE,'iconplus');
$icon->AddOption('title',S_ADD_TO.' '.S_FAVORITES);
- $icon->AddAction('onclick',new CScript("javascript: add2favorites('".((0 == $config)?'screenid':'slideid')."','".$elementid."');"));
+ $icon->AddAction('onclick',new CScript("javascript: add2favorites('".((0 == $config)?'screenid':'slideshowid')."','".$elementid."');"));
}
$icon->AddOption('id','addrm_fav');
diff --git a/frontends/php/sysmap.php b/frontends/php/sysmap.php
index c2144224..b22a5f61 100644
--- a/frontends/php/sysmap.php
+++ b/frontends/php/sysmap.php
@@ -69,7 +69,7 @@ include_once "include/page_header.php";
?>
<?php
show_table_header("CONFIGURATION OF NETWORK MAP");
- if(!sysmap_accessiable($_REQUEST["sysmapid"],PERM_READ_WRITE)) access_deny();
+ if(!sysmap_accessible($_REQUEST["sysmapid"],PERM_READ_WRITE)) access_deny();
$sysmap = DBfetch(DBselect("select * from sysmaps where sysmapid=".$_REQUEST["sysmapid"]));
?>
diff --git a/frontends/php/sysmaps.php b/frontends/php/sysmaps.php
index 89ada333..db840693 100644
--- a/frontends/php/sysmaps.php
+++ b/frontends/php/sysmaps.php
@@ -57,7 +57,7 @@ include_once "include/page_header.php";
if(isset($_REQUEST["sysmapid"]))
{
- if(!sysmap_accessiable($_REQUEST["sysmapid"],PERM_READ_WRITE))
+ if(!sysmap_accessible($_REQUEST["sysmapid"],PERM_READ_WRITE))
access_deny();
$sysmap = DBfetch(DBselect("select * from sysmaps where sysmapid=".$_REQUEST["sysmapid"]));
@@ -130,7 +130,7 @@ include_once "include/page_header.php";
while($row=DBfetch($result))
{
- if(!sysmap_accessiable($row["sysmapid"],PERM_READ_WRITE)) continue;
+ if(!sysmap_accessible($row["sysmapid"],PERM_READ_WRITE)) continue;
$table->AddRow(array(
new CLink($row["name"], "sysmaps.php?form=update".