summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6f0986d)
raw | patch | inline | side by side (parent: 6f0986d)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 4 Jan 2006 08:46:35 +0000 (08:46 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 4 Jan 2006 08:46:35 +0000 (08:46 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2398 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/include/class_glpi.inc b/include/class_glpi.inc
index a779d7552ab9029111ff48a44ef7b9beaf781736..6c390cd43f1bd7571d445809b17135501547aeea 100644 (file)
--- a/include/class_glpi.inc
+++ b/include/class_glpi.inc
<?php
+
class glpiDB{
var $user ="";
var $lasterror ="";
+ var $deviceMappingGOsaGlpi;
+ var $deviceMappingTableNameID;
+
function glpiDB($server,$user,$pwd,$db){
$this->server = $server;
$this->user = $user;
$this->is_connected = true;
$this->SelectDB($this->db);
}
+ $this->deviceMappingGOsaGlpi = array(
+ "glpi_device_case" => "case",
+ "glpi_device_control" => "control",
+ "glpi_device_drive" => "drive",
+ "glpi_device_gfxcard" => "gfxcard",
+ "glpi_device_hdd" => "hdd",
+ "glpi_device_iface" => "iface",
+ "glpi_device_moboard" => "moboard",
+ "glpi_device_pci" => "pci",
+ "glpi_device_power" => "power",
+ "glpi_device_processor" => "processor",
+ "glpi_device_ram" => "ram",
+ "glpi_device_sndcard" => "sndcard");
+
+ $this->deviceMappingTableNameID = array( "moboard" => 1,
+ "processor" => 2,
+ "ram" => 3,
+ "hdd" => 4,
+ "iface" => 5,
+ "drive" => 6,
+ "control" => 7,
+ "gfxcard" => 8,
+ "sndcard" => 9,
+ "pci" => 10,
+ "case" => 11,
+ "power" => 12);
+
+
}
function SelectDB()
}
}
+
+ /* This functions checks if the selected computer/network
+ device is already available in the db
+ */
function is_account($dn)
{
if(!$this->is_connected){
- $this->lasterror ="Can't query anything, if we aren't connected.";
- return(false);
- }else{
+ $this->lasterror ="Can't query anything, if we aren't connected.";
+ return(false);
+ }else{
$qry = "SELECT * FROM glpi_computers WHERE name='".$dn."';";
$res = $this->query($qry);
if(count($res)==0){
}
}
+ /* this function queries everything
+ */
function query($qry)
{
if(!$this->is_connected){
}
}
- /* System types */
+ /* System types
+ Returns all defined system types
+ */
function getSystemTypes()
{
if($this->is_connected){
}
}
- /* System types */
+ /* System types
+ Update a system type
+ */
function updateSystemType($name,$id)
{
}
}
- /* System types */
+ /* System types
+ Add one entry to the system types
+ */
function addSystemType($name)
{
if($this->is_connected){
}
}
- /* System types */
- function removeSystemType_byID($id)
+ /* System types
+ Remove one entry from the system types (specified by ID=$id)
+ */
+ function removeSystemType($id)
{
if($this->is_connected){
$tmp = $this->query("SELECT * FROM glpi_type_computers WHERE ID=".$id.";");
}
}
- /* Manufacturer */
- function getEnterprisesTypes()
+ /* Manufacturer
+ Returns all defined manufacturers
+ */
+ function getEnterprises()
{
if($this->is_connected){
$ret = array();
}
}
- /* Manufacturer */
+ /* Manufacturer
+ Returns single manufacturer
+ */
function getEnterprise($id)
{
if($this->is_connected){
}
}
- /* System types */
- function updateEnterprisesType($array,$id)
+ /* Manufacturer
+ Updates already existing manufacturer
+ */
+ function updateEnterprise($array,$id)
{
if(!is_array($array)){
echo "updateEnterprisesType: first paraeter must be an array";
}
}
- function addEnterprisesType($array)
+ /* Manufacturer
+ Add new manufacturer
+ */
+ function addEnterprise($array)
{
if(!is_array($array)){
echo "addUser: first paraeter must be an array";
}
-
-
- function removeEnterprisesType($id)
+ /* Manufacturer
+ remove manufacturer
+ */
+ function removeEnterprise($id)
{
if($this->is_connected){
$tmp = $this->query("SELECT * FROM glpi_enterprises WHERE ID=".$id.";");
}
}
-
- /* Operating systems */
+ /* Operating systems
+ Returns all OSs
+ */
function getOSTypes()
{
if($this->is_connected){
}
}
-
- /* os */
+ /* Operating systems
+ Add a new operating system to the dropdown menus
+ */
function addOS($name)
{
if($this->is_connected){
}
}
- /* System types */
+ /* Operating systems
+ remove one OS entry
+ */
function removeOS_byID($id)
{
if($this->is_connected){
}
}
-
-
- /* System types */
+ /* Operating systems
+ Update existing OS entry
+ */
function updateOS($name,$id)
{
}
}
-
- /* Technical / Responsible person / glpi users */
+ /* This returns all available glpi users
+ */
function getUsers()
{
if($this->is_connected){
}
}
-
+ /* this function adds a new glpi user
+ */
function addUser($array,$dn)
{
if(!is_array($array)){
}
+ /* This function updates a glpi user
+ with the given data
+ */
function updateUser($array,$dn)
{
if(!is_array($array)){
}
-
+ /* This function returns all available data
+ from a specified dn
+ */
function getComputerInformations($name)
{
if($this->is_connected){
- /*
- $ret = $this->query( '
- SELECT
- c.ID,
- c.name as "Name",
- c.comments as "Commets",
- d.name as "OS",
- e.name as "Manufacturer",
- dc.name as "Type",
- u.name as "Technical responsible"
- FROM
- glpi_computers as c
- left join glpi_dropdown_os as d on (c.os = d.ID)
- left join glpi_enterprises as e on (c.FK_glpi_enterprise = e.ID)
- left join glpi_type_computers as dc on (c.type = dc.ID)
- left join glpi_users as u on (c.tech_num = u.ID)
-
- WHERE c.Name!="" AND c.ID='.$id.';');
- */
$ret = $this->query("SELECT * FROM glpi_computers WHERE name='".$name."';");
return($ret);
}else{
}
}
+ /* This fucntions updates an already existing entry
+ */
function updateComputerInformations($array,$name)
{
if(!is_array($array)){
}
+ /* This function adds a new inventory device (computer phone etc)
+ */
function addComputerInformations($array)
{
if(!is_array($array)){
}
+ /* this functions checks if the given Device
+ * already exists
+ */
function deviceExists($attr)
{
+ $deviceMappingGOsaGlpi = $this->deviceMappingGOsaGlpi;
if($this->is_connected){
- $arr = array_flip(array( "glpi_device_case" => "case",
- "glpi_device_control" => "control",
- "glpi_device_drive" => "drive",
- "glpi_device_gfxcard" => "gfxcard",
- "glpi_device_hdd" => "hdd",
- "glpi_device_iface" => "iface",
- "glpi_device_moboard" => "moboard",
- "glpi_device_pci" => "pci",
- "glpi_device_power" => "power",
- "glpi_device_processor" => "processor",
- "glpi_device_ram" => "ram",
- "glpi_device_sndcard" => "sndcard"));
+ $arr = array_flip($deviceMappingGOsaGlpi);
$tbl_name = $arr[$attr['device_type']];
if(!isset($attr['ID'])){
return(false);
}
+ /* This functions deletes a specified entry
+ * from our device tables
+ */
function deleteDevice($attr)
{
+ $deviceMappingGOsaGlpi = $this->deviceMappingGOsaGlpi;
if($this->is_connected){
- $arr = array_flip(array( "glpi_device_case" => "case",
- "glpi_device_control" => "control",
- "glpi_device_drive" => "drive",
- "glpi_device_gfxcard" => "gfxcard",
- "glpi_device_hdd" => "hdd",
- "glpi_device_iface" => "iface",
- "glpi_device_moboard" => "moboard",
- "glpi_device_pci" => "pci",
- "glpi_device_power" => "power",
- "glpi_device_processor" => "processor",
- "glpi_device_ram" => "ram",
- "glpi_device_sndcard" => "sndcard"));
+ $arr = array_flip($deviceMappingGOsaGlpi);
$device_type = $attr['device_type'];
unset($attr['device_type']);
return(false);
}
}
+
+ /* This funtions updated an already existing device
+ */
function updateDevices($attr)
{
+ $deviceMappingGOsaGlpi = $this->deviceMappingGOsaGlpi;
if($this->is_connected){
- $arr = array_flip(array( "glpi_device_case" => "case",
- "glpi_device_control" => "control",
- "glpi_device_drive" => "drive",
- "glpi_device_gfxcard" => "gfxcard",
- "glpi_device_hdd" => "hdd",
- "glpi_device_iface" => "iface",
- "glpi_device_moboard" => "moboard",
- "glpi_device_pci" => "pci",
- "glpi_device_power" => "power",
- "glpi_device_processor" => "processor",
- "glpi_device_ram" => "ram",
- "glpi_device_sndcard" => "sndcard"));
+ $arr = array_flip($deviceMappingGOsaGlpi);
$device_type = $attr['device_type'];
unset($attr['device_type']);
}
}
+ /* Returns all possible RAM types
+ * like SDRAM , DIMM .....
+ */
function getRAMTypes()
{
if($this->is_connected){
}
}
-
+ /* Returns all possible HDD connection types
+ * like IDE SCSI ...
+ */
function getGlpiDeviceControlTypes()
{
if($this->is_connected){
}
}
+ /* Returns all possible gfx card connection types
+ * like PCI-X PCI AGP ....
+ */
function getGlpiGfxControlTypes()
{
if($this->is_connected){
}
}
-
+ /* Devices
+ Adds a new single device to our db
+ */
function addDevice($attr)
{
+ $deviceMappingGOsaGlpi = $this->deviceMappingGOsaGlpi;
if($this->is_connected){
- $arr = array_flip(array( "glpi_device_case" => "case",
- "glpi_device_control" => "control",
- "glpi_device_drive" => "drive",
- "glpi_device_gfxcard" => "gfxcard",
- "glpi_device_hdd" => "hdd",
- "glpi_device_iface" => "iface",
- "glpi_device_moboard" => "moboard",
- "glpi_device_pci" => "pci",
- "glpi_device_power" => "power",
- "glpi_device_processor" => "processor",
- "glpi_device_ram" => "ram",
- "glpi_device_sndcard" => "sndcard"));
+ $arr = array_flip($deviceMappingGOsaGlpi);
$device_type = $attr['device_type'];
unset($attr['device_type']);
}
}
+ /* Return all available devices
+ */
function getDevices()
{
+ $deviceMappingGOsaGlpi = $this->deviceMappingGOsaGlpi;
if($this->is_connected){
- $arr = array( "glpi_device_case" => "case",
- "glpi_device_control" => "control",
- "glpi_device_drive" => "drive",
- "glpi_device_gfxcard" => "gfxcard",
- "glpi_device_hdd" => "hdd",
- "glpi_device_iface" => "iface",
- "glpi_device_moboard" => "moboard",
- "glpi_device_pci" => "pci",
- "glpi_device_power" => "power",
- "glpi_device_processor" => "processor",
- "glpi_device_ram" => "ram",
- "glpi_device_sndcard" => "sndcard");
+ $arr = $deviceMappingGOsaGlpi;
$res = array();
foreach($arr as $glpi => $gosa){
}
}
+ /* This function returns all used devices
+ */
+ function getUsedDevices($computerID)
+ {
+ $deviceMappingGOsaGlpi = array_flip($this->deviceMappingGOsaGlpi);
+ $deviceMappingTableNameID = $this->deviceMappingTableNameID;
+
+ if($this->is_connected){
+ $qry = "SELECT * FROM glpi_computer_device WHERE FK_computers=".$computerID.";";
+ $res = $this->query($qry);
+
+ $ret = array();
+ foreach($deviceMappingGOsaGlpi as $GOsa => $glpi){
+ $ret[$GOsa] = array();
+ }
+
+ $tbls = array_flip($deviceMappingTableNameID);
+
+ foreach($res as $device){
+ $devtype = $tbls[$device['device_type']];
+ $tbl_name = $deviceMappingGOsaGlpi[$devtype];
+ $qry = ("SELECT * FROM ".$tbl_name." WHERE ID=".$device['FK_device'].";");
+ $res2 = $this->query($qry);
+ if(count($res2)!=0){
+ $ret[$devtype][$res2[0]['designation']]=$res2[0];
+ }
+ }
+ return($ret);
+ }else{
+ echo "not connected";
+ return(false);
+ }
+ }
+
+ /* This function removes all given devices from a computer, specified by $id
+ In the next step all devices specified by devices will be added.
+ */
+ function addDevicesToComputer($devices, $id)
+ {
+ $deviceMappingGOsaGlpi = array_flip($this->deviceMappingGOsaGlpi);
+ $deviceMappingTableNameID = $this->deviceMappingTableNameID;
+
+ if(($id == "" )||(!is_numeric($id))){
+ return (false);
+ }
+ if($this->is_connected){
+ $qry = "DELETE FROM glpi_computer_device WHERE FK_computers=".$id.";";
+ $this->query($qry);
+
+ foreach($devices as $type => $entries){
+ foreach($entries as $entry){
+ $str = "INSERT INTO glpi_computer_device (device_type,FK_device,FK_computers)
+ VALUES (".$deviceMappingTableNameID[$type].",".$entry['ID'].",".$id.");";
+ $this->query($str);
+ }
+ }
+
+
+ }else{
+ echo "not connected";
+ return(false);
+ }
+
+ }
+
function removeComputerInformations($id)
{
/*
diff --git a/plugins/admin/systems/class_glpiAccount.inc b/plugins/admin/systems/class_glpiAccount.inc
index a24c3382af4e34bb89133b346fb79e2532574d01..bd0e0eb4027428c63dc36a3af350e790702ac8cc 100644 (file)
/* attribute list for save action */
var $ignore_account= TRUE;
var $attributes= array("ID","name","contact",
- "tech_num","comments","date_mod","os","location","domain","network",
+ "tech_num","comments","date_mod","os","location","domain","network","contact_num",
"model","type","is_template","FK_glpi_enterprise","deleted");
var $ID ;
var $name ="";
var $contact ="";
+ var $contact_num ="";
var $tech_num ="";
var $comments ="";
var $orig_dn;
var $ui;
+
+ var $usedDevices = array();
+
/* Contructor
Sets default values and checks if we already have an existing glpi account
foreach(array("tech_num","os","FK_glpi_enterprise","type","comments") as $attr){
$this->$attr = $tmp[0][$attr];
}
+ $this->usedDevices = $this->handle->getUsedDevices($tmp[0]['ID']);
}else{
$this->is_account = false;
$smarty= get_smarty();
$display= "";
- // #fixme
- // Check if mysql a.s.o. is available.
+ /* Assign smarty defaults */
+ foreach(array("SystemTypes","SystemTypeKeys","Manufacturers",
+ "OSs","TechnicalResponsibles","InstalledDevices","Attachments",
+ "OSKeys","OSs","ManufacturerKeys","InstalledDeviceKeys") as $attr){
+ $smarty->assign($attr,array());
+ $smarty->assign($attr."ACL"," disabled ");
+ }
+
+ foreach(array("type","FK_glpi_enterprise","os","tech_num","comments","contact_num") as $attr){
+ $smarty->assign($attr,"");
+ $smarty->assign($attr."ACL"," disabled ");
+ }
+
+ if(!isset($this->config->data['SERVERS']['GLPI'])){
+ print_red(_("There is no server with valid glpi database service."));
+ return($smarty->fetch(get_template_path('glpi.tpl', TRUE)));
+ }
+
+ $this->data = $this->config->data['SERVERS']['GLPI'];
+
+ if(!is_callable("mysql_connect")){
+ print_red(_("Can't connect to glpi database, the php-mysql extension is missing."));
+ return($smarty->fetch(get_template_path('glpi.tpl', TRUE)));
+ }
+
+ $this->handle = new glpiDB($this->data['SERVER'],$this->data['LOGIN'],$this->data['PASSWORD'],$this->data['DB']);
+ if(!$this->handle->is_connected){
+ print_red(_("Can't connect to glpi database, check configuration twice."));
+ return($smarty->fetch(get_template_path('glpi.tpl', TRUE)));
+ }
$this->handle = new glpiDB($this->data['SERVER'],$this->data['LOGIN'],$this->data['PASSWORD'],$this->data['DB']);
$users = ($this->handle->getUsers());
if(isset($_POST['AddDevice'])){
$this->dialog =true;
- $this->cur_dialog = new glpiDeviceManagement($this->config,$this->dn);
+ $this->cur_dialog = new glpiDeviceManagement($this->config,$this->dn,$this->usedDevices);
}
/* We have selected some devices and pressed use button */
if(isset($_POST['SelectDeviceSave'])){
$this->cur_dialog->save_object();
- print_a($this->cur_dialog->getSelected());
+ $this->usedDevices= ($this->cur_dialog->getSelected());
$this->cur_dialog = false;
$this->dialog = false;
$this->edit_type=false;
}
if((isset($_POST['del_type']))&&(!empty($_POST['select_type']))){
- $this->handle->removeSystemType_byID($_POST['select_type']);
+ $this->handle->removeSystemType($_POST['select_type']);
}
if((isset($_POST['rename_type']))&&(!empty($_POST['select_type']))&&(!empty($_POST['type_string']))){
/* Assign smarty defaults */
foreach(array("SystemTypes","SystemTypeKeys","Manufacturers","OSs","TechnicalResponsibles","InstalledDevices","Attachments") as $attr){
$smarty->assign($attr,array());
- $smarty->assign($attr."ACL"," disabled ");
+ $smarty->assign($attr."ACL",chkacl($this->acl,$attr));
}
foreach(array("type","FK_glpi_enterprise","os","tech_num") as $attr){
$smarty->assign($attr,"");
- $smarty->assign($attr."ACL"," disabled ");
+ $smarty->assign($attr."ACL",chkacl($this->acl,$attr));
}
/* Perform some checks
$smarty->assign("OSs", $this->handle->getOSTypes());
$smarty->assign("os", $this->os);
- $smarty->assign("ManufacturerKeys", array_flip($this->handle->getEnterprisesTypes()));
- $smarty->assign("Manufacturers", $this->handle->getEnterprisesTypes());
+ $smarty->assign("InstalledDevices" ,$this->getDevices());
+ $smarty->assign("InstalledDeviceKeys" ,array_flip($this->getDevices()));
+
+
+ $smarty->assign("ManufacturerKeys", array_flip($this->handle->getEnterprises()));
+ $smarty->assign("Manufacturers", $this->handle->getEnterprises());
$smarty->assign("FK_glpi_enterprise", $this->FK_glpi_enterprise);
if(isset($users[$this->tech_num])){
{
}
+ function getDevices(){
+ $ret = array();
+ foreach($this->usedDevices as $type => $entries){
+ foreach($entries as $ent){
+ $ret[] = $ent['designation']." [".$type."]";
+ }
+ }
+ return($ret);
+ }
+
/* Save data to object */
function save_object()
/* Save to LDAP */
function save()
{
- $attrs = array();
- $this->date_mod = date("Y-m-d H:i:s");
- foreach($this->attributes as $attr){
- $attrs[$attr] = $this->$attr;
- }
- $attrs['name'] = $this->dn;
- unset($attrs['ID']);
- $this->handle = new glpiDB($this->data['SERVER'],$this->data['LOGIN'],$this->data['PASSWORD'],$this->data['DB']);
- if($this->initialy_was_account&&$this->is_account){
- $this->handle->updateComputerInformations($attrs,$this->dn);
- }elseif($this->is_account){
- $this->handle->addComputerInformations($attrs,$this->dn);
+ if($this->is_account){
+ $attrs = array();
+ $this->date_mod = date("Y-m-d H:i:s");
+ foreach($this->attributes as $attr){
+ $attrs[$attr] = $this->$attr;
+ }
+ $attrs['name'] = $this->dn;
+ unset($attrs['ID']);
+ $this->handle = new glpiDB($this->data['SERVER'],$this->data['LOGIN'],$this->data['PASSWORD'],$this->data['DB']);
+ if($this->initialy_was_account&&$this->is_account){
+ $this->handle->updateComputerInformations($attrs,$this->dn);
+ }elseif($this->is_account){
+ $this->handle->addComputerInformations($attrs,$this->dn);
+ }
+ $tmp = ($this->handle->getComputerInformations($this->dn));
+ $this->handle->addDevicesToComputer($this->usedDevices,$tmp[0]['ID']);
}
}
diff --git a/plugins/admin/systems/class_glpiDeviceManagement.inc b/plugins/admin/systems/class_glpiDeviceManagement.inc
index f235666999e74839ff1b429fcc41e496f19e6031..79c628ba57da2f21f5e70ceb0637ce377088be4e 100644 (file)
var $Selected = array();
- function glpiDeviceManagement ($config, $dn= NULL)
+ function glpiDeviceManagement ($config, $dn= NULL,$used=NULL)
{
plugin::plugin ($config, $dn);
$_SESSION['glpiDeviceRegex'] = $tmp;
}
$this->ui = get_userinfo();
+
+ if(isset($used)){
+ $this->Selected = $used;
+ }
/* Specify which vars are allowed for a sepcific type of device */
$this->DeviceAttrs['case'] = array("designation","format","comment","FK_glpi_enterprise");
function execute()
{
+ print_a($this->Selected);
/* Call parent execute */
plugin::execute();
$smarty->assign("device_type",$entry['device_type']);
$none = array(0 => _("none"));
- $manufacturer = array_merge($none,$this->parent->handle->getEnterprisesTypes());
+ $manufacturer = array_merge($none,$this->parent->handle->getEnterprises());
$ramtypes = $this->parent->handle->getRAMTypes();
diff --git a/plugins/admin/systems/class_glpiManufacturer.inc b/plugins/admin/systems/class_glpiManufacturer.inc
index aeedaa4d2ddc07d2098f576214f4c810be8b8359..a29a601c751f9fa6e62ec4d7e31b338700d8ee39 100644 (file)
$display = "";
if((isset($_POST['remove_manu']))&&(isset($_POST['manufacturer']))){
- $this->parent->handle->removeEnterprisesType($_POST['manufacturer']);
+ $this->parent->handle->removeEnterprise($_POST['manufacturer']);
}
if(isset($_POST['add_manu'])){
if($allok){
if($this->Edit_Add == "add"){
- $this->parent->handle->addEnterprisesType($tmp);
+ $this->parent->handle->addEnterprise($tmp);
$this->editMode=false;
}else{
- $this->parent->handle->updateEnterprisesType($tmp,$this->ID);
+ $this->parent->handle->updateEnterprise($tmp,$this->ID);
$this->editMode=false;
}
}
}
- $smarty->assign("Manus", $this->parent->handle->getEnterprisesTypes());
- $smarty->assign("ManuKeys", array_flip($this->parent->handle->getEnterprisesTypes()));
+ $smarty->assign("Manus", $this->parent->handle->getEnterprises());
+ $smarty->assign("ManuKeys", array_flip($this->parent->handle->getEnterprises()));
$display.= $smarty->fetch(get_template_path('glpiManufacturer.tpl', TRUE));
return($display);
}
index fca7e980899f2f540dc4eec91b9b53a79ade0d75..2f960e09b75a4cde2c3a94991b80c9795a963681 100644 (file)
<select name="type" {$typeACL}>
{html_options values=$SystemTypeKeys output=$SystemTypes selected=$type}
</select>
- <input type="submit" value="{t}edit{/t}" name="edit_type">
+ <input type="submit" value="{t}edit{/t}" name="edit_type" {$typeACL}>
</td>
</tr>
<tr>
<select name="os" {$osACL}>
{html_options values=$OSKeys output=$OSs selected=$os}
</select>
- <input type="submit" value="{t}edit{/t}" name="edit_os">
+ <input type="submit" value="{t}edit{/t}" name="edit_os" {$osACL}>
</td>
</tr>
<tr>
<select name="FK_glpi_enterprise" {$FK_glpi_enterpriseACL}>
{html_options values=$ManufacturerKeys output=$Manufacturers selected=$FK_glpi_enterprise}
</select>
- <input type="submit" value="{t}edit{/t}" name="edit_manufacturer">
+ <input type="submit" value="{t}edit{/t}" name="edit_manufacturer" {$FK_glpi_enterpriseACL}>
</td>
</tr>
<tr>
<td>{t}Technical responsible{/t}
</td>
<td>
- <i>{$tech_num}</i> <input type="submit" value="{t}Choose{/t}" name="SelectTechPerson">
+ <i>{$tech_num} </i>
+ <input type="submit" value="{t}Choose{/t}" name="SelectTechPerson" {$tech_numACL}>
</td>
</tr>
</table>
<tr>
<td>
<select name="InstalledDevices" {$InstalledDevicesACL} style="height:120px;width:100%;" multiple>
- {html_options values=$InstalledDevices output=$InstalledDevices}
+ {html_options values=$InstalledDeviceKeys output=$InstalledDevices}
</select>
- <input name="AddDevice" value="{t}Add{/t}" type="submit">
+ <input name="AddDevice" value="{t}Edit{/t}" type="submit" {$InstalledDevicesACL}>
</td>
</tr>
</table>
{t}Contact person{/t}
</td>
<td>
- contact person sdasd <input type="submit" value="{t}Edit{/t}"><img src="images/mailto.png" class="center" alt="{t}mailto{/t}">
+ <i>{$contact_num} </i>
+ <input {$contact_numACL} type="submit" value="{t}Edit{/t}"><img src="images/mailto.png" class="center" alt="{t}mailto{/t}">
</td>
</tr>
<tr>
{t}Comments{/t}
</td>
<td>
- <textarea name="comments" style="width:100%;height:110px;" >{$comments}</textarea>
+ <textarea name="comments" style="width:100%;height:110px;" {$commentsACL}>{$comments}</textarea>
</td>
</tr>
</table>
<select name="Attachments" {$AttachmentsACL} style="height:120px;width:100%;" multiple>
{html_options values=$Attachments output=$Attachments}
</select>
- <input name="AddDevice" value="{t}Add{/t}" type="submit">
+ <input name="AddDevice" value="{t}Edit{/t}" type="submit">
</td>
</tr>
</table>