remove old readme
[atutor.git] / themes / simplified-desktop / social / sprofile.tmpl.php
1 <?php
2 //Profile template for social
3 ?>
4
5 <div  class="social-wrapper">
6         <div><h3><?php echo printSocialName($this->profile['member_id'], false); ?></h3></div>
7         <div class="social-left">               
8                 <div class="row">
9                         <h4 class="profile"><?php echo _AT('profile'); ?></h4>
10                                 <?php if ($this->scope=='owner'): ?>
11                                 <a href="<?php echo url_rewrite(AT_SOCIAL_BASENAME."edit_profile.php");?>"><img src="<?php echo $_base_href.AT_SOCIAL_BASENAME;?>images/edit_profile.gif" alt="<?php echo _AT('edit_profile'); ?>" id="profile" title="<?php echo _AT('edit_profile'); ?>" border="0"/></a>
12                                 <?php endif; ?>
13                 </div>
14                 <div class="contentbox">
15                 <div class="row">
16                 <?php 
17                 //TODO: include this in the printSocialProfileImg function itself
18                 if (profile_image_exists($this->profile['member_id'])): ?>
19                         <a href="get_profile_img.php?id=<?php echo $this->profile['member_id'].SEP ;?>size=o"><?php echo printSocialProfileImg($this->profile['member_id'], 2, false); ?>
20                 <?php else: ?>
21                         <?php echo printSocialProfileImg($this->profile['member_id'], 2, false); ?>
22                 <?php endif; ?>
23                 <a href="inbox/send_message.php?id=<?php echo $this->profile['member_id']; ?>"><?php echo _AT('send_message'); ?></a>
24                 
25                 </div>
26
27                 <?php         if($this->profile['occupation']){ ?>
28                         
29                         <dt><?php echo _AT('occupation'); ?></dt>
30                         <dd><?php echo htmlentities_utf8($this->profile['occupation']); ?></dd>
31                         <?php }?>
32         
33                         
34                         <?php if($this->profile['expertise']){ ?>
35                         <dt><?php echo _AT('expertise'); ?></dt>
36                         <dd><?php echo htmlentities_utf8($this->profile['expertise']); ?></dd>
37                         <?php }?>
38                         
39                         
40                         <?php if ($this->relationship==AT_SOCIAL_FRIENDS_VISIBILITY || $this->relationship==AT_SOCIAL_OWNER_VISIBILITY): ?>
41                         <?php if($this->profile['email']): ?>
42                         <dl>
43                         <dt><?php echo _AT('email'); ?></dt>
44                         <dd><?php echo htmlentities_utf8($this->profile['email']); ?></dd>
45                         <?php endif; ?>
46                         <?php endif; ?>
47                 
48                         <?php if($this->profile['gender']!='n'){ ?>
49                         <dt><?php echo _AT('gender'); ?></dt>
50                         <dd><?php echo $this->profile['gender']; ?></dd>
51                         <?php }?>
52                 
53                         <?php if($this->profile['dob']!='0000-00-00'){ ?>
54                         <dt><?php echo _AT('dob'); ?></dt>
55                         <dd><?php echo $this->profile['dob']; ?></dd>
56                         <?php }?>
57                 
58                         <?php if($this->profile['phone']){ ?>
59                         <dt><?php echo _AT('phone'); ?></dt>
60                         <dd><?php echo htmlentities_utf8($this->profile['phone']); ?></dd>
61                         <?php }?>
62                         
63                         <?php if($this->profile['country']){ ?>
64                         <dt><?php echo _AT('country'); ?></dt>
65                         <dd><?php echo htmlentities_utf8($this->profile['country']); ?></dd>
66                         <?php }?>
67                         
68                         <?php if($this->profile['postal']){ ?>
69                         <dt><?php echo _AT('street_address'); ?></dt>
70                         <dd><?php echo htmlentities_utf8($this->profile['postal']); ?></dd>
71                         <?php }?>
72                 
73                         <?php if($this->profile['interests']){ ?>
74                         <dt><?php echo _AT('interests'); ?></dt>
75                         <dd><?php echo htmlentities_utf8($this->profile['interests']); ?></dd>
76                         <?php }?>
77                         
78                         <?php if($this->profile['associations']){ ?>
79                         <dt><?php echo _AT('associations'); ?></dt>
80                         <dd><?php echo htmlentities_utf8($this->profile['associations']); ?></dd>
81                         <?php }?>
82                 
83                         <?php if($this->profile['awards']){ ?>
84                         <dt><?php echo _AT('awards'); ?></dt>
85                         <dd><?php echo htmlentities_utf8($this->profile['awards']); ?></dd>
86                         <?php }?>
87                 
88                         <?php if($this->profile['others']){ ?>
89                         <dt><?php echo _AT('others'); ?></dt>
90                         <dd><?php echo htmlentities_utf8($this->profile['others']); ?></dd>
91                         <?php }?>
92                 
93                         <?php if($this->personal['per_weight']){ ?>
94                         <dt><?php echo _AT('per_weight'); ?></dt>
95                         <dd><?php echo htmlentities_utf8($this->personal['per_weight']); ?></dd>
96                         <?php }?>
97                 
98                         <?php if($this->personal['per_height']){ ?>
99                         <dt><?php echo _AT('per_height'); ?></dt>
100                         <dd><?php echo htmlentities_utf8($this->personal['per_height']); ?></dd>
101                         <?php }?>
102                 
103                         <?php if($this->personal['per_hair']){ ?>
104                         <dt><?php echo _AT('per_hair'); ?></dt>
105                         <dd><?php echo htmlentities_utf8($this->personal['per_hair']); ?></dd>
106                         <?php }?>
107                 
108                         <?php if($this->personal['per_eyes']){ ?>
109                         <dt><?php echo _AT('per_eyes'); ?></dt>
110                         <dd><?php echo htmlentities_utf8($this->personal['per_eyes']); ?></dd>
111                         <?php }?>
112                 
113                         <?php if($this->personal['per_ethnicity']){ ?>
114                         <dt><?php echo _AT('per_ethnicity'); ?></dt>
115                         <dd><?php echo htmlentities_utf8($this->personal['per_ethnicity']); ?></dd>
116                         <?php }?>
117                 
118                         <?php if($this->personal['per_languages']){ ?>
119                         <dt><?php echo _AT('per_languages'); ?></dt>
120                         <dd><?php echo htmlentities_utf8($this->personal['per_languages']); ?></dd>
121                         <?php }?>
122                 
123                         <?php if($this->personal['per_disabilities']){ ?>
124                         <dt><?php echo _AT('per_disabilities'); ?></dt>
125                         <dd><?php echo htmlentities_utf8($this->personal['per_disabilities']); ?></dd>
126                         <?php }?>
127                 
128
129
130                         </dl>
131                 </div>
132                 <?php if (!empty($this->representation)){ ?>
133                         <br /><div  class="headingbox"><h4><?php echo _AT('representation'); ?></h4></div>
134                         <div class="contentbox" >
135
136                                 <?php   foreach($this->representation as $row=>$value){  ?>
137                                 <dl class="public-profile">
138                                 <dt><?php echo _AT('name') . ':' ?></dt> <br /><dd> <?php echo htmlentities_utf8($value['rep_name']); ?></dd>
139
140                                 <dt><?php echo _AT('title') . ': ' ?></dt> <br /><dd> <?php echo htmlentities_utf8($value['rep_title']); ?></dd>
141                                 <dt><?php echo _AT('phone') . ':' ?></dt><br /> <dd> <?php echo htmlentities_utf8($value['rep_phone']);?></dd>
142                                 <dt><?php echo _AT('email') . ': ' ?></dt><br /> <dd> <?php echo  htmlentities_utf8($value['rep_email']); ?></dd>       
143                                 <dt><?php echo _AT('street_address') . ': ' ?></dt> <br /><dd> <?php echo htmlentities_utf8($value['rep_address']); ?></dd>
144                                 </dl>
145                         
146                         <?php } ?>
147                         </div>
148                         <?php } ?>
149
150                 <?php if (!empty($this->contact)){ ?>
151                         <br /><div  class="headingbox"><h4><?php echo _AT('alt_contact'); ?></h4></div>
152                         <div class="contentbox" >
153
154                                 <?php   foreach($this->contact as $row=>$value){  ?>
155                                 <dl class="public-profile">
156                                 <dt><?php echo _AT('name') . ':' ?></dt> <br /><dd> <?php echo htmlentities_utf8($value['con_name']); ?></dd>
157                                 <dt><?php echo _AT('phone') . ':' ?></dt> <br /><dd> <?php echo htmlentities_utf8($value['con_phone']);?></dd>
158                                 <dt><?php echo _AT('email') . ': ' ?></dt><br /> <dd> <?php echo  htmlentities_utf8($value['con_email']); ?></dd>
159                                 <dt><?php echo _AT('street_address') . ': ' ?></dt><br /> <dd> <?php echo htmlentities_utf8($value['con_address']); ?></dd>
160                                 </dl>
161                         
162                         <?php } ?>
163                         </div>
164                         <br/>
165                         <?php } ?>
166
167
168
169         </div>
170
171         <div class="social-right">      
172                 <?php if (PrivacyController::validatePrivacy(AT_SOCIAL_PROFILE_EDUCATION, $this->relationship, $this->prefs)): ?>
173                         <?php if (!empty($this->education)){ ?>
174                         <div>
175                                 <div class="headingbox"><h5><?php echo _AT('training_and_education'); ?></h5></div>
176                                 <div class="contentbox">
177                                 <table class="data static">     
178                                         <thead><tr>
179                                                 <th> <?php echo _AT('institution'); ?></th>
180                                                 <th> <?php echo _AT('degrees'); ?></th>
181                                                 <th> <?php echo _AT('year'); ?></th>
182                                         </tr></thead>
183                                         <tbody>
184                                         <?php
185                                                 foreach($this->education as $edu){
186                                                         echo '<tr><td>'.htmlentities_utf8($edu['university']).'</td>';
187                                                         echo '<td>'.htmlentities_utf8($edu['degree'].'/'.$edu['field']).'</td>';
188                                                         echo '<td>'.htmlentities_utf8($edu['from'].'-'.$edu['to']).'</td></tr>';
189                                                 }                                                       
190                                         ?>
191                                         </tbody>
192                                 </table>
193                                 </div>
194                         </div><br/>
195                         <?php } ?>
196                 <?php endif; ?>
197
198                 <?php if (PrivacyController::validatePrivacy(AT_SOCIAL_PROFILE_POSITION, $this->relationship, $this->prefs)): ?>
199                 
200                         <?php if (!empty($this->position)){ ?>
201                         <div>
202                                 <div class="headingbox"><h5><?php echo _AT('credits_and_work_experience'); ?></h5></div>
203                                 <div class="contentbox">
204                                 <table class="data static">     
205                                         <thead><tr>
206                                                 <th><?php echo _AT('company'); ?></th>
207                                                 <th><?php echo _AT('position'); ?></th>
208                                                 <th><?php echo _AT('year'); ?></th>
209                                         </tr></thead>
210                                         <tbody>
211                                         <?php
212                                                 foreach($this->position as $pos){
213                                                         echo '<tr><td>'.htmlentities_utf8($pos['company']).'</td>';
214                                                         echo '<td>'.htmlentities_utf8($pos['title']).'</td>';
215                                                         echo '<td>'.htmlentities_utf8($pos['from'].'-'.$pos['to']).'</td></tr>';
216                                                 }                                                       
217                                         ?>
218                                         </tbody>
219                                 </table></div>
220                         </div><br/>
221                         <?php } ?>              
222                 <?php endif; ?>
223
224                 <?php if (PrivacyController::validatePrivacy(AT_SOCIAL_PROFILE_MEDIA, $this->relationship, $this->prefs)): ?>
225                 <div>
226                         <?php if (!empty($this->websites)): ?>
227                         <div class="headingbox"><h5><?php echo _AT('websites'); ?></h5></div>
228                         <div class="contentbox">
229                         <table class="data static">     
230                                 <thead><tr>
231                                         <th><?php echo _AT('site_name'); ?></th>
232                                         <th><?php echo _AT('url'); ?></th>
233                                 </tr></thead>
234                                 <tbody>
235                                 <?php
236                                         foreach($this->websites as $sites){
237                                                 $is_http = preg_match("/^http/", $sites['url']);
238                                                 if ($is_http==0){
239                                                         $sites['url'] = 'http://' . $sites['url'];
240                                                 }
241                                                 echo '<tr><td>'.htmlentities_utf8($sites['site_name']).'</td>';
242                                                 echo '<td><a href="'.$sites['url'].'" target="user_profile_site">'.$sites['url'].'</a></td></tr>';
243                                         }                                                       
244                                 ?>
245                                 </tbody>
246                         </table>
247                         </div><br/>
248                         <?php endif; ?>
249                 </div>
250                 <?php endif; ?>
251
252                 <?php if (PrivacyController::validatePrivacy(AT_SOCIAL_PROFILE_STATUS_UPDATE, $this->relationship, $this->prefs)): ?>
253                 <div class="headingbox">
254                         <h5><?php echo _AT('activities'); ?></h5></div>
255                 <div class="contentbox" id="activity">
256                         <?php if(!empty($this->activities)): ?>
257                         <ul>
258                                 <?php
259                                         foreach($this->activities as $id=>$activity):
260                                                 /*
261                                                  * harris @may 26, 2009
262                                                  * Would be nice to use this, but we will have to change "has" to "have" for _AT('you')
263                                                  *
264                                                 if ($_SESSION['member_id']== $this->profile['member_id']){
265                                                         echo '<li>'._AT('you');
266                                                         echo ' '.$activity.' ';
267                                                         echo '<a href="'.url_rewrite(AT_SOCIAL_BASENAME.'sprofile.php?delete='.$id).'"><img src="'.$_base_href.AT_SOCIAL_BASENAME.'images/b_drop.png" alt="'._AT('remove').'" title="'._AT('remove').'" border="0" /></a></li>';
268                                                 } else {
269                                                         echo '<li>'.printSocialName($this->profile['member_id']).' '.$activity.'</li>';
270                                                 }
271                                                 */
272                                  ?>
273                                  <li><?php echo $activity['created_date']. ' - '. printSocialName($activity['member_id']).' '. $activity['title']; ?></li>
274                                 <?php endforeach; ?>
275                         </ul>
276                         <?php else: ?>
277                         <?php echo _AT('no_activities'); ?>
278                         <?php endif; ?>
279                 </div><br />
280                 <?php endif; ?>
281
282                 <?php if (PrivacyController::validatePrivacy(AT_SOCIAL_PROFILE_CONNECTION, $this->relationship, $this->prefs)): ?>
283                 <div class="headingbox">
284                         <h5><?php echo _AT('connections'); ?></h5>
285                 </div>
286                 <div class="contentbox">
287                         <?php if (sizeof($this->friends)>0):
288                                         foreach($this->friends as $friend_id): ?>                                                                                                       
289                                 <div>
290                                 <?php echo printSocialProfileImg($friend_id); ?><br/>
291                                 <?php echo printSocialName($friend_id); ?>
292                                 </div>
293                         <?php   endforeach;
294                                 else: 
295                                         echo _AT('no_friends');
296                                 endif; ?>
297                 </div><br/>
298
299                 <?php if (isset($this->mutual_friends)): ?>
300                 <div class="headingbox">
301                         <h5><?php echo _AT('mutual_connections'); ?></h5>
302                 </div>
303                 <div class="contentbox">
304                         <?php foreach($this->mutual_friends as $friend_id): ?>
305                                 <div>
306                                 <?php echo printSocialProfileImg($friend_id); ?><br/>
307                                 <?php echo printSocialName($friend_id); ?>
308                                 </div>
309                         <?php endforeach; ?>
310                 </div>
311                 <?php endif; //this->mutual_friends != empty ?>
312         
313         <?php endif; ?>
314
315
316                         
317         </div>
318 <div style="clear:both;"></div>
319 </div>
320