예제 #1
0
                $entries[] = array("id" => $id, "name" => $item_name, "title" => $item_class . ": ", "status" => "open", "childs" => $services);
            } else {
                # for single (any other) classes
                $entries[] = array("id" => $id, "name" => $item_name, "title" => $item_class . ": ", "type" => $item_class);
            }
        }
    }
    //foreach
    # service deletion: sort the array on hostnames
    ksort($entries);
    # Modify text on top tree element (root) when deleting services
    if ($item_class == "service") {
        $items = "services";
    } else {
        $items = "items";
    }
    $tree_view = array("root" => array("id" => "root", "status" => 'open', "name" => "The following {$items} will be deleted", "type" => "parent", "childs" => $entries));
    # display tree
    echo '<br><div>';
    displayTree_list($tree_view);
    echo '</div>';
} else {
    NConf_DEBUG::set("No item to delete", "ERROR");
}
if (NConf_DEBUG::status('ERROR')) {
    echo NConf_HTML::limit_space(NConf_HTML::show_error());
    echo "<br><br>";
    echo NConf_HTML::back_button($_SESSION["go_back_page"]);
}
mysql_close($dbh);
require_once 'include/foot.php';
예제 #2
0
     $result_array = db_templates("get_attributes_with_bidirectional", $item_class);
 }
 NConf_DEBUG::close_group();
 if (count($result_array) == 0) {
     // warn if class contains no attrbibutes
     NConf_DEBUG::set('There are no attributes defined for this class.', 'ERROR');
 }
 if (NConf_DEBUG::status('ERROR')) {
     $content = NConf_HTML::show_error();
     $content .= "<br><br>";
     if (!empty($_SESSION["after_delete_page"])) {
         $link = $_SESSION["after_delete_page"];
     } else {
         $link = "index.php";
     }
     $content .= NConf_HTML::back_button($link);
     echo NConf_HTML::limit_space($content);
     mysql_close($dbh);
     require_once 'include/foot.php';
     exit;
 }
 // seems not really nice, disabled for new theme
 //echo '<table border="0" style="table-layout:fixed; width:770px">';
 echo '<table>';
 # predefine col width
 echo define_colgroup();
 foreach ($result_array as $entry) {
     if ($handle_action != "modify" and !empty($entry["predef_value"])) {
         # add / multimodify
         $item_data[$entry["id_attr"]] = $entry["predef_value"];
         // debug must be redone with message: