" . __('Cacti has imported the following items:') . " ";
while (list($type, $type_array) = each($_SESSION['import_debug_info'])) {
print '' . $hash_type_names[$type] . ' ';
while (list($index, $vals) = each($type_array)) {
if ($vals['result'] == 'success') {
$result_text = "" . __('[success]') . "";
}else{
$result_text = "" . __('[fail]') . "";
}
if ($vals['type'] == 'update') {
$type_text = "" . __('[update]') . "";
}else{
$type_text = "" . __('[new]') . "";
}
print "$result_text " . htmlspecialchars($vals['title']) . " $type_text \n";
$dep_text = '';
$there_are_dep_errors = false;
if ((isset($vals['dep'])) && (sizeof($vals['dep']) > 0)) {
while (list($dep_hash, $dep_status) = each($vals['dep'])) {
if ($dep_status == 'met') {
$dep_status_text = "" . __('Found Dependency:') . "";
}else{
$dep_status_text = "" . __('Unmet Dependency:') . "";
$there_are_dep_errors = true;
}
$dep_text .= " + $dep_status_text " . hash_to_friendly_name($dep_hash, true) . " \n";
}
}
/* only print out dependency details if they contain errors; otherwise it would get too long */
if ($there_are_dep_errors == true) {
print $dep_text;
}
}
}
print ' |
';
html_end_box();
kill_session_var('import_debug_info');
}
html_start_box( __('Import Templates'), '100%', '', '3', 'center', '');
draw_edit_form(array(
'config' => array('no_form_tag' => true),
'fields' => $fields_template_import
));
html_end_box();
form_hidden_box('save_component_import','1','');
form_save_button('', 'import');
}