$acc) { $accOptions .= ''; } print '

'; $q = "SELECT `country`, COUNT(*) AS `num` FROM `" . OCC_TABLE_AUTHOR . "`, `" . OCC_TABLE_PAPER . "` WHERE `" . OCC_TABLE_AUTHOR . "`.`paperid`=`" . OCC_TABLE_PAPER . "`.`paperid` AND `" . OCC_TABLE_AUTHOR . "`.`position`=`" . OCC_TABLE_PAPER . "`.`contactid` $accSQL GROUP BY `country` ORDER BY `num` DESC"; $r = ocsql_query($q) or err("Unable to get information"); if (ocsql_num_rows($r) == 0) { print 'No submissions available

'; } else { print '

Note: Only the country of the contact ' . oc_strtolower(OCC_WORD_AUTHOR) . ' is used for reporting

'; if (isset($_REQUEST['s']) && ($_REQUEST['s'] == "num")) { print ''; $resAR = array(); $nocountry = 0; while ($l = ocsql_fetch_array($r)) { if (empty($l['country']) || !isset($OC_countryAR[$l['country']])) { $nocountry += $l['num']; } else { if (!isset($resAR[$l['num']])) { $resAR[$l['num']] = array(); } $resAR[$l['num']][] = $OC_countryAR[$l['country']]; } } $row = 1; foreach ($resAR as $num => $countries) { sort($countries, SORT_LOCALE_STRING); print '\n"; if ($row==1) { $row=2; } else { $row=1; } } if ($nocountry > 0) { print '\n"; } } else { print ''; $resAR = array(); $nocountry = 0; while ($l = ocsql_fetch_array($r)) { if (!empty($l['country']) && isset($OC_countryAR[$l['country']])) { $resAR[$OC_countryAR[$l['country']]] = $l['num']; } else { $nocountry = $l['num']; } } ksort($resAR, SORT_LOCALE_STRING); $row = 1; foreach ($resAR as $country => $num) { print '\n"; if ($row==1) { $row=2; } else { $row=1; } } if ($nocountry > 0) { print '\n"; } } print "
CountryCount
' . $OC_sortImg . '
' . implode('
', $countries) . '
' . $num . "
unknown' . $nocountry . "
Country
' . $OC_sortImg . '
Count
' . $country . '' . $num . "
unknown' . $nocountry . "
\n"; } printFooter(); ?>