Example #1
0
/*
	Main Code
*/
site_admin_header(array('title' => _('Site Admin: Trove - Category List')));
?>

<table width="100%" border="0">
	<tr>
		<td width="60%" valign="top">
		  <h3><?php 
echo _('Site Admin: Trove - Edit Category');
?>
</h3>

<form action="trove_cat_edit.php?trove_cat_id=<?php 
echo $category->getId();
?>
" method="post">
<input type="hidden" name="do" value="updateCategory" />

		  <p><?php 
echo _('New category short name (no spaces, Unix-like): ');
?>
<br /><input type="text" name="shortName" value="<?php 
echo $category->getShortName();
?>
" /></p>

		  <p><?php 
echo _('New category full name (80 characters max): ');
?>
Example #2
0
    // check and clean the array
    $filterArray = explode(',', $filter);
    $cleanArray = array();
    $count = max(6, sizeof($filterArray));
    for ($i = 0; $i < $count; $i++) {
        if (is_numeric($filterArray[$i]) && $filterArray[$i] != 0) {
            $cleanArray[] = (int) $filterArray[$i];
        }
    }
    $filterArray = array_unique($cleanArray);
    if (!empty($filterArray)) {
        $filterCategories = TroveCategoryFactory::getCategories($filterArray);
        echo '<p><span style="color:red;">' . _('Limiting View') . '</span>';
        for ($i = 0, $count = sizeof($filterCategories); $i < $count; $i++) {
            $filterCategory =& $filterCategories[$i];
            echo '<br /> &nbsp; &nbsp; &nbsp; ' . $filterCategory->getFullPath() . ' <a href="?form_cat=' . $category->getId() . getFilterUrl($filterArray, $filterCategory->getId()) . '">[' . _('Remove Filter') . ']' . '</a>';
        }
        echo '</p><hr />';
    }
    $category->setFilter($filterArray);
}
// We display the trove
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr valign="top">
		<td width="50%">
		<?php 
// here we print list of root level categories, and use open folder for current
$rootCategories = TroveCategoryFactory::getRootCategories();
echo _('Browse By') . ':';
for ($i = 0, $count = sizeof($rootCategories); $i < $count; $i++) {