示例#1
0
}
head('browse');
?>
        <div id="main">
          <h2><?php 
print _("Browse");
?>
</h2>
          <p><?php 
print _("You may browse through the loci and retrieve all related information.");
?>
</p>
<?php 
$sql = sql_connect($config['db']);
$result = sql_query('SELECT a.prefix, a.id, a.name, a.functions, a.status, b.status FROM locus AS a, status AS b WHERE b.lang=\'' . get_pref('language') . '\' AND a.status=b.id' . (get_pref('limit') ? ' AND a.status>0 AND a.status<=' . get_pref('limit') : '') . ' ORDER BY a.name ASC;', $sql);
if (!strlen($r = sql_last_error($sql)) && sql_num_rows($result) > 0) {
    print "          <ul class=\"result locus\">\n";
    while ($row = sql_fetch_row($result)) {
        if (!empty($row[4])) {
            print '            <li><a href="' . $config['server'] . '/locus/L' . decoct($row[0]) . '.' . decoct($row[1]) . '" title="L' . decoct($row[0]) . '.' . decoct($row[1]) . '" class="locus"><span class="name">' . $row[2] . '</span><span class="date"><img src="' . $config['server'] . '/images/status_' . $row[4] . '.png" height="8" width="8" alt="' . $row[5] . '" /></span><span class="description">' . (strlen($row[3]) > 53 ? substr($row[3], 0, 50) . '...' : $row[3]) . "</span></a></li>\n";
        } else {
            print '            <li><span class="name">L' . decoct($row[0]) . '.' . decoct($row[1]) . '</span><span class="description"><em>' . _("Waiting for analyse, GeneID:") . ' ' . $row[2] . "</em></span></li>\n";
        }
    }
    print "          </ul>\n";
} else {
    print '          <p>' . _("no result.") . "</p>\n";
}
?>
        </div>
        <div id="side">
 function FetchResultArray($result, &$array, $row)
 {
     if (!sqlite_seek($result, $row) || !($array = sqlite_fetch_array($result))) {
         return $this->SetError("Fetch result array", sql_last_error($this->connection));
     }
     $this->highest_fetched_row[$result] = max($this->highest_fetched_row[$result], $row);
     return $this->ConvertResultRow($result, $array);
 }