$editActions[] = $emptyAction; } $list_params[] = $l_params; # TODO no label in image! $a_label[] = sprintf("%s%s", '<img src="modules/imaging/graph/images/imaging-action.png" style="vertical-align: middle" /> ', $name); $a_desc[] = $image['desc']; $a_date[] = _toDate($image['creation_date']); $a_size[] = humanReadable($image['size']); $a_inbootmenu[] = isset($image['menu_item']) ? True : False; $a_fromprofile[] = $image['read_only'] ? True : False; $a_info[] = sprintf("Plop: %s", $image['fk_status']); $l_im[] = array($image['imaging_uuid'], $_GET['target_uuid'], $type); } if (!$actions) { if (count($l_im) != 0) { $ret = xmlrpc_areImagesUsed($l_im); foreach ($images as $image) { if ($ret[$image['imaging_uuid']]) { $a_destroy[] = $showImAction; } else { $a_destroy[] = $destroyAction; } } } } // show images list $l = new OptimizedListInfos($a_label, _T("Label", "imaging")); $l->setParamInfo($list_params); $l->addExtraInfo($a_desc, _T("Description", "imaging")); $l->addExtraInfo($a_date, _T("Created", "imaging")); $l->addExtraInfo($a_size, _T("Size (compressed)", "imaging"));
} else { // Come from an imaging server page header("Location: " . urlStrRedirect("imaging/manage/master")); exit; } } $params = getParams(); $id = $_GET['itemid']; $tid = $_GET['target_uuid']; $label = urldecode($_GET['itemlabel']); if (isset($_GET['gid'])) { $type = 'group'; } else { $type = ''; } $ret = xmlrpc_areImagesUsed(array(array($id, $tid, $type))); $ret = $ret[$id]; ?> <form name="showTarget" action="<?php echo urlStr("base/computers/showtarget", $params); ?> " method="post"> <p><?php printf(_T("Show all targets that use that image in their boot menu", "imaging")); ?> </p> <?php foreach ($ret as $target) { /* * $target = array( * [0] => UUID of the target