function eventAddFeed($coworkerid, $projectid)
 {
     $do_project = new Project();
     $do_project->getId($projectid);
     $this->project_name = $do_project->getProjectName();
     $user = array($coworkerid);
     $this->iduser = $_SESSION["do_User"]->iduser;
     $do_user = new User();
     $do_user->getId($this->iduser);
     $this->user_full_name = $do_user->getFullName();
     $this->idcontact = $coworkerid;
     $this->idproject = $projectid;
     $this->addFeed($user);
 }
 /**
  *  Add the note to the workfeed
  *  Select all other Co-Worker on the project and push the note to them.
  *  Every Co-Worker in the project get the feed except the one posting the note.
  *  @param EventControler object
  */
 function eventAddFeed(EventControler $evtcl)
 {
     $prefix_note = $evtcl->block_unblock_flag == "Block" ? "<b>Task Block </b>" : "<b>Task Unblock </b>";
     $this->idproject_task = $evtcl->ofuz_idprojecttask;
     $this->discuss = $prefix_note . $evtcl->block_unblock_reason;
     $this->iduser = $_SESSION['do_User']->iduser;
     $this->idproject_discuss = $evtcl->idproject_discuss;
     $this->idproject = $_SESSION['do_project_task']->idproject;
     $this->block_unblock_flag = $evtcl->block_unblock_flag;
     $do_project = new Project();
     $do_project->getId($this->idproject);
     $this->project_name = $do_project->getProjectName();
     $user = new User();
     $user->getId($this->iduser);
     $this->user_full_name = $user->getFullName();
     $do_contact = new Contact();
     $do_contact->getContactPictureDetails($this->iduser);
     if ($do_contact->getNumRows()) {
         while ($do_contact->next()) {
             $this->user_picture = $do_contact->picture;
             $this->contact_id = $do_contact->idcontact;
         }
     }
     $do_proj_task_feed = new ProjectTask();
     $do_proj_task_feed->getProjectTaskDetails($this->idproject_task);
     $this->task_description = $do_proj_task_feed->task_description;
     if (strlen($this->discuss) > 200) {
         $this->discuss = substr($this->discuss, 0, 200);
         $this->more = True;
     } else {
         $this->more = False;
     }
     $do_project_sharing = new ProjectSharing();
     $project_users = $do_project_sharing->getCoWorkersAsArray($do_project);
     $project_users[] = $do_project->getProjectOwner();
     $users = array();
     foreach ($project_users as $project_user) {
         if ($_SESSION['do_User']->iduser != $project_user) {
             $users[] = $project_user;
         }
     }
     $this->addFeed($users);
 }
Example #3
0
if (is_array($data)) {
    ?>
	<table border=0 width="75%">
		<tr>
			<td><b>Zend Email</b> </td> <td><b>Zend API</b> </td> <td><b>Zend URL</b></td><td><b>Project</b></td><td><b>Unlink</b></td>
		</tr>
	<?php 
    for ($i = 0; $i <= max(array_map('count', $data)) - 1; $i++) {
        $un_link = new Event("Zendesk->eventunlinkZend");
        $un_link->addParam("iduser_zendesk", $data['iduser_zendesk'][$i]);
        $path = '/Setting/Zendesk/zend_api';
        $un_link->addParam("goto", $path);
        $un_link = $un_link->getUrl();
        $idproject = $data['idproject'][$i];
        $do_project = new Project();
        $project_name = $do_project->getProjectName($idproject);
        $d_email = $data['zend_email'][$i];
        $d_zend_api = $data['zend_api'][$i];
        $d_zend_url = $data['zend_url'][$i];
        echo '<tr><td>' . $d_email . '</td><td>' . $d_zend_api . '</td><td>' . $d_zend_url . '</td><td>' . $project_name . '</td><td><a href="' . $un_link . '" onclick="return confirm(\'Do you really want to unlink from Zendesk?\')">Unlink</a></td></tr>';
        //echo'<tr><td>'.$d_email.'</td><td>'.$d_zend_api.'</td><td>'.$d_zend_url.'</td><td>'.$project_name.'</td><td><a href="'.$un_link.'" class="confirmation">Unlink</a></td></tr>';
    }
    ?>
	</table>
	<?php 
}
?>
	<br /><br />
	<b><u>Connect with Zendesk</u></b><br /><br />
	<?php 
