added: two ezc functions:
void winix_postvar_value_is(Info & i); void winix_postvar_value_is_not(Info & i); git-svn-id: svn://ttmath.org/publicrep/winix/trunk@824 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
parent
e83fd91423
commit
09bfdf9e77
|
@ -560,6 +560,8 @@ void Templates::CreateFunctions()
|
|||
ezc_functions.Insert("true", winix_true);
|
||||
ezc_functions.Insert("winix_has_postvar", winix_has_postvar);
|
||||
ezc_functions.Insert("winix_postvar", winix_postvar);
|
||||
ezc_functions.Insert("winix_postvar_value_is", winix_postvar_value_is);
|
||||
ezc_functions.Insert("winix_postvar_value_is_not", winix_postvar_value_is_not);
|
||||
ezc_functions.Insert("str", str);
|
||||
ezc_functions.Insert("strnc", strnc);
|
||||
|
||||
|
|
|
@ -478,6 +478,8 @@ namespace TemplatesFunctions
|
|||
void winix_true(Info & i);
|
||||
void winix_has_postvar(Info & i);
|
||||
void winix_postvar(Info & i);
|
||||
void winix_postvar_value_is(Info & i);
|
||||
void winix_postvar_value_is_not(Info & i);
|
||||
void str(Info & i);
|
||||
void strnc(Info & i);
|
||||
|
||||
|
|
|
@ -266,6 +266,23 @@ void winix_postvar(Info & i)
|
|||
}
|
||||
|
||||
|
||||
// first parameter is param_name
|
||||
// second parameter is param_value
|
||||
void winix_postvar_value_is(Info & i)
|
||||
{
|
||||
if( i.params.size() == 2 )
|
||||
i.res = (cur->request->PostVar(i.params[0]) == i.params[1]);
|
||||
}
|
||||
|
||||
|
||||
void winix_postvar_value_is_not(Info & i)
|
||||
{
|
||||
if( i.params.size() == 2 )
|
||||
i.res = (cur->request->PostVar(i.params[0]) != i.params[1]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// these functions are to be used with [is...] statements
|
||||
void str(Info & i)
|
||||
|
|
Loading…
Reference in New Issue