$far) { if (isset($far['showauthor']) && $far['showauthor']) { $displayFieldAR[] = $fid; } } // get review fields and reviewer comments $tempq = "SELECT `" . OCC_TABLE_PAPER . "`.`paperid`, `" . OCC_TABLE_PAPERREVIEWER . "`.* FROM `" . OCC_TABLE_PAPER . "`, `" . OCC_TABLE_PAPERREVIEWER . "` WHERE " . (!empty($accSQL) ? ($accSQL . " AND ") : '') . "`" . OCC_TABLE_PAPER . "`.`paperid`=`" . OCC_TABLE_PAPERREVIEWER . "`.`paperid`"; $tempr = ocsql_query($tempq) or err("Unable to get " . oc_strtolower(OCC_WORD_AUTHOR) . " comments"); while ($templ = ocsql_fetch_array($tempr)) { // init vars for paperid if (!isset($authorcomments[$templ['paperid']])) { $authorcomments[$templ['paperid']] = ""; } if (!isset($reviewfields[$templ['paperid']])) { $reviewfields[$templ['paperid']] = ""; } // set author comments if (!empty($templ['authorcomments'])) { $authorcomments[$templ['paperid']] .= $commentSeparator . "\n" . $templ['authorcomments'] . "\n"; } // set review fields $reviewInfo = ''; foreach ($displayFieldAR as $fid) { if (!empty($templ[$fid])) { $reviewInfo .= oc_strtoupper(oc_($OC_reviewQuestionsAR[$fid]['short'])) . ': ' . oc_getFieldValue($OC_reviewQuestionsAR, $templ, $fid) ."\n\n"; } } if (!empty($reviewInfo)) { $reviewfields[$templ['paperid']] .= $commentSeparator . "\n" . $reviewInfo . "\n"; } } // get advocate and comments $tempq = "SELECT `" . OCC_TABLE_PAPER . "`.`paperid`, `" . OCC_TABLE_REVIEWER . "`.`name_first`, `" . OCC_TABLE_REVIEWER . "`.`name_last`, `" . OCC_TABLE_REVIEWER . "`.`email`, `" . OCC_TABLE_PAPERADVOCATE . "`.`adv_comments` FROM `" . OCC_TABLE_PAPER . "`, `" . OCC_TABLE_PAPERADVOCATE . "`, `" . OCC_TABLE_REVIEWER . "` WHERE " . (!empty($accSQL) ? ($accSQL . " AND ") : '') . "`" . OCC_TABLE_PAPER . "`.`paperid`=`" . OCC_TABLE_PAPERADVOCATE . "`.`paperid` AND `" . OCC_TABLE_REVIEWER . "`.`reviewerid`=`" . OCC_TABLE_PAPERADVOCATE . "`.`advocateid`"; $tempr = ocsql_query($tempq) or err("Unable to get advocate comments"); while ($templ = ocsql_fetch_array($tempr)) { if ($OC_configAR['OC_paperAdvocates'] && !empty($templ['email'])) { $advocatename[$templ['paperid']] = $templ['name_first'] . ' ' . $templ['name_last']; $advocateemail[$templ['paperid']] = $templ['email']; } if (!empty($templ['adv_comments'])) { $advocatecomment[$templ['paperid']] = "\n" . $templ['adv_comments'] . "\n"; } } // get chair comments $tempq = "SELECT `paperid`, `pcnotes` FROM `" . OCC_TABLE_PAPER . "`" . (!empty($accSQL) ? ( " WHERE " . $accSQL) : ''); $tempr = ocsql_query($tempq) or err("Unable to get chair comments"); while ($templ = ocsql_fetch_array($tempr)) { if (!empty($templ['pcnotes'])) { $chairnotes[$templ['paperid']] = "\n" . $templ['pcnotes'] . "\n"; } } $specialIndexAR['authorcomments'] = 'paperid'; $specialIndexAR['reviewfields'] = 'paperid'; $specialIndexAR['advocatecomment'] = 'paperid'; $specialIndexAR['advocatename'] = 'paperid'; $specialIndexAR['advocateemail'] = 'paperid'; $specialIndexAR['chairnotes'] = 'paperid'; // Check for addt'l (hook) special variables if (oc_hookSet('chair-email-authors')) { foreach ($OC_hooksAR['chair-email-authors'] as $f) { require_once $f; } }