1 <?php
3 function smarty_block_render($params, $text, &$smarty)
4 {
5 $text = stripslashes($text);
7 if (isset($params['acl'])) {
8 $acl = $params['acl'];
9 unset($params['acl']);
10 }
12 if(preg_match("/w/i",$acl)){
14 /* Read / Write*/
16 }elseif(preg_match("/r/i",$acl)){
18 /* Read only */
19 $from = array("/name=/i");
20 $to = array("disabled name=");
21 $text = preg_replace($from,$to,$text);
23 }elseif(empty($acl)){
25 /* No rights */
26 $text= " ";
28 }else{
29 // unknown
30 $text =" ";
31 }
34 return $text;
35 }
37 ?>