$path = '/Setting/Zendesk/zend_api';
 /**
  *  Add the note to the workfeed from drop box email 
  *  Select all other Co-Worker on the project and push the note to them.
  *  Every Co-Worker in the project get the feed except the one posting the note.
  *  @param EventControler object
  */
 function AddProjectDiscussFeedFromDropBox($idproject_task, $discuss, $iduser, $idproject_discuss, $idproject)
 {
     $this->idproject_task = $idproject_task;
     $this->discuss = $discuss;
     $this->iduser = $iduser;
     $this->idproject_discuss = $idproject_discuss;
     $this->idproject = $idproject;
     $do_project = new Project();
     $do_project->getId($this->idproject);
     $this->project_name = $do_project->getProjectName();
     $user = new User();
     $user->getId($this->iduser);
     $this->user_full_name = $user->getFullName();
     $do_contact = new Contact();
     $do_contact->getContactPictureDetails($this->iduser);
     if ($do_contact->getNumRows()) {
         while ($do_contact->next()) {
             $co_workers[] = $do_->idcoworker;
             $this->user_picture = $do_contact->picture;
             $this->contact_id = $do_contact->idcontact;
         }
     }
     $do_proj_task_feed = new ProjectTask();
     $do_proj_task_feed->getProjectTaskDetails($this->idproject_task);
     $this->task_description = $do_proj_task_feed->task_description;
     if (strlen($this->discuss) > 200) {
         $this->discuss = substr($this->discuss, 0, 200);
         $this->more = True;
     } else {
         $this->more = False;
     }
     $do_project_sharing = new ProjectSharing();
     $project_users = $do_project_sharing->getCoWorkersAsArray($do_project);
     $project_users[] = $do_project->getProjectOwner();
     $users = array();
     foreach ($project_users as $project_user) {
         if ($iduser != $project_user) {
             $users[] = $project_user;
         }
     }
     $this->addFeed($users);
 }
Example #5
0
            <span class="headline11">Work Logs </span>
        </div>
    </div>
    <div class="contentfull">
        
<?php 
echo '<div class="dottedline"></div>
                    <div class="section20">';
$do_billing_proj = new Project();
$do_adm_task = new Task();
$do_billing_proj_discuss = new ProjectDiscuss();
$do_billing_proj_discuss->report_month = $_SESSION['adm_project_report_discuss']->report_month;
$do_billing_proj_discuss->report_year = $_SESSION['adm_project_report_discuss']->report_year;
$do_billing_proj_discuss->week_start_date = $_SESSION['adm_project_report_discuss']->week_start_date;
$do_billing_proj_discuss->week_end_date = $_SESSION['adm_project_report_discuss']->week_end_date;
$project_name = $do_billing_proj->getProjectName($idproject);
if ($do_billing_proj->isProjectOwner($idproject) || $do_billing_proj->isProjectCoWorker($idproject)) {
    echo '<b><span class="headline_fuscia">Project Name : ' . $project_name . '</span></b>&nbsp;&nbsp;&nbsp;<a href="timesheet.php">back</a><br />';
    $do_billing_proj_discuss->getDistinctTaskForProjectWithDiscussion($idproject, $_SESSION['adm_project_report_discuss']->report_month);
    while ($do_billing_proj_discuss->next()) {
        echo '<div class="contacts" >';
        echo '<div>';
        echo '<b>Task Name :' . $do_adm_task->getTaskDetail($do_billing_proj_discuss->idtask) . '</b>';
        echo '<br />';
        echo '<br />';
        $_SESSION['adm_project_report_discuss']->getMonthlyBillableHoursWithDiscussion($idproject, $do_billing_proj_discuss->idtask);
        $_SESSION['adm_project_report_discuss']->query($_SESSION['adm_project_report_discuss']->getSqlQuery());
        while ($_SESSION['adm_project_report_discuss']->next()) {
            echo '<i>Added By  ' . $_SESSION['do_User']->getFullName($_SESSION['adm_project_report_discuss']->iduser) . ' on :<b> ' . $_SESSION['adm_project_report_discuss']->date_added . '</b> </i>';
            echo '<br />';
            echo '<b><i>Time Worked : ' . $_SESSION['adm_project_report_discuss']->hours_work . ' hrs</i></b>';
 /**
  *  Add the Project note to the wrokfeed from the drop box mail. 
  *  Will do the similar steps as it does for adding new project note 
  *  @param User id, Projecttask id, Project id, task id, task descrpition
  */
 function eventaddFeedFromDropbox($iduser, $idproject_task, $idproject, $idtask, $task_description)
 {
     $do_project = new Project();
     $do_project->getId($idproject);
     $this->project_name = $do_project->getProjectName($idproject);
     $do_project_sharing = new ProjectSharing();
     $project_users = $do_project_sharing->getCoWorkersAsArray($do_project);
     $project_users[] = $do_project->getProjectOwner();
     $users = array();
     foreach ($project_users as $project_user) {
         if ($iduser != $project_user) {
             $users[] = $project_user;
         }
     }
     $do_user = new User();
     $this->user_full_name = $do_user->getFullName($iduser);
     $this->iduser = $iduser;
     $this->idproject_task = $idproject_task;
     $this->idtask = $idtask;
     $this->idproject = $idproject;
     $this->task_description = $task_description;
     $this->task_event_type = 'new_task_add';
     $this->addFeed($users);
 }