' . $OC_sortImg;
$tsort = 'Topic (ID)';
$sortfld = 'paperid';
} else {
$sort = '`topicid`, `paperid`';
$psort = 'Submission ID. Title';
$tsort = 'Topic (ID)
' . $OC_sortImg;
$sortfld = 'topicid';
}
printHeader("Submission Topics", 1);
$accOptions = '';
foreach ($OC_acceptanceValuesAR as $idx => $acc) {
$accOptions .= '';
}
print '
Show Count Only
';
$q = "SELECT `" . OCC_TABLE_PAPER . "`.`paperid`, `" . OCC_TABLE_TOPIC . "`.`topicid`, `" . OCC_TABLE_PAPER . "`.`title`, `" . OCC_TABLE_TOPIC . "`.`topicname`, `" . OCC_TABLE_TOPIC . "`.`short` FROM `" . OCC_TABLE_PAPER . "`, `" . OCC_TABLE_TOPIC . "`, `" . OCC_TABLE_PAPERTOPIC . "` WHERE `" . OCC_TABLE_PAPERTOPIC . "`.`paperid`=`" . OCC_TABLE_PAPER . "`.`paperid` AND `" . OCC_TABLE_PAPERTOPIC . "`.`topicid`=`" . OCC_TABLE_TOPIC . "`.`topicid` $accSQL ORDER BY $sort";
$r = ocsql_query($q) or err("Unable to get information ".ocsql_errno());
if (ocsql_num_rows($r) == 0) {
print 'No submissions available';
} else {
print '
';
$currid = null;
$row = 1;
if (isset($_REQUEST['s']) && ($_REQUEST['s'] == 'paperid')) {
while ($l = ocsql_fetch_array($r)) {
if ($l['paperid'] == $currid) {
print '' . safeHTMLstr(useTopic($l['short'], $l['topicname']) . ' (' . $l['topicid'] . ')') . ' | |
';
} else {
$row = $rowAR[$row];
print '' . safeHTMLstr(useTopic($l['short'], $l['topicname']) . ' (' . $l['topicid'] . ')') . ' | ' . $l['paperid'] . '. ' . safeHTMLstr($l['title']) . ' |
';
}
$currid = $l['paperid'];
}
} else {
while ($l = ocsql_fetch_array($r)) {
if ($l['topicid'] == $currid) {
print ' | ' . $l['paperid'] . '. ' . safeHTMLstr($l['title']) . ' |
';
} else {
$row = $rowAR[$row];
print '' . safeHTMLstr(useTopic($l['short'], $l['topicname']) . ' (' . $l['topicid'] . ')') . ' | ' . $l['paperid'] . '. ' . safeHTMLstr($l['title']) . ' |
';
}
$currid = $l['topicid'];
}
}
print '
';
}
printFooter();
?>