winix/templates/upload.cpp

43 lines
861 B
C++
Executable File

/*
* This file is a part of CMSLU -- Content Management System like Unix
* and is not publicly distributed
*
* Copyright (c) 2008-2010, Tomasz Sowa
* All rights reserved.
*
*/
#include <ctime>
#include "templates.h"
#include "../core/request.h"
namespace TemplatesFunctions
{
static size_t upload_ckeditor_reqid = 0;
static int upload_fun_num = 0;
void upload_ckeditor_funnum(Info & i)
{
if( upload_ckeditor_reqid != request.id )
{
upload_ckeditor_reqid = request.id;
ckeditor_getparser.fun_num = 2; // default if there is a problem with parsing info
if( !request.param_table.empty() )
{
const char * str = request.param_table[request.param_table.size()-1]->c_str() + 1; // the first char is '?'
ckeditor_getparser.Parse(str);
}
upload_fun_num = ckeditor_getparser.fun_num;
}
i.out << upload_fun_num;
}
} // namespace