Monday, November 08, 2010 at 12:05 AM.
system.verbs.builtins.radio.macros.viewCloudData
on viewCloudData () { <<Changes <<12/30/03; 2:28:59 PM by JES <<If defined, add the serial number expiration date to the Weather Report page. <<3/2/02; 6:16:56 PM by JES <<When adding the message of the day, only add "UserLand Says: " if user.radio.prefs.defaultCloud.server is radio.xmlstoragesystem.com. <<3/2/02; 4:41:55 AM by JES <<Fixed a macro error which would occur if user.radio.prefs.cloudData.serialNumber is not defined. <<12/18/01; 7:41:22 PM by JES <<Added witdh=30% to the left column to prevent lines from splitting. Added valign=top to the <td> tags to vertically align the labels with their values. <<12/18/01; 7:31:05 PM by JES <<Added information from the server capabilities table at user.radio.prefs.upstream.servers: Space remaining, max file size, and accepted file types. <<11/22/01; 6:55:54 PM by DW <<Created. system.temp.radio.misc.lastPingTime = date (0); //force a ping radio.thread.agents.pingCloud (); local (htmltext = "\r", indentlevel = 0); on add (s) { htmltext = htmltext + string.filledstring ("\t", indentlevel) + s + "\r\n"}; on addrow (label, value) { add ("<tr><td width=\"30%\" valign=\"top\">" + label + ": </td><td valign=\"top\">" + value + "</td></tr>")}; on yesno (fl) { if fl { return ("Yes")} else { return ("No")}}; add ("<table cellspacing=\"0\" cellpadding=\"3\">"); indentlevel++; with user.radio.prefs.defaultCloudData { addrow ("Name", name); addrow ("Email", email); addrow ("Usernum", user.radio.prefs.usernum); addrow ("Member since", whenCreated); addrow ("IP address and port", ip + ":" + port); addrow ("Signed on", yesno (flSignedOn)); addrow ("Behind firewall", yesno (flbehindfirewall)); if not (defined (serialnumber)) or (serialnumber == "") { addrow ("Serial number", "Trial Version")} else { addrow ("Serial number", serialnumber)}; if defined (user.radio.settings.whenSNExpires) { //JES 12/30/03: add SN expiration date addrow ("Expiration date", date.longString (user.radio.settings.whenSNExpires))}; addrow ("Upstreams", ctUpstreams); addrow ("Space used", string.megabytestring (ctBytesInUse)); bundle { //add info from the server capabilities table, if available if defined (user.radio.prefs.upstream.servers) { local (adrserverinfo = @user.radio.prefs.upstream.servers.[user.radio.prefs.defaultCloud.server]); if defined (adrserverinfo^) { local (adrcapabilities = @adrserverinfo^.serverCapabilities); if defined (adrcapabilities^) { addrow ("Space remaining", string.megabytestring (adrcapabilities^.maxBytesPerUser)); addrow ("Maximum file size", string.megabytestring (adrcapabilities^.maxFileSize)); bundle { //add accepted file types local (typesstring = "", type); for type in adrcapabilities^.legalFileExtensions { typesstring = typesstring + type + ", "}; typesstring = string.mid (typesstring, 1, sizeOf (typesstring) - 2); addrow ("File types accepted", typesstring)}}}}}; addrow ("Pings", string.addcommas (ctAccesses)); addrow ("Last ping", whenLastAccess); addrow ("Last signoff", whenLastSignOff); if user.radio.prefs.defaultCloud.server == "radio.xmlstoragesystem.com" { addrow ("UserLand says", messageOfTheDay)} else { addrow ("Message of the day", messageOfTheDay)}}; add ("</table>"); indentlevel--; return (htmltext)}
This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.