Esempio n. 1
0
/**
* changes the access level of a record
*
* @param integer $ The increment to reorder by
*/
function accessCategory($uid, $access)
{
    DOCMAN_token::check() or die('Invalid Token');
    $database = JFactory::getDBO();
    $mainframe = JFactory::getApplication();
    $row = new mosDMCategory($database);
    $row->load($uid);
    $row->access = $access;
    if (!$row->check()) {
        return $row->getError();
    }
    if (!$row->store()) {
        return $row->getError();
    }
    $mainframe->redirect('index.php?option=com_docman&section=categories');
}
Esempio n. 2
0
function copyDocumentProcess($cid)
{
    DOCMAN_token::check() or die('Invalid Token');
    global $database, $my;
    // get the id of the category to copy the document to
    $categoryCopy = mosGetParam($_POST, 'catid', '');
    // preform move
    $doc = new mosDMDocument($database);
    $doc->copy($cid, $categoryCopy);
    // output status message
    $cids = implode(',', $cid);
    $total = count($cid);
    $cat = new mosDMCategory($database);
    $cat->load($categoryCopy);
    $msg = $total . ' ' . _DML_DOCUMENTS_COPIED_TO . ' ' . $cat->name;
    mosRedirect('index2.php?option=com_docman&section=documents', $msg);
}
Esempio n. 3
0
function copyDocumentProcess($cid)
{
    DOCMAN_token::check() or die('Invalid Token');
    $mainframe = JFactory::getApplication();
    $database = JFactory::getDBO();
    $my = JFactory::getUser();
    // get the id of the category to copy the document to
    $categoryCopy = JRequest::getInt('catid', '', 'post');
    // preform move
    $doc = new mosDMDocument($database);
    $doc->copy($cid, $categoryCopy);
    // output status message
    $cids = implode(',', $cid);
    $total = count($cid);
    $cat = new mosDMCategory($database);
    $cat->load($categoryCopy);
    $msg = $total . ' ' . _DML_DOCUMENTS_COPIED_TO . ' ' . $cat->name;
    $mainframe->redirect('index.php?option=com_docman&section=documents', $msg);
}
Esempio n. 4
0
/**
* changes the access level of a record
*
* @param integer $ The increment to reorder by
*/
function accessCategory($uid, $access)
{
    DOCMAN_token::check() or die('Invalid Token');
    global $database;
    $row = new mosDMCategory($database);
    $row->load($uid);
    $row->access = $access;
    if (!$row->check()) {
        return $row->getError();
    }
    if (!$row->store()) {
        return $row->getError();
    }
    mosRedirect('index2.php?option=com_docman&section=categories');
}