root/releases/0.1.2a/units/profile/function_field_display.php

Revision 2, 0.9 kB (checked in by sven, 3 years ago)

importing elgg-0.1.1a

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 = db_query("select * from profile_data where name = '".$field[1]."' and 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 = run("display:output_field",array($value->value,$field[2],$field[1],$field[0],$value->ident));
30             $run_result .= run("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.