modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ $sql = "SELECT COUNT(id) AS whole FROM {$table} LIMIT 0,50"; $year = date("Y"); $query = mysql_db_query("{$db}", "{$sql}"); while ($row = mysql_fetch_array($query)) { $whole = $row[whole]; } $sql = "SELECT url, COUNT(ID) AS hits FROM {$table} WHERE cat = 'player' GROUP BY url ORDER BY hits DESC LIMIT 0,50"; $query = mysql_db_query("{$db}", "{$sql}"); echo "<table cellpadding='0' cellspacing='0'>"; while ($row = mysql_fetch_array($query)) { $url = $row[url]; $hits = $row[hits]; $stats = get_pt($hits, $whole); echo "<tr><td nowrap><a href='{$url}'>{$url}</a> </td><td>\n"; echo show_pt($stats, $hits); echo "</td></tr>\n"; } echo "</table>";
} if ($subjects != '') { d($vals_array); } $timer['start_main'] = microtime(true); /** * Main loop */ foreach ($vals_array as $subj_usubjid => $subj_val_array) { $seq = 1; $constants['USUBJID'] = $constants['STUDYID'] . '-' . $subj_usubjid; foreach ($subj_val_array AS $subj_array) { if ($subj_array['mhoccur'] != '') { $llt = $subj_array['mhmodify'] != '' ? $subj_array['mhmodify'] : get_llt($subj_array['mhterm']); $pt = get_pt($llt); $soc = get_bodsys($pt); $query[] = '(' . fix_null($constants['STUDYID']) . ',' . fix_null($constants['DOMAIN']) . ',' . fix_null($constants['USUBJID']) . ',' . fix_null($seq) . ',' . fix_null($subj_array['mhterm']) . ',' . fix_null($llt) . ',' . fix_null($pt) . ',' . fix_null($soc) . ',' . fix_null($subj_array['mhoccur']) . ',' . fix_null($subj_array['mhpresp']) . ',' . fix_null($subj_array['mhstdtc']) . ',' . fix_null($subj_array['mhstdtc']) . ')';