41 const char *dir = dirCopy.
text();
78 if(generate_html_header_and_trailer)
84 html +=
"<pre class=\"rlhtmldirpre\">\n";
108 htmlline.
printf(
"<a class=\"rlhtmldirup\" href=\"ftp://rlhtmldirup/dir/up\">..</a>\n");
117 if(line == NULL)
break;
118 if(strncmp(line,
"#EOF#",5) == 0)
break;
121 cptr = strstr(file.
text(),
" [");
124 if (strcmp(cptr,
" [d]") == 0)
131 if(cptr != NULL) *cptr =
'\0';
134 cptr = strrchr(file.
text(),
'/');
135 if(cptr == NULL) cptr = file.
text();
137 if(
recursive) htmlline.
printf(
"+<a class=\"rlhtmldir\" href=\"ftp://rlhtmldir%s\">%s</a>\n", file.
text(), file.
text());
138 else htmlline.
printf(
"+<a class=\"rlhtmldir\" href=\"ftp://rlhtmldir%s\">%s</a>\n", file.
text(), cptr);
143 else if(strcmp(cptr,
" [f]") == 0)
150 if(cptr != NULL) *cptr =
'\0';
151 cptr = strrchr(file.
text(),
'/');
152 if(cptr == NULL) cptr = file.
text();
156 if(
recursive) htmlline.
printf(
" <a class=\"rlhtmlfile\" href=\"ftp://rlhtmlfile%s\">%s</a>\n", file.
text(), file.
text());
157 else htmlline.
printf(
" <a class=\"rlhtmlfile\" href=\"ftp://rlhtmlfile%s\">%s</a>\n", file.
text(), cptr);
168 if(generate_html_header_and_trailer)
179 if(row == NULL)
return 0;
197 if(line == NULL)
break;
void setText(int column, const char *text)
const char * htmlTrailer()
const char * htmlHeader()
int cd(const char *dir, int is_initial_dir=0)
int getFilenames(rlSpreadsheetRow *row)
const char * getHtml(int generate_html_header_and_trailer=1)
int printf(const char *format,...)
int spawn(const char *command)
rlString textrlHtmlDirCSS