<?php
# Page variables
define("PAGE_ID","serviceescalationview");
define("PAGE_TITLE","Service Escalation object");
define("OBJECTTYPE","serviceescalation");
define("OBJECTNAME","ServiceEscalation");
require_once("includes/main.inc.php");
include_once("html_wrap/head2.inc.php");
$rowcolor = '';
$cntinh = 0;
if (!isset($objectid) ) $objectid = NULL;
if ($objectid != "") {
$object = $Plugin->GetObjectById($objectid, OBJECTTYPE);
}
foreach ($confobjects[OBJECTTYPE] as $key => $propconf ) {
$required = 'label';
$value = !empty($object[$key]) ? $object[$key] : '';
$inhhtml = "";
if (isset($object["++".$key]) ) {
$inhhtml = " <td>".$object["++".$key]."</td>";
$reqclass = 'requiredok';
} else {
$reqclass = 'required';
$inhhtml = " <td> </td>";
}
$show = str_replace(",", ",<br>", $value);
if (empty($object[$key]))
$required = ($propconf[2] == TRUE) ? $reqclass : 'label';
$rowcolor = ($rowcolor != "dataOdd") ? "dataOdd" : "dataEven";
$key=ucfirst(str_replace("_", " ", $key));
$rows[$key] = <<<HTML
<tr class="{$rowcolor}">
<td>$key</td>
<td class="$required" width="3"> </td>
<td>
$show
</td>
$inhhtml
</tr>
HTML;
}
?>
<div align="center">
<table cellpadding="3" border="0">
<tr>
<td colspan="4" align="left">
</td>
</tr>
<tr class="data">
<th colspan="3" class="data">Properties</th>
<?
if (!empty($object['use']) ) {
$parent = PluginGetObjectByName($object['use'],OBJECTTYPE);
print <<<HTML
<th class="data">
Inherits from <a href="serviceescalationedit.php?objectid={$parent['__objectid']}"><b>{$parent['name']}</b></a>
</th>
HTML;
} else echo "<th class=\"data\"> </th>";
?>
</tr>
<?=implode("\n", $rows)?>
<tr>
<td colspan="4" align="center">
<hr>
</td>
</tr>
<tr>
<td colspan="4" align="center">
<form method="post">
<input type="submit" value="Close" onclick="parent.close('')">
</form>
</td>
</tr>
</table>
</div>
<?
include_once("html_wrap/tail2.inc.php");
?>