$settingInfo = get_Conference_Settings(); if (count($_POST) > 0) { $error_array = array(); $exempt_array = array("commentfile", "commentsadmin"); $vars = array_merge($_POST, $_FILES); check_form($vars, $error_array, &$exempt_array); if ($_POST["submitType"] == "file" && !$error_array["commentfile"]) { //Read the file contents and display $_POST["comments"] = addslashes(fread(fopen($_FILES["commentfile"]["tmp_name"], "r"), filesize($_FILES["commentfile"]["tmp_name"]))); } } // display ( $error_array ) ; if (count($error_array) == 0 && count($_POST) > 0) { if ($_POST["Submit"] == "Submit") { //Process the normal form submission here if ($returnResult = insert_review($_POST["paperid"], $_POST["appropriateness"], $_POST["originality"], $_POST["tech_strength"], $_POST["presentation"], $_POST["overall"], addslashes($_POST["comments"]), addslashes($_POST["commentsadmin"]), &$err_message)) { if (update_paper_status($_POST["paperid"], &$err_message)) { do_html_header("Review Accepted", &$err_message); echo $returnResult; do_html_footer(&$err_message); exit; } else { do_html_header("Show Review Form Failed", &$err_message); $err_message .= " Could not update paper status in Paper Table<br>\n"; $err_message .= "<br><br> Try <a href='review_form.php?paperid=" . $_POST["paperid"] . "'>again</a>?"; } } else { do_html_header("Show Review Form Failed", &$err_message); $err_message .= " Could not execute \"insert_review\" in \"review_form.php\". <br>\n"; $err_message .= "<br><br> Try <a href='review_form.php?paperid=" . $_POST["paperid"] . "'>again</a>?"; }
if (is_numeric($HTTP_VARS['sequence_number']) && ($HTTP_VARS['op'] == 'update' || $HTTP_VARS['op'] == 'delete' || $HTTP_VARS['op'] == 'edit')) { $review_r = fetch_review_r($HTTP_VARS['sequence_number']); // Copy reference only. $item_r = $review_r; } } if (is_not_empty_array($item_r)) { $titleMaskCfg = new TitleMask('item_display'); $item_r['title'] = $titleMaskCfg->expand_item_title($item_r); $page_title = get_opendb_lang_var('review_title', 'display_title', $item_r['title']); echo _theme_header($page_title); echo "<h2>" . $page_title . " " . get_item_image($item_r['s_item_type']) . "</h2>\n"; if ($HTTP_VARS['op'] == 'insert') { $HTTP_VARS['comment'] = filter_input_field('htmlarea(55,10)', $HTTP_VARS['comment']); if (validate_review_input($HTTP_VARS, $errors)) { if (insert_review($HTTP_VARS['item_id'], get_opendb_session_var('user_id'), $HTTP_VARS['comment'], $HTTP_VARS['rating'])) { echo "<p class=\"success\">" . get_opendb_lang_var('review_added') . "</p>"; } else { echo "<p class=\"error\">" . get_opendb_lang_var('review_not_added') . "</p>"; } } else { echo format_error_block($errors); echo get_edit_form('insert', array(), $HTTP_VARS); } } else { if ($HTTP_VARS['op'] == 'update') { if (get_opendb_config_var('item_review', 'update_support') !== FALSE) { if (is_review_author($review_r['sequence_number']) || is_user_granted_permission(PERM_ADMIN_REVIEWER)) { $HTTP_VARS['comment'] = filter_input_field('htmlarea(55,10)', $HTTP_VARS['comment']); if (validate_review_input($HTTP_VARS, $errors)) { if (update_review($HTTP_VARS['sequence_number'], $HTTP_VARS['comment'], $HTTP_VARS['rating'])) {