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;
     }
 }
            $old_upload_dir = EJHSJournal::getUploadDir($updateID);
            ##OLD UPLOAD DIR
            EJHSJournal::recursiveCopy($old_upload_dir . '/', $new_upload_dir . '/');
            EJHSJournal::deleteFiles($old_upload_dir);
            ## DELETE OLD DIR WITH CONTENTS
            $upload_dir = $new_upload_dir;
        }
        ## RENAME and UPLOAD
        if ($fileIsUploaded) {
            $fullFileName = explode(".", $_FILES["cover"]["name"]);
            $ext = $fullFileName[1];
            $fileName = "Volume-" . $vol . "-Num-" . $num . "-cover-page" . "." . $ext;
            EJHSJournal::renameAndUpload($_FILES, $new_upload_dir, $fileName);
        }
        ## DEALL With Table Updates
        if (EJHSJournal::update($year_of_edition, $month, $vol, $num, $issn, $eissn, $new_upload_dir, $fileName, $updateID) && EJHSJournalArticle::updateArticleUploadDir($updateID, $new_upload_dir)) {
            $_SESSION['notice1'] = "Journal Update Was Successful.";
            header('location: journal_edit.php');
        } else {
            echo mysql_error() . "It Seems Like There Are Errors";
        }
    }
}
if (!isset($_GET['updateID'])) {
    $_SESSION['error'] = "Unable To Start Update: UpdateID Error.";
    header('location: journal_edit.php');
} else {
    $updateID = $_GET['updateID'];
    $result = EJHSJournal::queryOneById($updateID);
    $row = mysql_fetch_array($result, MYSQL_ASSOC);
    $year_of_edition = $row['year'];
示例#3
0
    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);
} else {
    ## redirect to Journal Edit
    $_SESSION['notice1'] = "Requested Journal Information Unavailable.";
    header('location: journal_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">
#customizeLink a{
示例#4
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">
示例#5
0
}
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;
    }
}
?>

<!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" />