root/devel/mod/profile/lib/function_field_display.php

Revision 1301, 1.2 kB (checked in by dramirez, 1 year ago)

Moved from units to mod:

  • profile
  • users
  • template

Updated .htaccess rules

  • Property svn:eol-style set to native
Line 
1 <?php
2
3     global $profile_id;
4     
5     $field = $parameter[0];
6     $allvalues = $parameter[1];
7     
8     if (sizeof($field) >= 2) {
9     
10         $value = get_record('profile_data','name',$field[1],'owner',$profile_id);
11         
12         $value->value = "";
13         $value->access = "";
14         foreach($allvalues as $curvalue) {
15             if ($curvalue->name == stripslashes($field[1])) {
16                 $value = $curvalue;
17             }
18         }
19         
20         /* if (isset($value[0])) {
21             $value = $value[0];
22         } else {
23             $value->value = "";
24             $value->access = "";
25         } */
26
27         if ((($value->value != "" && $value->value != "blank")) && run("users:access_level_check", $value->access)) {
28             $name = $field[0];
29             $column1 = display_output_field(array($value->value,$field[2],$field[1],$field[0],$value->ident));
30             $run_result .= templates_draw(array(
31                                     'context' => 'databox1',
32                                     'name' => $name,
33                                     'column1' => $column1
34                                 )
35                                 );
36         }
37     }
38
39 ?>
Note: See TracBrowser for help on using the browser.