]> git.mxchange.org Git - friendica.git/blob - view/contact_selectors.php
cleanup after deploy
[friendica.git] / view / contact_selectors.php
1 <?php
2
3
4 function contact_profile_assign($current) {
5
6         $o = '';
7         $o .= "<select id=\"contact-profile-selector\" name=\"profile-assign\" />\r\n";
8
9         $r = q("SELECT `id`, `profile-name` FROM `profile` WHERE `uid` = %d",
10                         intval($_SESSION['uid']));
11
12         if(count($r)) {
13                 foreach($r as $rr) {
14                         $selected = (($rr['id'] == $current) ? " selected=\"selected\" " : "");
15                         $o .= "<option value=\"{$rr['id']}\" $selected >{$rr['profile-name']}</option>\r\n";
16                 }
17         }
18         $o .= "</select>\r\n";
19         return $o;
20 }
21
22
23 function contact_reputation($current) {
24
25         $o = '';
26         $o .= "<select id=\"contact-reputation-selector\" name=\"reputation\" />\r\n";
27
28         $rep = array(
29                 0 => "Unknown | Not categorised",
30                 1 => "Block immediately",
31                 2 => "Shady, spammer, self-marketer",
32                 3 => "Known to me, but no opinion",
33                 4 => "OK, probably harmless",
34                 5 => "Reputable, has my trust"
35         );
36
37         foreach($rep as $k => $v) {
38                 $selected = (($k == $current) ? " selected=\"selected\" " : "");
39                 $o .= "<option value=\"$k\" $selected >$v</option>\r\n";
40         }
41         $o .= "</select>\r\n";
42         return $o;
43 }
44
45
46