:)
GoonBBS 中的 www 部分使用新的框架: apache -> mod_bbs.so -> URL
并且, 每个页的采用新的标记, 类似于 php, 但实质是 C 语言,
这样, 只要会 C 就可以维护了 :) 详细请见代码.
附加页面 bbsuser.g 的代码如下:
<*
bbs_start();
*>
<table border=0 width=80%>
<thead>
<td class=doc3 width=8%>序号
<td class=doc3 width=8%>友
<td class=doc3 width=20%>使用者代号
<td class=doc3 width=20%>使用者昵称
<td class=doc3 width=12%>来自
<td class=doc3 width=12%>动态
<td class=doc3 width=12%>发呆
<*
char *id, idle[16];
struct user_info *x;
int i, n = 0;
for (i = 0; i < MAXACTIVE; i++) {
x = &(current->utmpshm->uinfo[i]);
if (x->active == 0)
continue;
if (x->invisible == 1 && !HAS_PERM(PERM_SEECLOAK))
continue;
if (!x->pid || (x->mode < WWW && kill(x->pid, 0)))
continue;
n++;
id = x->userid;
sprintf(idle, "%d", (int)((bbs_time_t)time(NULL) - x->idle_time) / 60);
*>
<tr>
<td> <* =n *>
<td> <* hisfriend(x) ? "√" : " " *>
<* x->invisible ? "<font color=green>C</font>" : " " *>
<td> <a href="bbsquery.g?id=<* id *>"><* id *></a>
<td> <* x->username *>
<td> <* x->from *>
<td> <* x->invisible ? "隐身中..." : modetype(x->mode) *>
<td> <* idle[0] == '0' ? "" : idle *>
<*
}
*>
</table>
<* bbs_end(); *>
【 在 baileifirst (毕业完成时|仙四) 的大作中提到: 】
: 赞,就是教育网连太慢了。。。。
--
FROM 210.21.48.*