00001
00002
00003
00009 #include "webcit.h"
00010
00011
00013 #define IB_PICTEXT 0
00014 #define IB_PICONLY 1
00015 #define IB_TEXTONLY 2
00021 void do_selected_iconbar(void) {
00022 if (WC->current_iconbar == current_iconbar_roomlist) {
00023 do_iconbar_roomlist();
00024 }
00025 else {
00026 do_iconbar();
00027 }
00028 }
00029
00033 void do_iconbar(void) {
00034 char iconbar[SIZ];
00035 char buf[SIZ];
00036 char key[SIZ], value[SIZ];
00037 int i;
00038
00039 WC->current_iconbar = current_iconbar_menu;
00040
00047 int ib_displayas = 0;
00048 int ib_logo = 0;
00049 int ib_summary = 1;
00050 int ib_inbox = 1;
00051 int ib_calendar = 1;
00052 int ib_contacts = 1;
00053 int ib_notes = 1;
00054 int ib_tasks = 1;
00055 int ib_rooms = 1;
00056 int ib_users = 1;
00057 int ib_chat = 1;
00058 int ib_advanced = 1;
00059 int ib_citadel = 1;
00060
00061
00062
00063 get_preference("iconbar", iconbar, sizeof iconbar);
00064 for (i=0; i<num_tokens(iconbar, ','); ++i) {
00065 extract_token(buf, iconbar, i, ',', sizeof buf);
00066 extract_token(key, buf, 0, '=', sizeof key);
00067 extract_token(value, buf, 1, '=', sizeof value);
00068
00069 if (!strcasecmp(key, "ib_displayas")) ib_displayas = atoi(value);
00070 if (!strcasecmp(key, "ib_logo")) ib_logo = atoi(value);
00071 if (!strcasecmp(key, "ib_summary")) ib_summary = atoi(value);
00072 if (!strcasecmp(key, "ib_inbox")) ib_inbox = atoi(value);
00073 if (!strcasecmp(key, "ib_calendar")) ib_calendar = atoi(value);
00074 if (!strcasecmp(key, "ib_contacts")) ib_contacts = atoi(value);
00075 if (!strcasecmp(key, "ib_notes")) ib_notes = atoi(value);
00076 if (!strcasecmp(key, "ib_tasks")) ib_tasks = atoi(value);
00077 if (!strcasecmp(key, "ib_rooms")) ib_rooms = atoi(value);
00078 if (!strcasecmp(key, "ib_users")) ib_users = atoi(value);
00079 if (!strcasecmp(key, "ib_chat")) ib_chat = atoi(value);
00080 if (!strcasecmp(key, "ib_advanced")) ib_advanced = atoi(value);
00081 if (!strcasecmp(key, "ib_citadel")) ib_citadel = atoi(value);
00082 }
00083
00084 if (ib_logo) {
00085 if (ib_displayas != IB_TEXTONLY) {
00086 wprintf("<div class=\"logo\"> <img "
00087 "src=\"image&name=hello\" alt=\" \"> "
00088 "</div>\n"
00089 );
00090 }
00091 wprintf("\n");
00092 }
00093
00094 if (ib_citadel) if (ib_displayas != IB_TEXTONLY) wprintf(
00095 "<div class=\"logo_citadel\"> "
00096 "<a href=\"http://www.citadel.org\" "
00097 "title=\"%s\" target=\"aboutcit\"> "
00098 "<img "
00099 "src=\"static/citadel-logo.gif\" alt=\"%s\"></a> "
00100 "</div>\n",
00101 _("Find out more about Citadel"),
00102 _("CITADEL")
00103 );
00104
00105 wprintf("<ul id=\"button\">\n");
00106
00107 wprintf("<li class=\"switch\"><a href=\"javascript:switch_to_room_list()\">");
00108 wprintf(_("switch to room list"));
00109 wprintf("</a></li>");
00110
00111 if (ib_summary) {
00112 wprintf("<li><a href=\"summary\" "
00113 "title=\"%s\" "
00114 ">", _("Your summary page")
00115 );
00116 if (ib_displayas != IB_TEXTONLY) {
00117 wprintf("<img border=\"0\" width=\"32\" height=\"32\" "
00118 "src=\"static/summscreen_32x.gif\">");
00119 }
00120 if (ib_displayas != IB_PICONLY) {
00121 wprintf(_("Summary"));
00122 }
00123 wprintf("</a></li>\n");
00124 }
00125
00126 if (ib_inbox) {
00127 wprintf("<li>"
00128 "<a href=\"dotgoto?room=_MAIL_\" "
00129 "title=\"%s\" "
00130 ">",
00131 _("Go to your email inbox")
00132 );
00133 if (ib_displayas != IB_TEXTONLY) {
00134 wprintf("<img border=\"0\" width=\"32\" height=\"32\" "
00135 "src=\"static/privatemess_32x.gif\">");
00136 }
00137 if (ib_displayas != IB_PICONLY) {
00138 wprintf(_("Mail"));
00139 if (WC->new_mail != WC->remember_new_mail) {
00140
00141
00142
00143
00144
00145 WC->remember_new_mail = WC->new_mail;
00146 }
00147 }
00148 wprintf("</a></li>\n");
00149 }
00150
00151 if (ib_calendar) {
00152 wprintf("<li>"
00153 "<a href=\"dotgoto?room=_CALENDAR_\" "
00154 "title=\"%s\" "
00155 ">",
00156 _("Go to your personal calendar")
00157 );
00158 if (ib_displayas != IB_TEXTONLY) {
00159 wprintf("<img border=\"0\" width=\"32\" height=\"32\" "
00160 "src=\"static/calarea_32x.gif\">");
00161 }
00162 if (ib_displayas != IB_PICONLY) {
00163 wprintf(_("Calendar"));
00164 }
00165 wprintf("</a></li>\n");
00166 }
00167
00168 if (ib_contacts) {
00169 wprintf("<li>"
00170 "<a href=\"dotgoto?room=_CONTACTS_\" "
00171 "title=\"%s\" "
00172 ">",
00173 _("Go to your personal address book")
00174 );
00175 if (ib_displayas != IB_TEXTONLY) {
00176 wprintf("<img border=\"0\" width=\"32\" height=\"32\" "
00177 "src=\"static/viewcontacts_32x.gif\">");
00178 }
00179 if (ib_displayas != IB_PICONLY) {
00180 wprintf(_("Contacts"));
00181 }
00182 wprintf("</a></li>\n");
00183 }
00184
00185 if (ib_notes) {
00186 wprintf("<li>"
00187 "<a href=\"dotgoto?room=_NOTES_\" "
00188 "title=\"%s\" "
00189 ">",
00190 _("Go to your personal notes")
00191 );
00192 if (ib_displayas != IB_TEXTONLY) {
00193 wprintf("<img border=\"0\" width=\"32\" height=\"32\" "
00194 "src=\"static/storenotes_32x.gif\">");
00195 }
00196 if (ib_displayas != IB_PICONLY) {
00197 wprintf(_("Notes"));
00198 }
00199 wprintf("</a></li>\n");
00200 }
00201
00202 if (ib_tasks) {
00203 wprintf("<li>"
00204 "<a href=\"dotgoto?room=_TASKS_\" "
00205 "title=\"%s\" "
00206 ">",
00207 _("Go to your personal task list")
00208 );
00209 if (ib_displayas != IB_TEXTONLY) {
00210 wprintf("<img border=\"0\" width=\"32\" height=\"32\" "
00211 "src=\"static/taskmanag_32x.gif\">");
00212 }
00213 if (ib_displayas != IB_PICONLY) {
00214 wprintf(_("Tasks"));
00215 }
00216 wprintf("</a></li>\n");
00217 }
00218
00219 if (ib_rooms) {
00220 wprintf("<li>"
00221 "<a href=\"knrooms\" title=\"%s\" >",
00222 _("List all of your accessible rooms")
00223 );
00224 if (ib_displayas != IB_TEXTONLY) {
00225 wprintf("<img border=\"0\" width=\"32\" height=\"32\" "
00226 "src=\"static/chatrooms_32x.gif\">");
00227 }
00228 if (ib_displayas != IB_PICONLY) {
00229 wprintf(_("Rooms"));
00230 }
00231 wprintf("</a></li>\n");
00232 }
00233
00234 if (ib_users) {
00235 wprintf("<li>"
00236 "<a href=\"who\" title=\"%s\" "
00237 ">",
00238 _("See who is online right now")
00239 );
00240 if (ib_displayas != IB_TEXTONLY) {
00241 wprintf("<img border=\"0\" width=\"32\" height=\"32\" "
00242 "src=\"static/usermanag_32x.gif\">");
00243 }
00244 if (ib_displayas != IB_PICONLY) {
00245 wprintf(_("Who is online?"));
00246 }
00247
00248 wprintf("</a>\n");
00249 wprintf("<ul id=\"wholist\">");
00250 wprintf("</ul></li>\n");
00251 }
00252
00253 if (ib_chat) {
00254 wprintf("<li>"
00255 "<a href=\"#\" onClick=\"window.open('chat', "
00256 "'ctdl_chat_window', "
00257 "'toolbar=no,location=no,directories=no,copyhistory=no,"
00258 "status=no,scrollbars=yes,resizable=yes');\""
00259 ">"
00260 );
00261 if (ib_displayas != IB_TEXTONLY) {
00262 wprintf("<img border=\"0\" width=\"32\" height=\"32\" "
00263 "src=\"static/citadelchat_32x.gif\">");
00264 }
00265 if (ib_displayas != IB_PICONLY) {
00266 wprintf(_("Chat"));
00267 }
00268 wprintf("</a></li>\n");
00269 }
00270
00271 if (ib_advanced) {
00272 wprintf("<li>"
00273 "<a href=\"display_main_menu\" "
00274 "title=\"%s\" "
00275 ">",
00276 _("Advanced Options Menu: Advanced Room commands, Account Info, and Chat")
00277 );
00278 if (ib_displayas != IB_TEXTONLY) {
00279 wprintf("<img border=\"0\" width=\"32\" height=\"32\" "
00280 "src=\"static/advanpage2_32x.gif\">");
00281 }
00282 if (ib_displayas != IB_PICONLY) {
00283 wprintf(_("Advanced"));
00284 }
00285 wprintf("</a></li>\n");
00286 }
00287
00288 if ((WC->axlevel >= 6) || (WC->is_room_aide)) {
00289 wprintf("<li>"
00290 "<a href=\"display_aide_menu\" "
00291 "title=\"%s\" "
00292 ">",
00293 _("Room and system administration functions")
00294 );
00295 if (ib_displayas != IB_TEXTONLY) {
00296 wprintf("<img border=\"0\" width=\"32\" height=\"32\" "
00297 "src=\"static/advanpage2_32x.gif\">");
00298 }
00299 if (ib_displayas != IB_PICONLY) {
00300 wprintf(_("Administration"));
00301 }
00302 wprintf("</a></li>\n");
00303 }
00304
00305 wprintf("<li>"
00306 "<a href=\"termquit\" title=\"%s\" "
00307 "onClick=\"return confirm('%s');\">",
00308 _("Log off"),
00309 _("Log off now?")
00310
00311 );
00312 if (ib_displayas != IB_TEXTONLY) {
00313 wprintf("<img border=\"0\" width=\"32\" height=\"32\" "
00314 "src=\"static/logoff_32x.gif\">");
00315 }
00316 if (ib_displayas != IB_PICONLY) {
00317 wprintf(_("Log off"));
00318 }
00319 wprintf("</a></li>\n");
00320
00321 wprintf(
00322 "<li class=\"switch\">"
00323 "<a href=\"display_customize_iconbar\" "
00324 "title=\"%s\" "
00325 ">%s"
00326 "</a></li>\n",
00327 _("Customize this menu"),
00328 _("customize this menu")
00329 );
00330
00331 wprintf("</ul>\n");
00332
00333 wprintf(
00334 "<script type=\"text/javascript\"> "
00335 " new Ajax.PeriodicalUpdater('wholist', 'wholist_section', "
00336 " { method: 'get', frequency: 30 } ); "
00337 "</script> \n"
00338 );
00339
00340 }
00341
00342
00348 void do_iconbar_roomlist(void) {
00349 char iconbar[SIZ];
00350 char buf[SIZ];
00351 char key[SIZ], value[SIZ];
00352 int i;
00353
00354 WC->current_iconbar = current_iconbar_roomlist;
00355
00362 int ib_displayas = 0;
00363 int ib_logo = 0;
00364 int ib_citadel = 1;
00365
00366
00367
00368 get_preference("iconbar", iconbar, sizeof iconbar);
00369 for (i=0; i<num_tokens(iconbar, ','); ++i) {
00370 extract_token(buf, iconbar, i, ',', sizeof buf);
00371 extract_token(key, buf, 0, '=', sizeof key);
00372 extract_token(value, buf, 1, '=', sizeof value);
00373
00374 if (!strcasecmp(key, "ib_displayas")) ib_displayas = atoi(value);
00375 if (!strcasecmp(key, "ib_logo")) ib_logo = atoi(value);
00376 if (!strcasecmp(key, "ib_citadel")) ib_citadel = atoi(value);
00377 }
00378
00379 if (ib_logo) {
00380 if (ib_displayas != IB_TEXTONLY) {
00381 wprintf("<div class=\"logo\"> <img "
00382 "src=\"image&name=hello\" alt=\" \"> "
00383 "</div>\n"
00384 );
00385 }
00386 }
00387
00388 if (ib_citadel) if (ib_displayas != IB_TEXTONLY) wprintf(
00389 "<div class=\"logo_citadel\"> "
00390 "<a href=\"http://www.citadel.org\" "
00391 "title=\"%s\" target=\"aboutcit\"> "
00392 "<img "
00393 "src=\"static/citadel-logo.gif\" alt=\"%s\"></a> "
00394 "</div>\n",
00395 _("Find out more about Citadel"),
00396 _("CITADEL")
00397 );
00398
00399 wprintf("<ul id=\"button\">\n");
00400
00401 wprintf("<li class=\"switch\"><a href=\"javascript:switch_to_menu_buttons()\">");
00402 wprintf(_("switch to menu"));
00403 wprintf("</a></li>");
00404
00405 wprintf("<li>"
00406 "<a href=\"termquit\" title=\"%s\" "
00407 "onClick=\"return confirm('%s');\">",
00408 _("Log off"),
00409 _("Log off now?")
00410
00411 );
00412 if (ib_displayas != IB_TEXTONLY) {
00413 wprintf("<img border=\"0\" width=\"32\" height=\"32\" "
00414 "src=\"static/logoff_32x.gif\">");
00415 }
00416 if (ib_displayas != IB_PICONLY) {
00417 wprintf(_("Log off"));
00418 }
00419 wprintf("</a></li>\n");
00420
00421 wprintf("</ul>\n");
00422
00424 list_all_rooms_by_floor("iconbar");
00425
00426 wprintf("</div>\n");
00427 }
00428
00429
00433 void display_customize_iconbar(void) {
00434 char iconbar[SIZ];
00435 char buf[SIZ];
00436 char key[SIZ], value[SIZ];
00437 int i;
00438 int bar = 0;
00439
00446 int ib_displayas = IB_PICTEXT;
00447 int ib_logo = 0;
00448 int ib_summary = 1;
00449 int ib_inbox = 1;
00450 int ib_calendar = 1;
00451 int ib_contacts = 1;
00452 int ib_notes = 1;
00453 int ib_tasks = 1;
00454 int ib_rooms = 1;
00455 int ib_users = 1;
00456 int ib_chat = 1;
00457 int ib_advanced = 1;
00458 int ib_citadel = 1;
00459
00460
00461
00462 get_preference("iconbar", iconbar, sizeof iconbar);
00463 for (i=0; i<num_tokens(iconbar, ','); ++i) {
00464 extract_token(buf, iconbar, i, ',', sizeof buf);
00465 extract_token(key, buf, 0, '=', sizeof key);
00466 extract_token(value, buf, 1, '=', sizeof value);
00467
00468 if (!strcasecmp(key, "ib_displayas")) ib_displayas = atoi(value);
00469 if (!strcasecmp(key, "ib_logo")) ib_logo = atoi(value);
00470 if (!strcasecmp(key, "ib_summary")) ib_summary = atoi(value);
00471 if (!strcasecmp(key, "ib_inbox")) ib_inbox = atoi(value);
00472 if (!strcasecmp(key, "ib_calendar")) ib_calendar = atoi(value);
00473 if (!strcasecmp(key, "ib_contacts")) ib_contacts = atoi(value);
00474 if (!strcasecmp(key, "ib_notes")) ib_notes = atoi(value);
00475 if (!strcasecmp(key, "ib_tasks")) ib_tasks = atoi(value);
00476 if (!strcasecmp(key, "ib_rooms")) ib_rooms = atoi(value);
00477 if (!strcasecmp(key, "ib_users")) ib_users = atoi(value);
00478 if (!strcasecmp(key, "ib_chat")) ib_chat = atoi(value);
00479 if (!strcasecmp(key, "ib_advanced")) ib_advanced = atoi(value);
00480 if (!strcasecmp(key, "ib_citadel")) ib_citadel = atoi(value);
00481 }
00482
00483 output_headers(1, 1, 2, 0, 0, 0);
00484 wprintf("<div id=\"banner\">\n"
00485 "<TABLE class=\"iconbar_banner\"><tr><td>"
00486 "<SPAN CLASS=\"titlebar\">");
00487 wprintf(_("Customize the icon bar"));
00488 wprintf("</SPAN>"
00489 "</td></tr></table>\n"
00490 "</div>\n<div id=\"content\">\n"
00491 );
00492
00493 wprintf("<div class=\"fix_scrollbar_bug\">"
00494 "<table class=\"iconbar_background\"><tr><td>");
00495
00496 wprintf("<FORM METHOD=\"POST\" action=\"commit_iconbar\">\n");
00497
00498 wprintf("<CENTER>");
00499 wprintf(_("Display icons as:"));
00500 wprintf(" ");
00501 for (i=0; i<=2; ++i) {
00502 wprintf("<input type=\"radio\" name=\"ib_displayas\" value=\"%d\"", i);
00503 if (ib_displayas == i) wprintf(" CHECKED");
00504 wprintf(">");
00505 if (i == IB_PICTEXT) wprintf(_("pictures and text"));
00506 if (i == IB_PICONLY) wprintf(_("pictures only"));
00507 if (i == IB_TEXTONLY) wprintf(_("text only"));
00508 wprintf("\n");
00509 }
00510 wprintf("<br /><br />\n");
00511
00512 wprintf(_("Select the icons you would like to see displayed "
00513 "in the 'icon bar' menu on the left side of the "
00514 "screen."));
00515 wprintf("</CENTER><br />\n");
00516
00517 wprintf("<TABLE border=0 cellspacing=0 cellpadding=3 width=100%%>\n");
00518
00519 wprintf("<tr BGCOLOR=%s><td>"
00520 "<input type=\"checkbox\" name=\"ib_logo\" value=\"yes\" %s>"
00521 "</td><td>"
00522 "<img border=\"0\" width=\"48\" "
00523 "src=\"image&name=hello\" alt=\" \">"
00524 "</td><td>"
00525 "<b>%s</b><br />"
00526 "%s"
00527 "</td></tr>\n",
00528 ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")),
00529 (ib_logo ? "CHECKED" : ""),
00530 _("Site logo"),
00531 _("An icon describing this site")
00532 );
00533
00534 wprintf("<tr bgcolor=%s><td>"
00535 "<input type=\"checkbox\" name=\"ib_summary\" value=\"yes\" %s>"
00536 "</td><td>"
00537 "<img border=\"0\" width=\"48\" height=\"48\" "
00538 "src=\"static/summscreen_48x.gif\" alt=\" \">"
00539 "</td><td>"
00540 "<b>%s</b><br />"
00541 "%s"
00542 "</td></tr>\n",
00543 ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")),
00544 (ib_summary ? "CHECKED" : ""),
00545 _("Summary"),
00546 _("Your summary page")
00547 );
00548
00549 wprintf("<tr bgcolor=%s><td>"
00550 "<input type=\"checkbox\" name=\"ib_inbox\" value=\"yes\" %s>"
00551 "</td><td>"
00552 "<img border=\"0\" width=\"48\" height=\"48\" "
00553 "src=\"static/privatemess_48x.gif\" alt=\" \">"
00554 "</td><td>"
00555 "<b>%s</b><br />"
00556 "%s"
00557 "</td></tr>\n",
00558 ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")),
00559 (ib_inbox ? "CHECKED" : ""),
00560 _("Mail (inbox)"),
00561 _("A shortcut to your email Inbox")
00562 );
00563
00564 wprintf("<tr bgcolor=%s><td>"
00565 "<input type=\"checkbox\" name=\"ib_contacts\" "
00566 "value=\"yes\" %s>"
00567 "</td><td>"
00568 "<img border=\"0\" width=\"48\" height=\"48\" "
00569 "src=\"static/viewcontacts_48x.gif\" alt=\" \">"
00570 "</td><td>"
00571 "<b>%s</b><br />"
00572 "%s"
00573 "</td></tr>\n",
00574 ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")),
00575 (ib_contacts ? "CHECKED" : ""),
00576 _("Contacts"),
00577 _("Your personal address book")
00578 );
00579
00580 wprintf("<tr bgcolor=%s><td>"
00581 "<input type=\"checkbox\" name=\"ib_notes\" "
00582 "value=\"yes\" %s>"
00583 "</td><td>"
00584 "<img border=\"0\" width=\"48\" height=\"48\" "
00585 "src=\"static/storenotes_48x.gif\" alt=\" \">"
00586 "</td><td>"
00587 "<b>%s</b><br />"
00588 "%s"
00589 "</td></tr>\n",
00590 ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")),
00591 (ib_notes ? "CHECKED" : ""),
00592 _("Notes"),
00593 _("Your personal notes")
00594 );
00595
00596 #ifdef WEBCIT_WITH_CALENDAR_SERVICE
00597 wprintf("<tr bgcolor=%s><td>"
00598 "<input type=\"checkbox\" name=\"ib_calendar\" "
00599 "value=\"yes\" %s>"
00600 "</td><td>"
00601 "<img border=\"0\" width=\"48\" height=\"48\" "
00602 "src=\"static/calarea_48x.gif\" alt=\" \">"
00603 "</td><td>"
00604 "<b>%s</b><br />"
00605 "%s"
00606 "</td></tr>\n",
00607 ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")),
00608 (ib_calendar ? "CHECKED" : ""),
00609 _("Calendar"),
00610 _("A shortcut to your personal calendar")
00611 );
00612
00613 wprintf("<tr bgcolor=%s><td>"
00614 "<input type=\"checkbox\" name=\"ib_tasks\" value=\"yes\" %s>"
00615 "</td><td>"
00616 "<img border=\"0\" width=\"48\" height=\"48\" "
00617 "src=\"static/taskmanag_48x.gif\" alt=\" \">"
00618 "</td><td>"
00619 "<b>%s</b><br />"
00620 "%s"
00621 "</td></tr>\n",
00622 ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")),
00623 (ib_tasks ? "CHECKED" : ""),
00624 _("Tasks"),
00625 _("A shortcut to your personal task list")
00626 );
00627 #endif
00628
00629 wprintf("<tr bgcolor=%s><td>"
00630 "<input type=\"checkbox\" name=\"ib_rooms\" value=\"yes\" %s>"
00631 "</td><td>"
00632 "<img border=\"0\" width=\"48\" height=\"48\" "
00633 "src=\"static/chatrooms_48x.gif\" alt=\" \">"
00634 "</td><td>"
00635 "<b>%s</b><br />"
00636 "%s"
00637 "</td></tr>\n",
00638 ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")),
00639 (ib_rooms ? "CHECKED" : ""),
00640 _("Rooms"),
00641 _("Clicking this icon displays a list of all accessible "
00642 "rooms (or folders) available.")
00643 );
00644
00645 wprintf("<tr bgcolor=%s><td>"
00646 "<input type=\"checkbox\" name=\"ib_users\" value=\"yes\" %s>"
00647 "</td><td>"
00648 "<img border=\"0\" width=\"48\" height=\"48\" "
00649 "src=\"static/usermanag_48x.gif\" alt=\" \">"
00650 "</td><td>"
00651 "<b>%s</b><br />"
00652 "%s"
00653 "</td></tr>\n",
00654 ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")),
00655 (ib_users ? "CHECKED" : ""),
00656 _("Who is online?"),
00657 _("Clicking this icon displays a list of all users "
00658 "currently logged in.")
00659 );
00660
00661 wprintf("<tr bgcolor=%s><td>"
00662 "<input type=\"checkbox\" name=\"ib_chat\" value=\"yes\" %s>"
00663 "</td><td>"
00664 "<img border=\"0\" width=\"48\" height=\"48\" "
00665 "src=\"static/citadelchat_48x.gif\" alt=\" \">"
00666 "</td><td>"
00667 "<b>%s</b><br />"
00668 "%s"
00669 "</td></tr>\n",
00670 ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")),
00671 (ib_chat ? "CHECKED" : ""),
00672 _("Chat"),
00673 _("Clicking this icon enters real-time chat mode "
00674 "with other users in the same room.")
00675
00676 );
00677
00678 wprintf("<tr bgcolor=%s><td>"
00679 "<input type=\"checkbox\" name=\"ib_advanced\" "
00680 "value=\"yes\" %s>"
00681 "</td><td>"
00682 "<img border=\"0\" width=\"48\" height=\"48\" "
00683 "src=\"static/advanpage2_48x.gif\" alt=\" \">"
00684 "</td><td>"
00685 "<b>%s</b><br />"
00686 "%s"
00687 "</td></tr>\n",
00688 ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")),
00689 (ib_advanced ? "CHECKED" : ""),
00690 _("Advanced options"),
00691 _("Access to the complete menu of Citadel functions.")
00692
00693 );
00694
00695 wprintf("<tr bgcolor=%s><td>"
00696 "<input type=\"checkbox\" name=\"ib_citadel\" "
00697 "value=\"yes\" %s>"
00698 "</td><td>"
00699 "<img border=\"0\" width=\"48\" height=\"48\" "
00700 "src=\"static/citadel-logo.gif\" alt=\" \">"
00701 "</td><td>"
00702 "<b>%s</b><br />"
00703 "%s"
00704 "</td></tr>\n",
00705 ((bar = 1 - bar), (bar ? "\"#CCCCCC\"" : "\"#FFFFFF\"")),
00706 (ib_citadel ? "CHECKED" : ""),
00707 _("Citadel logo"),
00708 _("Displays the 'Powered by Citadel' icon")
00709 );
00710
00711 wprintf("</table><br />\n"
00712 "<CENTER>"
00713 "<input type=\"submit\" name=\"ok_button\" value=\"%s\">"
00714 " "
00715 "<input type=\"submit\" name=\"cancel_button\" value=\"%s\">"
00716 "</CENTER></FORM>\n",
00717 _("Save changes"),
00718 _("Cancel")
00719 );
00720
00721 wprintf("</td></tr></table></div>\n");
00722 wDumpContent(2);
00723 }
00724
00728 void commit_iconbar(void) {
00729 char iconbar[SIZ];
00730 int i;
00731
00732 char *boxen[] = {
00733 "ib_logo",
00734 "ib_summary",
00735 "ib_inbox",
00736 "ib_calendar",
00737 "ib_contacts",
00738 "ib_notes",
00739 "ib_tasks",
00740 "ib_rooms",
00741 "ib_users",
00742 "ib_chat",
00743 "ib_advanced",
00744 "ib_logoff",
00745 "ib_citadel"
00746 };
00747
00748 if (strlen(bstr("ok_button")) == 0) {
00749 display_main_menu();
00750 return;
00751 }
00752
00753 sprintf(iconbar, "ib_displayas=%d", atoi(bstr("ib_displayas")));
00754
00755 for (i=0; i<(sizeof(boxen)/sizeof(char *)); ++i) {
00756 sprintf(&iconbar[strlen(iconbar)], ",%s=", boxen[i]);
00757 if (!strcasecmp(bstr(boxen[i]), "yes")) {
00758 sprintf(&iconbar[strlen(iconbar)], "1");
00759 }
00760 else {
00761 sprintf(&iconbar[strlen(iconbar)], "0");
00762 }
00763 }
00764
00765 set_preference("iconbar", iconbar, 1);
00766
00767 output_headers(1, 1, 0, 0, 0, 0);
00768 wprintf(
00769 "<center><table border=1 bgcolor=\"#ffffff\"><tr><td>"
00770 "<img src=\"static/advanpage2_48x.gif\">"
00771 " ");
00772 wprintf(_("Your icon bar has been updated. Please select any of its "
00773 "choices to continue."));
00774 wprintf("</td></tr></table>\n");
00775 wDumpContent(2);
00776 }
00777
00778
00779