$ages = $response['data'][6]; $times = array(); $count = count($backups); $params = array(); for ($i = 0; $i < $count; $i++) { $params[] = array('host' => $_GET['host'], 'backupnum' => $backups[$i]); preg_match("#.+ (.+)#", $bk_time[$i], $result); $time = time() - floatval($ages[$i]) * 24 * 60 * 60; $times[] = strftime(_T("%A, %B %e %Y", 'backuppc'), $time) . ' - ' . $result[1]; } $n = new OptimizedListInfos($times, _T("Backup#", "backuppc")); //$n->addExtraInfo($types, _T("Type", "backuppc")); $n->setCssClass("file"); // CSS for icons $n->setItemCount($count); $n->setNavBar(new AjaxNavBar($count, $filter1)); $n->start = 0; $n->end = 50; $n->setParamInfo($params); // Setting url params $n->addActionItem(new ActionItem(_T("View", "backuppc"), "BrowseShareNames", "display", "host", "backuppc", "backuppc")); print "<br/><br/>"; // to go below the location bar : FIXME, really ugly as line height dependent $n->display(); } // Downloaded files table include "modules/backuppc/backuppc/ajaxDownloadsTable.php"; ?> <style> .noborder { border:0px solid blue; }
} else { if ($dstatus['err'] == 0) { $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; ?>
} } if ($err) { new NotifyWidgetFailure(implode('<br/>', array_merge($err, array(_T("Please contact your administrator.", "msc"))))); } $n = new OptimizedListInfos($a_packages, _T("Package", "msc")); $n->addExtraInfo($a_description, _T("Description", "msc")); $n->addExtraInfo($a_pversions, _T("Version", "msc")); $n->addExtraInfo($a_sizes, _T("Package size", "msc")); if ($group != null) { $n->addExtraInfo($a_convergence_status, _T("Convergence", "msc")); } $n->setCssClasses($a_css); $n->setParamInfo($params); $n->setItemCount($count); $n->setNavBar(new AjaxNavBar($count, $filter['filter'])); $n->setTableHeaderPadding(1); $n->disableFirstColumnActionLink(); $n->start = 0; $n->end = $count; $n->addActionItem(new ActionItem(_T("Advanced launch", "msc"), "start_adv_command", "advanced", "msc", "base", "computers")); $n->addActionItem(new ActionItem(_T("Direct launch", "msc"), "start_command", "start", "msc", "base", "computers")); if ($group != null) { $n->addActionItem($a_convergence_action); } //$n->addActionItem(new ActionPopupItem(_T("Details", "msc"), "package_detail", "detail", "msc", "base", "computers")); $n->display(); ?> <style> .primary_list { } .secondary_list {
$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();
$date = '<img src="modules/imaging/graph/images/backup.png" style="vertical-align: bottom"/> '.$date; } elseif (ereg('restore', $status)) { $date = '<img src="modules/imaging/graph/images/restore.png" style="vertical-align: bottom"/> '.$date; }*/ // get status if (!array_key_exists($status, $logStates)) { $status = 'unknow'; } // complete status display $led = new LedElement($logStates[$status][1]); $status = $logStates[$status][0]; //$status = $led->value.' '.$logStates[$status][0]; $a_level[] = $log['imaging_log_level']; $a_date[] = $date; $a_target[] = $log['target']['name']; $a_desc[] = $status . ' - ' . $log['detail']; $a_states[] = $status; } $l = new OptimizedListInfos($a_date, _T("Timestamp", "imaging")); // $l->addExtraInfo($a_level, _T("Log level", "imaging")); $l->addExtraInfo($a_target, _T("Target", "imaging")); $l->addExtraInfo($a_desc, _T("Message", "imaging")); //$l->addExtraInfo($a_states, _T("State", "imaging")); $l->setParamInfo($list_params); $l->setItemCount($count); $l->setNavBar(new AjaxNavBar($count, $filter, "updateSearchParamLogs")); $l->disableFirstColumnActionLink(); $l->setTableHeaderPadding(1); $l->start = 0; $l->end = $maxperpage; $l->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();
function display_part($part, $get, $simpleTableParts, $displayNavBar = True, $partTitle = null) { $uuid = ''; if (isset($get['uuid'])) { $uuid = $get['uuid']; } elseif (isset($get['objectUUID'])) { $uuid = $get['objectUUID']; } $maxperpage = isset($get['maxperpage']) ? $get['maxperpage'] : 0; $filter = isset($get["filter"]) ? $get['filter'] : ''; if (isset($get["start"])) { $start = $get["start"]; } else { $start = 0; } $end = $start + $maxperpage; $hide_win_updates = isset($get['hide_win_updates']) ? $get['hide_win_updates'] : False; $hide_win_updates = strtolower($hide_win_updates) == 'true' ? True : False; $history_delta = isset($get['history_delta']) ? $get['history_delta'] : False; $options = array('hide_win_updates' => $hide_win_updates, 'history_delta' => $history_delta); // Get current part inventory $inv = getLastMachineGlpiPart($uuid, $part, $start, $end, $filter, $options); $itemCount = countLastMachineGlpiPart($uuid, $part, $filter, $options); if (!is_array($inv)) { $inv = array(); } // this piece of code re-format inventory array // $all variable will contain part's inventory $all = array(); $i = 0; foreach ($inv as $line) { foreach ($line as $vals) { /* * If $vals[1] is an empty string or an array, don't use the _T() function * Empty fields are replaced by a trademark text by transifex * if it's an array, it's an editable field */ $vals[1] = str_replace('@@FALSE_POSITIVE@@', _T(' (Not an antivirus)', 'glpi'), $vals[1]); $all[$vals[0]][$i] = ''; if (!is_array($vals[1]) && $vals[1] != '') { // translatable fields $all[$vals[0]][$i] = _T($vals[1]); } elseif (is_array($vals[1])) { // editable fields $all[$vals[0]][$i] = $vals[1]; } } $i++; } /* * simpleTableParts are parts who are *not* displayed * in a multi-line table */ // Simple table if (in_array($part, $simpleTableParts)) { $key = array(); $val = array(); foreach (array_keys($all) as $k) { $key[] = _T($k, 'glpi'); if ($k == 'Serial Number') { $val[] = str_replace('@@WARRANTY_LINK_TEXT@@', _T('Click here to see this computer on manufacturer website', 'glpi'), $all[$k][0]); } else { /* * if $all[$k][0] is an array, it's an editable value * $editable = array(uniquename, type, value) */ if (is_array($all[$k][0])) { $editable = $all[$k][0]; $val[] = sprintf('<label class="editableField" name="%s" data="%s" style="height:1em;">%s</label>', $editable[0], $editable[1], $editable[2]) . sprintf('<input type="text" class="editableField" name="%s" value="%s" style="display:none" />', $editable[0], $editable[2]); } else { $val[] = $all[$k][0]; } } } $n = new ListInfos($key, _T("Properties", "glpi")); $n->addExtraInfo($val, _T("Value", "glpi")); /* * $_GET['maxperpage'] is set to 10 by default * If there is more than 10 elements, they don't be displayed * So setRowsPerPage equal to number of elements to display */ $n->setRowsPerPage(count($all)); $n->drawTable(0); } else { $n = null; // If nothing found, display a "nothing found" message // except on Hardware tab (identified by $partTitle == null) => display nothing if (count($all) == 0 && $partTitle == null) { switch ($part) { case 'History': printf('<p>%s</p>', _T('No record found for this period.', 'glpi')); break; case 'Antivirus': printf('<p>%s</p>', _T('Unable to detect any Antivirus software on this machine.', 'glpi')); printf('<p>%s</p>', _T('Please ensure you are running GLPI with FusionInventory plugin and FusionInventory Agent on this client.', 'glpi')); break; default: printf('<p>%s</p>', _T('No record found.', 'glpi')); } } // Put datas in a ListInfos object foreach ($all as $k => $v) { if ($n == null) { $n = new OptimizedListInfos($v, _T($k, 'glpi')); } else { $n->addExtraInfo($v, _T($k, 'glpi')); } } // display table if ($n) { $n->setItemCount($itemCount); $n->setNavBar(new AjaxNavBar($itemCount, $filter)); $n->disableFirstColumnActionLink(); $n->setTableHeaderPadding(1); $n->start = 0; $n->end = $itemCount; // Display a title (it happens in Hardware tab) if ($partTitle) { printf("<h2>%s</h2>", $partTitle); } // Display table with (or not) NavBar $n->display($displayNavBar, $displayNavBar); if ($partTitle) { echo "<br />"; } } } }
if (isset($_GET["start"])) { $start = $_GET["start"]; } else { $start = 0; } $params = array('min' => $start, 'max' => $start + $maxperpage, 'filters' => ''); if (isset($_GET["filter"]) && $_GET["filter"]) { $params['filters'] = $_GET["filter"]; } extract(getLocationAll($params)); // Listinfo params $listinfoParams = array(); foreach ($data as $key => $row) { $listinfoParams[] = array('id' => $row['id'], 'Label' => $row['Label'], 'Labelval' => $row['Labelval'], 'parentId' => $row['parentId']); } if (!$count || $count <= 0) { print _T('No entry found', 'inventory'); return; } $cols = listInfoFriendly($data); $n = new OptimizedListInfos($cols['Labelval'], _T('Entity name', 'inventory'), ''); $n->first_elt_padding = '0'; $n->setParamInfo($listinfoParams); $n->setItemCount($count); $n->setNavBar(new AjaxNavBar($count, $status)); $n->start = 0; $n->end = $maxperpage; $n->addActionItem(new ActionItem(_T("Edit Entity", "inventory"), "EditEntity", "edit", "id", "base", "computers")); $n->addActionItem(new ActionItem(_T("Edit Entity", "inventory"), "deleteEntity", "delete", "id", "base", "computers")); $n->disableFirstColumnActionLink(); $n->display();
$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; $l->end = $maxperpage; $l->setTableHeaderPadding(19); $l->display(); ?> <!-- inject styles --> <link rel="stylesheet" href="modules/imaging/graph/css/imaging.css" type="text/css" media="screen" />
/** * (c) 2004-2007 Linbox / Free&ALter Soft, http://linbox.com * (c) 2007-2008 Mandriva, http://www.mandriva.com/ * * $Id$ * * This file is part of Mandriva Management Console (MMC). * * MMC is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * MMC is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with MMC; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ function list_computers($names, $filter, $count = 0, $delete_computer = false, $remove_from_result = false, $is_group = false, $msc_can_download_file = false, $msc_vnc_show_icon = false) { /* $pull_list is an array with UUIDs of pull machines */ $pull_list = in_array("pulse2", $_SESSION["modulesList"]) ? get_pull_targets() : array(); $emptyAction = new EmptyActionItem(); $inventAction = new ActionItem(_("Inventory"), "invtabs", "inventory", "inventory", "base", "computers"); $glpiAction = new ActionItem(_("GLPI Inventory"), "glpitabs", "inventory", "inventory", "base", "computers"); $logAction = new ActionItem(_("Read log"), "msctabs", "logfile", "computer", "base", "computers", "tablogs"); $mscAction = new ActionItem(_("Software deployment"), "msctabs", "install", "computer", "base", "computers"); $imgAction = new ActionItem(_("Imaging management"), "imgtabs", "imaging", "computer", "base", "computers"); $downloadFileAction = new ActionItem(_("Download file"), "download_file", "download", "computer", "base", "computers"); $vncClientAction = new ActionPopupItem(_("Remote control"), "vnc_client", "vncclient", "computer", "base", "computers"); $profileAction = new ActionItem(_("Show Profile"), "computersgroupedit", "logfile", "computer", "base", "computers"); $actionInventory = array(); $actionLogs = array(); $actionMsc = array(); $actionImaging = array(); $actionDownload = array(); $actionVncClient = array(); $actionProfile = array(); $params = array(); $cssClasses = array(); $headers = getComputersListHeaders(); $columns = array(); foreach ($headers as $header) { $columns[$header[0]] = array(); } function getUUID($machine) { return $machine['objectUUID']; } $uuids = array_map("getUUID", $names); /*if (in_array("dyngroup", $_SESSION["modulesList"])) { $profiles = xmlrpc_getmachinesprofiles($uuids); $h_profiles = array(); $i = 0; foreach ($uuids as $uuid) { $h_profiles[$uuid] = $profiles[$i++]; } }*/ foreach ($names as $value) { $cssClasses[] = in_array($value['objectUUID'], $pull_list) ? 'machinePull' : 'machineName'; foreach ($headers as $header) { if (!empty($value[$header[0]])) { $v = $value[$header[0]]; } else { $v = ''; } $columns[$header[0]][] = $v; } if (isset($filter['gid'])) { $value['gid'] = $filter['gid']; } if (in_array("inventory", $_SESSION["supportModList"])) { $actionInventory[] = $inventAction; } else { $actionInventory[] = $glpiAction; } if (in_array("msc", $_SESSION["supportModList"])) { $actionMsc[] = $mscAction; $actionLogs[] = $logAction; } if (in_array("imaging", $_SESSION["supportModList"])) { $actionImaging[] = $imgAction; } /* if (in_array("dyngroup", $_SESSION["modulesList"])) { $profile = $h_profiles[$value['objectUUID']]; if ($profile) { $actionProfile[] = $profileAction; $value['id'] = $profile; } else { $actionProfile[] = $emptyAction; } } */ if ($msc_can_download_file) { $actionDownload[] = $downloadFileAction; } if ($msc_vnc_show_icon) { $actionVncClient[] = $vncClientAction; } $params[] = $value; } if (isset($filter['location'])) { $filter = $filter['hostname'] . '##' . $filter['location']; } else { $filter = $filter['hostname'] . '##'; } $n = null; if ($count) { foreach ($headers as $header) { if ($n == null) { if (in_array("glpi", $_SESSION["modulesList"])) { $n = new OptimizedListInfos($columns[$header[0]], _T($header[1], 'glpi')); } else { $n = new OptimizedListInfos($columns[$header[0]], _($header[1])); } } else { if (in_array("glpi", $_SESSION["modulesList"])) { $n->addExtraInfo($columns[$header[0]], _T($header[1], 'glpi')); } else { $n->addExtraInfo($columns[$header[0]], _($header[1])); } } } $n->setItemCount($count); $n->setNavBar(new AjaxNavBar($count, $filter)); $n->start = 0; $n->end = $count - 1; } else { foreach ($headers as $header) { if ($n == null) { $n = new ListInfos($columns[$header[0]], _($header[1])); } else { $n->addExtraInfo($columns[$header[0]], _($header[1])); } } $n->setNavBar(new AjaxNavBar(count($columns[$headers[0][0]]), $filter)); } $n->setName(_("Computers list")); $n->setParamInfo($params); //$n->setCssClass("machineName"); $n->setMainActionClasses($cssClasses); $n->addActionItemArray($actionInventory); if ($msc_can_download_file) { $n->addActionItemArray($actionDownload); } if (in_array("backuppc", $_SESSION["supportModList"])) { $n->addActionItem(new ActionItem(_("Backup status"), "hostStatus", "backuppc", "backuppc", "backuppc", "backuppc")); } if ($msc_vnc_show_icon) { $n->addActionItemArray($actionVncClient); } /*if (in_array("dyngroup", $_SESSION["modulesList"])) { $n->addActionItemArray($actionProfile); }*/ if (in_array("msc", $_SESSION["supportModList"])) { $n->addActionItemArray($actionLogs); $n->addActionItemArray($actionMsc); } if (in_array("imaging", $_SESSION["supportModList"])) { $n->addActionItemArray($actionImaging); } if ($delete_computer && canDelComputer()) { // set popup window to 400px width $n->addActionItem(new ActionPopupItem(_("Delete computer"), "delete", "delete", "computer", "base", "computers", null, 400)); } if ($remove_from_result) { $n->addActionItem(new ActionPopupItem(_("Remove machine from group"), "remove_machine", "remove_machine", "name", "base", "computers")); } $n->display(); }
// Create an array with the inventory dates $inventories = array(); // Create an array with the "new_machine" booleans $new_machines = array(); // Create an array with $params needed for cliquable first column $params = array(); foreach ($incoming as $inc) { $machines[] = $inc[0]; $inventories[] = _toDate($inc[1]); $new_machines[] = $inc[2]; $params[] = array('hostname' => $inc[0], 'uuid' => $inc[3]); } // Create the listinfos widget, the first column is the machine name $l = new OptimizedListInfos($machines, _T("Computer name")); // Add the second column, which is the inventory date $l->addExtraInfo($inventories, _T("Inventory date")); // Add the third column, which is the boolean "new_machine" $l->addExtraInfo($new_machines, _T("New computer")); // Add actions item, to make first column cliquable $l->addActionItem(new ActionItem(_T("View", "inventory"), "invtabs", "display", "inventory", "base", "computers")); $l->addActionItem(new ActionPopupItem(_T("Information", "inventory"), "infos", "info", "inventory", "inventory", "inventory")); $l->setParamInfo($params); // Navbar for an Ajax widget $l->setItemCount($count); $l->setNavBar(new AjaxNavBar($count, $filter)); // Item counter label $l->setName(_T("Elements")); $l->setTableHeaderPadding(0); $l->start = 0; $l->end = count($machines); $l->display();
for ($i = 0; $i < count($cols['total_targets']); $i++) { $cols['targets'][] = $cols['total_installed'][$i] . ' / ' . $cols['total_targets'][$i]; } // Printing selected updates form print '<form id="sel_updates_form">'; $n = new OptimizedListInfos($checkboxes, $check_all, '', '10px'); $n->first_elt_padding = '0'; $n->addExtraInfo($cols['title'], _T("Update title", "update")); $n->addExtraInfo($cols['uuid'], _T("UUID", "update")); $n->addExtraInfo($cols['type_str'], _T("Type", "update")); $n->addExtraInfo($cols['targets'], _T("Installed count", "update")); $n->addActionItem(new ActionPopupItem(_T("Enable", "update"), "enableUpdate", "enable", "id", "update", "update")); $n->addActionItem(new ActionPopupItem(_T("Disable", "update"), "disableUpdate", "disable", "id", "update", "update")); $n->setParamInfo($listinfoParams); $n->setItemCount($count); $n->setNavBar(new AjaxNavBar($count, $status, "updateSearchParam", $maxperpage)); $n->start = 0; $n->end = $maxperpage; $n->disableFirstColumnActionLink(); $n->display(); // End selected updates form print '</form>'; ?> <input id="btnEnableUpdates" type="button" value="<?php print _T('Enable selected updates', 'update'); ?> " class="btnPrimary"> <input id="btnDisableUpdates" type="button" value="<?php print _T('Disable selected updates', 'update'); ?> " class="btnPrimary">
* * MMC is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * MMC is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with MMC; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ print "<center><h1>" . _T('Appstream updates', 'update') . "</h1>"; require_once "includes/xmlrpc.inc.php"; require_once "modules/pkgs/includes/xmlrpc.php"; $notifications = getAppstreamNotifications(); $update_titles = array(); foreach ($notifications as $update) { $update_titles[] = $update['title']; } $n = new OptimizedListInfos($update_titles, _T("Appstream update", "pkgs")); $n->setItemCount(count($notifications)); $n->setNavBar(new AjaxNavBar(count($notifications), '')); $n->start = 0; $n->end = 50; //ob_start(); $n->display(); print '</center>';