/**
  *  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);
 }
 /**
  *  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);
 }
Exemple #3
0
 */
include_once 'config.php';
$pageTitle = 'Ofuz :: ' . _('Project Task');
$Author = 'SQLFusion LLC';
$Keywords = 'Keywords for search engine';
$Description = 'Description for search engine';
$background_color = 'white';
//include_once('includes/header.inc.php');
$do_user = new User();
if (is_object($_SESSION['ProjectDiscussCount'])) {
    $_SESSION['ProjectDiscussCount']->sql_qry_start = 0;
}
if (isset($_GET['idprojecttask'])) {
    $idproject_task = $_GET['idprojecttask'];
    $do_project_task = new ProjectTask();
    $do_project_task->getProjectTaskDetails($idproject_task);
    $do_project = $do_project_task->getParentProject();
    if ($_SESSION['do_project']->idproject != $do_project_task->idproject) {
        $do_project->sessionPersistent("do_project", "project.php", OFUZ_TTL);
    }
}
$do_task_name = new ProjectTask();
$task_name = $do_task_name->getTaskName($idproject_task);
$pageTitle = 'Ofuz :: ' . $task_name;
include_once 'includes/header.inc.php';
//check if the user can access the task or not
$task_access = false;
$task_operation_access = false;
if ($do_project_task->isPublicAccess($idproject_task)) {
    $task_access = true;
    $task_operation_access = false;