From 3644520502707cc1a35a915bfa358105e86c4818 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 3 Jan 2006 13:18:35 +0000 Subject: [PATCH] Some changes for glpi git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2395 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_glpiAccount.inc | 181 ++--- .../systems/class_glpiDeviceManagement.inc | 293 ++++++++ .../admin/systems/class_glpiManufacturer.inc | 18 +- .../admin/systems/glpiDeviceManagement.tpl | 53 ++ plugins/admin/systems/glpiManufacturerAdd.tpl | 24 +- plugins/admin/systems/glpi_devices.tpl | 645 ++++++++++++++++++ 6 files changed, 1112 insertions(+), 102 deletions(-) create mode 100644 plugins/admin/systems/class_glpiDeviceManagement.inc create mode 100644 plugins/admin/systems/glpiDeviceManagement.tpl create mode 100644 plugins/admin/systems/glpi_devices.tpl diff --git a/plugins/admin/systems/class_glpiAccount.inc b/plugins/admin/systems/class_glpiAccount.inc index 593c5408e..117aa3792 100644 --- a/plugins/admin/systems/class_glpiAccount.inc +++ b/plugins/admin/systems/class_glpiAccount.inc @@ -10,8 +10,8 @@ class glpiAccount extends plugin /* attribute list for save action */ var $ignore_account= TRUE; var $attributes= array("ID","name","contact", - "tech_num","comments","date_mod","os","location","domain","network", - "model","type","is_template","FK_glpi_enterprise","deleted"); + "tech_num","comments","date_mod","os","location","domain","network", + "model","type","is_template","FK_glpi_enterprise","deleted"); var $ID ; var $name =""; @@ -49,7 +49,7 @@ class glpiAccount extends plugin /* Contructor Sets default values and checks if we already have an existing glpi account - */ + */ function glpiAccount ($config, $dn= NULL) { plugin::plugin ($config, $dn); @@ -58,15 +58,15 @@ class glpiAccount extends plugin if(!isset($this->config->data['SERVERS']['GLPI'])){ return; } - + $this->data = $this->config->data['SERVERS']['GLPI']; - + if(!is_callable("mysql_connect")){ return; } - + $this->handle = new glpiDB($this->data['SERVER'],$this->data['LOGIN'],$this->data['PASSWORD'],$this->data['DB']); - + if(!$this->handle->is_connected){ return; } @@ -90,8 +90,8 @@ class glpiAccount extends plugin function execute() { - /* Call parent execute */ - plugin::execute(); + /* Call parent execute */ + plugin::execute(); /* Fill templating stuff */ $smarty= get_smarty(); @@ -99,93 +99,103 @@ class glpiAccount extends plugin // #fixme // Check if mysql a.s.o. is available. - + $this->handle = new glpiDB($this->data['SERVER'],$this->data['LOGIN'],$this->data['PASSWORD'],$this->data['DB']); $users = ($this->handle->getUsers()); $ldap= $this->config->get_ldap_link(); + if(isset($_POST['AddDevice'])){ + $this->dialog =true; + $this->cur_dialog = new glpiDeviceManagement($this->config,$this->dn); + } - /* System type management - */ - if(isset($_POST['edit_type'])){ - $this->dialog = true; - $this->edit_type=true; - } - if(isset($_POST['close_edit_type'])){ - $this->edit_type=false; - $this->dialog = false; - } + /* System type management + */ + if(isset($_POST['edit_type'])){ + $this->dialog = true; + $this->edit_type=true; + } - if((isset($_POST['add_type']))&&(!empty($_POST['type_string']))){ - $this->handle->addSystemType($_POST['type_string']); - } + if(isset($_POST['close_edit_type'])){ + $this->edit_type=false; + $this->dialog = false; + } - if((isset($_POST['del_type']))&&(!empty($_POST['select_type']))){ - $this->handle->removeSystemType_byID($_POST['select_type']); - } + if((isset($_POST['add_type']))&&(!empty($_POST['type_string']))){ + $this->handle->addSystemType($_POST['type_string']); + } - if((isset($_POST['rename_type']))&&(!empty($_POST['select_type']))&&(!empty($_POST['type_string']))){ - $this->handle->updateSystemType($_POST['type_string'],$_POST['select_type']); - } + if((isset($_POST['del_type']))&&(!empty($_POST['select_type']))){ + $this->handle->removeSystemType_byID($_POST['select_type']); + } - if($this->edit_type){ - $smarty->assign("SystemTypes", $this->handle->getSystemTypes()); - $smarty->assign("SystemTypeKeys", array_flip($this->handle->getSystemTypes())); + if((isset($_POST['rename_type']))&&(!empty($_POST['select_type']))&&(!empty($_POST['type_string']))){ + $this->handle->updateSystemType($_POST['type_string'],$_POST['select_type']); + } - $display= $smarty->fetch(get_template_path('glpi_edit_type.tpl', TRUE)); - return($display); - } + if($this->edit_type){ + $smarty->assign("SystemTypes", $this->handle->getSystemTypes()); + $smarty->assign("SystemTypeKeys", array_flip($this->handle->getSystemTypes())); - /* ENDE, Systemtype management. - */ - - /* System os management - */ - if(isset($_POST['edit_os'])){ - $this->dialog = true; - $this->edit_os=true; - } + $display= $smarty->fetch(get_template_path('glpi_edit_type.tpl', TRUE)); + return($display); + } - if(isset($_POST['close_edit_os'])){ - $this->edit_os=false; - $this->dialog = false; - } + /* ENDE, Systemtype management. + */ - if((isset($_POST['add_os']))&&(!empty($_POST['is_string']))){ - $this->handle->addOS($_POST['is_string']); - } + /* System os management + */ + if(isset($_POST['edit_os'])){ + $this->dialog = true; + $this->edit_os=true; + } - if((isset($_POST['del_os']))&&(!empty($_POST['select_os']))){ - $this->handle->removeOS_byID($_POST['select_os']); - } + if(isset($_POST['close_edit_os'])){ + $this->edit_os=false; + $this->dialog = false; + } - if((isset($_POST['rename_os']))&&(!empty($_POST['select_os']))&&(!empty($_POST['is_string']))){ - $this->handle->updateOS($_POST['is_string'],$_POST['select_os']); - } + if((isset($_POST['add_os']))&&(!empty($_POST['is_string']))){ + $this->handle->addOS($_POST['is_string']); + } - if($this->edit_os){ - $smarty->assign("OSKeys", array_flip($this->handle->getOSTypes())); - $smarty->assign("OSs", $this->handle->getOSTypes()); + if((isset($_POST['del_os']))&&(!empty($_POST['select_os']))){ + $this->handle->removeOS_byID($_POST['select_os']); + } - $display= $smarty->fetch(get_template_path('glpi_edit_os.tpl', TRUE)); - return($display); - } + if((isset($_POST['rename_os']))&&(!empty($_POST['select_os']))&&(!empty($_POST['is_string']))){ + $this->handle->updateOS($_POST['is_string'],$_POST['select_os']); + } - /* ENDE, os management. - */ - - if(isset($_POST['edit_manufacturer'])){ - $this->cur_dialog = new glpiManufacturer($this->config,$this->dn); - $this->cur_dialog->parent = &$this; - } + if($this->edit_os){ + $smarty->assign("OSKeys", array_flip($this->handle->getOSTypes())); + $smarty->assign("OSs", $this->handle->getOSTypes()); - if(isset($_POST['close_edit_manufacturer'])){ - $this->cur_dialog = false; - } + $display= $smarty->fetch(get_template_path('glpi_edit_os.tpl', TRUE)); + return($display); + } + + /* ENDE, os management. + */ + + if(isset($_POST['edit_manufacturer'])){ + $this->cur_dialog = new glpiManufacturer($this->config,$this->dn); + $this->dialog = true; + } + + if(isset($_POST['close_edit_manufacturer'])){ + $this->dialog = false; + $this->cur_dialog = false; + } + if(isset($_POST['SelectUserCancel'])){ + $this->dialog = false; + $this->cur_dialog = false; + } if(isset($_POST['SelectTechPerson'])){ $this->cur_dialog= new glpiSelectUser($this->config,$this->dn); @@ -204,8 +214,8 @@ class glpiAccount extends plugin $atr = $ldap->fetch($ldap->cat($id)); $tmp = array(); $use = array( "cn" =>"name", - "mail" =>"email", - "telephoneNumber" =>"phone"); + "mail" =>"email", + "telephoneNumber" =>"phone"); /* Create array */ foreach($use as $gosa => $glpi){ @@ -213,18 +223,18 @@ class glpiAccount extends plugin $tmp[$glpi]= $atr[$gosa][0]; } } - + /* Add this user */ $this->handle->addUser($tmp,$id); } - + /* Re-read users */ $users = ($this->handle->getUsers()); /* Get user */ $tmp = array_flip($users); $id=$tmp[$id]; - + /* Use user id, close dialog */ $this->tech_num = $id; $this->cur_dialog = false; @@ -234,6 +244,7 @@ class glpiAccount extends plugin if($this->cur_dialog){ $this->cur_dialog->save_object(); $this->dialog=true; + $this->cur_dialog->parent = &$this; return($this->cur_dialog->execute()); } @@ -280,10 +291,10 @@ class glpiAccount extends plugin /* Show tab dialog headers */ if ($this->is_account){ - $display= $this->show_header(_("Remove DNS service"), + $display= $this->show_header(_("Remove inventory service"), _("This server has inventory features enabled. You can disable them by clicking below.")); } else { - $display= $this->show_header(_("Add DNS service"), + $display= $this->show_header(_("Add inventory service"), _("This server has inventory features disabled. You can enable them by clicking below.")); return ($display); } @@ -293,7 +304,7 @@ class glpiAccount extends plugin $smarty->assign($attr."ACL",chkacl($this->acl,$attr)); } - + $smarty->assign("SystemTypeKeys", array_flip($this->handle->getSystemTypes())); $smarty->assign("SystemTypes", $this->handle->getSystemTypes()); $smarty->assign("type", $this->type); @@ -316,7 +327,7 @@ class glpiAccount extends plugin if(isset($tr['sn'][0])){ $str .= $tr['sn'][0]." "; } - + if(isset($tr['uid'][0])){ $str .= "[".$tr['uid'][0]."]"; } @@ -354,9 +365,9 @@ class glpiAccount extends plugin { $message= array(); -// if($this->TechnicalResponsible == ""){ -// $message[] = _("Please select a technical responsible person for this entry."); -// } + // if($this->TechnicalResponsible == ""){ + // $message[] = _("Please select a technical responsible person for this entry."); + // } return ($message); } diff --git a/plugins/admin/systems/class_glpiDeviceManagement.inc b/plugins/admin/systems/class_glpiDeviceManagement.inc new file mode 100644 index 000000000..195bea382 --- /dev/null +++ b/plugins/admin/systems/class_glpiDeviceManagement.inc @@ -0,0 +1,293 @@ + "Eins ist toll", "zwei" => "Zwei ist noch besser"); + + /* attribute list for save action */ + var $ignore_account= TRUE; + var $attributes= array(); + var $objectclasses= array("whatever"); + + var $devices = array(); + var $ui; + + var $parent ; + var $EditEntry; + var $editMode =false; + + var $DeviceAttrs = array(); + var $AllowedDevices = array(); + + + function glpiDeviceManagement ($config, $dn= NULL) + { + plugin::plugin ($config, $dn); + + if(!isset($_SESSION['glpiDeviceRegex'])){ + $tmp['device_regex'] = "*"; + $_SESSION['glpiDeviceRegex'] = $tmp; + } + $this->ui = get_userinfo(); + + /* Specify which vars are allowed for a sepcific type of device */ + $this->DeviceAttrs['case'] = array("designation","format","comment","FK_glpi_enterprise"); + $this->DeviceAttrs['moboard'] = array("designation","chipset","comment","FK_glpi_enterprise"); + $this->DeviceAttrs['processor'] = array("designation","frequence","comment","FK_glpi_enterprise","specif_default"); + $this->DeviceAttrs['iface'] = array("designation","bandwidth","comment","FK_glpi_enterprise","specif_default"); + $this->DeviceAttrs['ram'] = array("designation","frequence","comment","FK_glpi_enterprise","specif_default","type"); + $this->DeviceAttrs['hdd'] = array("designation","rpm","interface","cache","comment","FK_glpi_enterprise","specif_default"); + $this->DeviceAttrs['drive'] = array("designation","speed","interface","is_writer","comment","FK_glpi_enterprise","specif_default"); + $this->DeviceAttrs['control'] = array("designation","interface","raid","comment","FK_glpi_enterprise"); + $this->DeviceAttrs['gfxcard'] = array("designation","ram","interface","comment","FK_glpi_enterprise","specif_default"); + $this->DeviceAttrs['sndcard'] = array("designation","type","comment","FK_glpi_enterprise","specif_default"); + $this->DeviceAttrs['power'] = array("designation","power","comment","FK_glpi_enterprise","atx"); + $this->DeviceAttrs['pci'] = array("designation","comment","FK_glpi_enterprise","specif_default"); + + $this->AllowedDevices=array("case","moboard","sndcard","processor","iface","ram","hdd","drive","control","gfxcard","power","pci"); + } + + function execute() + { + /* Call parent execute */ + plugin::execute(); + + /* Get all defined devices */ + $this->reload(); + + /* Fill templating stuff */ + $smarty= get_smarty(); + $display= ""; + + /* Check if we should create a new entry .... */ + $only_once = true; + foreach($_POST as $name => $value){ + + /* All Post vars starts with new */ + if((preg_match("/^new_/",$name))&&($only_once)){ + + /* do this twice */ + $only_once = false; + + /*extract device device_type */ + $deviceType = preg_replace("/_.*$/","",preg_replace("/^new_/","",$name)); + + /* Check if type is allowed, and create empty entry */ + $tmp = array(); + if((!isset($this->DeviceAttrs[$deviceType]))||((!in_array($deviceType,$this->AllowedDevices)))){ + print_red(sprintf(_("Internal Error can't create device of type '%s'"),$deviceType)); + }else{ + foreach($this->DeviceAttrs[$deviceType] as $attr){ + $tmp[$attr] = ""; + } + $tmp['device_type'] = $deviceType; + $this->EditEntry = $tmp; + $this->editMode =true; + } + } + } + + /* Open entry for editing if requested */ + if((isset($_GET['act']))&&($_GET['act']=="del_device")){ + $id = base64_decode($_GET['id']); + $tmp = $this->devices[$id]; + $this->parent->handle->deleteDevice($tmp); + $this->reload(); + } + + /* Open entry for editing if requested */ + if((isset($_GET['act']))&&($_GET['act']=="edit_device")){ + $id = base64_decode($_GET['id']); + $this->editMode =true; + $this->EditEntry = $this->devices[$id]; + } + + /* Abort editing this entry */ + if(isset($_POST['AbortDeviceChanges'])){ + $this->EditEntry = array(); + $this->editMode = false; + } + + /* Save all changes made on currently selected entry */ + if(isset($_POST['SaveDeviceChanges'])){ + + /* First check if all changes made are allowed */ + if(count($this->check($this->EditEntry))==0){ + $this->save($this->EditEntry); + $this->editMode = false; + $this->reload(); + }else{ + foreach($this->check($this->EditEntry) as $msg){ + print_red($msg); + } + } + + } + + /* Check if we are currently editing something ? */ + if($this->editMode == true){ + return ($this->editDevice($this->EditEntry)); + } + + /* ENDE : GET / POST handling + * Below, only output generation for headpage + */ + + $divlist = new divlist("glpi devices"); + $divlist->SetEntriesPerPage(0); + $divlist->SetHeader(array( + array("string" => " ", "attach" => "style='text-align:center;width:20px;'"), + array("string" => _("devices")." / "._("Departments"), "attach" => "style=''"), + array("string" => _("Use"), "attach" => "style='width:60px;border-right:0px;text-align:right;'" ))); + + $edit = "%s"; + $editdel = ""._("Edit").""; + $editdel.= ""._("Delete").""; + + $useDevice = ""; + + foreach($this->devices as $key=>$user){ + $field1 = array("string" => sprintf($useDevice,base64_encode($key),base64_encode($key)), "attach" => "style='text-align:center;width:20px;'"); + $field2 = array("string" => sprintf($edit,base64_encode($key),$user['designation']." [".$user['comment']."]"), "attach" => "style=''"); + $field3 = array("string" => sprintf($editdel,base64_encode($key),base64_encode($key)), + "attach" => "style='width:60px;border-right:0px;text-align:right;'"); + $divlist->AddEntry(array($field1,$field2,$field3)); + + } + + $listhead = "
". + "  ". + "  ". + "  ". + "  ". + "  ". + "  ". + "  ". + "  ". + "  ". + "  ". + "  ". + "  ". + "
"; + $filter= $_SESSION['glpiDeviceRegex']; + $smarty->assign("devicehead", $listhead); + $smarty->assign("devices", $divlist->DrawList()); + $smarty->assign("search_image", get_template_path('images/search.png')); + $smarty->assign("searchu_image", get_template_path('images/search_user.png')); + $smarty->assign("tree_image", get_template_path('images/tree.png')); + $smarty->assign("infoimage", get_template_path('images/info.png')); + $smarty->assign("launchimage", get_template_path('images/launch.png')); + $smarty->assign("apply", apply_filter()); + $smarty->assign("alphabet", generate_alphabet()); + $smarty->assign("device_regex", $filter['device_regex']); + + + $display.= $smarty->fetch(get_template_path('glpiDeviceManagement.tpl', TRUE)); + return($display); + } + + /* Save device to glpi database + * If this is a new device, create a new entry, else update this entry + */ + function save() + { + if($this->parent->handle->deviceExists($this->EditEntry)){ + $this->parent->handle->updateDevices($this->EditEntry); + }else{ + $this->parent->handle->addDevice($this->EditEntry); + } + + } + + /* this only gets all already defined devices */ + function reload() + { + $this->devices = $this->parent->handle->getDevices(); + ksort($this->devices); + } + + /* This funtions saves all POST variables. + The variable must be in the array $this->EditEntry + */ + function save_object() + { + if(is_array($this->EditEntry)){ + foreach($this->EditEntry as $name => $value){ + if(isset($_POST[$name])){ + $this->EditEntry[$name] = $_POST[$name]; + } + + } + } + } + + /* This function cehck all created devices if you wan't to create device specific check + use >>if($attr['device_type']=="moboard")<< to create a device type depending check + */ + function check($attr) + { + $message = array(); + if(empty($attr['designation'])){ + $message[]=(_("You have to specify a valid name for this device.")); + } + return($message); + } + + /* This funtions displays the tempalte for all available devices + * This funtion is also used if we create a new device + */ + function editDevice($entry) + { + $smarty = get_smarty(); + + /* Transfer given data to smarty */ + foreach($this->EditEntry as $name => $value){ + $smarty->assign($name,$value); + } + + /* Set default select boxes, manufacturers ... */ + $smarty->assign("device_type",$entry['device_type']); + + $none = array(0 => _("none")); + $manufacturer = array_merge($none,$this->parent->handle->getEnterprisesTypes()); + + $ramtypes = $this->parent->handle->getRAMTypes(); + + $smarty->assign("RAMtypes", $ramtypes); + $smarty->assign("RAMtypeKeys", array_flip($ramtypes)); + + $deviceControlTypes = array_merge($none,$this->parent->handle->getGlpiDeviceControlTypes()); + + $smarty->assign("HDDInterfaceKeys",array_flip($deviceControlTypes)); + $smarty->assign("HDDInterfaces" , $deviceControlTypes); + + $gfxControlTypes = array("0"=>_("None"),"AGP"=>"AGP","PCI"=>"PCI","PCI-X"=>"PCI-X","Other"=>_("Other")); + + $smarty->assign("GFXInterfaceKeys",array_flip($gfxControlTypes)); + $smarty->assign("GFXInterfaces" , $gfxControlTypes); + + $smarty->assign("FK_glpi_enterpriseKeys",array_flip($manufacturer)); + $smarty->assign("FK_glpi_enterprises", $manufacturer); + + $smarty->assign("formats",array("Large","Medium","Micro")); + $smarty->assign("formatKeys",array('Grand','Moyen','Micro')); + return($smarty->fetch(get_template_path('glpi_devices.tpl', TRUE))); + } +} +// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: +?> diff --git a/plugins/admin/systems/class_glpiManufacturer.inc b/plugins/admin/systems/class_glpiManufacturer.inc index 8463743a2..aeedaa4d2 100644 --- a/plugins/admin/systems/class_glpiManufacturer.inc +++ b/plugins/admin/systems/class_glpiManufacturer.inc @@ -78,13 +78,21 @@ class glpiManufacturer extends plugin $tmp[$attrs]=$this->$attrs; } - if($this->Edit_Add == "add"){ - $this->parent->handle->addEnterprisesType($tmp); - }else{ - $this->parent->handle->updateEnterprisesType($tmp,$this->ID); + $allok = true; + if(empty($tmp['name'])){ + print_red(_("Please specify a name.")); + $allok = false; } - $this->editMode=false; + if($allok){ + if($this->Edit_Add == "add"){ + $this->parent->handle->addEnterprisesType($tmp); + $this->editMode=false; + }else{ + $this->parent->handle->updateEnterprisesType($tmp,$this->ID); + $this->editMode=false; + } + } } if($this->editMode == true){ diff --git a/plugins/admin/systems/glpiDeviceManagement.tpl b/plugins/admin/systems/glpiDeviceManagement.tpl new file mode 100644 index 000000000..9c64ae60a --- /dev/null +++ b/plugins/admin/systems/glpiDeviceManagement.tpl @@ -0,0 +1,53 @@ + + + + + +
+
+

+ {t}List of devices{/t} +

+
+
+ {$devicehead} +
+
+
+ {$devices} + +
+
+
+

[i]{t}Information{/t}

+
+
+

+ {t}This dialog allows you to attach a device to your currently edited computer.{/t} +

+
+
+
+

[F]{t}Filters{/t}

+
+
+ + {$alphabet} +
+ + + + + +
+ +
+ {$apply} +
+
+ + +

 

+
+ +
diff --git a/plugins/admin/systems/glpiManufacturerAdd.tpl b/plugins/admin/systems/glpiManufacturerAdd.tpl index e4d24a65e..f31c6d639 100644 --- a/plugins/admin/systems/glpiManufacturerAdd.tpl +++ b/plugins/admin/systems/glpiManufacturerAdd.tpl @@ -9,25 +9,25 @@ - + - {t}Address{/t} + {t}Website{/t} - + - {t}Website{/t} + {t}Address{/t} - + @@ -42,24 +42,24 @@ - {t}Comments{/t} + {t}Fax{/t} - + - {t}Fax{/t} + {t}Email{/t} - + - {t}Email{/t} + {t}Comments{/t} - + diff --git a/plugins/admin/systems/glpi_devices.tpl b/plugins/admin/systems/glpi_devices.tpl new file mode 100644 index 000000000..608469e53 --- /dev/null +++ b/plugins/admin/systems/glpi_devices.tpl @@ -0,0 +1,645 @@ + +{if $device_type=="pci"} + +

{t}Other devices{/t}

+ + + + + +
+ + + + + + + + + +
{t}Name{/t} + + +
{t}Comment{/t} + + +
+
+ + + + + +
{t}Manufacturer{/t} + + +
+
+ +{elseif $device_type=="power"} + +

{t}Power supply{/t}

+ + + + + +
+ + + + + + + + + +
{t}Name{/t} + + +
{t}Comment{/t} + + +
+
+ + + + + + + + + + + + + +
{t}Manufacturer{/t} + + +
{t}Atx{/t} + + {t}Yes{/t} + {t}No{/t} +
{t}Power{/t} + + +
+
+{elseif $device_type=="gfxcard"} + +

{t}Gfxcard{/t}

+ + + + + +
+ + + + + + + + + +
{t}Name{/t} + + +
{t}Comment{/t} + + +
+
+ + + + + + + + + + + + + +
{t}Manufacturer{/t} + + +
{t}Interface{/t} + + +
{t}Ram{/t} + + +
+
+{elseif $device_type=="control"} + +

{t}Controllers{/t}

+ + + + + +
+ + + + + + + + + +
{t}Name{/t} + + +
{t}Comment{/t} + + +
+
+ + + + + + + + + + + + + +
{t}Manufacturer{/t} + + +
{t}Interface{/t} + + +
{t}Size{/t} + + {t}Yes{/t} + {t}No{/t} +
+
+ +{elseif $device_type=="drive"} + +

{t}Drive{/t}

+ + + + + +
+ + + + + + + + + +
{t}Name{/t} + + +
{t}Comment{/t} + + +
+
+ + + + + + + + + + + + + + + + + +
{t}Manufacturer{/t} + + +
{t}Speed{/t} + + +
{t}Interface{/t} + + +
{t}Writeable{/t} + + {t}Yes{/t} + {t}No{/t} +
+
+ +{elseif $device_type=="hdd"} +

{t}Hdd{/t}

+ + + + + +
+ + + + + + + + + +
{t}Name{/t} + + +
{t}Comment{/t} + + +
+
+ + + + + + + + + + + + + + + + + + + + + + +
{t}Manufacturer{/t} + + +
{t}Rpm{/t} + + +
{t}Cache{/t} + + +
{t}Size{/t} + + +
{t}Type{/t} + + +
+
+ +{elseif $device_type=="ram"} + +

{t}RAM{/t}

+ + + + + +
+ + + + + + + + + +
{t}Name{/t} + + +
{t}Comment{/t} + + +
+
+ + + + + + + + + + + + + + + + + + +
{t}Manufacturer{/t} + + +
{t}Frequenz{/t} + + +
{t}Size{/t} + + +
{t}Type{/t} + + +
+
+ +{elseif $device_type=="sndcard"} +

{t}Soundcard{/t}

+ + + + + +
+ + + + + + + + + +
{t}Name{/t} + + +
{t}Comment{/t} + + +
+
+ + + + + + + + + +
{t}Manufacturer{/t} + + +
{t}Type{/t} + + +
+
+{elseif $device_type=="iface"} +

{t}Network interface{/t}

+ + + + + +
+ + + + + + + + + +
{t}Name{/t} + + +
{t}Comment{/t} + + +
+
+ + + + + + + + + + + + + +
{t}Manufacturer{/t} + + +
{t}MAC address{/t} + + +
{t}Bandwidth{/t} + + +
+
+{elseif $device_type=="processor"} +

{t}Processor{/t}

+ + + + + +
+ + + + + + + + + +
{t}Name{/t} + + +
{t}Comment{/t} + + +
+
+ + + + + + + + + + + + + +
{t}Manufacturer{/t} + + +
{t}Frequenz{/t} + + +
{t}Default frequenz{/t} + + +
+
+ +{elseif $device_type=="moboard"} +

{t}Motherboard{/t}

+ + + + + +
+ + + + + + + + + +
{t}Name{/t} + + +
{t}Comment{/t} + + +
+
+ + + + + + + + + +
{t}Manufacturer{/t} + + +
{t}Chipset{/t} + + +
+
+{elseif $device_type=="case"} +

{t}Computer case{/t}

+ + + + + +
+ + + + + + + + + +
{t}Name{/t} + + +
{t}Comment{/t} + + +
+
+ + + + + + + + + +
{t}Manufacturer{/t} + + +
{t}format{/t} + + +
+
+{/if} + + +

 

+
+

+ + +

+
-- 2.30.2