Ignore:
Timestamp:
11/30/05 12:38:39 (7 years ago)
Author:
sam
Message:
  • utf8 charset
  • fix HTML for empty <ul>s
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trollforge/lastmeasure/stats/index.php

    r113 r114  
    2929    $id = dba_open('../db/uagent.db', 'c', 'db4'); 
    3030    if(!$id) { 
     31        echo '<li style="color:red;">Failed to open database!</li>'; 
    3132        return; 
    3233    } 
    3334    $key = dba_firstkey($id); 
     35    if($key == false) { 
     36        echo '<li style="color:red;">No hits found!</li>'; 
     37        return; 
     38    } 
    3439    while($key != false) { 
    3540        $val = dba_fetch($key, $id); 
     
    4348    $id = dba_open('../db/user.db', 'c', 'db4'); 
    4449    if(!$id) { 
     50        echo '<li style="color:red;">Failed to open database!</li>'; 
    4551        return; 
    4652    } 
    4753    $key = dba_firstkey($id); 
     54    if($key == false) { 
     55        echo '<li style="color:red;">No hits found!</li>'; 
     56        return; 
     57    } 
    4858    while($key != false) { 
    4959        $val = dba_fetch($key, $id); 
     
    5969<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> 
    6070<head> 
     71   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    6172   <title>LM stats</title> 
    6273   <link rel="icon" type="image/x-icon" href="/favicon.ico" /> 
Note: See TracChangeset for help on using the changeset viewer.