If and ElseIF statement supported in DooView .
Functions used in the conditional statement must be registered in template_tags.php or else the malicious function call will be change to: function_deny()
Usage:
- Code: Select all
<!-- if {{MyVar}}==888 -->
With function
- Code: Select all
<!-- if {{checkVar(MyVar)}} -->
And you can do all the normal things such as:
- Code: Select all
<!-- if {{isGender(gender, 'female')}}==true && {{age}}>=14 -->
<!-- if {{isAdmin(user)}}==true && ({{age}}>=14 || {{age}}<54)-->
etc.
Try using a function that is not registered in template_tags, the function will be converted into function_deny and you can handle it in template_tags
- Code: Select all
<!-- if unlink('asdasd.txt') -->
<!-- if unlink ( 'asdasd.txt' ) && {{age}}>20-->
In the latest app folder, 'function_deny', 'isset', 'empty' are registered by default since they are used commonly in IF statements
The syntax is
- Code: Select all
<!-- if -->
<!-- elseif -->
<!-- else -->
<!-- endif-->
Details at
http://code.google.com/p/doophp/source/detail?r=14
* Slight update in the latest trunk r15
