コード例 #1
0
ファイル: rejects.php プロジェクト: watsonad/opendocman
    ?>
</table>
</form>

<?php 
    draw_footer();
} elseif (isset($_POST['submit']) && $_POST['submit'] == 'resubmit') {
    if (!isset($_REQUEST['checkbox'])) {
        header('Location:rejects.php?last_message=' . urlencode(msg('message_you_did_not_enter_value')));
        exit;
    }
    if (isset($_POST["checkbox"])) {
        foreach ($_POST['checkbox'] as $cbox) {
            $fileid = $cbox;
            $file_obj = new FileData($fileid, $pdo);
            $file_obj->Publishable(0);
        }
    }
    header('Location:rejects.php?mode=' . urlencode(@$_REQUEST['mode']) . '&last_message=' . urlencode(msg('message_file_authorized')));
} elseif ($_POST['submit'] == 'delete') {
    if (!isset($_REQUEST['checkbox'])) {
        header('Location: rejects.php?last_message=' . urlencode(msg('message_you_did_not_enter_value')));
        exit;
    }
    $url = 'delete.php?mode=tmpdel&';
    $id = 0;
    if (isset($_POST["checkbox"])) {
        $loop = 0;
        foreach ($_POST['checkbox'] as $num => $cbox) {
            $fileid = $cbox;
            $url .= 'id' . $num . '=' . $fileid . '&';
コード例 #2
0
ファイル: check_exp.php プロジェクト: scdogan/opendocman
    $mail_subject = msg('email_subject_review_status');
    $mail_greeting = msg('email_greeting') . ":\n\r\t" . msg('email_i_would_like_to_inform');
    $mail_body = msg('email_was_declined_for_publishing_at') . ' ' . $time . ' on ' . $date . ' ' . msg('email_because_you_did_not_revise') . ' ' . $GLOBALS['CONFIG']['revision_expiration'] . ' ' . msg('days');
    $mail_salute = "\n\r\n\r" . msg('email_salute') . ",\n\r{$full_name}";
    foreach ($data_result as $row) {
        $file_obj = new FileData($row['id'], $pdo);
        $user_obj = new User($file_obj->getOwner(), $pdo);
        $mail_to = $user_obj->getEmailAddress();
        if ($GLOBALS['CONFIG']['demo'] == 'False') {
            mail($mail_to, $mail_subject . $file_obj->getName(), $mail_greeting . $file_obj->getName() . ' ' . $mail_body . $mail_salute, $mail_headers);
        }
    }
}
//do not show file
if ($GLOBALS['CONFIG']['file_expired_action'] == 1) {
    $reviewer_comments = 'To=' . msg('author') . ';Subject=' . msg('message_file_expired') . ';Comments=' . msg('email_file_was_rejected_because') . ' ' . $GLOBALS['CONFIG']['revision_expiration'] . ' ' . msg('days');
    foreach ($data_result as $row) {
        $file_obj = new FileData($row['id'], $pdo);
        $file_obj->Publishable(-1);
        $file_obj->setReviewerComments($reviewer_comments);
    }
}
//lock file, not check-outable
if ($GLOBALS['CONFIG']['file_expired_action'] == 2) {
    foreach ($data_result as $row) {
        $file_obj = new FileData($row['id'], $pdo);
        $file_obj->setStatus(-1);
    }
}
echo msg('message_all_actions_successfull');
draw_footer();