homepages.c

lima-1.0b5/lib/WWW/cgi/homepages.c · 489 B

From the archive lima-1.0b5+driver.tar.gz

Download the archive   « Back to the archive contents

/* Do not remove the headers from this file! see /USAGE for more info. */

#include <http_d.h>

string main() {
    string *wizards;
    string ret;
    ret = "<title>Wizard's Home Pages</title><center><h2>Wizards</h2></center>";
    wizards = get_dir(WIZ_DIR+"/");
    foreach(string wizard in wizards) {
        if(file_size(WIZ_DIR+"/"+wizard+HTTP_USER_HOME) == -2) {
            ret+=sprintf("<li><a href=/~%s> %s </a></li>", wizard, wizard);
        }
    }
    return ret+"</ul>";
}

Site Stats

Snippets: 1791
Codebases: 571