changed: upload function

select file type by the extension
         param: multi
fixed:   uptime function
         it showed incorrect uptime time (minuts were badly calculated)


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@575 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2010-02-12 23:16:13 +00:00
parent 796985472a
commit 3c5a7cd664
16 changed files with 275 additions and 81 deletions

View File

@@ -107,7 +107,8 @@ void item_print_content(std::ostringstream & out, const std::string & content, I
else
if( content_type == Item::ct_bbcode )
{
out << content; // !! tutaj bedzie parsowanie bbcodu i tworzenie odpowiadajacego mu html-a
//out << content; // !! tutaj bedzie parsowanie bbcodu i tworzenie odpowiadajacego mu html-a
out << "bbcode is not implemented yet";
}
else
if( content_type == Item::ct_raw )
@@ -117,6 +118,11 @@ void item_print_content(std::ostringstream & out, const std::string & content, I
}
void item_content_is_empty(Info & i)
{
i.result = request.item.content.empty();
}
void item_print_content(Info & i)
{
item_print_content(i.out, request.item.content, request.item.content_type);

View File

@@ -185,6 +185,7 @@ void Templates::CreateFunctions()
functions.Insert("item_id", item_id);
functions.Insert("item_subject", item_subject);
functions.Insert("item_subject_noescape", item_subject_noescape);
functions.Insert("item_content_is_empty", item_content_is_empty);
functions.Insert("item_content", item_content);
functions.Insert("item_content_noescape", item_content_noescape);
functions.Insert("item_content_type_is", item_content_type_is);

View File

@@ -103,6 +103,7 @@ namespace TemplatesFunctions
void item_content(Info & i);
void item_content_noescape(Info & i);
void item_content_type_is(Info & i);
void item_content_is_empty(Info & i);
void item_print_content(std::ostringstream & out, const std::string & content, Item::ContentType content_type);
void item_print_content(Info & i);
void item_privileges(Info & i);

View File

@@ -44,9 +44,9 @@ char buf[50];
time_t hour = min / 60;
if( hour == 0 && min == 0 )
sprintf(buf, "%d:%02d:%02d", (int)hour, (int)min, (int)sec);
sprintf(buf, "%d:%02d:%02d", (int)hour, (int)(min%60), (int)(sec%60));
else
sprintf(buf, "%d:%02d", (int)hour, (int)min);
sprintf(buf, "%d:%02d", (int)hour, (int)(min%60));
i.out << buf;
}