echo '<p>' . nl2br($do_group->description) . '</p>'; ?> </div> <div class="right_200"> <a href="<?php echo NavigationControl::getNavigationLink($module, "group_edit", $do_group->idgroup); ?> " class="btn btn-primary"><i class="icon-white icon-edit"></i> <?php echo _('Update'); ?> </a> </div> <div class="clear_float"></div> <h3><?php echo _('Members associated to this group'); ?> </h3> <?php $do_group_user_rel = new GroupUserRelation(); $do_group_user_rel->get_users_related_to_group($do_group->idgroup); if ($do_group_user_rel->getNumRows() > 0) { while ($do_group_user_rel->next()) { echo '<p><a href="' . NavigationControl::getNavigationLink("User", "detail", $do_group_user_rel->iduser) . '">' . $do_group_user_rel->firstname . ' ' . $do_group_user_rel->lastname . '(' . $do_group_user_rel->user_name . ')</a></p>'; } } ?> </div> </div> </div><!--/row--> </div><!--/span--> </div><!--/row-->
} } else { $email_to_array = array(); } $do_calendar->getId($do_event_reminder->idevents); if ($do_calendar->getNumRows() > 0) { $start_date = $do_calendar->start_date; $start_time = $do_calendar->start_time; $start_date_time = $start_date . ' ' . $start_time; if ($do_calendar->iduser > 0) { $do_user = new User(); $do_user->getId((int) $do_calendar->iduser); $email_to_array[(int) $do_calendar->iduser] = array("email" => $do_user->email, "firstname" => $do_user->firstname, "lastname" => $do_user->lastname); } else { $do_group_user_rel = new GroupUserRelation(); $do_group_user_rel->get_users_related_to_group($do_calendar->idgroup); if ($do_group_user_rel->getNumRows() > 0) { while ($do_group_user_rel->next()) { $email_to_array[] = array("email" => $do_group_user_rel->email, "firstname" => $do_group_user_rel->firstname, "lastname" => $do_group_user_rel->lastname); } } } $event_url = SITE_URL . NavigationControl::getNavigationLink("Calendar", "detail", $do_calendar->idevents); $reminder_time = strtotime("- {$d} days - {$h} hours - {$m} minutes ", strtotime($start_date_time)); if (strtotime($now) >= $reminder_time) { foreach ($email_to_array as $key => $val) { if ($key == 0) { foreach ($val as $additional_emailids) { $email_data = array("firstname" => "Hi", "event_type" => $do_calendar->event_type, "start_time" => FieldType10::display_value($start_time), "start_date" => FieldType9::display_value($start_date), "CRM_NAME" => CRM_NAME, "event_url" => $event_url, "subject" => $do_calendar->subject); $emailer->IsSendmail(); $emailer->setEmailTemplate($email_template);
<?php // Copyright SQCRM. For licensing, reuse, modification and distribution see license.txt /** * Group add page * @author Abhik Chakraborty */ $do_group = new Group(); $do_group_user_rel = new GroupUserRelation(); $do_user = new User(); $do_group->getId($sqcrm_record_id); $do_user->get_all_users(); $do_group_user_rel->get_users_related_to_group($sqcrm_record_id); $group_to_users = array(); while ($do_group_user_rel->next()) { $group_to_users[$do_group_user_rel->iduser] = $do_group_user_rel->firstname . ' ' . $do_group_user_rel->lastname . ' (' . $do_group_user_rel->user_name . ')'; } ?> <div class="container-fluid"> <div class="row"> <?php include_once "modules/Settings/settings_leftmenu.php"; ?> <div class="col-md-9"> <div class="box_content"> <ol class="breadcrumb"> <li class="active"><?php echo _('Settings'); ?> </li> <li><a href="<?php
$prospect_win_by_amount = $prospect_win->get_propect_win($where); $users_and_groups = $prospect_win->get_users_and_groups($selected_user, false, 'assigned_to'); $group_users = array(); if (array_key_exists('data', $prospect_win_by_amount) && count($prospect_win_by_amount['data']) > 0) { if (count($users_and_groups) > 0) { if (array_key_exists('users', $users_and_groups) && count($users_and_groups['users']) > 0) { foreach ($users_and_groups['users'] as $key => $val) { if (!array_key_exists($key, $prospect_win_by_amount['data'])) { $prospect_win_by_amount['data'][$key] = 0.0; } } } if (array_key_exists('groups', $users_and_groups) && count($users_and_groups['groups']) > 0) { $do_group_users = new GroupUserRelation(); foreach ($users_and_groups['groups'] as $key => $val) { $do_group_users->get_users_related_to_group($val["idgroup"]); if ($do_group_users->getNumRows() > 0) { while ($do_group_users->next()) { $group_users[$key][] = array("user_name" => $do_group_users->user_name, "firstname" => $do_group_users->firstname, "lastname" => $do_group_users->lastname); } } if (!array_key_exists($key, $prospect_win_by_amount['data'])) { $prospect_win_by_amount['data'][$key] = 0.0; } } } } } $graph_height = 350; $height_offset = 5; $record_count = count($prospect_win_by_amount['data']);
/** * function to get the other assigne for feed. By default a feed is displayed to the users * above the action user. But in some situations its necessary to notify other user like the * users within the same group etc. * This method will return those users for feed. * @param integer $action_user_id * @param array $other_assigne * @param integer $idrecord */ public function get_other_assigne($action_user_id, $other_assigne, $idrecord = 0) { $other_assigne_users = array(); if (array_key_exists("related", $other_assigne)) { switch ($other_assigne["related"]) { case "group": if (array_key_exists("data", $other_assigne)) { if (array_key_exists("key", $other_assigne["data"]) && $other_assigne["data"]["key"] == "oldgroup") { $idgroup = $other_assigne["data"]["val"]; $do_group_user_rel = new GroupUserRelation(); $do_group_user_rel->get_users_related_to_group($idgroup); if ($do_group_user_rel->getNumRows() > 0) { while ($do_group_user_rel->next()) { $other_assigne_users[] = $do_group_user_rel->iduser; } } } if (array_key_exists("key", $other_assigne["data"]) && $other_assigne["data"]["key"] == "newgroup") { $idgroup = $other_assigne["data"]["val"]; $do_group_user_rel = new GroupUserRelation(); $do_group_user_rel->get_users_related_to_group($idgroup); if ($do_group_user_rel->getNumRows() > 0) { while ($do_group_user_rel->next()) { $other_assigne_users[] = $do_group_user_rel->iduser; } } } } break; } } return $other_assigne_users; }