diff options
| author | alex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-10-22 19:48:26 +0000 |
|---|---|---|
| committer | alex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-10-22 19:48:26 +0000 |
| commit | 92bf3020da3e671315d21b93ca998b6ab3305136 (patch) | |
| tree | 7bba589d79c713a5e891f816e334301596374c35 /frontends/php/scripts_exec.php | |
| parent | 8586918ae51297d8be70ff360a8cac4d58f593eb (diff) | |
- [DEV-48] improvements for script execution (Alexei)
[svn merge -r4895:4896 svn://svn.zabbix.com/branches/1.4.j]
git-svn-id: svn://svn.zabbix.com/trunk@4897 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/scripts_exec.php')
| -rw-r--r-- | frontends/php/scripts_exec.php | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/frontends/php/scripts_exec.php b/frontends/php/scripts_exec.php index b96d29cd..ec587c86 100644 --- a/frontends/php/scripts_exec.php +++ b/frontends/php/scripts_exec.php @@ -22,6 +22,7 @@ include_once "include/config.inc.php"; require_once "include/hosts.inc.php"; require_once "include/scripts.inc.php"; + require_once "include/forms.inc.php"; $page['title'] = "S_SCRIPTS"; $page['file'] = 'scripts_exec.php'; @@ -49,16 +50,22 @@ if(isset($_REQUEST['execute'])){ $hosts_read_write = explode(',',get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_WRITE,null,null,get_current_nodeid())); if(in_array($_REQUEST['hostid'],$hosts_read_write)){ -SDI('WRITE: '.$_REQUEST['scriptid'].' : '.$_REQUEST['hostid']); - $result = execute_script($_REQUEST['scriptid'],$_REQUEST['hostid']); +//SDI('WRITE: '.$_REQUEST['scriptid'].' : '.$_REQUEST['hostid']); +// $result = execute_script($_REQUEST['scriptid'],$_REQUEST['hostid']); +// insert_command_result_form($result["flag"],$result["message"]); + insert_command_result_form($_REQUEST['scriptid'],$_REQUEST['hostid']); +/* echo nl2br(htmlspecialchars($result));*/ } } else{ $hosts_read_only = explode(',',get_accessible_hosts_by_user($USER_DETAILS,PERM_READ_ONLY,null,null,get_current_nodeid())); if(in_array($_REQUEST['hostid'],$hosts_read_only)){ -SDI('READ: '.$_REQUEST['scriptid'].' : '.$_REQUEST['hostid']); - $result = execute_script($_REQUEST['scriptid'],$_REQUEST['hostid']); +//SDI('READ: '.$_REQUEST['scriptid'].' : '.$_REQUEST['hostid']); +// $result = execute_script($_REQUEST['scriptid'],$_REQUEST['hostid']); +// insert_command_result_form($result["flag"],$result["message"]); + insert_command_result_form($_REQUEST['scriptid'],$_REQUEST['hostid']); +/* echo nl2br(htmlspecialchars($result));*/ } } } @@ -66,4 +73,4 @@ SDI('READ: '.$_REQUEST['scriptid'].' : '.$_REQUEST['hostid']); ?> <?php include_once "include/page_footer.php"; -?>
\ No newline at end of file +?> |
