예제 #1
0
파일: user.php 프로젝트: jubinpatel/horde
    echo $activity['activity_message'];
    ?>
</td>
</tr>
<?php 
}
?>

<tr>
    <td><strong><?php 
echo _("Age");
?>
</strong></td>
    <td>
        <?php 
$age = Folks::calcAge($profile['user_birthday']);
echo $age['age'];
if ($age['sign']) {
    echo ' (' . $age['sign'] . ')';
}
?>
    </td>
</tr>
<tr>
    <td><strong><?php 
echo _("Gender");
?>
</strong></td>
    <td><?php 
if ($profile['user_gender']) {
    echo $profile['user_gender'] == 1 ? _("Male") : _("Female");
예제 #2
0
파일: Api.php 프로젝트: jubinpatel/horde
 /**
  * Lists users with birthdays/goout dates as time objects.
  *
  * @param array $categories  The time categories (from listTimeObjectCategories) to list.
  * @param Horde_Date $start       The start date of the period.
  * @param Horde_Date $end         The end date of the period.
  */
 public function listTimeObjects($categories, $start, $end)
 {
     require_once __DIR__ . '/base.php';
     require_once FOLKS_BASE . '/lib/Friends.php';
     $friends_driver = Folks_Friends::singleton('sql');
     $friends = $friends_driver->getFriends();
     if ($friends instanceof PEAR_Error) {
         return array();
     }
     $objects = array();
     foreach ($friends as $friend) {
         $user = $GLOBALS['folks_driver']->getProfile($friend);
         if ($user instanceof PEAR_Error) {
             continue;
         }
         $user['user_birthday'] = date('Y') . substr($user['user_birthday'], 4);
         $born = strtotime($user['user_birthday']);
         if ($born === false || $born < $start->timestamp() || $born > $end->timestamp()) {
             continue;
         }
         $age = Folks::calcAge($user['user_birthday']);
         $desc = $age['age'] . ' (' . $age['sign'] . ')';
         $objects[$friend] = array('title' => $friend, 'description' => $desc, 'id' => $friend, 'start' => date('Y-m-d\\TH:i:s', $born), 'end' => date('Y-m-d\\TH:i:s', $born + 1), 'params' => array('user' => $friend), 'link' => Folks::getUrlFor('user', $friend, true));
     }
     return $objects;
 }
예제 #3
0
파일: list.php 프로젝트: jubinpatel/horde
        echo Folks::getImageUrl($user['user_uid']);
        ?>
" class="userMiniIcon" />
        <?php 
        echo $user['user_uid'];
        ?>
</a>
    </td>
    <td><?php 
        if ($user['user_gender']) {
            echo $user['user_gender'] == 1 ? _("Male") : _("Female");
        }
        ?>
</td>
    <td><?php 
        $age = Folks::calcAge($user['user_birthday']);
        if (!empty($age['age'])) {
            echo $age['age'] . ' (' . $age['sign'] . ')';
        }
        ?>
</td>
    <td><?php 
        echo $user['user_city'];
        ?>
</td>
    <td><?php 
        echo $user['user_url'] ? _("Yes") : _("No");
        ?>
</td>
    <td><?php 
        echo $user['user_description'] ? _("Yes") : _("No");