diff --git a/src/elogd.c b/src/elogd.c index cf11ee25..96aad9b1 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -6,6 +6,9 @@ Contents: Web server program for Electronic Logbook ELOG $Log$ + Revision 1.686 2005/06/30 05:18:43 ritt + Added image insertion by JScript + Revision 1.685 2005/06/24 20:22:33 ritt Fixed bug with conditional attributes and quick filters @@ -1550,7 +1553,7 @@ int run_service(void); void show_error(char *error); BOOL enum_user_line(LOGBOOK * lbs, int n, char *user, int size); int get_user_line(LOGBOOK * lbs, char *user, char *password, char *full_name, - char *email, BOOL email_notify[1000], time_t *last_access); + char *email, BOOL email_notify[1000], time_t * last_access); int strbreak(char *str, char list[][NAME_LENGTH], int size, char *brk); int execute_shell(LOGBOOK * lbs, int message_id, char attrib[MAX_N_ATTR][NAME_LENGTH], char att_file[MAX_ATTACHMENTS][256], char *sh_cmd); @@ -1576,7 +1579,7 @@ void highlight_searchtext(regex_t * re_buf, char *src, char *dst, BOOL hidden); int parse_config_file(char *config_file); PMXML_NODE load_password_file(LOGBOOK * lbs, char *error, int error_size); int load_password_files(); -void compose_base_url(LOGBOOK *lbs, char *base_url, int size); +void compose_base_url(LOGBOOK * lbs, char *base_url, int size); /*---- Funcions from the MIDAS library -----------------------------*/ @@ -1615,10 +1618,10 @@ BOOL strnieq(const char *str1, const char *str2, int n) return TRUE; if (str1 == NULL || str2 == NULL) return FALSE; - if ((int)strlen(str1) < n || (int)strlen(str2) < n) + if ((int) strlen(str1) < n || (int) strlen(str2) < n) return FALSE; - for (i=0 ; i= (int)sizeof(tmp)) + if (j >= (int) sizeof(tmp)) return; memcpy(pt, ps, j); pt += j; @@ -2771,13 +2775,13 @@ INT sendmail(LOGBOOK * lbs, char *smtp_host, char *from, char *to, } while (str[0]); if (getcfg(lbs->name, "SMTP username", str, strsize)) { - + snprintf(str, strsize - 1, "EHLO %s\r\n", host_name); send(s, str, strlen(str), 0); if (verbose) efputs(str); write_logfile(lbs, str); - + do { recv_string(s, str, strsize, 3000); if (verbose) @@ -2788,7 +2792,7 @@ INT sendmail(LOGBOOK * lbs, char *smtp_host, char *from, char *to, } while (stristr(str, " OK") == NULL); } else { - + snprintf(str, strsize - 1, "HELO %s\r\n", host_name); send(s, str, strlen(str), 0); @@ -2805,7 +2809,7 @@ INT sendmail(LOGBOOK * lbs, char *smtp_host, char *from, char *to, /* optional authentication */ if (getcfg(lbs->name, "SMTP username", str, strsize)) { - + snprintf(str, strsize - 1, "AUTH LOGIN\r\n"); send(s, str, strlen(str), 0); if (verbose) @@ -2814,7 +2818,7 @@ INT sendmail(LOGBOOK * lbs, char *smtp_host, char *from, char *to, recv_string(s, str, strsize, 3000); if (strchr(str, '\r')) *strchr(str, '\r') = 0; - base64_decode(str+4, decoded); + base64_decode(str + 4, decoded); strcat(decoded, "\n"); if (verbose) efputs(decoded); @@ -2832,7 +2836,7 @@ INT sendmail(LOGBOOK * lbs, char *smtp_host, char *from, char *to, recv_string(s, str, strsize, 3000); if (strchr(str, '\r')) *strchr(str, '\r') = 0; - base64_decode(str+4, decoded); + base64_decode(str + 4, decoded); strcat(decoded, "\n"); if (verbose) efputs(decoded); @@ -3531,7 +3535,7 @@ int parse_config_file(char *file_name) if (*p == '[') { p++; pstr = str; - while (*p && *p != ']' && *p != '\n' && *p != '\r' && (int)pstr-(int)str < 10000) + while (*p && *p != ']' && *p != '\n' && *p != '\r' && (int) pstr - (int) str < 10000) *pstr++ = *p++; *pstr = 0; @@ -3551,7 +3555,7 @@ int parse_config_file(char *file_name) p++; while (p && *p && *p != '[') { pstr = str; - while (*p && *p != '=' && *p != '\n' && *p != '\r' && (int)pstr-(int)str < 10000) + while (*p && *p != '=' && *p != '\n' && *p != '\r' && (int) pstr - (int) str < 10000) *pstr++ = *p++; *pstr-- = 0; while (pstr > str && (*pstr == ' ' || *pstr == '\t' || *pstr == '=')) @@ -3577,7 +3581,7 @@ int parse_config_file(char *file_name) while (*p == ' ' || *p == '\t') p++; pstr = str; - while (*p && *p != '\n' && *p != '\r' && (int)pstr-(int)str < 10000) + while (*p && *p != '\n' && *p != '\r' && (int) pstr - (int) str < 10000) *pstr++ = *p++; *pstr-- = 0; while (*pstr == ' ' || *pstr == '\t') @@ -6077,7 +6081,7 @@ void rsputs2(const char *str) else sprintf(return_buffer + j, "elog:%s", link, link_text); } else if (strcmp(key_list[l], "mailto:") == 0) { - sprintf(return_buffer + j, "%s", link, link_text); + sprintf(return_buffer + j, "%s", link, link_text); } else { sprintf(return_buffer + j, "" }, - { ":-))","" }, - { ":)", "" }, - { ":-)", "" }, - { ":(", "" }, - { ":-(", "" }, - { ";)", "" }, - { ";-)", "" }, - { ":D", "" }, - { "?)", "" }, - { ";(", "" }, - { ":]", "" }, - { ":O", "" }, - { "8)", "" }, - { "8o", "" }, - { "X(", "" }, - { ":P", "" }, + {":))", ""}, + {":-))", ""}, + {":)", ""}, + {":-)", ""}, + {":(", ""}, + {":-(", ""}, + {";)", ""}, + {";-)", ""}, + {":D", ""}, + {"?)", ""}, + {";(", ""}, + {":]", ""}, + {":O", ""}, + {"8)", ""}, + {"8o", ""}, + {"X(", ""}, + {":P", ""}, /* formatting */ - { "[b]", "" }, - { "[/b]", "" }, - { "[u]", "" }, - { "[/u]", "" }, - { "[i]", "" }, - { "[/i]", "" }, + {"[b]", ""}, + {"[/b]", ""}, + {"[u]", ""}, + {"[/u]", ""}, + {"[i]", ""}, + {"[/i]", ""}, - { "[center]", "
" }, - { "[/center]", "
" }, - { "[color=", "" }, - { "[/color]", "" }, - { "[size=", "" }, - { "[/size]", "" }, - { "[font=", "" }, - { "[/font]", "" }, - { "[code]", "" }, - { "[/code]", "" }, + {"[center]", "
"}, + {"[/center]", "
"}, + {"[color=", ""}, + {"[/color]", ""}, + {"[size=", ""}, + {"[/size]", ""}, + {"[font=", ""}, + {"[/font]", ""}, + {"[code]", ""}, + {"[/code]", ""}, /* lists */ - { "[list]\r", "" }, - { "[list=", "
    " }, + {"[list]\r", "
      "}, + {"[list]", "
        "}, + {"[*]", "
      • "}, + {"[/list]\r", "
      "}, + {"[/list]", "
    "}, + {"[list=", "
      "}, /* URLs */ - { "[url=", "%s" }, - { "[url]", "%s" }, - { "[/url]", "" }, - { "[email]","%s" }, - { "[/email]", "" }, - { "[img]", "" }, - { "[/img]", "" }, + {"[url=", "%s"}, + {"[url]", "%s"}, + {"[/url]", ""}, + {"[email]", "%s"}, + {"[/email]", ""}, + {"[img]", ""}, + {"[/img]", ""}, /* quote */ - { "[quote=", "
      %s:
      " }, - { "[quote]", "
      %s:
      " }, - { "[/quote]\r", "

      " }, - { "[/quote]", "

      " }, + {"[quote=", + "
      %s:
      "}, + {"[quote]", + "
      %s:
      "}, + {"[/quote]\r", "

      "}, + {"[/quote]", "

      "}, - { "", "" } + {"", ""} }; -void rsputs_elcode(LOGBOOK *lbs, const char *str) +void rsputs_elcode(LOGBOOK * lbs, const char *str) { int i, j, k, l, m, n; - char *p, *pd, link[1000], link_text[1000], tmp[1000], attrib[1000], hattrib[1000], - value[1000], subst[1000], base_url[256]; + char *p, *pd, link[1000], link_text[1000], tmp[1000], attrib[1000], hattrib[1000], + value[1000], subst[1000], base_url[256], param[256]; if (strlen_retbuf + (int) (2 * strlen(str) + 1000) >= return_buffer_size) { return_buffer = xrealloc(return_buffer, return_buffer_size + 100000); @@ -6346,7 +6352,7 @@ void rsputs_elcode(LOGBOOK *lbs, const char *str) else sprintf(return_buffer + j, "elog:%s", link, link_text); } else if (strcmp(key_list[l], "mailto:") == 0) { - sprintf(return_buffer + j, "%s", link, link_text); + sprintf(return_buffer + j, "%s", link, link_text); } else { sprintf(return_buffer + j, "name, "URL", str, sizeof(str))) { extract_path(str); @@ -8632,7 +8644,7 @@ void attrib_from_param(int n_attr, char attrib[MAX_N_ATTR][NAME_LENGTH]) void ricon(char *name, char *comment, char *onclick) { rsprintf("\"%s\"name, "Default Encoding", str, sizeof(str))) + if (getcfg(lbs->name, "Default Encoding", str, sizeof(str))) enc_selected = atoi(str); /* detrmine if smiley bar should be displayed */ show_smileys = 0; cookie[0] = 0; - if (isparam("hsm") && atoi(getparam("hsm")) == 1) /* cookie */ + if (isparam("hsm") && atoi(getparam("hsm")) == 1) /* cookie */ show_smileys = 0; if (isparam("smcmd") && strieq(getparam("smcmd"), "hsm")) { /* turn off */ show_smileys = 0; @@ -8740,7 +8763,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL else if (encoding[0] == 'H') enc_selected = 2; } - + /* check for preset attributes without any condition */ set_condition(""); for (index = 0; index < lbs->n_attr; index++) { @@ -9221,7 +9244,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL rsprintf("//-->\n"); rsprintf("\n"); - + /* optionally load ELCode JavaScript code */ if (enc_selected == 0) rsprintf("\n\n"); @@ -9234,10 +9257,14 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL rsprintf("\n"); + script[0] = 0; + if (isparam("inlineatt")) + strcpy(script, " OnLoad=\"document.form1.Text.focus();\""); + if (getcfg(lbs->name, "Use Lock", str, sizeof(str)) && atoi(str) == 1) - rsprintf("\n"); + rsprintf("\n", script); else - rsprintf("\n"); + rsprintf("\n", script); rsprintf("

      \n"); @@ -9254,6 +9281,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL rsprintf("\n"); rsprintf("\n"); + rsprintf("\n"); /*---- title row ----*/ @@ -9745,7 +9773,11 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL rsprintf(" "); ricon("url", loc("insert hyperlink"), "queryURL(document.form1.Text)"); ricon("email", loc("insert email"), "elcode(document.form1.Text, 'EMAIL','')"); - ricon("image", loc("insert image"), "elcode(document.form1.Text, 'IMG','')"); + + sprintf(str, "window.open('upload.html', '',"); + strlcat(str, "'top=280,left=350,width=500,height=120,dependent=yes,", sizeof(str)); + strlcat(str, "menubar=no,status=no,scrollbars=no,location=no,resizable=yes')", sizeof(str)); + ricon("image", loc("insert image"), str); rsprintf(" "); ricon("quote", loc("insert quote"), "elcode(document.form1.Text, 'QUOTE','')"); @@ -9755,11 +9787,13 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL ricon("code", loc("insert code"), "elcode(document.form1.Text, 'CODE','')"); if (show_smileys) - rsprintf(" \"%s\"\n"); @@ -9809,39 +9843,43 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL /* main box for text box and icons */ rsprintf("\n"); if (enc_selected == 0) - rsprintf("\n"); + for (i = 0; i < MAX_ATTACHMENTS; i++) + if (!att[i][0]) { + /* put first free attachment for show_uploader_finished() */ + rsprintf("\n", i + 1); + break; + } + if (!getcfg(lbs->name, "Enable attachments", str, sizeof(str)) || atoi(str) > 0) { i = 0; @@ -11386,8 +11434,8 @@ int save_user_config(LOGBOOK * lbs, char *user, BOOL new_user, BOOL activate) sprintf(url + strlen(url), "?cmd=Login&unm=%s", getparam("new_user_name")); sprintf(mail_text + strlen(mail_text), "%s %s\r\n", loc("You can access it at"), url); - sendmail(lbs, smtp_host, mail_from, getparam("new_user_email"), subject, mail_text, - TRUE, url, "text/plain", NULL, NULL, 0); + sendmail(lbs, smtp_host, mail_from, getparam("new_user_email"), subject, mail_text, + TRUE, url, "text/plain", NULL, NULL, 0); } else { if (getcfg(lbs->name, "Admin user", admin_user, sizeof(admin_user))) { pl = strtok(admin_user, " ,"); @@ -11455,7 +11503,7 @@ int save_user_config(LOGBOOK * lbs, char *user, BOOL new_user, BOOL activate) loc("Logbook"), url, getparam("new_user_name"), pl); } - sendmail(lbs, smtp_host, mail_from, email_addr, subject, mail_text, TRUE, + sendmail(lbs, smtp_host, mail_from, email_addr, subject, mail_text, TRUE, url, "text/plain", NULL, NULL, 0); } @@ -11786,7 +11834,7 @@ void show_forgot_pwd_page(LOGBOOK * lbs) strlcat(mail_text, "\r\n\r\n", sizeof(mail_text)); sprintf(mail_text + strlen(mail_text), "ELOG Version %s\r\n", VERSION); - if (sendmail(lbs, smtp_host, mail_from, user_email, subject, mail_text, TRUE, + if (sendmail(lbs, smtp_host, mail_from, user_email, subject, mail_text, TRUE, url, "text/plain", NULL, NULL, 0) != -1) { /* save new password */ @@ -13222,7 +13270,7 @@ int submit_message(LOGBOOK * lbs, char *host, int message_id, char *error_str) int receive_message(LOGBOOK * lbs, char *url, int message_id, char *error_str, BOOL bnew) { - int i, status, size, n_attr; + int i, status, size, n_attr, header_size; char str[NAME_LENGTH], str2[NAME_LENGTH], *p, *p2, *message, date[80], attrib[MAX_N_ATTR][NAME_LENGTH], in_reply_to[80], reply_to[MAX_REPLY_TO * 10], encoding[80], locked_by[256], attachment[MAX_ATTACHMENTS][MAX_PATH_LENGTH], @@ -13335,8 +13383,9 @@ int receive_message(LOGBOOK * lbs, char *url, int message_id, char *error_str, B return -1; } p += 4; + header_size = (int)p - (int)message; - el_submit_attachment(lbs, attachment[i], p, size, NULL); + el_submit_attachment(lbs, attachment[i], p, size - header_size, NULL); xfree(message); } } @@ -15031,7 +15080,7 @@ void display_line(LOGBOOK * lbs, int message_id, int number, char *mode, rsprintf(""); + rsprintf(" "); } else { @@ -15596,7 +15645,7 @@ BOOL is_command_allowed(LOGBOOK * lbs, char *command) if (!str[0]) { if (!getcfg(lbs->name, "Guest Find Menu commands", str, sizeof(str)) - || *getparam("unm") != 0) + || *getparam("unm") != 0) getcfg(lbs->name, "Find Menu commands", str, sizeof(str)); } @@ -15763,6 +15812,8 @@ void show_page_filters(LOGBOOK * lbs, int n_msg, int page_n, BOOL mode_commands, if (!isparam("new_entries")) rsprintf("%s  ", loc("Show only new entries")); + else + rsprintf("%s  ", loc("Show all entries")); if (getcfg(lbs->name, "Quick filter", str, sizeof(str))) { @@ -15853,12 +15904,12 @@ void show_page_filters(LOGBOOK * lbs, int n_msg, int page_n, BOOL mode_commands, if (comment[0] == 0) strcpy(comment, attr_options[i][j]); - for (i1=i2=0 ; i1<=(int)comment ; i1++) { + for (i1 = i2 = 0; i1 <= (int) strlen(comment); i1++) { if (comment[i1] == '(') { option[i2++] = '\\'; option[i2++] = '('; } else if (comment[i1] == '{') { - option[i2]= 0; + option[i2] = 0; break; } else option[i2++] = comment[i1]; @@ -16508,7 +16559,7 @@ void show_elog_list(LOGBOOK * lbs, INT past_n, INT last_n, INT page_n, char *inf /* for page display, get mode from config file */ if (getcfg(lbs->name, "Display Mode", str, sizeof(str))) strcpy(mode, str); - + /* supersede mode from cookie */ if (isparam("elmode")) strcpy(mode, getparam("elmode")); @@ -17176,7 +17227,7 @@ void show_elog_list(LOGBOOK * lbs, INT past_n, INT last_n, INT page_n, char *inf if (!menu_str[0]) { if (!getcfg(lbs->name, "Guest list menu commands", menu_str, sizeof(menu_str)) - || *getparam("unm") != 0) + || *getparam("unm") != 0) getcfg(lbs->name, "list menu commands", menu_str, sizeof(menu_str)); } @@ -17246,7 +17297,7 @@ void show_elog_list(LOGBOOK * lbs, INT past_n, INT last_n, INT page_n, char *inf if ((getcfg(lbs->name, "find menu text", str, sizeof(str)) || getcfg(lbs->name, "list menu text", str, sizeof(str))) - && !printable) { + && !printable) { FILE *f; char file_name[256], *buf; @@ -17511,7 +17562,7 @@ void show_elog_list(LOGBOOK * lbs, INT past_n, INT last_n, INT page_n, char *inf if (list[0]) { n_attr_disp = strbreak(list, disp_attr, MAX_N_ATTR, ","); - + /* if text is in guest display list, adjust number of *real* attributes */ if (text_in_attr) n_attr_disp--; @@ -17649,6 +17700,31 @@ void show_elog_list(LOGBOOK * lbs, INT past_n, INT last_n, INT page_n, char *inf strlcpy(str, attrib[i], sizeof(str)); if (str[0]) { + if (attr_flags[i] & AF_DATE) { + if (!getcfg(lbs->name, "Date format", format, sizeof(format))) + strcpy(format, DEFAULT_DATE_FORMAT); + + ltime = atoi(attrib[i]); + ptms = localtime(<ime); + if (ltime == 0) + strcpy(str, "-"); + else + my_strftime(str, sizeof(str), format, ptms); + + } else if (attr_flags[i] & AF_DATETIME) { + + if (!getcfg(lbs->name, "Time format", format, sizeof(format))) + strcpy(format, DEFAULT_TIME_FORMAT); + + ltime = atoi(attrib[i]); + ptms = localtime(<ime); + if (ltime == 0) + strcpy(str, "-"); + else + my_strftime(str, sizeof(str), format, ptms); + + } + rsputs("\""); pt1 = str; while ((pt2 = strchr(pt1, '"')) != NULL) { @@ -17676,14 +17752,40 @@ void show_elog_list(LOGBOOK * lbs, INT past_n, INT last_n, INT page_n, char *inf rsprintf("\t\t%s\n", date); for (i = 0; i < lbs->n_attr; i++) { - strcpy(str, attr_list[i]); - for (j = 0; j < (int) strlen(str); j++) - if (!isalnum(str[j])) - str[j] = '_'; + strcpy(iattr, attr_list[i]); + for (j = 0; j < (int) strlen(iattr); j++) + if (!isalnum(iattr[j])) + iattr[j] = '_'; + rsprintf("\t\t<%s>", iattr); - rsprintf("\t\t<%s>", str); - xmlencode(attrib[i]); - rsprintf("\n", str); + strcpy(str, attrib[i]); + if (attr_flags[i] & AF_DATE) { + if (!getcfg(lbs->name, "Date format", format, sizeof(format))) + strcpy(format, DEFAULT_DATE_FORMAT); + + ltime = atoi(attrib[i]); + ptms = localtime(<ime); + if (ltime == 0) + strcpy(str, "-"); + else + my_strftime(str, sizeof(str), format, ptms); + + } else if (attr_flags[i] & AF_DATETIME) { + + if (!getcfg(lbs->name, "Time format", format, sizeof(format))) + strcpy(format, DEFAULT_TIME_FORMAT); + + ltime = atoi(attrib[i]); + ptms = localtime(<ime); + if (ltime == 0) + strcpy(str, "-"); + else + my_strftime(str, sizeof(str), format, ptms); + + } + + xmlencode(str); + rsprintf("\n", iattr); } rsputs("\t\t"); xmlencode(text); @@ -17893,41 +17995,24 @@ void show_elog_thread(LOGBOOK * lbs, int message_id) /*------------------------------------------------------------------*/ -int compose_email(LOGBOOK * lbs, char *mail_to, int message_id, - char attrib[MAX_N_ATTR][NAME_LENGTH], char *mail_param, int old_mail, - char att_file[MAX_ATTACHMENTS][256], char *encoding) +void format_email_text(LOGBOOK * lbs, char *mail_to, int message_id, + char attrib[MAX_N_ATTR][NAME_LENGTH], char *mail_param, int old_mail, + char att_file[MAX_ATTACHMENTS][256], char *encoding, char *mail_text) { - int i, j, k, n, flags, status, html=0; - char str[NAME_LENGTH + 100], str2[256], mail_from[256], *mail_text, smtp_host[256], - subject[256], format[256], error[256], content_type[256]; + int j, k, flags; + char str[NAME_LENGTH + 100], str2[256], mail_from[256], subject[256], format[256]; char slist[MAX_N_ATTR + 10][NAME_LENGTH], svalue[MAX_N_ATTR + 10][NAME_LENGTH]; - char list[MAX_PARAM][NAME_LENGTH], url[256], comment[256]; + char url[256], comment[256]; time_t ltime; struct tm *pts; - if (!getcfg("global", "SMTP host", smtp_host, sizeof(smtp_host))) { - show_error(loc("No SMTP host defined in [global] section of configuration file")); - return 0; - } - flags = 63; if (getcfg(lbs->name, "Email format", str, sizeof(str))) flags = atoi(str); - if (encoding[0] == 'E' || encoding[0] == 'H') - html = 1; - retrieve_email_from(lbs, mail_from, attrib); - mail_text = xmalloc(TEXT_SIZE + 1000); - mail_text[0] = 0; - - if (html) - strcpy(mail_text + strlen(mail_text), "\r\n"); - if (flags & 1) { - if (html) - strcpy(mail_text + strlen(mail_text), "

      \r\n"); if (getcfg(lbs->name, "Use Email heading", str, sizeof(str))) { if (old_mail) { if (!getcfg(lbs->name, "Use Email heading edit", str, sizeof(str))) @@ -17944,21 +18029,159 @@ int compose_email(LOGBOOK * lbs, char *mail_to, int message_id, strcat(mail_text, ":"); } - if (html) - strcpy(mail_text + strlen(mail_text), "

      \r\n"); - else - sprintf(mail_text + strlen(mail_text), "\r\n\r\n"); + sprintf(mail_text + strlen(mail_text), "\r\n\r\n"); } - if (html) - sprintf(mail_text + strlen(mail_text), "
      \n"); + rsprintf("\n"); if (enc_selected == 0 && show_smileys) { + rsprintf("\n"); } + if (enc_selected == 0) + rsprintf("
      \n"); rsicon("smile", loc("smiling"), ":)"); - rsprintf("
      \n"); + rsprintf("
      \n"); rsicon("happy", loc("happy"), ":))"); - rsprintf("
      \n"); - rsicon("wink", loc("winking"), ";)"); - rsprintf("
      \n"); + rsprintf("
      \n"); + rsicon("wink", loc("winking"), ";)"); + rsprintf("
      \n"); rsicon("biggrin", loc("big grin"), ":D"); - rsprintf("
      \n"); + rsprintf("
      \n"); rsicon("crying", loc("crying"), ";("); - rsprintf("
      \n"); + rsprintf("
      \n"); rsicon("cool", loc("cool"), "8)"); - rsprintf("
      \n"); + rsprintf("
      \n"); rsicon("frown", loc("frowning"), ":("); - rsprintf("
      \n"); + rsprintf("
      \n"); rsicon("confused", loc("confused"), "?)"); - rsprintf("
      \n"); + rsprintf("
      \n"); rsicon("eek", loc("eek"), "8o"); - rsprintf("
      \n"); + rsprintf("
      \n"); rsicon("mad", loc("mad"), "X("); - rsprintf("
      \n"); + rsprintf("
      \n"); rsicon("pleased", loc("pleased"), ":]"); - rsprintf("
      \n"); + rsprintf("
      \n"); rsicon("tongue", loc("tongue"), ":P"); - rsprintf("
      \n"); + rsprintf("
      \n"); rsicon("yawn", loc("yawn"), ":O"); - rsprintf("
      \n"); + rsprintf("
      \n"); + /* set textarea width */ width = 112; @@ -9917,11 +9955,10 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL if (enc_selected == 1) /* use hard wrapping only for plain text */ - rsprintf("
      \n"); /* Encoding radio buttons */ - + rsprintf("%s: ", loc("Encoding")); if (enc_selected == 0) rsprintf(""); else - rsprintf(""); - rsprintf("\n"); + rsprintf + (""); + rsprintf + ("\n"); if (enc_selected == 1) rsprintf(""); else - rsprintf(""); + rsprintf + (""); rsprintf("\n"); if (enc_selected == 2) rsprintf(""); else - rsprintf(""); + rsprintf + (""); rsprintf("\n"); rsprintf("
      \n"); @@ -10163,6 +10204,13 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL if (enc_selected == 0) rsprintf("
      ", sclass); if (attrib[i][0]) rsprintf("\"%s\"", attrib[i], attrib[i]); - rsprintf(" 
      \r\n"); + if (flags & 32) + sprintf(mail_text + strlen(mail_text), "%s : %s\r\n", loc("Logbook"), lbs->name); + + if (flags & 2) { + for (j = 0; j < lbs->n_attr; j++) { + strcpy(str, " "); + memcpy(str, attr_list[j], strlen(attr_list[j])); + + comment[0] = 0; + if (attr_flags[j] & AF_ICON) { + + sprintf(str2, "Icon comment %s", attrib[j]); + getcfg(lbs->name, str2, comment, sizeof(comment)); + + } else if (attr_flags[j] & AF_DATE) { + + if (!getcfg(lbs->name, "Date format", format, sizeof(format))) + strcpy(format, DEFAULT_DATE_FORMAT); + + ltime = atoi(attrib[j]); + pts = localtime(<ime); + if (ltime == 0) + strcpy(comment, "-"); + else + my_strftime(comment, sizeof(str), format, pts); + } else if (attr_flags[j] & AF_DATETIME) { + + if (!getcfg(lbs->name, "Time format", format, sizeof(format))) + strcpy(format, DEFAULT_TIME_FORMAT); + + ltime = atoi(attrib[j]); + pts = localtime(<ime); + if (ltime == 0) + strcpy(comment, "-"); + else + my_strftime(comment, sizeof(str), format, pts); + } + + if (!comment[0]) + strcpy(comment, attrib[j]); + + if (strieq(attr_options[j][0], "boolean")) + strcpy(comment, atoi(attrib[j]) ? loc("Yes") : loc("No")); + + for (k = strlen(str) - 1; k > 0; k--) + if (str[k] != ' ') + break; + + if (k < 20) + sprintf(str + 20, ": %s\r\n", comment); + else + sprintf(str + k + 1, ": %s\r\n", comment); + + strcpy(mail_text + strlen(mail_text), str); + } + } + + /* compose subject from attributes */ + if (getcfg(lbs->name, "Use Email Subject", subject, sizeof(subject))) { + j = build_subst_list(lbs, slist, svalue, attrib, TRUE); + sprintf(str, "%d", message_id); + add_subst_list(slist, svalue, "message id", str, &j); + strsubst(subject, sizeof(subject), slist, svalue, j); + } else { + if (old_mail) + strcpy(subject, "Updated ELOG entry"); + else + strcpy(subject, "New ELOG entry"); + } + + /* try to get URL from referer */ + + if (!getcfg("global", "URL", str, sizeof(str))) { + if (referer[0]) + strcpy(str, referer); + else { + if (elog_tcp_port == 80) + sprintf(str, "http://%s/", host_name); + else + sprintf(str, "http://%s:%d/", host_name, elog_tcp_port); + strcat(str, lbs->name); + strcat(str, "/"); + } + } else { + if (str[strlen(str) - 1] != '/') + strlcat(str, "/", sizeof(str)); + strlcat(str, lbs->name_enc, sizeof(str)); + strlcat(str, "/", sizeof(str)); + } + + sprintf(url, "%s%d", str, message_id); + + if (flags & 4) + sprintf(mail_text + strlen(mail_text), "\r\n%s URL : %s\r\n", loc("Logbook"), url); + + if (flags & 8) { + if (*getparam("text")) { + sprintf(mail_text + strlen(mail_text), + "\r\n=================================\r\n\r\n%s", getparam("text")); + } + } +} + +/*------------------------------------------------------------------*/ + +void format_email_html(LOGBOOK * lbs, char *mail_to, int message_id, + char attrib[MAX_N_ATTR][NAME_LENGTH], char *mail_param, int old_mail, + char att_file[MAX_ATTACHMENTS][256], char *encoding, char *mail_text) +{ + int j, k, flags; + char str[NAME_LENGTH + 100], str2[256], mail_from[256], subject[256], format[256]; + char slist[MAX_N_ATTR + 10][NAME_LENGTH], svalue[MAX_N_ATTR + 10][NAME_LENGTH]; + char url[256], comment[256]; + time_t ltime; + struct tm *pts; + + retrieve_email_from(lbs, mail_from, attrib); + + flags = 63; + if (getcfg(lbs->name, "Email format", str, sizeof(str))) + flags = atoi(str); + + strcpy(mail_text + strlen(mail_text), "\r\n"); + + if (flags & 1) { + strcpy(mail_text + strlen(mail_text), "

      \r\n"); + if (getcfg(lbs->name, "Use Email heading", str, sizeof(str))) { + if (old_mail) { + if (!getcfg(lbs->name, "Use Email heading edit", str, sizeof(str))) + getcfg(lbs->name, "Use Email heading", str, sizeof(str)); + } + + sprintf(mail_text + strlen(mail_text), str); + + } else { + if (old_mail) + sprintf(mail_text + strlen(mail_text), loc("A old entry has been updated on %s"), host_name); + else + sprintf(mail_text + strlen(mail_text), loc("A new entry has been submitted on %s"), host_name); + strcat(mail_text, ":"); + } + + strcpy(mail_text + strlen(mail_text), "

      \r\n"); + } + + sprintf(mail_text + strlen(mail_text), "
      \r\n"); if (flags & 32) { - if (html) { - sprintf(mail_text + strlen(mail_text), "", loc("Logbook")); - sprintf(mail_text + strlen(mail_text), "\r\n", lbs->name); - } else - sprintf(mail_text + strlen(mail_text), "%s : %s\r\n", loc("Logbook"), lbs->name); + sprintf(mail_text + strlen(mail_text), "", loc("Logbook")); + sprintf(mail_text + strlen(mail_text), "\r\n", lbs->name); } if (flags & 2) { @@ -18006,17 +18229,8 @@ int compose_email(LOGBOOK * lbs, char *mail_to, int message_id, if (str[k] != ' ') break; - if (html) { - sprintf(mail_text + strlen(mail_text), "", attr_list[j]); - sprintf(mail_text + strlen(mail_text), "\r\n", comment); - } else { - if (k < 20) - sprintf(str + 20, ": %s\r\n", comment); - else - sprintf(str + k + 1, ": %s\r\n", comment); - - strcpy(mail_text + strlen(mail_text), str); - } + sprintf(mail_text + strlen(mail_text), "", attr_list[j]); + sprintf(mail_text + strlen(mail_text), "\r\n", comment); } } @@ -18056,21 +18270,17 @@ int compose_email(LOGBOOK * lbs, char *mail_to, int message_id, sprintf(url, "%s%d", str, message_id); if (flags & 4) { - if (html) { - sprintf(mail_text + strlen(mail_text), "\r\n", url, url); - } else - sprintf(mail_text + strlen(mail_text), "\r\n%s URL : %s\r\n", loc("Logbook"), url); + sprintf(mail_text + strlen(mail_text), + "\r\n", url, url); } - if (html) - sprintf(mail_text + strlen(mail_text), "
      %s URL%s
      %s URL%s
      %s URL%s
      %s%s
      %s URL", loc("Logbook")); - sprintf(mail_text + strlen(mail_text), "%s
      %s URL", loc("Logbook")); + sprintf(mail_text + strlen(mail_text), "%s
      \r\n"); + sprintf(mail_text + strlen(mail_text), "\r\n"); if (flags & 8) { if (*getparam("text")) { if (encoding[0] == 'H') - sprintf(mail_text + strlen(mail_text), - "\r\n
      \r\n%s", getparam("text")); + sprintf(mail_text + strlen(mail_text), "\r\n
      \r\n%s", getparam("text")); if (encoding[0] == 'E') { sprintf(mail_text + strlen(mail_text), "\r\n
      \r\n"); strlen_retbuf = 0; @@ -18079,12 +18289,56 @@ int compose_email(LOGBOOK * lbs, char *mail_to, int message_id, strlen_retbuf = 0; } else sprintf(mail_text + strlen(mail_text), - "\r\n=================================\r\n\r\n%s", getparam("text")); + "\r\n=================================\r\n\r\n%s", getparam("text")); } } + strcpy(mail_text + strlen(mail_text), "\r\n\r\n"); +} + +/*------------------------------------------------------------------*/ + +int compose_email(LOGBOOK * lbs, char *mail_to, int message_id, + char attrib[MAX_N_ATTR][NAME_LENGTH], char *mail_param, int old_mail, + char att_file[MAX_ATTACHMENTS][256], char *encoding) +{ + int i, n, flags, status, html = 0; + char str[NAME_LENGTH + 100], mail_from[256], *mail_text, smtp_host[256], + subject[256], error[256], content_type[256]; + char list[MAX_PARAM][NAME_LENGTH], url[256]; + + if (!getcfg("global", "SMTP host", smtp_host, sizeof(smtp_host))) { + show_error(loc("No SMTP host defined in [global] section of configuration file")); + return 0; + } + + flags = 63; + if (getcfg(lbs->name, "Email format", str, sizeof(str))) + flags = atoi(str); + + /* get initial HTML flag from message encoding */ + if (encoding[0] == 'E' || encoding[0] == 'H') + html = 1; + + /* overwrite with config setting */ + if (getcfg(lbs->name, "Email encoding", str, sizeof(str))) { + if (atoi(str) == 1) + html = 0; + else if (atoi(str) == 2) + html = 1; + } + + retrieve_email_from(lbs, mail_from, attrib); + + mail_text = xmalloc(TEXT_SIZE + 1000); + mail_text[0] = 0; + if (html) - strcpy(mail_text + strlen(mail_text), "\r\n\r\n"); + format_email_html(lbs, mail_to, message_id, attrib, mail_param, old_mail, att_file, encoding, + mail_text); + else + format_email_text(lbs, mail_to, message_id, attrib, mail_param, old_mail, att_file, encoding, + mail_text); if (html) strcpy(content_type, "text/html"); @@ -18095,20 +18349,20 @@ int compose_email(LOGBOOK * lbs, char *mail_to, int message_id, if (flags & 16) { if (getcfg(lbs->name, "Omit Email to", str, sizeof(str)) && atoi(str) == 1) status = - sendmail(lbs, smtp_host, mail_from, mail_to, subject, mail_text, FALSE, + sendmail(lbs, smtp_host, mail_from, mail_to, subject, mail_text, FALSE, url, content_type, att_file, error, sizeof(error)); else status = - sendmail(lbs, smtp_host, mail_from, mail_to, subject, mail_text, TRUE, + sendmail(lbs, smtp_host, mail_from, mail_to, subject, mail_text, TRUE, url, content_type, att_file, error, sizeof(error)); } else { if (getcfg(lbs->name, "Omit Email to", str, sizeof(str)) && atoi(str) == 1) status = - sendmail(lbs, smtp_host, mail_from, mail_to, subject, mail_text, FALSE, + sendmail(lbs, smtp_host, mail_from, mail_to, subject, mail_text, FALSE, url, content_type, NULL, error, sizeof(error)); else status = - sendmail(lbs, smtp_host, mail_from, mail_to, subject, mail_text, TRUE, + sendmail(lbs, smtp_host, mail_from, mail_to, subject, mail_text, TRUE, url, content_type, NULL, error, sizeof(error)); } @@ -18747,8 +19001,7 @@ void submit_elog(LOGBOOK * lbs) message_id = el_submit(lbs, message_id, bedit, date, attr_list, attrib, n_attr, - getparam("text"), in_reply_to, reply_to, - getparam("encoding"), att_file, TRUE, NULL); + getparam("text"), in_reply_to, reply_to, getparam("encoding"), att_file, TRUE, NULL); if (message_id <= 0) { sprintf(str, loc("New entry cannot be written to directory \"%s\""), lbs->data_dir); @@ -18870,7 +19123,9 @@ void submit_elog(LOGBOOK * lbs) if (strlen(mail_to) > 0) { mail_to[strlen(mail_to) - 1] = 0; /* strip last ',' */ - if (compose_email(lbs, mail_to, message_id, attrib, mail_param, *getparam("edit_id"), att_file, getparam("encoding")) == 0) + if (compose_email + (lbs, mail_to, message_id, attrib, mail_param, *getparam("edit_id"), att_file, + getparam("encoding")) == 0) return; } @@ -19207,7 +19462,7 @@ void show_elog_entry(LOGBOOK * lbs, char *dec_path, char *command) { int size, i, j, n, n_log, status, fh, length, message_error, index, n_hidden, message_id, orig_message_id, format_flags[MAX_N_ATTR], att_hide[MAX_ATTACHMENTS], - n_attachments, n_lines; + att_inline[MAX_ATTACHMENTS], n_attachments, n_lines; char str[2 * NAME_LENGTH], ref[256], file_enc[256], thumb_name[256], attrib[MAX_N_ATTR][NAME_LENGTH]; char date[80], text[TEXT_SIZE], menu_str[1000], cmd[256], orig_tag[80], reply_tag[MAX_REPLY_TO * 10], display[NAME_LENGTH], @@ -19744,7 +19999,7 @@ void show_elog_entry(LOGBOOK * lbs, char *dec_path, char *command) else rsprintf("\"%s\"", attrib[i], attrib[i]); } - rsprintf(" \n"); + rsprintf(" \n"); } else if ((attr_flags[i] & AF_MULTI) && (format_flags[i] & AFF_MULTI_LINE)) { rsprintf("%s:\n", attr_list[i], class_value); @@ -19777,7 +20032,7 @@ void show_elog_entry(LOGBOOK * lbs, char *dec_path, char *command) else my_strftime(str, sizeof(str), format, pts); - rsprintf("%s:%s \n", attr_list[i], class_value, str); + rsprintf("%s:%s \n", attr_list[i], class_value, str); } else if (attr_flags[i] & AF_DATETIME) { @@ -19791,7 +20046,7 @@ void show_elog_entry(LOGBOOK * lbs, char *dec_path, char *command) else my_strftime(str, sizeof(str), format, pts); - rsprintf("%s:%s \n", attr_list[i], class_value, str); + rsprintf("%s:%s \n", attr_list[i], class_value, str); } else { rsprintf("%s:\n", attr_list[i], class_value); @@ -19817,7 +20072,7 @@ void show_elog_entry(LOGBOOK * lbs, char *dec_path, char *command) else rsputs2(display); - rsprintf(" \n"); + rsprintf(" \n"); } if (i < lbs->n_attr - 1 && (format_flags[i + 1] & AFF_SAME_LINE) == 0) { @@ -19877,13 +20132,12 @@ void show_elog_entry(LOGBOOK * lbs, char *dec_path, char *command) n_hidden = 0; for (i = 0, n_attachments = 0; i < MAX_ATTACHMENTS; i++) { + att_inline[i] = 0; att_hide[i] = 0; - sprintf(str, "[img]elog:/%d[/img]", i+1); - if (strieq(encoding, "ELCode") && - strstr(text, str)) { - att_hide[i] = 1; - n_hidden++; + sprintf(str, "[img]elog:/%d[/img]", i + 1); + if (strieq(encoding, "ELCode") && stristr(text, str)) { + att_inline[i] = 1; } if (attachment[i][0]) n_attachments++; @@ -19912,7 +20166,7 @@ void show_elog_entry(LOGBOOK * lbs, char *dec_path, char *command) } for (index = 0; index < MAX_ATTACHMENTS; index++) { - if (attachment[index][0] && strlen(attachment[index]) > 14) { + if (attachment[index][0] && strlen(attachment[index]) > 14 && !att_inline[index]) { for (i = 0; i < (int) strlen(attachment[index]); i++) att[i] = toupper(attachment[index][i]); att[i] = 0; @@ -20349,7 +20603,7 @@ int load_password_files() /*------------------------------------------------------------------*/ int get_user_line(LOGBOOK * lbs, char *user, char *password, char *full_name, - char *email, BOOL email_notify[1000], time_t *last_logout) + char *email, BOOL email_notify[1000], time_t * last_logout) { int i, j; char str[256], global[256], orig_topgroup[256]; @@ -20492,7 +20746,7 @@ void set_user_login_time(LOGBOOK * lbs, char *user) last = date_to_ltime(str); } else last = 0; - + time(&now); /* check if activity time changed significantly */ @@ -21320,6 +21574,104 @@ void show_calendar(LOGBOOK * lbs) /*------------------------------------------------------------------*/ +void show_uploader(LOGBOOK * lbs) +{ + char str[256]; + + show_html_header(lbs, FALSE, loc("Upload image"), TRUE, FALSE, NULL); + rsprintf("\n"); + rsprintf("\n"); + + rsprintf("\n\n"); + + rsprintf(""); + + strcpy(str, loc("Maximum allowed file size is")); + if (MAX_CONTENT_LENGTH >= 1024 * 1024) + sprintf(str + strlen(str), " %d MB", MAX_CONTENT_LENGTH / 1024 / 1024); + else + sprintf(str + strlen(str), " %d kB", MAX_CONTENT_LENGTH / 1024); + rsprintf("\n", + loc("Enter filename or URL"), str); + rsprintf("\n"); + + rsprintf("\n"); + + rsprintf("
      %s: (%s)

      \n"); + rsprintf("\n", + loc("Upload")); + rsprintf("\n", loc("Cancel")); + rsprintf("

      \n"); + rsprintf("
      \n"); +} + +/*------------------------------------------------------------------*/ + +void show_uploader_finished(LOGBOOK * lbs) +{ + int i; + char str[256], att[256]; + + show_html_header(lbs, FALSE, loc("Image uploaded successfully"), FALSE, FALSE, NULL); + + rsprintf("\n\n"); + + rsprintf("\n"); + rsprintf("\n"); + + /* find last attachment */ + att[0] = 0; + for (i = MAX_ATTACHMENTS - 1; i >= 0; i--) { + sprintf(str, "attachment%d", i); + if (isparam(str)) { + strlcpy(att, getparam(str), sizeof(att)); + break; + } + } + + rsprintf("\n\n"); + + rsprintf("
      \n"); + rsprintf(loc("Image \"%s\" uploaded successfully"), att + 14); + rsprintf("
      \n"); + + rsprintf("\n"); +} + +/*------------------------------------------------------------------*/ + void interprete(char *lbook, char *path) /********************************************************************\ @@ -21753,6 +22105,18 @@ void interprete(char *lbook, char *path) return; } + /* check for upload window */ + if (strieq(dec_path, "upload.html")) { + show_uploader(lbs); + return; + } + + /* check for finished JavaScript upload */ + if (isparam("jcmd") && *getparam("jcmd") && strieq(getparam("jcmd"), "JUpload")) { + show_uploader_finished(lbs); + return; + } + /*---- check if file requested -----------------------------------*/ /* skip elog message id in front of possible attachment */ @@ -22273,8 +22637,9 @@ void decode_get(char *logbook, char *string) void decode_post(LOGBOOK * lbs, char *string, char *boundary, int length) { - int n_att; - char *pinit, *p, *ptmp, file_name[MAX_PATH_LENGTH], full_name[MAX_PATH_LENGTH], + int n_att, size, header_size; + char *pinit, *p, *ptmp, *buffer, *pbody, + file_name[MAX_PATH_LENGTH], full_name[MAX_PATH_LENGTH], str[NAME_LENGTH], line[NAME_LENGTH], item[NAME_LENGTH]; n_att = 0; @@ -22401,15 +22766,40 @@ void decode_post(LOGBOOK * lbs, char *string, char *boundary, int length) ptmp += strlen(ptmp); } while (TRUE); + /* check attachment size */ if (file_name[0] && (int) (p - string) == 0) { - sprintf(str, loc("Attachment file \"%s\" empty or not found"), file_name); - show_error(str); - return; - } - /* save attachment */ - if (file_name[0]) { + /* check for URL */ + if (stristr(file_name, "http://")) { + size = retrieve_url(file_name, &buffer, NULL); + if (size == 0) { + sprintf(str, loc("Cannot retrieve file from URL \"%s\""), file_name); + show_error(str); + return; + } + + /* check for HTTP header */ + pbody = strstr(buffer, "\r\n\r\n"); + if (!pbody) { + show_error(loc("Invalid HTTP header")); + xfree(buffer); + return; + } + pbody += 4; + header_size = (int)pbody - (int)buffer; + + el_submit_attachment(lbs, file_name, pbody, size - header_size, full_name); + xfree(buffer); + sprintf(str, "attachment%d", n_att++); + setparam(str, full_name); + } else { + sprintf(str, loc("Attachment file \"%s\" empty or not found"), file_name); + show_error(str); + return; + } + } else if (file_name[0]) { + /* save attachment */ el_submit_attachment(lbs, file_name, string, (int) (p - string), full_name); sprintf(str, "attachment%d", n_att++); setparam(str, full_name); @@ -23113,6 +23503,28 @@ void server_loop(void) setcfg_topgroup(""); p = strchr(net_buffer, '/') + 1; + + /* check if file is in scripts directory or in its subdirs */ + for (i = 0; p[i] && p[i] != ' ' && p[i] != '?'; i++) + url[i] = (p[i] == '/') ? DIR_SEPARATOR : p[i]; + url[i] = 0; + if (strchr(url, '.')) { + strlcpy(str, resource_dir, sizeof(str)); + strlcat(str, "scripts", sizeof(str)); + strlcat(str, DIR_SEPARATOR_STR, sizeof(str)); + strlcat(str, url, sizeof(str)); + if (exist_file(str)) { + send_file_direct(str); + send(_sock, return_buffer, return_length, 0); + if (verbose) { + eprintf("==== Return ================================\n"); + eputs(return_buffer); + eprintf("\n\n"); + } + goto finished; + } + } + logbook[0] = 0; for (i = 0; *p && *p != '/' && *p != '?' && *p != ' '; i++) logbook[i] = *p++; @@ -23436,8 +23848,8 @@ void server_loop(void) if (p != NULL) { length = strlen(p + 4); header_length = (int) (p - return_buffer); - if (header_length+100 > (int)sizeof(header_buffer)) - header_length = sizeof(header_buffer)-100; + if (header_length + 100 > (int) sizeof(header_buffer)) + header_length = sizeof(header_buffer) - 100; memcpy(header_buffer, return_buffer, header_length); sprintf(header_buffer + header_length, "\r\nContent-Length: %d\r\n\r\n", length); send(_sock, header_buffer, strlen(header_buffer), 0); @@ -24053,8 +24465,8 @@ int run_service(void) int main(int argc, char *argv[]) { int i, j, n, fh, tcp_port_cl, silent, sync_flag; - char read_pwd[80], write_pwd[80], admin_pwd[80], smtp_pwd[80], str[256], - logbook[256], clone_url[256], error_str[256], file_name[256]; + char read_pwd[80], write_pwd[80], admin_pwd[80], smtp_pwd[80], str[256], + logbook[256], clone_url[256], error_str[256], file_name[256]; time_t now; struct tm *tms; struct stat finfo; diff --git a/themes/default/default.css b/themes/default/default.css index d5c12db0..f3628587 100755 --- a/themes/default/default.css +++ b/themes/default/default.css @@ -553,6 +553,31 @@ td { cursor:pointer; } +.uploadwindow { + margin:0px; + color:black; + background-color:white; + font-family:sans-serif; + padding:0px; +} + +.uploadtext +{ + background-color:#CCCCFF; + border:1px solid #0000FF; + border-top:1px solid white; + border-left:1px solid white; + padding:3px; +} + +.uploadvalue { + border:1px solid #308000; + border-top:1px solid white; + border-left:1px solid white; + background-color:#DDEEBB; + padding:3px; +} + .quotetable { width:98%; align:center;