Example #1
0
function get_bdays()
{
    global $o;
    $mon = $o->this_month;
    $day = $o->this_day;
    $cid = 'bday';
    $cname = sprintf("%02s-%02s.json", $mon, $day);
    if (!rcache($cid, $cname, $c)) {
        $url = sprintf("%s/bday:%02s-%02s", WS_MSNAV_CACHE, $mon, $day);
        json_get($url, $c);
        wcache($cid, $cname, $c);
    }
    return $c;
}
Example #2
0
 function display_name($uid)
 {
     if (substr_count($uid, ".")) {
         $url = sprintf("%s/name:" . $uid, WS_LDAP_CACHE);
         json_get($url, $c);
         if (isset($c[0]->displayname)) {
             return $c[0]->displayname;
         }
     }
     return $uid;
 }
Example #3
0
File: srm.php Project: p2ska/ptable
 function person_info($uid)
 {
     global $l;
     $overview = "";
     if (substr_count($uid, "@")) {
         list($uid) = explode("@", $uid);
     }
     if (substr_count($uid, ".")) {
         $url = sprintf("%s/name:" . $uid, WS_LDAP_CACHE);
         json_get($url, $c);
         if (count($c)) {
             $overview = $this->pr_row(@$l->txt_name, $c[0]->displayname);
             $overview .= $this->pr_row(@$l->txt_email, $c[0]->mail);
             $overview .= $this->pr_row(@$l->txt_phone, $c[0]->telephonenumber);
             $overview .= $this->pr_row(@$l->txt_mobile, $c[0]->mobile);
             $overview .= $this->pr_row(@$l->txt_other_mobile, $c[0]->othermobile);
             $overview .= $this->pr_row(@$l->txt_profession, $c[0]->title);
             $overview .= $this->pr_row(@$l->txt_room, $c[0]->roomnumber);
             $overview .= $this->pr_row(@$l->txt_ou, $c[0]->department);
         }
     }
     /*if (!$overview) {
     			$overview  = "<div class=\"info_row\"><div class=\"info_val\">Kahjuks ei leidnud sellise</div></div>";
     			$overview .= "<div class=\"info_row\"><div class=\"info_val\">kasutajanimega seotud kontot!</div></div>";
     		}*/
     return $overview;
 }