public function modInvitationList() { $usersInvite = AccountFactory::getModel('usersInvite'); $result = $usersInvite->getList(array('status' => AccountTableUsersInvite::PENDING), '10'); $html = '<ul>'; if (!empty($result)) { foreach ($result as $record) { $date = JXDate::formatDate($record->last_invite_date); $html .= '<li>' . $record->invite_email . ' invited on ' . $date . '</li>'; } } $html .= '</ul>'; return $html; }
/** * This will return the user timezone * @param int $user_id id of the user * @param String $forDisplay get the display, if true then return value will be formatted to the proper display * @return String depends on the value of format */ public static function getUserTime($user_id = null, $forDisplay = false) { $config = new JXConfig(); $user = JFactory::getUser($user_id); // First load account setting (if any) timezone to override timezone in language file $defaultTz = $config->getTimezone() != '' ? $config->getTimezone() : JText::_('JXLIB_DEFAULT_TIMEZONE'); $my = !$user instanceof JUser && !$user instanceof JXUser ? JXFactory::getUser() : $user; $timeZoneStr = $my->getParam('timezone'); // Second load user personalize timezone (if any) to override system default timezone $timeZoneStr = empty($timeZoneStr) ? $defaultTz : $timeZoneStr; $tz = new DateTimeZone($timeZoneStr); $date2 = new JDate('now', $tz); $offset = $date2->getOffset() / 3600; $date = new JDate(); $date->setOffset($offset); $xdate = new JXDate(); /* if the value want to be used as display purposes */ if ($forDisplay) { return $xdate->formatDate($date); } else { return $xdate->format($date); } }
* To change this template, choose Tools | Templates * and open the template in the editor. */ ?> <tr> <td valign="top" style="background:#f9f9f9;font-size:14px;" width="50" > <img src="<?php echo $actor->getThumbAvatarURL(); ?> " alt="logo" style="display:block;border:3px solid #ffffff;outline:1px solid #ccc;margin:20px 0 0 20px;" width="50" height="50" /> </td> <td valign="top" style="background:#f9f9f9;font-size:14px;" width="20" > </td> <td valign="middle" style="background:#f9f9f9;font-size:14px;" width="538" > <p style="padding:0;margin:20px 20px 0 0;font-family:Helvetica,Geneva,sans-serif;"><strong><?php echo StreamMessage::formatShortDisplay($todoName, $linkOption); ?> </strong></p> <p style="padding:0;margin:20px 20px 0 0;font-family:Helvetica,Geneva,sans-serif;">✔ <?php echo $todoItem; ?> </p> <?php $now = new JDate(); ?> <p style="margin:0;padding:0;font-size:13px;color:#777;"><?php echo JText::sprintf('COM_STREAM_POST_DETAIL', $actor->get('name'), $actor->get('designation'), JXDate::formatDate($now, $formatDateShort, $recipient)); ?> </p> </td> </tr>
</div> <ul class="todolist noBorder" id="todo-list-<?php echo $task->id; ?> "> <?php $todoData = json_decode($task->raw); $todoIndex = 0; $numTodo = count($todoData->todo); $doneTodo = 0; foreach ($todoData->todo as $todo) { // @todo: move checking to input filtering $isDone = $task->getState($todoIndex); $doneBy = JXFactory::getUser(intval($task->getDoneBy($todoIndex))); $doneOn = $task->getDoneOn($todoIndex); $doneOn = empty($doneOn) ? '' : ' - ' . JXDate::formatDate($doneOn); if (!empty($todo)) { ?> <li class="clearfix todo-item <?php if ($isDone) { echo 'todo-done'; $doneTodo++; } ?> "> <a href="javascript: void(0);" data-message_id="<?php echo $task->id; ?> " data-type="list" data-todo_index="<?php echo $todoIndex; ?>
echo $rowData->from_email; ?> </span></div></td> <td class="to-update"> <div class="key"> <span><?php echo $rowData->invite_email; ?> </span> <span class="small"> <?php echo JText::_('COM_ACCOUNT_LABEL_LAST_INVITED_DATE'); ?> : <span class="last-invite-date"><?php echo JXDate::formatDate($rowData->last_invite_date); ?> </span> <?php if (!empty($rowData->group_limited)) { ?> <?php echo JText::_('Limited to these groups'); ?> : <span class="last-invite-date"> <?php $groupModel = StreamFactory::getModel('groups'); $limitedGroups = $groupModel->getGroups(array('id' => $rowData->group_limited), 100); foreach ($limitedGroups as $idx => $group) {
</div> <p style="margin:0;padding:0;font-size:13px;color:#777;"><?php echo JText::sprintf('COM_STREAM_POST_DETAIL', $postOwner->get('name'), $postOwner->get('designation'), JXDate::formatDate($streamMessage->created, $formatDateShort)); ?> </p> </td> </tr> <tr> <td valign="top" style="background:#f9f9f9;font-size:14px;" width="50" > <img src="<?php echo $sender->getThumbAvatarURL(); ?> " alt="logo" style="display:block;border:3px solid #ffffff;outline:1px solid #ccc;margin:20px 0 0 20px;" width="50" height="50" /> </td> <td valign="top" style="background:#f9f9f9;font-size:14px;" width="10" > <div style="width:0;min-height:0;border-width:8px;border-style:solid;border-color:#f8fafb #3ea7af #f8fafb #f8fafb;margin-top:35px;"></div> </td> <td valign="middle" style="background:#f9f9f9;font-size:14px;" width="548" > <div id="topic" style="background:#3ea7af;padding:10px;color:#fefefe;display:block;margin:20px 20px 5px 0;"> <p style="padding:0;margin:0;font-style:italic;font-family:georgia,serif;">“ <?php echo StreamMessage::formatShortDisplay($messageComment->get('comment'), $linkOption); ?> ”</p> </div> <p style="margin:0;padding:0;font-size:13px;color:#777;"><?php echo JText::sprintf('COM_STREAM_POST_DETAIL', $sender->get('name'), $sender->get('designation'), JXDate::formatDate($messageComment->created, $formatDateShort)); ?> </p> </td> </tr>
public function ajaxResendInvitation() { // Only admin can use this function to invite guests $jxConfig = new JXConfig(); $my = JXFactory::getUser(); $accessHelper = new AccountAccessHelper(); if (!$my->authorise('stream.setting.edit', $accessHelper)) { echo '{"error":"1","info":""'; exit; } $invitation = JRequest::getVar('invitation_id', 0); $returnData = array(); //if ($email !== false) if ($invitation) { $usersInvite = JTable::getInstance('usersInvite', 'AccountTable'); $usersInvite->load(array('id' => $invitation)); if ($usersInvite->id) { $emailToInvite = $usersInvite->invite_email; $dummy = new JXUser(); $loadUser = $dummy->loadUserByEmail($usersInvite->from_email); if (!$loadUser) { // Delete invitations which invitor email cannot be found from registered users $dummy = JXFactory::getUser(); $usersInvite->delete(); } $result = $this->processInvitation($dummy, $emailToInvite); $now = new JDate(); if ($result['flag'] == self::SENT_FLAG) { $usersInvite->load(array('from_email' => $dummy->email, 'invite_email' => $emailToInvite)); $returnData["info"] = JXDate::formatDate($now->format('Y-m-d h:i:s')); $returnData["html"] = $usersInvite->getRowHtml(); } elseif ($result['flag'] == self::ALREADY_REGISTERED_FLAG) { $returnData["msg"] = JText::sprintf('COM_ACCOUNT_MSG_INVITATION_EMAIL_ALREADY_REGISTERED', $result['email']); } $returnData["error"] = '0'; } else { $returnData["error"] = '1'; } } else { $returnData["error"] = '1'; } echo json_encode($returnData); exit; }
?> </p> </td> </tr> <tr> <td valign="top" style="background:#f9f9f9;font-size:14px;" width="50" > <img src="<?php echo $postOwner->getThumbAvatarURL(); ?> " alt="logo" style="display:block;border:3px solid #ffffff;outline:1px solid #ccc;margin:20px 0 0 20px;" width="50" height="50" /> </td> <td valign="top" style="background:#f9f9f9;font-size:14px;" width="10" > <div style="width:0;min-height:0;border-width:8px;border-style:solid;border-color:#f8fafb #3ea7af #f8fafb #f8fafb;margin-top:35px;"></div> </td> <td valign="middle" style="background:#f9f9f9;font-size:14px;" width="548" > <div id="topic" style="background:#3ea7af;padding:10px;color:#fefefe;display:block;margin:20px 20px 5px 0;"> <p style="padding:0;margin:0;font-style:italic;font-family:georgia,serif;">“ <?php echo StreamMessage::formatShortDisplay($streamMessage->get('message'), $linkOption); ?> ”</p> </div> <?php $date = new JDate($streamMessage->created); ?> <p style="margin:0;padding:0;font-size:13px;color:#777;"><?php echo JText::sprintf('COM_STREAM_POST_DETAIL', $postOwner->get('name'), $postOwner->get('designation'), JXDate::formatDate($streamMessage->created, $formatDateShort, $recipient)); ?> </p> </td> </tr>
echo $eventCount; ?> </span></a> </li> </ul> </div> <div class="modal weekly-overview" id="daily-overview" style="display:none;"> <h1>Weekly Overview:</h1> <h3> <span><?php echo JText::sprintf('COM_STREAM_LABEL_WEEKLY_OVERVIEW_DATE_RANGE', $weekNumber); ?> </span> <span class="pull-right"><?php echo '( ' . JXDate::formatDate($firstDay, JXDate::SHORT_DATE_FORMAT) . ' - ' . JXDate::formatDate($lastDay, JXDate::SHORT_DATE_FORMAT) . ' )'; ?> </span> </h3> <ul class="nav"> <li class="ov-milestone"> <a href="<?php echo $milestoneLink; ?> "><span><?php echo $milestoneCount; ?> </span></a> </li> <li class="ov-todo"> <a href="<?php
</tr> <tr> <td valign="top" style="background:#f9f9f9;font-size:14px;" width="50" > <img src="<?php echo $sender->getThumbAvatarURL(); ?> " alt="logo" style="display:block;border:3px solid #ffffff;outline:1px solid #ccc;margin:20px 0 0 20px;" width="50" height="50" /> </td> <td valign="top" style="background:#f9f9f9;font-size:14px;" width="10" > </td> <td valign="middle" style="background:#f9f9f9;font-size:14px;" width="548" > <p style="padding:0;margin:20px 20px 0 0;font-family:Helvetica,Geneva,sans-serif;"><strong> ♥ <?php echo JText::_('COM_STREAM_LIKE_LABEL'); ?> </strong> <?php echo JText::_('COM_STREAM_LABEL_YOUR_WALL_POST'); ?> <span style="font-size:12px;color:#999;"><?php echo JText::sprintf('COM_STREAM_LIKE_AND_OTHER_MANY', $streamMessage->countLike() - 1); ?> </span></p> <?php $now = new JDate(); ?> <p style="margin:0;padding:0;font-size:13px;color:#777;"><?php echo JText::sprintf('COM_STREAM_POST_DETAIL', $sender->get('name'), $sender->get('designation'), JXDate::formatDate($now, $formatDateShort, $postOwner)); ?> </p> </td> </tr>
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ ?> <tr> <td valign="top" style="background:#f9f9f9;font-size:14px;" width="50" > <img src="<?php echo $owner->getThumbAvatarURL(); ?> " alt="logo" style="display:block;border:3px solid #ffffff;outline:1px solid #ccc;margin:20px 0 0 20px;" width="50" height="50" /> </td> <td valign="top" style="background:#f9f9f9;font-size:14px;" width="10" > <div style="width:0;min-height:0;border-width:8px;border-style:solid;border-color:#f8fafb #dbf5f7 #f8fafb #f8fafb;margin-top:35px;"></div> </td> <td valign="middle" style="background:#f9f9f9;font-size:14px;" width="548" > <div id="topic" style="background:#dbf5f7;padding:10px;color:#333333;display:block;margin:20px 20px 5px 0;"> <p style="padding:0;margin:0;font-style:italic;font-family:georgia,serif;">“ <?php echo JText::sprintf('COM_STREAM_NOTIFICATION_FILE_REPLACE_CONTENT', $owner->get('name'), $previousFilename); ?> ”</p> </div> <p style="margin:0;padding:0;font-size:13px;color:#777;"><?php echo JText::sprintf('COM_STREAM_POST_DETAIL', $owner->get('name'), $owner->get('designation'), JXDate::formatDate($fileTable->created, $formatDateShort)); ?> </p> </td> </tr>