Ejemplo n.º 1
0
 public static function deleteById($ID = NULL)
 {
     $result = EJHSJournalArticle::queryOneById($ID);
     $row = mysql_fetch_array($result, MYSQL_ASSOC);
     EJHSJournalArticle::deleteUpload($row['upload_location'], $row['upload_name']);
     if (EJHSJournalArticle::checkIfUploadExists($row['upload_location'], $row['upload_name'])) {
         EJHSJournalArticle::deleteUpload($row['upload_location'], $row['upload_name']);
     }
     $query = "DELETE FROM journal_article WHERE id = '{$ID}'";
     $result = mysql_query($query) or die('Error : ' . mysql_error());
     if ($result) {
         return TRUE;
     } else {
         return FALSE;
     }
 }
Ejemplo n.º 2
0
    if (EJHSJournalArticle::deleteById($_GET['del'])) {
        $_SESSION['notice'] = 'File Deletion Was Successful.';
        header('location:journal_article_list.php?artID=' . $jRow['id'] . '&vol=' . $jRow['volume'] . '&num=' . $jRow['num'] . '&year=' . $jRow['year'] . '');
        exit;
    } else {
        $_SESSION['error'] = "File Deletion Was Not Sccuessful.";
        header('Location: ' . $_SERVER['PHP_SELF'] . '?detailID=' . $_GET['detailID'] . '&her2e=here');
        exit;
    }
}
if (isset($_GET['detailID']) && EJHSJournalArticle::checkIfExists($_GET['detailID'])) {
    ## Get Journal By ID
    $detailID = $_GET['detailID'];
    $aResult = EJHSJournalArticle::queryOneById($detailID);
    $aRow = mysql_fetch_array($aResult, MYSQL_ASSOC);
    $jResult = EJHSJournalArticle::queryOneById($aRow['journal_id']);
    $jRow = mysql_fetch_array($jResult, MYSQL_ASSOC);
} else {
    ## redirect to Journal Edit
    $_SESSION['notice1'] = "Requested Journal Article Information Unavailable.";
    header('location: journal_article_edit.php');
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>E J H S | About Ethiopian Journal of Health Sciences</title>
<link href="admin-style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
Ejemplo n.º 3
0
session_start();
if (!$_SESSION['user_is_logged_in']) {
    header("location:login.php");
}
if ($_SESSION['privilege'] != "reviewer") {
    header("location:login.php");
}
include 'library/config.php';
include 'library/opendb.php';
include 'EJHSJournal.class.php';
include 'EJHSJournalForm.class.php';
include 'EJHSJournalArticle.class.php';
include 'EJHSJournalArticleCategory.class.php';
if (isset($_GET['del'])) {
    $aResult = EJHSJournalArticle::queryOneById($_GET['del']);
    $aRow = mysql_fetch_array($aResult, MYSQL_ASSOC);
    $jResult = EJHSJournal::queryOneById($aRow['journal_id']);
    $jRow = mysql_fetch_array($jResult, MYSQL_ASSOC);
    if (EJHSJournalArticle::deleteById($_GET['del'])) {
        $_SESSION['notice'] = 'File Deletion Was Successful.';
        header('location:journal_article_list.php?artID=' . $jRow['id'] . '&vol=' . $jRow['volume'] . '&num=' . $jRow['num'] . '&year=' . $jRow['year'] . '');
        exit;
    } else {
        $_SESSION['error'] = "File Deletion Was Not Sccuessful.";
        header('Location: ' . $_SERVER['PHP_SELF'] . '?detailID=' . $_GET['detailID'] . '&her2e=here');
        exit;
    }
}
?>