Esempio n. 1
0
function fetchCategory($id)
{
    global $_DMUSER;
    $cat = new DOCMAN_Category($id);
    // if the user is not authorized to access this category, redirect
    if (!$_DMUSER->canAccessCategory($cat->getDBObject())) {
        _returnTo('', _DML_NOT_AUTHORIZED);
    }
    // process content mambots
    DOCMAN_Utils::processContentBots($cat, 'description');
    return HTML_DMCategories::displayCategory($cat->getLinkObject(), $cat->getPathObject(), $cat->getDataObject());
}
function fetchCategory($id)
{
    global $_DMUSER;
    $cat = new DOCMAN_Category($id);
    // if the user is not authorized to access this category, redirect
    if (!$_DMUSER->canAccessCategory($cat->getDBObject())) {
        return JError::raiseError(404, JText::_("Resource Not Found"));
    }
    // process content mambots
    DOCMAN_Utils::processContentBots($cat, 'description');
    return HTML_DMCategories::displayCategory($cat->getLinkObject(), $cat->getPathObject(), $cat->getDataObject());
}
Esempio n. 3
0
    function createFolders($rows, $cid)
    {
        if (!count($rows)) {
            return '';
        }
        $html = '';
        foreach ($rows as $row) {
            $cat = new DOCMAN_Category($row->id);
            $links = $cat->getLinkObject();
            $paths = $cat->getPathObject();
            $details = $cat->getDataObject();
            $cid = $details->id;
            $pid = $details->parent_id;
            $icon = $cat->getPath('icon', 1, '16x16');
            $url = DOCMAN_Utils::_rawLink('cat_view', $details->id);
            ?>
            <tr>
                <td><img src="<?php 
            echo $icon;
            ?>
" alt="<?php 
            echo $details->name;
            ?>
" /></td>
                <td><a href="<?php 
            echo JURI::root();
            ?>
index.php?option=com_docman&amp;task=doclink-listview&amp;catid=<?php 
            echo $cid;
            ?>
" onClick="onclickFolder(<?php 
            echo $pid;
            ?>
, <?php 
            echo $cid;
            ?>
, '<?php 
            echo $details->name;
            ?>
', '<?php 
            echo $url;
            ?>
', '<?php 
            echo $icon;
            ?>
');"><?php 
            echo $details->name;
            ?>
</a></td>
                <td><?php 
            echo _DML_FOLDER;
            ?>
</td>
                <td>&nbsp;</td>
            </tr>
            <?php 
        }
    }