640 |
|
host[i] = 0; |
641 |
|
port = atoi(host + i + 1); |
642 |
|
break; |
643 |
+ |
}else if(vhost[i] == '['){ |
644 |
+ |
for(; vhost[i] != 0 && vhost[i] != ']'; i++); |
645 |
|
} |
646 |
|
} |
647 |
|
name = host; |
793 |
|
addstring(&str, " <tr>\n"); |
794 |
|
addstring(&str, " <th></th>\n"); |
795 |
|
addstring(&str, " <th>Filename</th>\n"); |
796 |
+ |
addstring(&str, " <th>Last-modified</th>\n"); |
797 |
|
addstring(&str, " <th>MIME</th>\n"); |
798 |
|
addstring(&str, " <th>Size</th>\n"); |
799 |
|
addstring(&str, " </tr>\n"); |
811 |
|
char* fpth = cm_strcat3(path, "/", items[i]); |
812 |
|
struct stat s; |
813 |
|
char size[512]; |
814 |
+ |
char date[512]; |
815 |
|
char* showmime; |
816 |
|
char* mime; |
817 |
+ |
struct tm* tm; |
818 |
|
size[0] = 0; |
819 |
|
stat(fpth, &s); |
820 |
+ |
tm = localtime(&s.st_mtime); |
821 |
+ |
strftime(date, 512, "%a, %d %b %Y %H:%M:%S %Z", tm); |
822 |
|
if(phase == 0 && !S_ISDIR(s.st_mode)) { |
823 |
|
free(fpth); |
824 |
|
continue; |
892 |
|
addstring(&str, "<tr>\n"); |
893 |
|
addstring(&str, " <td><img src=\"%s\" alt=\"icon\"></td>\n", icon); |
894 |
|
addstring(&str, " <td><a href=\"%l\"><code>%h</code></a></td>\n", items[i], itm); |
895 |
+ |
addstring(&str, " <td><code> %h </code></td>\n", date); |
896 |
|
addstring(&str, " <td><code> %h </code></td>\n", showmime); |
897 |
|
addstring(&str, " <td><code> %s </code></td>\n", size); |
898 |
|
addstring(&str, "</tr>\n"); |