X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fmainmenu.c;h=0eda83f50aafc425792c7692217ec0449a6ad797;hb=2b01bf58f1bb034451069a51d0bf312f383f4bb8;hp=0436a77a270abb0c7783ebff2052da8ed70f8b32;hpb=bedf5c0b955473d8ad02eaf628e8d209f534f2b6;p=citadel.git diff --git a/webcit/mainmenu.c b/webcit/mainmenu.c index 0436a77a2..0eda83f50 100644 --- a/webcit/mainmenu.c +++ b/webcit/mainmenu.c @@ -14,6 +14,7 @@ */ void display_main_menu(void) { + char buf[SIZ]; output_headers(1, 1, 1, 0, 0, 0); wprintf("
" @@ -48,7 +49,7 @@ void display_main_menu(void) wprintf(_("(come back here later)")); wprintf("\n"); - if ((strlen(WC->ugname) > 0) && (strcasecmp(WC->ugname, WC->wc_roomname))) { + if ((!IsEmptyStr(WC->ugname)) && (strcasecmp(WC->ugname, WC->wc_roomname))) { wprintf("
  • "); wprintf(_("Ungoto")); wprintf(""); @@ -120,71 +121,31 @@ void display_main_menu(void) wprintf("" ""); - svprintf("BOXTITLE", WCS_STRING, _("Your info")); - do_template("beginbox"); - - wprintf("\n"); - - do_template("endbox"); + print_menu_box(_("Your info"), "adminitems", 6, + "display_preferences", _("Change your preferences and settings"), + "display_reg", _("Update your contact information"), + "display_changepw", _("Change your password"), + "display_editbio", _("Enter your 'bio'"), + "display_editpic", _("Edit your online photo"), + "display_sieve", _("View/edit server-side mail filters")); wprintf(""); - svprintf("BOXTITLE", WCS_STRING, _("Advanced room commands")); - do_template("beginbox"); - - wprintf("\n"); - - do_template("endbox"); + snprintf(buf, SIZ, _("Zap (forget) this room (%s)"), WC->wc_roomname); + + if ((WC->axlevel >= 6) || (WC->is_room_aide)) + print_menu_box(_("Advanced room commands"),"adminitems", 5, + "display_editroom", _("Edit or delete this room"), + "display_private", _("Go to a 'hidden' room"), + "display_entroom", _("Create a new room"), + "display_zap",buf, + "zapped_list",_("List all forgotten rooms")); + else + print_menu_box(_("Advanced room commands"),"adminitems", 4, + "display_private", _("Go to a 'hidden' room"), + "display_entroom", _("Create a new room"), + "display_zap",buf, + "zapped_list",_("List all forgotten rooms")); wprintf("
  • "); wDumpContent(2); @@ -199,76 +160,41 @@ void display_aide_menu(void) output_headers(1, 1, 2, 0, 0, 0); wprintf("
    \n"); - wprintf("
    \n"); wprintf("

    "); wprintf(_("System Administration Menu")); wprintf("

    "); - wprintf("
    "); + wprintf("\n"); - wprintf("
    "); + wprintf("
    "); wprintf("
    " - " " - "
    "); - - svprintf("BOXTITLE", WCS_STRING, _("Global Configuration")); - do_template("beginbox"); - - wprintf(""); - - do_template("endbox"); - - wprintf(""); + " " + "
    "); - svprintf("BOXTITLE", WCS_STRING, _("User account management")); - do_template("beginbox"); + print_menu_box(_("Global Configuration"), "adminitems", 4, + "display_siteconfig", _("Edit site-wide configuration"), + "display_inetconf",_("Domain names and Internet mail configuration"), + "display_netconf", _("Configure replication with other Citadel servers"), + "display_smtpqueue", _("View the outbound SMTP queue")); + + wprintf(""); - wprintf("
    "); - wprintf("
  • "); - wprintf(_("Validate new users")); - wprintf("
  • \n"); - wprintf(""); + print_menu_box(_("Shutdown Citadel"), "adminitems", 3, + "server_shutdown?when=now", _("Restart Now"), + "server_shutdown?when=page", _("Restart after paging users"), + "server_shutdown?when=idle", _("Restart when all users are idle")); - do_template("endbox"); + wprintf("
    "); - wprintf("
    "); - - svprintf("BOXTITLE", WCS_STRING, _("Rooms and Floors")); - do_template("beginbox"); - - wprintf(""); - - do_template("endbox"); + print_menu_box(_("Rooms and Floors"), "adminitems", 1, + "display_floorconfig", _("Add, change, or delete floors")); wprintf("
    "); wDumpContent(2); @@ -284,13 +210,13 @@ void display_aide_menu(void) void display_generic(void) { output_headers(1, 1, 2, 0, 0, 0); - wprintf("
    \n" - "
    " - ""); + wprintf("
    \n"); + wprintf("

    "); wprintf(_("Enter a server command")); - wprintf("

    \n" - "
    \n
    \n" - ); + wprintf(""); + wprintf("
    \n"); + + wprintf("
    \n"); wprintf("
    " "
    \n"); @@ -332,7 +258,7 @@ void do_generic(void) char *junk; size_t len; - if (strlen(bstr("sc_button")) == 0) { + if (IsEmptyStr(bstr("sc_button"))) { display_main_menu(); return; }