5 * \defgroup ShowSysMsgs Editing of various text files on the Citadel server.
12 * \brief display the form for editing something (room info, bio, etc)
13 * \param description the descriptive text for the box
14 * \param check_cmd command to check????
15 * \param read_cmd read answer from citadel server???
16 * \param save_cmd save comand to the citadel server??
17 * \param with_room_banner should we bisplay a room banner?
19 void display_edit(char *description, char *check_cmd,
20 char *read_cmd, char *save_cmd, int with_room_banner)
25 serv_getln(buf, sizeof buf);
28 safestrncpy(WC->ImportantMessage, &buf[4], sizeof WC->ImportantMessage);
32 if (with_room_banner) {
33 output_headers(1, 1, 1, 0, 0, 0);
36 output_headers(1, 1, 0, 0, 0, 0);
39 svprintf("BOXTITLE", WCS_STRING, _("Edit %s"), description);
40 do_template("beginbox");
42 wprintf("<div align=\"center\">");
43 wprintf(_("Enter %s below. Text is formatted to "
44 "the reader's screen width. To defeat the "
45 "formatting, indent a line at least one space."), description);
48 wprintf("<FORM METHOD=\"POST\" action=\"%s\">\n", save_cmd);
49 wprintf("<TEXTAREA NAME=\"msgtext\" wrap=soft "
50 "ROWS=10 COLS=80 WIDTH=80>\n");
52 serv_getln(buf, sizeof buf);
55 wprintf("</TEXTAREA><br /><br />\n");
56 wprintf("<INPUT TYPE=\"submit\" NAME=\"save_button\" VALUE=\"%s\">", _("Save changes"));
58 wprintf("<INPUT TYPE=\"submit\" NAME=\"cancel_button\" VALUE=\"%s\"><br />\n", _("Cancel"));
60 wprintf("</FORM></div>\n");
61 do_template("endbox");
67 * \brief save a screen which was displayed with display_edit()
68 * \param description the window title???
69 * \param enter_cmd which command to enter at the citadel server???
70 * \param regoto should we go to that room again after executing that command?
72 void save_edit(char *description, char *enter_cmd, int regoto)
76 if (strlen(bstr("save_button")) == 0) {
77 sprintf(WC->ImportantMessage,
78 _("Cancelled. %s was not saved."),
84 serv_getln(buf, sizeof buf);
86 safestrncpy(WC->ImportantMessage, &buf[4], sizeof WC->ImportantMessage);
90 text_to_server(bstr("msgtext"), 0);
94 smart_goto(WC->wc_roomname);
96 sprintf(WC->ImportantMessage,
97 _("%s has been saved."),