public static function getVolumeFormChoices()
 {
     $choices = array();
     $start = 1;
     $end = EJHSJournal::getLastVolumeNumber();
     for ($i = $start; $i <= $end + 10; $i++) {
         $choices[$i] = $i;
     }
     return $choices;
 }
Exemple #2
0
 public static function deleteFiles($target)
 {
     if (is_dir($target)) {
         $files = glob($target . '*', GLOB_MARK);
         //GLOB_MARK adds a slash to directories returned
         foreach ($files as $file) {
             EJHSJournal::deleteFiles($file);
         }
         @rmdir($target);
     } elseif (is_file($target)) {
         unlink($target);
     }
 }
        }
        ## 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'];
    $month = $row['month'];
    $vol = $row['volume'];
    $num = $row['num'];
    $issn = $row['issn'];
    $eissn = $row['eissn'];
    $cover = $row['coverpage_location'];
}
?>

<!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" />
Exemple #4
0
}
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);
} 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" />
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';
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;
    }
}
if (isset($_GET['detailID']) && EJHSJournalArticle::checkIfExists($_GET['detailID'])) {
    ## Get Journal By ID
    $detailID = $_GET['detailID'];
    $aResult = EJHSJournalArticle::queryOneById($detailID);
Exemple #6
0
            $upload_dir = $create_dir;
        }
        ## VALIDATE UPLOADED FILE FOR JPED
        if (!EJHSFormValidator::validateJPEG($_FILES)) {
            $errmsg .= "Error With Attached File: Please Make Sure It Is JPEG or GIF Image File Format. <br /> ";
        } else {
            if (EJHSFormValidator::checkIfFileExists($upload_dir, $_FILES)) {
                $errmsg .= "File Already Exists <br /> ";
            }
        }
        $fileName = $_FILES['cover']['name'];
        $date = date('d-m-Y');
        if ($errmsg == "") {
            $result = EJHSJournal::insert($year_of_edition, $month, $vol, $num, $issn, $eissn, $upload_dir, $fileName);
            if ($result) {
                EJHSJournal::upload($_FILES, $upload_dir);
                $_SESSION['notice1'] = "Journal Upload Was Successful ";
                header('location: journal_edit.php');
            } else {
                $errmsg .= "Journal Add Was Not Successful Due To Error On Database: " . mysql_error();
            }
        } else {
            $errmsg .= "Journal Add Was Not Successful ";
        }
    }
}
?>

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