diff options
| author | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-05-29 09:50:36 +0000 |
|---|---|---|
| committer | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-05-29 09:50:36 +0000 |
| commit | 7793a01ae2f76d155ae263aedb7b1fae454e9475 (patch) | |
| tree | 2a49f53e1e429c9dc65da447da2907ad4782bda6 /frontends/php/services_form.php | |
| parent | 87cc41c05dd2066f1be68e9db29dc3a06da149e4 (diff) | |
- fixed adding times to IT Services
git-svn-id: svn://svn.zabbix.com/trunk@4193 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/services_form.php')
| -rw-r--r-- | frontends/php/services_form.php | 39 |
1 files changed, 4 insertions, 35 deletions
diff --git a/frontends/php/services_form.php b/frontends/php/services_form.php index b4fc22fc..aa9b8aa7 100644 --- a/frontends/php/services_form.php +++ b/frontends/php/services_form.php @@ -1,7 +1,7 @@ <?php
/*
** ZABBIX
-** Copyright (C) 2000-2005 SIA Zabbix
+** Copyright (C) 2000-2007 SIA Zabbix
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
@@ -19,7 +19,6 @@ **/
?>
<?php
-set_time_limit(3);
include_once "include/config.inc.php";
include_once "include/services.inc.php";
@@ -157,7 +156,6 @@ if(isset($_REQUEST['saction'])){ }
}
//-------------------------------------------- </ACTIONS> --------------------------------------------
-//$_REQUEST['sform'] = 1;
//----------------------------------------- <PARENT SERVICES LIST> ------------------------------------------
if(isset($_REQUEST['pservices'])){
@@ -355,10 +353,11 @@ if(isset($_REQUEST['sform'])){ );
$new_service_time['note'] = $_REQUEST["new_service_time"]['note'];
}
+
+ while($new_service_time['to'] && ($new_service_time['to'] <= $new_service_time['from'])) $new_service_time['to'] += 7*24*3600;
- while($new_service_time['to'] <= $new_service_time['from']) $new_service_time['to'] += 7*24*3600;
- if(!in_array($_REQUEST['service_times'], $new_service_time))
+ if($new_service_time['to'] && !in_array($_REQUEST['service_times'], $new_service_time))
array_push($_REQUEST['service_times'],$new_service_time);
} elseif(isset($_REQUEST["del_service_times"]) && isset($_REQUEST["rem_service_times"])){
$_REQUEST["service_times"] = get_request("service_times",array());
@@ -563,36 +562,6 @@ if(isset($_REQUEST['sform'])){ $row->AddOption('style',($showsla)?(''):('display: none;'));
$frmService->AddRow($row);
-/*
- $table_sla = new CTable();
- $table_sla->AddOption('width','100%');
-// $table_sla->AddOption('border','1');
-
- $table_sla->options['cellpadding'] = 0;
- $table_sla->options['cellspacing'] = 0;
-
-
- $row = new CRow(array(
- new CCol(S_SHOW_SLA,'form_row_l_simple'),
- new CCol(new CCheckBox("showsla",$showsla,"javascript: display_element('sla_row');",1),'form_row_r_simple')
- )
- );
-
- $table_sla->AddRow($row);
-
- $row = new CRow(array(
- new CCol(S_ACCEPTABLE_SLA_IN_PERCENT,'form_row_l_simple'),
- new CCol(new CTextBox("goodsla",$goodsla,6),'form_row_r_simple')
- )
- );
-
- $row->AddOption('id','sla_row');
- $row->AddOption('style',($showsla)?(''):('display: none;'));
-
- $table_sla->AddRow($row);
-
- $frmService->AddRow($table_sla);
-*/
//------
//times
|
