added: column 'guest_name' to 'item' table
used when user_id is -1 added: mount parameters: thread_with_info, thread_with_header added: function rm can remove threads git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@506 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -226,6 +226,61 @@ void dir_last_subject(Info & i)
|
||||
}
|
||||
|
||||
|
||||
void dir_last_info(Info & i)
|
||||
{
|
||||
Ezc::Generator gen(i.out, pat_dir_last_info, functions);
|
||||
gen.Generate();
|
||||
}
|
||||
|
||||
|
||||
void dir_last_user(Info & i)
|
||||
{
|
||||
User * puser = data.users.GetUser(request.dir_table.back()->user_id);
|
||||
|
||||
if( puser )
|
||||
HtmlEscape(i.out, puser->name);
|
||||
else
|
||||
{
|
||||
i.out << "~";
|
||||
|
||||
if( !request.dir_table.back()->guest_name.empty() )
|
||||
HtmlEscape(i.out, request.dir_table.back()->guest_name);
|
||||
else
|
||||
i.out << "guest"; // !! dodac do konfiga
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void dir_last_date_creation(Info & i)
|
||||
{
|
||||
tm * ptm = &request.dir_table.back()->date_creation;
|
||||
|
||||
i.out << DateToStr(ptm->tm_year + 1900, ptm->tm_mon + 1, ptm->tm_mday, ptm->tm_hour, ptm->tm_min, ptm->tm_sec);
|
||||
}
|
||||
|
||||
|
||||
void dir_last_date_modification(Info & i)
|
||||
{
|
||||
tm * ptm = &request.dir_table.back()->date_modification;
|
||||
|
||||
i.out << DateToStr(ptm->tm_year + 1900, ptm->tm_mon + 1, ptm->tm_mday, ptm->tm_hour, ptm->tm_min, ptm->tm_sec);
|
||||
}
|
||||
|
||||
|
||||
void dir_last_dates_equal(Info & i)
|
||||
{
|
||||
tm * ptm1 = &request.dir_table.back()->date_creation;
|
||||
tm * ptm2 = &request.dir_table.back()->date_modification;
|
||||
|
||||
i.result = ptm1->tm_year == ptm2->tm_year &&
|
||||
ptm1->tm_mon == ptm2->tm_mon &&
|
||||
ptm1->tm_mday == ptm2->tm_mday &&
|
||||
ptm1->tm_hour == ptm2->tm_hour &&
|
||||
ptm1->tm_min == ptm2->tm_min &&
|
||||
ptm1->tm_sec == ptm2->tm_sec;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void dir_old(Info & i)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user