Esempio n. 1
0
function removeDocument($cid)
{
    DOCMAN_token::check() or die('Invalid Token');
    $database = JFactory::getDBO();
    $mainframe = JFactory::getApplication();
    $doc = new mosDMDocument($database);
    if ($doc->remove($cid)) {
        $mainframe->redirect("index.php?option=com_docman&section=documents");
    } else {
        echo "<script> alert('Problem removing documents'); window.history.go(-1);</script>\n";
        exit;
    }
}
Esempio n. 2
0
function removeDocument($cid)
{
    DOCMAN_token::check() or die('Invalid Token');
    global $database;
    $doc = new mosDMDocument($database);
    if ($doc->remove($cid)) {
        mosRedirect("index2.php?option=com_docman&section=documents");
    } else {
        echo "<script> alert('Problem removing documents'); window.history.go(-1);</script>\n";
        exit;
    }
}