$status[] = '<img src="modules/msc/graph/images/status/success.png" alt=""/>';
            } else {
                $status[] = '<img src="modules/msc/graph/images/status/failed.png" alt=""/> ' . $dstatus['errtext'];
                $name = sprintf('<a href="#">%s</a>', $name);
            }
        }
        $names[] = $name;
    }
    $n = new OptimizedListInfos($names, _T("Destination", "backuppc"));
    $n->addExtraInfo($times, _T("Restore time", "backuppc"));
    $n->addExtraInfo($status, _T("Status", "backuppc"));
    $n->setCssClass("file");
    $filter1 = '';
    $n->setNavBar(new AjaxNavBar(0, $filter1));
    $n->setParamInfo($params);
    $n->addActionItemArray($actions);
    $n->start = 0;
    $n->end = 50;
    $n->setItemCount(count($names));
    $n->display();
}
print '</div>';
?>

<script type="text/javascript">
    function refresh() {
        jQuery('div#downloadTable').load("<?php 
echo 'main.php?module=backuppc&submod=backuppc&action=ajaxDownloadsTable&host=' . $host;
?>
");
    }
        $params = array_merge(array(''), $params);
        $viewVersionsActions = array_merge(array($emptyAction), $viewVersionsActions);
    }
    $count = count($names);
    $n = new OptimizedListInfos($names, $z);
    $n->disableFirstColumnActionLink();
    $n->addExtraInfo($sizes, _T("Size", "backuppc"));
    $n->setMainActionClasses($cssClasses);
    $n->setItemCount($count);
    $filter = $_GET['folder'] . '|mDvPulse|' . $_GET['location'];
    $n->setNavBar(new AjaxNavBar($count, $filter));
    $n->start = isset($_GET['start']) ? $_GET['start'] : 0;
    $n->end = isset($_GET['end']) ? $_GET['end'] : $maxperpage;
    $n->setParamInfo($params);
    // Setting url params
    $n->addActionItemArray($viewVersionsActions);
    print '<br/><br/><form id="restorefiles" method="post" action="">';
    printf('<input type="hidden" name="host" value="%s" />', $_GET['host']);
    printf('<input type="hidden" name="backupnum" value="%s" />', $_GET['backupnum']);
    printf('<input type="hidden" name="sharename" value="%s" />', $_GET['sharename']);
    printf('<input type="hidden" name="dir" value="%s" />', $folder);
    print '<input type="hidden"  name="restoredir" id="restoredir" value=""  />';
    $n->display();
}
?>
<input id="btnRestoreZip" type="button" value="<?php 
print _T('Download selected (ZIP)', 'backuppc');
?>
" class="btnPrimary" />
<input type="button" value="<?php 
print _T('Restore to host', 'backuppc');
    $hosts[] = $r["hostname"];
    //rtrim($r[1],".");
    $types[] = $r["type"];
    $values[] = getRecordValueDescription($zone, $r["type"], $r["value"]);
    $params[] = array("zone" => $zone, "reverse" => $reverse, "id" => $r["id"], "serial" => $serial);
    $actionsMod[] = $editAction;
    if ($r["hostname"] === $curzone . "." && $r["type"] === "TXT" || $r["type"] == "SOA") {
        $actionsDel[] = $emptyAction;
    } else {
        $actionsDel[] = $delAction;
    }
}
//print_r($values);
$typeAsc = $sortby == "type" ? intval(!$asc) : "1";
$hostnameAsc = $sortby == "hostname" ? intval(!$asc) : "1";
$typeUrl = urlStr("network/network/zonerecords", array("zone" => $zone, "reverse" => $reverse, "sortby" => "type", "asc" => $typeAsc));
$hostnameUrl = urlStr("network/network/zonerecords", array("zone" => $zone, "reverse" => $reverse, "sortby" => "hostname", "asc" => $hostnameAsc));
$n = new OptimizedListInfos($hosts, "<a href='" . $hostnameUrl . "'>" . _T("Host name", "network") . "</a>");
$n->setTableHeaderPadding(1);
$n->setNavBar(new AjaxNavBar(count($records), $filter));
$n->setItemCount(count($records));
$n->start = 0;
$n->end = count($recordsatpage) - 1;
$n->addExtraInfo($types, "<a href='" . $typeUrl . "'>" . _T("Record type", "network")) . "</a>";
$n->addExtraInfo($values, _T("Record parameters", "network"));
$n->setName(_T("Host", "network"));
$n->setParamInfo($params);
$n->disableFirstColumnActionLink();
$n->addActionItemArray($actionsMod);
$n->addActionItemArray($actionsDel);
$n->display();
        $a_create[] = $script['fk_boot_service'] ? $bsCreatedAction : $createAction;
    } else {
        $url = '<img src="modules/imaging/graph/images/postinst-action-ro.png" style="vertical-align: middle" /> ';
        $a_edit[] = $emptyAction;
        $a_delete[] = $emptyAction;
        // Don't display "Create Boot Service" icon if a Boot Service already created
        // from this PostInstall entry
        $a_create[] = $script['fk_boot_service'] ? $bsCreatedAction : $createAction;
    }
    $a_label[] = sprintf("%s%s", $url, $script['default_name']);
    $a_desc[] = $script["default_desc"];
    $l_params = array();
    $l_params["itemid"] = $script['imaging_uuid'];
    $l_params["itemlabel"] = $script["default_name"];
    $list_params[] = $l_params;
}
// show scripts list
$l = new OptimizedListInfos($a_label, _T("Name", "imaging"));
$l->addExtraInfo($a_desc, _T("Description", "imaging"));
$l->setParamInfo($list_params);
$l->addActionItemArray($a_edit);
$l->addActionItem($a_create);
$l->addActionItem(new ActionItem(_T("Duplicate", "imaging"), "postinstall_duplicate", "duplicatescript", "image", "imaging", "manage"));
$l->addActionItemArray($a_delete);
$l->setTableHeaderPadding(19);
$l->disableFirstColumnActionLink();
$l->setItemCount($count);
$l->setNavBar(new AjaxNavBar($count, $filter, "updateSearchParamformLevel2"));
$l->start = 0;
$l->end = $maxperpage;
$l->display();
        if ($icons['stop'] == '') { $a_stop[] = $actionempty; } else { $a_stop[] = $actionstop; }
        if ($icons['pause'] == '') { $a_pause[] = $actionempty; } else { $a_pause[] = $actionpause; }
        if ((!isset($bid) || $bid == '') && (!isset($gid) || $gid == '')) { # gid
            $a_details[] = $actionsinglestatus;
        } else {
            $a_details[] = $actionstatus;
        }
    }
}

