#include "ctdl3264_structs.h"
// Open a database environment
-DB_ENV *open_dbenv(char *src_dir) {
+DB_ENV *open_dbenv(char *dirname) {
DB_ENV *dbenv = NULL;
}
flags = DB_CREATE | DB_INIT_MPOOL | DB_PRIVATE | DB_INIT_LOG;
- printf("db: dbenv open(dir=%s, flags=%d)\n", src_dir, flags);
- ret = dbenv->open(dbenv, src_dir, flags, 0);
+ printf("db: dbenv open(dir=%s, flags=%d)\n", dirname, flags);
+ ret = dbenv->open(dbenv, dirname, flags, 0);
if (ret) {
printf("db: dbenv->open: %s\n", db_strerror(ret));
dbenv->close(dbenv, 0);
// open the file containing the source table
snprintf(dbfilename, sizeof dbfilename, "cdb.%02x", which_cdb);
- printf("\033[33m\033[1mdb: opening %s\033[0m\n", dbfilename);
+ printf("\033[33m\033[1mdb: opening source %s\033[0m\n", dbfilename);
ret = src_dbp->open(src_dbp, NULL, dbfilename, NULL, DB_BTREE, 0, 0600);
if (ret) {
printf("db: db_open: %s\n", db_strerror(ret));
// open the file containing the destination table
snprintf(dbfilename, sizeof dbfilename, "cdb.%02x", which_cdb);
- printf("\033[33m\033[1mdb: opening %s\033[0m\n", dbfilename);
+ printf("\033[33m\033[1mdb: opening destination %s\033[0m\n", dbfilename);
ret = dst_dbp->open(dst_dbp, NULL, dbfilename, NULL, DB_BTREE, (DB_CREATE | DB_TRUNCATE), 0600);
if (ret) {
printf("db: db_open: %s\n", db_strerror(ret));
// write the converted record to the target database
if (out_key.size > 0) {
-
// If we compressed the output, write recomp_data instead of out_data
if (compressed) {
printf("DB: %02x , out_keylen: %-3d , out_datalen: %-10d , dataptr: %012lx \033[31m(compressed)\033[0m\n", which_cdb, (int)out_key.size, (int)recomp_data.size, (long unsigned int)recomp_data.data);
ret = dst_dbp->put(dst_dbp, NULL, &out_key, &out_data, 0);
}
-
if (ret) {
printf("db: cdb_put(%d): %s", which_cdb, db_strerror(ret));
exit(CTDLEXIT_DB);
/*
* Instead of an ugly 404, send a 1x1 transparent GIF
- * when there's no such image on the server.
+ * when there's no such image on the server display blank
*/
- StrBufPrintf (Buf, "%s%s", static_dirs[0], "/webcit_icons/blank.gif");
- output_static(ChrPtr(Buf));
+ output_static(NULL);
FreeStrBuf(&Buf);
}
int len;
const char *Err;
char what[SIZ];
- snprintf(what, sizeof what, "./%s/%s", prefix, (char *)ChrPtr(WC->Hdr->HR.ReqLine));
+ if (prefix==NULL) {
+ // Force blank.gif Overrides the request line.
+ strcpy(what,"./static/webcit_icons/blank.gif");
+ } else {
+ snprintf(what, sizeof what, "./%s/%s", prefix, (char *)ChrPtr(WC->Hdr->HR.ReqLine));
+ }
syslog(LOG_DEBUG, "output_static(%s)", what);
len = strlen (what);
</div>
<div id="content" class="service">
<table>
-<tr valign=top><td width=50% valign="top">
+<tr valign="top"><td width="50%" valign="top">
<??("COND:AIDE", 3)><?DOBOXED("aide_global_config", _("Global Configuration"))><??("X", 3)>
-</td><td width=50% valign="top">
+</td><td width="50%" valign="top">
<??("COND:AIDE", 4)><?DOBOXED("aide_usermanagement", _("User account management"))><??("X", 4)>
-</td></tr><tr><td width=50% valign="top">
+</td></tr><tr><td width="50%" valign="top">
<??("COND:AIDE", 5)><?DOBOXED("aide_restart", _("Shutdown Citadel"))><??("X", 5)>
-</td><td width=50% valign="top">
+</td><td width="50%" valign="top">
<?DOBOXED("aide_floorconfig", _("Rooms and Floors"))>
</td></tr></table>
+</div>
<?=("trailing")>
<ul class="adminitems">
<li><a href="do_template?template=aide_display_sitewide_config"><?_("Edit site-wide configuration")></a></li>
<li><a href="do_template?template=aide_display_inetconf"><?_("Domain names and Internet mail configuration")></a></li>
-<li><a href="dotskip?room=__CitadelSMTPspoolout__&view=11"><?_("View the outbound SMTP queue")></a></li>
+<li><a href="dotskip?room=__CitadelSMTPspoolout__&view=11"><?_("View the outbound SMTP queue")></a></li>
<li><a href="do_template?template=aide_display_aliases"><?_("Global email aliases")></a></li>
</ul>
</td></tr>
</table>
</div>
-
-</div>
-
<?=("trailing")>
<?_("Delete")><br>
<?_("Print")><br>
</div>
-</div>
-</div>
+</div><!-- end message_listview -->
<div id="room_banner_override">
<table border=0><tr>
-<td><img src="static/webcit_icons/essen/32x32/summary.png"></td>
+<td><img alt="" src="static/webcit_icons/essen/32x32/summary.png"></td>
<td><h1><?_("Summary page for ")>
<??("COND:LOGGEDIN", 1)><?CURRENT_USER("X")><??("X", 1)>
<?!("COND:LOGGEDIN", 2)><?SERV:HUMANNODE("X")><??("X", 2)>
* instead of the whole thing.
")>
<div class="service">
- <table width="98%" cellspacing="3" cellpadding="0">
- <tr valign=top>
- <td width="33%">
+ <table width="98%" cellspacing="3" cellpadding="0">
+ <tr valign=top>
+ <td width="33%">
<div class="box">
- <div class="boxlabel">
- <?_("Messages")>
- </div><div class="boxcontent">
- <div id="msg_inner">
- <img src="static/webcit_icons/throbber.gif">
+ <div class="boxlabel">
+ <?_("Messages")>
+ </div><div class="boxcontent">
+ <div id="msg_inner">
+ <img alt="" src="static/webcit_icons/throbber.gif">
</div></div></div>
- </td>
- <td width="33%">
+ </td>
+ <td width="33%">
<div class="box">
- <div class="boxlabel">
- <?_("Tasks")>
- </div><div class="boxcontent">
- <div id="tasks_inner">
- <img src="static/webcit_icons/throbber.gif">
+ <div class="boxlabel">
+ <?_("Tasks")>
+ </div><div class="boxcontent">
+ <div id="tasks_inner">
+ <img alt="" src="static/webcit_icons/throbber.gif">
</div></div></div>
- </td>
- <td width="33%">
+ </td>
+ <td width="33%">
<div class="box">
- <div class="boxlabel">
- <?_("Today on your calendar")>
- </div><div class="boxcontent">
- <div id="calendar_inner">
- <img src="static/webcit_icons/throbber.gif">
+ <div class="boxlabel">
+ <?_("Today on your calendar")>
+ </div><div class="boxcontent">
+ <div id="calendar_inner">
+ <img alt="" src="static/webcit_icons/throbber.gif">
</div></div></div>
- </td>
-
- </tr><tr valign=top>
+ </td>
+
+ </tr><tr valign=top>
- <td colspan=2>
+ <td colspan=2>
<div class="box">
- <div class="boxlabel">
- <?_("Who‘s online now")>
- </div><div class="boxcontent">
- <div id="who_inner">
- <img src="static/webcit_icons/throbber.gif">
- </div></div></div>
- </td>
- <td width="33%">
+ <div class="boxlabel">
+ <?_("Who‘s online now")>
+ </div><div class="boxcontent">
+ <div id="who_inner">
+ <img alt="" src="static/webcit_icons/throbber.gif">
+ </div></div></div>
+ </td>
+ <td width="33%">
<div class="box">
- <div class="boxlabel">
- <?_("About this server")>
- </div><div class="boxcontent">
- <div id="info_inner">
- <?_("You are connected to")> <?SERV:HUMANNODE>,
- <?_("running")> <?SERV:SOFTWARE>
- <?_("with")> <?PACKAGESTRING>,
- <?_("server build")> <?SERV:REV_LEVEL>
- <?_("and located in")> <?SERV:BBS_CITY>.
- <?_("Your system administrator is")> <?SERV:ADMIN>
+ <div class="boxlabel">
+ <?_("About this server")>
+ </div><div class="boxcontent">
+ <div id="info_inner">
+ <?_("You are connected to")> <?SERV:HUMANNODE><br>
+ <?_("Running:")> <?SERV:SOFTWARE> <?_("with")> <?PACKAGESTRING><br>
+ <?_("Server Build:")> <?SERV:REV_LEVEL><br>
+ <?_("Location:")> <?SERV:BBS_CITY><br>
+ <?_("System Administrator:")> <?SERV:ADMIN>
</div></div></div>
- </td>
- </tr></table>
-
-</div>
+ </td>
+ </tr></table>
</div>
<script type="text/javascript">
- new Ajax.PeriodicalUpdater('msg_inner', 'new_messages_html', { method: 'get', frequency: 60 } );
- new Ajax.PeriodicalUpdater('tasks_inner', 'tasks_inner_html', { method: 'get', frequency: 120 } );
- new Ajax.PeriodicalUpdater('calendar_inner', 'calendar_inner_html', { method: 'get', frequency: 90 } );
- new Ajax.PeriodicalUpdater('who_inner', 'do_template?template=who_summary', { method: 'get', frequency: 30 } );
+ new Ajax.PeriodicalUpdater('msg_inner', 'new_messages_html', { method: 'get', frequency: 60 } );
+ new Ajax.PeriodicalUpdater('tasks_inner', 'tasks_inner_html', { method: 'get', frequency: 120 } );
+ new Ajax.PeriodicalUpdater('calendar_inner', 'calendar_inner_html', { method: 'get', frequency: 90 } );
+ new Ajax.PeriodicalUpdater('who_inner', 'do_template?template=who_summary', { method: 'get', frequency: 30 } );
</script>
<!-- start trailing.html -->
+</div> <!-- end of 'global' div -->
<div id="important_message"
<??("COND:IMPMSG", 1)>
style="visibility: hidden;"
<?_("Edit Room info")>
<?=("box_begin_2")>
-<?_("Enter your bio below."> <?_("The text is formatted to the reader's browser. A newline is forced by preceding the next line by a blank.")>
+<?_("Enter your bio below.")> <?_("The text is formatted to the reader's browser. A newline is forced by preceding the next line by a blank.")>
<form method="post" action="editbio">
<input type="hidden" name="nonce" value="<?NONCE()>">
<textarea name="msgtext" wrap=soft rows=10 cols=80 width=80><?USER:BIO("", "X")></textarea>
<?=("head")>
<div id="banner">
- <img src="static/webcit_icons/essen/32x32/account.png" alt="">
- <h1><?_("User profile")></h1>
- <div id="navbar">
- <ul><li><a href="display_page?recp=<?BSTR("who", "U")>">
- <img src="static/webcit_icons/essen/16x16/chat.png" alt="">
- <span class="navbar_link">
- <?_("Click here to send an instant message to")> <?BSTR("who", "X")> </span></li></a>
- </div>
+ <img src="static/webcit_icons/essen/32x32/account.png" alt="">
+ <h1><?_("User profile")></h1>
+ <div id="navbar">
+ <ul>
+ <li>
+ <a href="display_page?recp=<?BSTR("who", "U")>">
+ <img src="static/webcit_icons/essen/16x16/chat.png" alt="">
+ <span class="navbar_link"> <?_("Click here to send an instant message to")> <?BSTR("who", "X")> </span>
+ </a>
+ </li>
+ </ul>
+ </div>
</div>
<div id="content" class="service bio">
- <table class="userlist_background">
- <tr><td>
- <center>
- <table>
- <tr><td>
- <img src="userpic?user=<?BSTR("who", "U")>" alt="" border=0>
- </td><td><h1>
- <?BSTR("who", "X")>
- </h1></td></tr>
+ <table class="userlist_background">
+ <tr>
+ <td>
+ <center>
+ <table>
+ <tr>
+ <td><img src="userpic?user=<?BSTR("who", "U")>" alt="" border=0></td>
+ <td>
+ <h1><?BSTR("who", "X")></h1>
+ </td>
+ </tr>
+ </table>
+ </center>
+ <?USER:BIO(B"who", "FJUSTIFY")>
+ </td>
+ </tr>
</table>
- </center>
- <?USER:BIO(B"who", "FJUSTIFY")>
- </td></tr>
- </table>
+</div>
<?=("trailing")>
-<??("COND:ITERATE:FIRSTN", 40)><?!("COND:ITERATE:ISMOD", 45, #"NAMESPERPAGE", 0)><!--y=<?ITERATE:N()>--><?=("vcard_list_section_end")><??("X", 40)><??("X", 45)>
-<?!("COND:ITERATE:ISMOD", 10, #"NAMESPERPAGE", 0)><?=("vcard_list_section_start")><??("X", 10)>
-<?!("COND:ITERATE:ISMOD", 20, 4, 0)> <?=("vcard_list_row_start")><??("X", 20)>
-<td><!--X=<?ITERATE:N()>--><a href='readfwd?startmsg=<?VC:MSGNO()>?is_singlecard=1?maxmsgs=1?is_summary=0?alpha=<?BSTR("alpha")>'><?VC:ITEM(#"VC:.n.last", "X")> <?VC:ITEM(#"VC:.n.first", "X")><?VC:ITEM(#"VC:.n.middle", "X")> <?VC:ITEM(#"VC:.n.prefix", "X")> <?VC:ITEM(#"VC:.n.suffix", "X")></a></td>
+<?!("COND:ITERATE:FIRSTN", 10)><!--y=<?ITERATE:N()>--><?=("vcard_list_section_start")><??("X", 10)>
+<??("COND:ITERATE:FIRSTN", 10)><?!("COND:ITERATE:ISMOD", 15, #"NAMESPERPAGE", 0)><!--y=<?ITERATE:N()>--><?=("vcard_list_section_end")><?=("vcard_list_section_start")><?!("X", 15)><?!("X", 10)>
-<??("COND:ITERATE:FIRSTN", 30)><?!("COND:ITERATE:ISMOD", 35, 4, 3)> <?=("vcard_list_row_end")><??("X", 35)><?!("X", 30)>
-<?!("COND:ITERATE:LASTN", 40)><??("COND:ITERATE:ISMOD", 45, 4, 3)> <?=("vcard_list_row_end")><??("X", 45)><?!("X", 40)>
+<?!("COND:ITERATE:ISMOD", 10, 4, 0)><?=("vcard_list_row_start")><?!("X", 10)>
+<td><!--X=<?ITERATE:N()>--><a href='readfwd?startmsg=<?VC:MSGNO()>?is_singlecard=1?maxmsgs=1?is_summary=0?alpha=<?BSTR("alpha")>'><?VC:ITEM(#"VC:.n.last", "X ")><?VC:ITEM(#"VC:.n.suffix", "X")>, <?VC:ITEM(#"VC:.n.prefix", "X ")><?VC:ITEM(#"VC:.n.first", "X ")><?VC:ITEM(#"VC:.n.middle", "X")></a></td>
+<??("COND:ITERATE:LASTN", 10)><?!("COND:ITERATE:ISMOD", 15, 4, 3)><?=("vcard_list_row_end")><?!("X", 15)><??("X", 10)>
+<?!("COND:ITERATE:LASTN", 10)><?=("vcard_list_row_end")><?!("X", 10)>
-<?!("COND:ITERATE:LASTN", 40)><??("COND:ITERATE:ISMOD", 45, #"NAMESPERPAGE", 0)><!--z=<?ITERATE:N()>--><?=("vcard_list_section_end")><??("X", 45)><?!("X", 40)>
+<?!("COND:ITERATE:LASTN", 10)><!--y=<?ITERATE:N()>--><?=("vcard_list_section_end")><?!("X", 10)>
-<div class="message_content"><div>
+<!-- start msg_display.html -->
+<div class="message_content">
<div align="center">
<table bgcolor="#aaaaaa" width="50%">
<tr bgcolor="#aaaaaa">
<td colspan=2 bgcolor="#ffffff">
- <img align="center" src="static/webcit_icons/essen/32x32/contact.png">
- <font size="+1"><b><?VC:ITEM(#"VC:.fn", "X")></b></font>
- <div align="right>"<?VC:ITEM(#"VC:.title", "X")></div>
- <div align="right"><?VC:ITEM(#"VC:.org", "X")></div>
-</td>
+ <img style="vertical-align:middle" alt="" src="static/webcit_icons/essen/32x32/contact.png">
+ <font size="+1"><b><?VC:ITEM(#"VC:.fn", "X")></b></font>
+ <div align="right"><?VC:ITEM(#"VC:.title", "X")></div>
+ <div align="right"><?VC:ITEM(#"VC:.org", "X")></div>
+ </td>
</tr>
<?!("VC:HAVE:TYPE", 10, #"PhoneNumber")>
<tr>
- <td>Telephone:</td>
- <td>
-<?ITERATE("VC:TYPE", ="vcard_msg_display_phone", 0, 0, -1, #"PhoneNumber")>
- </td>
+ <td style="vertical-align:top"><?VC:NAME(#"VC:.tel")></td>
+ <td><?ITERATE("VC:TYPE", ="vcard_msg_display_phone", 0, 0, -1, #"PhoneNumber")></td>
</tr>
<??("X", 10)>
<?!("VC:HAVE:TYPE", 20, #"EmailAddr")>
<tr>
- <td>E-mail:</td>
- <td>
-<?ITERATE("VC:TYPE", ="vcard_msg_display_email", 0, 0, -1, #"EmailAddr")>
- </td>
+ <td style="vertical-align:top"><?VC:NAME(#"VC:.email")></td>
+ <td><?ITERATE("VC:TYPE", ="vcard_msg_display_email", 0, 0, -1, #"EmailAddr")></td>
</tr>
<?!("X", 20)>
-
-<?!("VC:HAVE:TYPE", 30, #"VC:.adr.address")>
+<?!("VC:HAVE:TYPE", 30, #"Address")>
<tr>
- <td><?VC:NAME(#"Address")>:</td>
- <td>
-<?VC:ITEM(#"VC:.adr.POBox", "X")><br>
-<?VC:ITEM(#"VC:.adr.extadr", "X")><br>
-<?VC:ITEM(#"VC:.adr.street", "X")><br>
-<?VC:ITEM(#"VC:.adr.city", "X")> <?VC:ITEM(#"VC:.adr.state", "X")> <?VC:ITEM(#"VC:.adr.zip", "X")> <?VC:ITEM(#"VC:.adr.country", "X")>
- </td>
+ <td style="vertical-align:top"><?VC:NAME(#"VC:.adr")></td>
+ <td>
+ <?VC:ITEM(#"VC:.adr.POBox", "X<br>")>
+ <?VC:ITEM(#"VC:.adr.extadr", "X<br>")>
+ <?VC:ITEM(#"VC:.adr.street", "X<br>")>
+ <?VC:ITEM(#"VC:.adr.city", "X, ")><?VC:ITEM(#"VC:.adr.state", "X ")><?VC:ITEM(#"VC:.adr.zip", "X")><br>
+ <?VC:ITEM(#"VC:.adr.country", "X")>
+ </td>
</tr>
<?!("X", 30)>
-</table></div>
+</table>
+</div>
+</div>
+<!-- end msg_display.html -->
<div align="center">
<table border="0" bgcolor="#ffffff" cellpadding="10">
<tr><td align="center">
- <br><b> <?_("There is no page called '"><?BSTR("pagename", "x")><?_("'here")>.
+ <br><b> <?_("There is no page called '")><?BSTR("pagename", "x")><?_("'here")>.
</b><br><br>
<?_("Select the 'Edit this page' link in the room banner if you would like to create this page.")>
<br><br>
StrEscAppend(Target, Source, NULL, 0, 2);
break;
case 'X':
- StrEscAppend(Target, Source, NULL, 0, 0);
+ if (!IsEmptyStr(ChrPtr(Source))) {
+ StrEscAppend(Target, Source, NULL, 0, 0);
+ if (pFmt[1]) {
+ StrBufAppendBufPlain(Target, pFmt, -1, 1);
+ }
+ }
break;
case 'J':
StrECMAEscAppend(Target, Source, NULL);
UnStackContext(&SubTP);
DeleteHash(&headlines);
free(tablabels);
- StrBufAppendBufPlain(WC->WBuf, HKEY("</div>"), 0);/* closes: id=global */
}