Ejemplo n.º 1
0
        $setActivate = 'activated';
        $_SESSION['notice1'] = "Journal Activation Was Successful.";
    } else {
        $setActivate = '';
        $_SESSION['notice1'] = "Journal Deactivation Was Successful.";
    }
    $activateJournal = "UPDATE journal SET is_activated = '{$setActivate}' WHERE id='{$activate_id}'";
    mysql_query($activateJournal) or die('Error : ' . mysql_error());
    $msg = "Journal Activation was successful";
    // redirect to current page so when the user refresh this page
    // after deleting an article we won't go back to this code block
    header('Location: ' . $_SERVER['PHP_SELF'] . '?detailID=' . $_GET['activate_id']);
    exit;
}
if (isset($_GET['del'])) {
    if (EJHSJournalArticle::deleteById($_GET['del'])) {
        $_SESSION['notice1'] = 'File Deletion Was Successful.';
        header('location:journal_detail.php?detailID=' . $_GET['detailID']);
        exit;
    } else {
        $_SESSION['error'] = "File Deletion Was Not Sccuessful.";
        header('Location: ' . $_SERVER['PHP_SELF'] . '?detailID=' . $_GET['detailID'] . '&her2e=here');
        exit;
    }
}
if (isset($_GET['detailID']) && EJHSJournal::checkIfExistsById($_GET['detailID'])) {
    ## Get Journal By ID
    $detailID = $_GET['detailID'];
    $jResult = EJHSJournal::queryOneById($detailID);
    $jRow = mysql_fetch_array($jResult, MYSQL_ASSOC);
    $aResult = EJHSJournalArticle::getArticlesUnderJournal($detailID);