$n = new OptimizedListInfos($a_cmd, _T("Command", "msc"));
$n->addExtraInfo($a_creator, _T("Creator", "msc"));
$n->addExtraInfo($a_date, _T("Creation date", "msc"));
$n->addExtraInfo($a_target, _T("Target", "msc"));

$n->addActionItemArray($a_start);
$n->addActionItemArray($a_pause);
$n->addActionItemArray($a_stop);
$n->addActionItemArray($a_details);

$n->disableFirstColumnActionLink(); # TODO put several columns actions
$n->setParamInfo($params);
$n->setTableHeaderPadding(1);
$n->setItemCount($count);
$n->setNavBar(new AjaxNavBar($count, $filter));
$n->start = 0;
$n->end = $maxperpage;

$n->display();

?>
    if (in_array("update", $_SESSION["supportModList"])) {
        $n->addActionItem(new ActionItem(_T("Update on this group", "dyngroup"), "view_updates", "reload", "id", "base", "computers"));
    }
} else {
    // Imaging group
    $n->addActionItem(new ActionItem(_T("Display this imaging group's content", 'dyngroup'), "display", "display", "id", "imaging", "manage"));
    if (in_array("inventory", $_SESSION["supportModList"])) {
        $n->addActionItem(new ActionItem(_T("Inventory on this imaging group", "dyngroup"), "groupinvtabs", "inventory", "inventory", "imaging", "manage"));
    } else {
        # TODO implement the glpi inventory on groups
        #    $n->addActionItem(new ActionItem(_T("Inventory on this profile", "dyngroup"),"groupglpitabs","inventory","inventory", "base", "computers"));
    }
    $n->addActionItem(new ActionItem(_T("Edit this imaging group", 'dyngroup'), "computersgroupedit", "edit", "id", "imaging", "manage"));
    $n->addActionItem(new ActionItem(_T("Share this imaging group", 'dyngroup'), "edit_share", "groupshare", "id", "imaging", "manage"));
    if (in_array("msc", $_SESSION["supportModList"])) {
        $n->addActionItem(new ActionItem(_T("Read log", "dyngroup"), "groupmsctabs", "logfile", "computer", "imaging", "manage", "grouptablogs"));
        $n->addActionItem(new ActionItem(_T("Software deployment on this imaging group", "dyngroup"), "groupmsctabs", "install", "computer", "imaging", "manage"));
    }
    if (in_array("imaging", $_SESSION["supportModList"])) {
        if (xmlrpc_isImagingInProfilePossible()) {
            $n->addActionItem(new ActionItem(_("Imaging management"), "groupimgtabs", "imaging", "computer", "imaging", "manage"));
        }
    }
}
$n->addActionItemArray($action_delete);
$n->addActionItem(new ActionItem(_T("Csv export", "dyngroup"), "csv", "csv", "computer", "base", "computers"));
//$n->disableFirstColumnActionLink();
$n->display();
?>

Exemple #7
0
                $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"));
