Example #1
0
    $dgf = new DocumentGroupFactory($g);
    if ($dgf->isError()) {
        exit_error('Error', $dgf->getErrorMessage());
    }
    $dgh = new DocumentGroupHTML($g);
    if ($dgh->isError()) {
        exit_error('Error', $dgh->getErrorMessage());
    }
    $nested_groups =& $dgf->getNested();
    if (count($nested_groups) > 0) {
        $title_arr = array();
        $title_arr[] = _('ID');
        $title_arr[] = _('Group Name');
        echo $GLOBALS['HTML']->listTableTop($title_arr);
        $row = 0;
        $dgh->showTableNestedGroups($nested_groups, $row);
        echo $GLOBALS['HTML']->listTableBottom();
    } else {
        echo "\n<h1>" . _('No Document Groups defined') . "</h1>";
    }
    ?>
	<p><strong><?php 
    echo _('Add a group');
    ?>
:</strong></p>
	<form name="addgroup" action="index.php?addgroup=1&amp;group_id=<?php 
    echo $group_id;
    ?>
" method="post">
	<table>
		<tr>