function display() { $do_proj_task_feed = new ProjectTask(); $do_proj_feed = new Project(); $do_user = new User(); if ($do_proj_task_feed->isProjectTaskReletedToUser($this->idproject_task)) { //$idproject = $do_proj_task_feed->getProjectForTask($this->idproject_task); $do_proj_task_feed->getProjectTaskDetails($this->idproject_task); $html .= '<br />'; if ($this->user_picture != '') { $thumb_name = $_SERVER['DOCUMENT_ROOT'] . '/dbimage/thumbnail/' . $this->user_picture; if (file_exists($thumb_name)) { $user_pic = "/dbimage/thumbnail/" . $this->user_picture; } else { $user_pic = "/images/empty_avatar.gif"; } } else { $user_pic = "/images/empty_avatar.gif"; } $user_name = $do_user->getUserNameByIdUser($this->iduser); $html .= '<div style="width:50px;float:left;">'; $html .= '<a href="/profile/' . $user_name . '"> <img width="34" height="34"alt="" src=' . $user_pic . ' > </a>'; $html .= '</div>'; $html .= '<div style="text-align:middle;"> <table width=95% border=0><tr><td>'; $html .= '<b>' . ucfirst($this->user_full_name) . '</b>' . ' ' . _('has added a note on discussion') . ' ' . '<a href ="/Task/' . $this->idproject_task . '">' . $this->task_description . '</a>'; $html .= ' ' . _('in project ') . ' ' . ' <a href="/Project/' . $this->idproject . '"><i>' . $this->project_name . '</i></a>'; $html .= ' <img src="/images/discussion.png" width="16" height="16" alt="" />'; $html .= '<div id="discusspreview' . $this->idproject_discuss . '">'; $html .= stripslashes($this->discuss); //$html .= htmlentities($this->discuss); if ($this->more) { $html .= '<a onclick="showFullProjDiscuss(' . $this->idproject_discuss . '); return false;" href="#">' . _('more...') . '</a>'; } $html .= '</div>'; $html .= '</td></tr></table></div>'; $html .= '<div style = "color: #666666;font-size: 8pt; margin-left:50px;">'; // $html .= date('l, F j, g:i a', $this->date_added); $html .= OfuzUtilsi18n::formatDateLong(date("Y-m-d H:i:s", $this->date_added), true); //$html .= ' '.$this->date_added; $html .= '</div>'; $html .= '<br />'; $html .= '<div class="dottedline"></div>'; $html .= '<div id="' . $this->idworkfeed . '" class="message_box"></div>'; } return $html; }
function display() { $do_user = new User(); $user_name = $do_user->getUserNameByIdUser($this->iduser); $html .= '<div style="width:50px;float:left;">'; $html .= '<img src="/images/note_icon.gif" width="34" height="34" alt="" />'; $html .= '</div>'; $html .= '<div style="text-align:middle;">'; //$html .= '<a href ="/Contact/'.$this->idcontact.'">'.$this->user_full_name.'</a>'; $username = $this->user_full_name; //$user_name = explode(' ',$username); $html .= '<a href="/profile/' . $user_name . '">' . $this->user_full_name . ' </a>'; $html .= ' ' . _('added you to the project: ') . ' ' . ' <a href="/Project/' . $this->idproject . '"><i>' . $this->project_name . '</i></a>'; $html .= '</div>'; $html .= '<div style = "color: #666666;font-size: 8pt; margin-left:50px;">'; $html .= OfuzUtilsi18n::formatDateLong(date("Y-m-d H:i:s", $this->date_added), true); $html .= '</div>'; $html .= '<br />'; $html .= '<div class="dottedline"></div>'; return $html; }
} } } /*$do_contact->getUserContacts($_SESSION['do_coworker']->idcoworker); if($do_contact->getNumRows()){ // while($do_contact->next()){ $co_workers[] = $do_contact->idcoworker; $user_picture = $do_contact->picture; $contact_id = $do_contact->idcontact; // } }*/ $user_name = $do_user->getUserNameByIdUser($_SESSION['do_coworker']->idcoworker); // Get Bio Information $do_userprofile = new UserProfile(); $profile_information = $do_userprofile->getProfileInformation($_SESSION['do_coworker']->idcoworker); $job_description = $profile_information['job_description']; $do_userprofile->free(); if ($user_picture != '') { $thumb_name = $_SERVER['DOCUMENT_ROOT'] . '/dbimage/thumbnail/' . $user_picture; if (file_exists($thumb_name)) { $user_pic = "/dbimage/thumbnail/" . $user_picture; } else { $user_pic = "/images/empty_avatar.gif"; } } else { $user_pic = '/images/empty_avatar.gif'; }
$e_PrioritySort = new Event('ContactNotes->eventPrioritySortNotes'); $e_PrioritySort->addParam('goto', 'contact.php'); $e_PrioritySort->addParam('idnote', $do_notes->idcontact_note); // Priority sort Ends here $star_title = $do_notes->priority > 0 ? 'Unstar this note' : 'Star this note to move it on top'; $star_img_url = '<img src="/images/' . ($do_notes->priority > 0 ? 'star_priority.gif' : 'star_normal.gif') . '" class="star_icon" width="14" height="14" alt="' . _($star_title) . '" />'; // Generate the delete event if (is_object($_SESSION["ContactNotes"])) { $e_note_del = new Event("ContactNotes->eventTempDelNoteById"); } $e_note_del->addParam("goto", "contact.php"); $e_note_del->addParam("id", $do_notes->idcontact_note); $e_note_del->addParam("context", "ContactNote"); $del_img_url = 'delete <img src="/images/delete.gif" width="14px" height="14px" alt="" />'; //delete event ends here $user_name = $do_user->getUserNameByIdUser($do_notes->iduser); $do_contact = new Contact(); $do_contact->getContactPictureDetails($do_notes->iduser); if ($do_contact->getNumRows()) { if ($do_contact->picture != '') { $thumb_name = $_SERVER['DOCUMENT_ROOT'] . '/dbimage/thumbnail/' . $do_contact->picture; if (file_exists($thumb_name)) { $contact_picture = "/dbimage/thumbnail/" . $do_contact->picture; } else { $contact_picture = "/images/empty_avatar.gif"; } } else { $contact_picture = '/images/empty_avatar.gif'; } $contact_id = $do_contact->idcontact; }
$file_url = "/files/" . $doc_name; //$file_url = '/files/'.$do_discuss->document; $file = '<br /><a href="' . $file_url . '" target="_blank">' . $do_discuss->document . '</a>'; //$file = '<br /><a href="/files_download.php?e=ProjectTask&id='.$idproject_task.'&file='.$do_discuss->document.'" target="_blank">'.$do_discuss->document.'</a>'; } $item_text = $do_discuss->formatDiscussionItemDisplay($do_discuss->discuss, 500); //if (substr_count($item_text, '<br />') > 4) { // $preview_item = preg_replace('/(.*?<br \/>.*?<br \/>.*?<br \/>.*?<br \/>)(.*)/','$1',str_replace("\n",'',$item_text)).' '; //} else if (strlen($item_text) > 500) { // $preview_item = substr($item_text, 0, 500); //} // profile $do_user = new User(); if ($do_discuss->iduser) { $added_by = $_SESSION['do_User']->getFullName($do_discuss->iduser); $user_name = $do_user->getUserNameByIdUser($do_discuss->iduser); $do_contact = new Contact(); $do_contact->getContactPictureDetails($do_discuss->iduser); if ($do_contact->getNumRows()) { if ($do_contact->picture != '') { $thumb_name = $_SERVER['DOCUMENT_ROOT'] . '/dbimage/thumbnail/' . $do_contact->picture; if (file_exists($thumb_name)) { $contact_picture = "/dbimage/thumbnail/" . $do_contact->picture; } else { $contact_picture = "/images/empty_avatar.gif"; } } else { $contact_picture = '/images/empty_avatar.gif'; } $contact_id = $do_contact->idcontact; } else {