$l->addExtraInfo($a_inbootmenu, _T("In boot menu", "imaging"));
if ($is_in_profile) {
    $l->addExtraInfo($a_fromprofile, _T("From profile", "imaging"));
}
$l->addActionItemArray($addActions);
$l->addActionItem(new ActionPopupItem(_T("Create bootable iso", "imaging"), "images_iso", "backup", "image", "base", "computers"));
// if not in boot menu
if ($actions) {
    $l->addActionItem(new ActionItem(_T("Edit image", "imaging"), "imgtabs", "edit", "image", "base", "computers", $type . "tabimages", "edit"));
    $l->addActionItem($logAction);
    $l->addActionItem($destroyAction);
} else {
    $l->addActionItemArray($editActions);
    $l->addActionItem($logAction);
    $l->addActionItemArray($a_destroy);
}
$l->disableFirstColumnActionLink();
$l->setItemCount($count);
$l->setNavBar(new AjaxNavBar($count, $filter, "updateSearchParamform" . ($actions ? 'image' : 'master')));
$l->start = 0;
            # gid
            $a_details[] = $actionsinglestatus;
        } else {
            $a_details[] = $actionstatus;
        }
    }
}
$n = new OptimizedListInfos($a_cmd, _T("Command", "msc"));
$n->addExtraInfo($a_creator, _T("Creator", "msc"));
//$n->addExtraInfo($a_date, _T("Creation date", "msc"));
$n->addExtraInfo($start_dates, _T("Start date", "msc"));
$n->addExtraInfo($end_dates, _T("End date", "msc"));
$n->addExtraInfo($a_deployment_intervals, _T("Deployment interval", "msc"));
$n->addExtraInfo($a_target, _T("Target", "msc"));
$n->addExtraInfo($a_donepercent, _T("Success percent", "msc"));
$n->addActionItemArray($a_start);
//$n->addActionItemArray($a_pause);
$n->addActionItemArray($a_stop);
$n->addActionItemArray($a_delete);
//$n->addActionItemArray($a_details);
$n->disableFirstColumnActionLink();
# TODO put several columns actions
$n->setParamInfo($params);
$n->setTableHeaderPadding(1);
$n->setItemCount($count);
$n->setNavBar(new AjaxNavBar($count, $filter));
$n->start = 0;
$n->end = $maxperpage;
$n->display();
?>
<!-- inject styles -->
Exemple #9
0
    }
    if ($is_in_profile) {
        $addActions[] = $emptyAction;
    } elseif (!isset($entry['menu_item'])) {
        $addActions[] = $addAction;
    } else {
        $addActions[] = $delAction;
        $l_params["mi_itemid"] = $entry['menu_item']['imaging_uuid'];
    }
    $list_params[] = $l_params;
    $icon = '<img src="modules/imaging/graph/images/service-action.png" style="vertical-align: middle" /> ';
    $a_label[] = sprintf("%s%s", $icon, $entry['default_name']);
    $a_desc[] = $entry['default_desc'];
    $a_in_boot_menu[] = isset($entry['menu_item']) ? True : False;
    $a_from_profile[] = isset($entry['menu_item']) ? $entry['menu_item']['read_only'] ? True : False : False;
}
$l = new OptimizedListInfos($a_label, _T("Label", "imaging"));
$l->addExtraInfo($a_desc, _T("Description", "imaging"));
$l->addExtraInfo($a_in_boot_menu, _T("In bootmenu", "imaging"));
if ($is_in_profile) {
    $l->addExtraInfo($a_from_profile, _T("From profile", "imaging"));
}
$l->setParamInfo($list_params);
$l->addActionItemArray($addActions);
$l->disableFirstColumnActionLink();
$l->setItemCount($count);
$l->setNavBar(new AjaxNavBar($count, $filter, "updateSearchParamLevel2"));
$l->start = 0;
$l->end = $maxperpage;
$l->setTableHeaderPadding(19);
$l->display();
Exemple #10
0
    // Delete and edit only for user defined profiles [id>=1000]
    //$editActions[] = ($pid<1000)? $emptyAction:$editAction;
    $delActions[] = $pid < 1000 ? $emptyAction : $delAction;
}
$profile_names = array_values($profile_names);
if ($profile_names) {
    $count = count($profile_names);
    $n = new OptimizedListInfos($profile_names, _T("Schedule", "backuppc"));
    $n->setItemCount($count);
    $n->setNavBar(new AjaxNavBar($count, $filter1));
    $n->start = 0;
    $n->end = 50;
    $n->setParamInfo($params);
    // Setting url params
    $n->addActionItem($editAction);
    $n->addActionItemArray($delActions);
    $n->display();
}
_T('Linux (User files)', 'backuppc');
_T('Linux (Whole / drive)', 'backuppc');
_T('Mac OS X (User files)', 'backuppc');
_T('Mac OS X (Whole / drive)', 'backuppc');
_T('Windows 7/Vista (User files)', 'backuppc');
_T('Windows 7/Vista (Whole C: Drive)', 'backuppc');
_T('Windows XP (User files)', 'backuppc');
_T('Windows XP (Whole C: Drive)', 'backuppc');
_T('Daytime', 'backuppc');
_T('Nightly', 'backuppc');
?>

<style>