Commit | Line | Data |
---|---|---|
1 | <?php | |
2 | function smarty_function_rand($params,&$smarty) { | |
3 | if (is_numeric($params['min']) || is_numeric($params['max'])) { | |
4 | $rand = rand($params['min'],$params['max']); | |
5 | } | |
6 | else $rand = rand(); | |
7 | $smarty->assign('rand',$rand); | |
8 | } | |
9 | ?> |