$tval) { if (preg_match("/^name-(\d+)$/", $tid, $tmatch) && !empty($tval)) { $q2 = "INSERT INTO `" . OCC_TABLE_TOPIC . "` (`topicid`, `topicname`, `short`) VALUES ('" . safeSQLstr($j) . "','" . safeSQLstr(substr($tval,0,250)) . "','" . safeSQLstr(substr($_POST["short-".$tmatch[1]],0,20)) . "')"; issueSQL($q2); $j++; } } // Success - if install, redirect, else let user know if (isset($_REQUEST['install']) && ($_REQUEST['install'] == 1)) { header("Location: set_status.php?install=1"); exit; } else { print '
Options successfully updated
'; } } $displayWarning = false; if (isset($_REQUEST['install']) && ($_REQUEST['install'] == 1)) { printHeader($hdr,$hdrfn); print 'Step 4 of 5: Set Topics
'; } else { $countsr = ocsql_query("SELECT COUNT(*) AS `count` FROM `" . OCC_TABLE_PAPER . "`") or err('Unable to check for existing submissions'); $countsl = ocsql_fetch_assoc($countsr); $countcr = ocsql_query("SELECT COUNT(*) AS `count` FROM `" . OCC_TABLE_REVIEWER . "`") or err('Unable to check for existing committee member'); $countcl = ocsql_fetch_assoc($countcr); if (($countsl['count'] > 0) || ($countcl['count'] > 0)) { $displayWarning = true; } } print ' '; printFooter(); ?>