Skip to content
Snippets Groups Projects
Select Git revision
  • dailybuild_linux-x64
  • dailybuild_win32
  • master default protected
  • sqlite
  • rip_abstraction
  • dailybuild_macos-armv8
  • dd_file_lister_filanem_in_desc_color
  • mode7
  • dd_msg_reader_are_you_there_warning_improvement
  • c23-playing
  • syncterm-1.3
  • syncterm-1.2
  • test-build
  • hide_remote_connection_with_telgate
  • 638-can-t-control-c-during-a-file-search
  • add_body_to_pager_email
  • mingw32-build
  • cryptlib-3.4.7
  • ree/mastermind
  • new_user_dat
  • sbbs320d
  • syncterm-1.6
  • syncterm-1.5
  • syncterm-1.4
  • sbbs320b
  • syncterm-1.3
  • syncterm-1.2
  • syncterm-1.2rc6
  • syncterm-1.2rc5
  • push
  • syncterm-1.2rc4
  • syncterm-1.2rc2
  • syncterm-1.2rc1
  • sbbs319b
  • sbbs318b
  • goodbuild_linux-x64_Sep-01-2020
  • goodbuild_win32_Sep-01-2020
  • goodbuild_linux-x64_Aug-31-2020
  • goodbuild_win32_Aug-31-2020
  • goodbuild_win32_Aug-30-2020
40 results

html_who.js

Blame
  • html_who.js 2.17 KiB
    // html_nodelist.js
    
    load("nodedefs.js");
    
    var include_age_gender=false;
    var include_location=false;
    var include_statistics=false;
    
    function xtrn_name(code)
    {
    	if(this.xtrn_area==undefined)
    		return(code);
    
    	for(s in xtrn_area.sec_list)
    		for(p in xtrn_area.sec_list[s].prog_list)
    			if(xtrn_area.sec_list[s].prog_list[p].code.toLowerCase()==code.toLowerCase())
    				return(xtrn_area.sec_list[s].prog_list[p].name);
    	return(code);
    }
    
    writeln("<font face=Arial,Helvetica,sans-serif>");
    
    font_color = "<font color=black>";
    
    // Table
    writeln("<table border=0 width=100%>");
    
    // Header
    writeln("<thead>");
    writeln("<tr bgcolor=white>");
    
    write("<th align=center width=7%>" + font_color + "Node");
    write("<th align=center width=20%>" + font_color + "User");
    write("<th align=left>" + font_color + "Action/Status");
    if(include_location) 
    	write("<th align=left>" +font_color+ "Location");
    if(include_age_gender) {
    	write("<th align=center width=7%>" + font_color + "Age");
    	write("<th align=center width=10%>" + font_color + "Gender\r\n");
    }
    write("<th align=center width=10%>" + font_color + "Time\r\n");
    writeln("</thead>");
    
    writeln("<tbody>");
    var u = new User(0);
    for(n=0;n<system.node_list.length;n++) {
    	if(system.node_list[n].status==NODE_INUSE) {
    		write("<tr>");
    		write(format("<td align=right><font size=-1>%d",n+1));
    		u.number=system.node_list[n].useron;
    		if(system.node_list[n].action==NODE_XTRN && system.node_list[n].aux)
    			action=format("running %s",xtrn_name(u.curxtrn));
    		else
    			action=format(NodeAction[system.node_list[n].action]
    				,system.node_list[n].aux);
    		write(format(
    			"<td align=center><a href=mailto:%s>%s</a>"
    			,u.email
    			,u.alias
    			));
    		write(format(
    			"<td><font color=yellow>%s"
    			,action
    			));
    		if(include_location)
    			write(format(
    				"<td align=left>%s"
    				,u.location
    				));
    		if(include_age_gender) 
    			write(format(
    				"<td align=center>%d<td align=center>%s"
    				,u.age
    				,u.gender
    				));
    		t=time()-u.logontime;
            if(t&0x80000000) t=0;
    		write(format(
    			"<td align=center>%u:%02u:%02u"
    			,Math.floor(t/(60*60))
    			,Math.floor(t/60)%60
    			,t%60
    			));
    		write("\r\n");
    	}
    }
    writeln("</tbody>");
    writeln("</table>");
    writeln("</font>");
    writeln("</font>");