• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP getGroupName函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getGroupName函数的典型用法代码示例。如果您正苦于以下问题:PHP getGroupName函数的具体用法?PHP getGroupName怎么用?PHP getGroupName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了getGroupName函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: getSearchParams

 function getSearchParams($stage, $assignedto, $dates)
 {
     $listSearchParams = array();
     $conditions = array();
     array_push($conditions, array("sales_stage", "e", $stage));
     if ($assignedto == '') {
         $currenUserModel = Users_Record_Model::getCurrentUserModel();
         $assignedto = $currenUserModel->getId();
     }
     if ($assignedto != 'all') {
         $ownerType = vtws_getOwnerType($assignedto);
         if ($ownerType == 'Users') {
             array_push($conditions, array("assigned_user_id", "e", getUserFullName($assignedto)));
         } else {
             $groupName = getGroupName($assignedto);
             $groupName = $groupName[0];
             array_push($conditions, array("assigned_user_id", "e", $groupName));
         }
     }
     if (!empty($dates)) {
         array_push($conditions, array("closingdate", "bw", $dates['start'] . ',' . $dates['end']));
     }
     $listSearchParams[] = $conditions;
     return '&search_params=' . json_encode($listSearchParams);
 }
开发者ID:yozhi,项目名称:YetiForceCRM,代码行数:25,代码来源:CampaignsWidget.php


示例2: getRequestedToData

function getRequestedToData()
{
    $mail_data = array();
    $mail_data['user_id'] = $_REQUEST["task_assigned_user_id"];
    $mail_data['subject'] = $_REQUEST['task_subject'];
    $mail_data['status'] = $_REQUEST['activity_mode'] == 'Task' ? $_REQUEST['taskstatus'] : $_REQUEST['eventstatus'];
    $mail_data['activity_mode'] = $_REQUEST['activity_mode'];
    $mail_data['taskpriority'] = $_REQUEST['taskpriority'];
    $mail_data['relatedto'] = $_REQUEST['task_parent_name'];
    $mail_data['contact_name'] = $_REQUEST['task_contact_name'];
    $mail_data['description'] = $_REQUEST['task_description'];
    $mail_data['assign_type'] = $_REQUEST['task_assigntype'];
    $mail_data['group_name'] = getGroupName($_REQUEST['task_assigned_group_id']);
    $mail_data['mode'] = $_REQUEST['task_mode'];
    $startTime = $_REQUEST['task_time_start'];
    $date = new DateTimeField($_REQUEST['task_date_start'] . " " . $startTime);
    $endTime = $_REQUEST['task_time_end'];
    $endDate = new DateTimeField($_REQUEST['task_due_date'] . " " . $startTime);
    $startTime = $date->getDisplayTime();
    $endTime = $endDate->getDisplayTime();
    $value = getaddEventPopupTime($startTime, $endTime, '24');
    $start_hour = $value['starthour'] . ':' . $value['startmin'] . '' . $value['startfmt'];
    $mail_data['st_date_time'] = $date->getDisplayDateTimeValue();
    $mail_data['end_date_time'] = $endDate->getDisplayDate();
    return $mail_data;
}
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:26,代码来源:SaveTodo.php


示例3: CustomerCommentFromPortal

function CustomerCommentFromPortal($entityData)
{
    $adb = PearDatabase::getInstance();
    $data = $entityData->getData();
    $customerWSId = $data['customer'];
    $relatedToWSId = $data['related_to'];
    $relatedToId = explode('x', $relatedToWSId);
    $moduleName = getSalesEntityType($relatedToId[1]);
    if ($moduleName == 'HelpDesk' && !empty($customerWSId)) {
        $ownerIdInfo = getRecordOwnerId($relatedToId[1]);
        if (!empty($ownerIdInfo['Users'])) {
            $ownerId = $ownerIdInfo['Users'];
            $ownerName = getOwnerName($ownerId);
            $toEmail = getUserEmailId('id', $ownerId);
        }
        if (!empty($ownerIdInfo['Groups'])) {
            $ownerId = $ownerIdInfo['Groups'];
            $groupInfo = getGroupName($ownerId);
            $ownerName = $groupInfo[0];
            $toEmail = implode(',', getDefaultAssigneeEmailIds($ownerId));
        }
        $subject = getTranslatedString('LBL_RESPONDTO_TICKETID', $moduleName) . "##" . $relatedToId[1] . "## " . getTranslatedString('LBL_CUSTOMER_PORTAL', $moduleName);
        $contents = getTranslatedString('Dear', $moduleName) . " " . $ownerName . "," . "<br><br>" . getTranslatedString('LBL_CUSTOMER_COMMENTS', $moduleName) . "<br><br>\n\t\t\t\t\t<b>" . $data['commentcontent'] . "</b><br><br>" . getTranslatedString('LBL_RESPOND', $moduleName) . "<br><br>" . getTranslatedString('LBL_REGARDS', $moduleName) . "<br>" . getTranslatedString('LBL_SUPPORT_ADMIN', $moduleName);
        $customerId = explode('x', $customerWSId);
        $result = $adb->pquery("SELECT email FROM vtiger_contactdetails WHERE contactid=?", array($customerId[0]));
        $fromEmail = $adb->query_result($result, 0, 'email');
        send_mail('HelpDesk', $toEmail, '', $fromEmail, $subject, $contents);
    }
}
开发者ID:cannking,项目名称:vtigercrm-debug,代码行数:29,代码来源:ModCommentsHandler.php


示例4: getGroups

 function getGroups($currentUserModel, $moduleName)
 {
     $groups = $currentUserModel->getAccessibleGroupForModule($moduleName);
     $groupIds = array_keys($groups);
     $groupsList = array();
     $groupsWSId = Mobile_WS_Utils::getEntityModuleWSId('Groups');
     foreach ($groupIds as $groupId) {
         $groupName = getGroupName($groupId);
         $groupsList[] = array('value' => $groupsWSId . 'x' . $groupId, 'label' => $groupName[0]);
     }
     return $groupsList;
 }
开发者ID:cannking,项目名称:vtigercrm-debug,代码行数:12,代码来源:FetchModuleOwners.php


示例5: getContent

 function getContent()
 {
     $result_content = '<div class="panel panel-default" style="padding: 15px; margin-top: 20px">
             <ol class="breadcrumb">
                 <li><a href="/do/admin">Home</a></li>
                 <li class="active">Users</li>
             </ol>
         <legend>Панель управления <small>Пользователи</small></legend>
         <table class="table table-striped table-condensed">
               <thead>
               <tr>
                   <th>ID</th>
                   <th>Username</th>
                   <th>Дата регистрации</th>
                   <th>Группа (уровень)</th>
                   <th>Действия</th>                                          
               </tr>
           </thead>   
           <tbody>
             ';
     global $bd;
     $res = $bd->query("SELECT * FROM users");
     $rows = $res->fetch_assoc();
     if ($res->num_rows == 0) {
         // Кто попадет в этот if - получит миллион
         $result_content .= '<div class="alert alert-warning" role="alert">Нет пользователей для вывода!</div>';
     }
     do {
         //$result_content .= '<tr>
         //        <td>'.$rows['id'].'</td>
         //        <td>'.$rows['title'].'</td>
         //        <td>'.$this->ClearStringHTML($rows['description']).'</td>
         //        <td class="text-center"><a class="btn btn-info btn-xs" href="/do/editnews/'.$rows['id'].'"><span class="glyphicon glyphicon-edit"></span> Edit</a> <a href="/do/delnews/'.$rows['id'].'" class="btn btn-danger btn-xs"><span class="glyphicon glyphicon-remove"></span> Del</a></td>
         //    </tr>';
         $groupName = getGroupName($rows['login'], $bd);
         $result_content .= '<tr>
                 <td>' . $rows['id'] . '</td>
                 <td>' . $rows['login'] . '</td>
                 <td>' . $rows['date'] . '</td>
                 <td>' . $groupName . ' (' . $rows['group'] . ')</td>
                 <td class="text-center"><a class="btn btn-info btn-xs" href="/do/edituser/' . $rows['id'] . '"><span class="glyphicon glyphicon-edit"></span> Edit</a> <a href="/do/deluser/' . $rows['id'] . '" class="btn btn-danger btn-xs"><span class="glyphicon glyphicon-remove"></span> Del</a></td>                                      
             </tr>';
     } while ($rows = $res->fetch_assoc());
     $result_content .= '</tbody></table></div>';
     return $result_content;
 }
开发者ID:Evervolv1337,项目名称:EvervolvCMS,代码行数:46,代码来源:users.class.php


示例6: HelpDesk_notifyOnPortalTicketComment

function HelpDesk_notifyOnPortalTicketComment($entityData)
{
    $adb = PearDatabase::getInstance();
    $moduleName = $entityData->getModuleName();
    $wsId = $entityData->getId();
    $parts = explode('x', $wsId);
    $entityId = $parts[1];
    $ownerIdInfo = getRecordOwnerId($entityId);
    if (!empty($ownerIdInfo['Users'])) {
        $ownerId = $ownerIdInfo['Users'];
        $ownerName = getOwnerName($ownerId);
        $to_email = getUserEmailId('id', $ownerId);
    }
    if (!empty($ownerIdInfo['Groups'])) {
        $ownerId = $ownerIdInfo['Groups'];
        $groupInfo = getGroupName($ownerId);
        $ownerName = $groupInfo[0];
        $to_email = implode(',', getDefaultAssigneeEmailIds($ownerId));
    }
    $wsParentId = $entityData->get('contact_id');
    $parentIdParts = explode('x', $wsParentId);
    $parentId = $parentIdParts[1];
    $entityDelta = new VTEntityDelta();
    $oldComments = $entityDelta->getOldValue($entityData->getModuleName(), $entityId, 'comments');
    $newComments = $entityDelta->getCurrentValue($entityData->getModuleName(), $entityId, 'comments');
    $commentDiff = str_replace($oldComments, '', $newComments);
    $latestComment = strip_tags($commentDiff);
    //send mail to the assigned to user when customer add comment
    // SalesPlatform.ru begin
    $subject = getTranslatedString('LBL_RESPONDTO_TICKETID', $moduleName) . " " . $entityData->get('ticket_no') . " " . getTranslatedString('LBL_CUSTOMER_PORTAL', $moduleName);
    //$subject = getTranslatedString('LBL_RESPONDTO_TICKETID', $moduleName)."##". $entityId."##". getTranslatedString('LBL_CUSTOMER_PORTAL', $moduleName);
    // SalesPlatform.ru end
    $contents = getTranslatedString('Dear', $moduleName) . " " . $ownerName . "," . "<br><br>" . getTranslatedString('LBL_CUSTOMER_COMMENTS', $moduleName) . "<br><br>\n\t\t\t\t\t\t<b>" . $latestComment . "</b><br><br>" . getTranslatedString('LBL_RESPOND', $moduleName) . "<br><br>" . getTranslatedString('LBL_REGARDS', $moduleName) . "<br>" . getTranslatedString('LBL_SUPPORT_ADMIN', $moduleName);
    //get the contact email id who creates the ticket from portal and use this email as from email id in email
    $result = $adb->pquery("SELECT lastname, firstname, email FROM vtiger_contactdetails WHERE contactid=?", array($parentId));
    $customername = $adb->query_result($result, 0, 'firstname') . ' ' . $adb->query_result($result, 0, 'lastname');
    $customername = decode_html($customername);
    //Fix to display the original UTF-8 characters in sendername instead of ascii characters
    $from_email = $adb->query_result($result, 0, 'email');
    send_mail('HelpDesk', $to_email, '', $from_email, $subject, $contents);
}
开发者ID:gitter-badger,项目名称:openshift-salesplatform,代码行数:41,代码来源:HelpDeskHandler.php


示例7: generateRecipientOption

 public static function generateRecipientOption($type, $value, $name = '')
 {
     switch ($type) {
         case "users":
             if (empty($name)) {
                 $name = getUserFullName($value);
             }
             $optionName = 'User::' . addslashes(decode_html($name));
             $optionValue = 'users::' . $value;
             break;
         case "groups":
             if (empty($name)) {
                 $groupInfo = getGroupName($value);
                 $name = $groupInfo[0];
             }
             $optionName = 'Group::' . addslashes(decode_html($name));
             $optionValue = 'groups::' . $value;
             break;
         case "roles":
             if (empty($name)) {
                 $name = getRoleName($value);
             }
             $optionName = 'Roles::' . addslashes(decode_html($name));
             $optionValue = 'roles::' . $value;
             break;
         case "rs":
             if (empty($name)) {
                 $name = getRoleName($value);
             }
             $optionName = 'RoleAndSubordinates::' . addslashes(decode_html($name));
             $optionValue = 'rs::' . $value;
             break;
     }
     return '<option value="' . $optionValue . '">' . $optionName . '</option>';
 }
开发者ID:cin-system,项目名称:cinrepo,代码行数:35,代码来源:ScheduledReports4You.php


示例8: getInviteUserMailData

 public function getInviteUserMailData()
 {
     $adb = PearDatabase::getInstance();
     $return_id = $this->getId();
     $cont_qry = "select * from vtiger_cntactivityrel where activityid=?";
     $cont_res = $adb->pquery($cont_qry, array($return_id));
     $noofrows = $adb->num_rows($cont_res);
     $cont_id = array();
     if ($noofrows > 0) {
         for ($i = 0; $i < $noofrows; $i++) {
             $cont_id[] = $adb->query_result($cont_res, $i, "contactid");
         }
     }
     $cont_name = '';
     foreach ($cont_id as $key => $id) {
         if ($id != '') {
             $contact_name = Vtiger_Util_Helper::getRecordName($id);
             $cont_name .= $contact_name . ', ';
         }
     }
     $parentId = $this->get('parent_id');
     $parentName = '';
     if ($parentId != '') {
         $parentName = Vtiger_Util_Helper::getRecordName($parentId);
     }
     $cont_name = trim($cont_name, ', ');
     $mail_data = array();
     $mail_data['user_id'] = $this->get('assigned_user_id');
     $mail_data['subject'] = $this->get('subject');
     $moduleName = $this->getModuleName();
     $mail_data['status'] = $moduleName == 'Calendar' ? $this->get('taskstatus') : $this->get('eventstatus');
     $mail_data['activity_mode'] = $moduleName == 'Calendar' ? 'Task' : 'Events';
     $mail_data['taskpriority'] = $this->get('taskpriority');
     $mail_data['relatedto'] = $parentName;
     $mail_data['contact_name'] = $cont_name;
     $mail_data['description'] = $this->get('description');
     $mail_data['assign_type'] = $this->get('assigntype');
     $mail_data['group_name'] = getGroupName($this->get('assigned_user_id'));
     $mail_data['mode'] = $this->get('mode');
     //TODO : remove dependency on request;
     $value = getaddEventPopupTime($_REQUEST['time_start'], $_REQUEST['time_end'], '24');
     $start_hour = $value['starthour'] . ':' . $value['startmin'] . '' . $value['startfmt'];
     if ($_REQUEST['activity_mode'] != 'Task') {
         $end_hour = $value['endhour'] . ':' . $value['endmin'] . '' . $value['endfmt'];
     }
     $startDate = new DateTimeField($_REQUEST['date_start'] . " " . $start_hour);
     $endDate = new DateTimeField($_REQUEST['due_date'] . " " . $end_hour);
     $mail_data['st_date_time'] = $startDate->getDBInsertDateTimeValue();
     $mail_data['end_date_time'] = $endDate->getDBInsertDateTimeValue();
     $mail_data['location'] = $this->get('location');
     return $mail_data;
 }
开发者ID:cannking,项目名称:vtigercrm-debug,代码行数:52,代码来源:Record.php


示例9: getGroupName

  <div class="container">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar2" aria-expanded="false" aria-controls="navbar">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
      </button>
    </div><!--/.navbar-header -->
    <p class="weekSelector-text">Your Picks for <?php 
echo "{$this_season_year} {$this_season_type} Week {$this_week}";
?>
</p>
    <div id="navbar2" class="navbar-collapse collapse weekSelector">
     <ul class="nav navbar-nav weekSelector">
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><?php 
echo getGroupName($db, $this_group_id);
?>
 <span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li class="dropdown-header">Groups</li>
            <?php 
$groups = getGroups($db, $this_user_id);
foreach ($groups as $group) {
    echo '<li><a href="' . $THIS_PAGE . '?group_id=' . $group['group_id'] . '&season_year=' . $this_season_year . '&season_type=' . $this_season_type . '&week=' . $this_week . '">' . $group['group_name'] . '</a></li>';
}
?>
      
          </ul>
        </li>
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><?php 
开发者ID:jeffmoreland,项目名称:football,代码行数:31,代码来源:selector.php


示例10: getGroupName

								<?php 
            echo $warning;
            ?>
								<img src="<?php 
            echo ADMIN_URL;
            ?>
/images/modify_16.png" border="0" alt="Modify" /> 
								<img src="<?php 
            echo WB_URL . $slide['image'];
            ?>
" style="height:30px;"/>
							</a>
						</td>
						<td>
							<?php 
            echo getGroupName($slide['group_id']);
            ?>
						</td>
						<td>
							<b><?php 
            if ($slide['active'] == 1) {
                echo '<span style="color: green;">' . $WB_TEXT['YES'] . '</span>';
            } else {
                echo '<span style="color: red;">' . $WB_TEXT['NO'] . '</span>';
            }
            ?>
</b>
						</td>
						<td>
							<a href="javascript: confirm_link('<?php 
            echo $TEXT['ARE_YOU_SURE'];
开发者ID:WebsiteBaker-modules,项目名称:CaptionSlider,代码行数:31,代码来源:tool.php


示例11: getRequestData

function getRequestData($return_id)
{
    global $adb;
    $cont_qry = "select * from vtiger_cntactivityrel where activityid=?";
    $cont_res = $adb->pquery($cont_qry, array($return_id));
    $noofrows = $adb->num_rows($cont_res);
    $cont_id = array();
    if ($noofrows > 0) {
        for ($i = 0; $i < $noofrows; $i++) {
            $cont_id[] = $adb->query_result($cont_res, $i, "contactid");
        }
    }
    $cont_name = '';
    foreach ($cont_id as $key => $id) {
        if ($id != '') {
            $displayValueArray = getEntityName('Contacts', $id);
            if (!empty($displayValueArray)) {
                foreach ($displayValueArray as $key => $field_value) {
                    $contact_name = $field_value;
                }
            }
            $cont_name .= $contact_name . ', ';
        }
    }
    $cont_name = trim($cont_name, ', ');
    $mail_data = array();
    $mail_data['user_id'] = $_REQUEST['assigned_user_id'];
    $mail_data['subject'] = $_REQUEST['subject'];
    $mail_data['status'] = $_REQUEST['activity_mode'] == 'Task' ? $_REQUEST['taskstatus'] : $_REQUEST['eventstatus'];
    $mail_data['activity_mode'] = $_REQUEST['activity_mode'];
    $mail_data['taskpriority'] = $_REQUEST['taskpriority'];
    $mail_data['relatedto'] = $_REQUEST['parent_name'];
    $mail_data['contact_name'] = $cont_name;
    $mail_data['description'] = $_REQUEST['description'];
    $mail_data['assign_type'] = $_REQUEST['assigntype'];
    $mail_data['group_name'] = getGroupName($_REQUEST['assigned_group_id']);
    $mail_data['mode'] = $_REQUEST['mode'];
    $value = getaddEventPopupTime($_REQUEST['time_start'], $_REQUEST['time_end'], '24');
    $start_hour = $value['starthour'] . ':' . $value['startmin'] . '' . $value['startfmt'];
    if ($_REQUEST['activity_mode'] != 'Task') {
        $end_hour = $value['endhour'] . ':' . $value['endmin'] . '' . $value['endfmt'];
    }
    $startDate = new DateTimeField($_REQUEST['date_start'] . " " . $start_hour);
    $endDate = new DateTimeField($_REQUEST['due_date'] . " " . $end_hour);
    $mail_data['st_date_time'] = $startDate->getDBInsertDateTimeValue();
    $mail_data['end_date_time'] = $endDate->getDBInsertDateTimeValue();
    $mail_data['location'] = vtlib_purify($_REQUEST['location']);
    return $mail_data;
}
开发者ID:mslokhat,项目名称:corebos,代码行数:49,代码来源:Save.php


示例12: array

}
$course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);
require_course_login($course, true, $cm);
$context = context_module::instance($cm->id);
require_capability('mod/project:view', $context);
$PAGE->set_url('/mod/project/workload_distribution.php', array('id' => $cm->id));
$PAGE->set_title($course->shortname . ': ' . $project->name);
$PAGE->set_heading($course->fullname);
$PAGE->set_activity_record($project);
$options = empty($project->displayoptions) ? array() : unserialize($project->displayoptions);
/// Check to see if groups are being used here
$groupmode = groups_get_activity_groupmode($cm);
$currentgroup = groups_get_activity_group($cm, true);
echo $OUTPUT->header();
echo $OUTPUT->heading(format_string('Workload Distribution'), 2);
echo $OUTPUT->heading(format_string(getGroupName($currentgroup)), 4);
//$html = "<img src='pix\\".$history_summary->method.".png' width='16px' heigh='16px' />  ".userdate($history_summary->date)."<br /><br />";
$member_rank = RankMembersTasksDistribution($currentgroup);
//echo AlertMembersTasksDistribution($member_rank);
arsort($member_rank);
//Order the Rank by number of hours
//Get the total number of hours based on each student
$total_hours = array_sum($member_rank);
if ($total_hours > 0) {
    $equal_hours = $total_hours / count($member_rank);
    $html = "Individual Recommended Hours: " . round($equal_hours, 2) . " Hours<br /><br />";
    //If large variance occurs, display column for table
    if (AlertWorkloadDistribution($currentgroup)) {
        $html .= "<table style='border:1px solid black;'><tr style='background-color:lightgrey;'><th>Member</th><th>Assigned Hours</th><th>% of Workload</th><th>Variance</th></tr>";
    } else {
        $html .= "<table style='border:1px solid black;'><tr style='background-color:lightgrey;'><th>Member</th><th>Assigned Hours</th><th>% of Workload</th><th></th></tr>";
开发者ID:kurcz,项目名称:moodle_project,代码行数:31,代码来源:workload_distribution.php


示例13: renderGroupList

      <?php 
    renderGroupList($db, $group, $groupLeader);
    ?>

      <?php 
    if ($groupLeader == 1) {
        ?>
        <a class="button right" href="#" onclick="alert('Group leader cant leave the group - set someone else as leader first.');">Leave Group</a>
      <?php 
    } else {
        ?>
        <a class="button right" href="/?page=group&amp;action=remove&amp;user=<?php 
        echo $userId;
        ?>
" onclick="return confirm('Leave <?php 
        echo getGroupName($group, $db);
        ?>
?')">Leave Group</a>
      <?php 
    }
    ?>
      <a class="button left" href="/">Back Home</a>
      <?php 
}
// end if
?>
    </div>
    <?php 
include 'footer.php';
?>
  </main>
开发者ID:ruslan-a,项目名称:teamworker,代码行数:31,代码来源:list.php


示例14: getAssignedTo

 public function getAssignedTo($scannerId, $ruleId)
 {
     $db = PearDatabase::getInstance();
     $result = $db->pquery("SELECT assigned_to FROM vtiger_mailscanner_rules WHERE scannerid = ? AND ruleid = ?", array($scannerId, $ruleId));
     $id = $db->query_result($result, 0, 'assigned_to');
     if (empty($id)) {
         global $current_user;
         $id = $current_user->id;
     }
     $assignedUserName = getUserFullName($id);
     if (empty($assignedUserName)) {
         $groupInfo = getGroupName($id);
         $assignedUserName = $groupInfo[0];
     }
     return array($id, $assignedUserName);
 }
开发者ID:cannking,项目名称:vtigercrm-debug,代码行数:16,代码来源:RuleRecord.php


示例15: getRecordValues

/** To get the converted record values which have to be display in duplicates merging tpl*/
function getRecordValues($id_array, $module)
{
    global $adb, $current_user;
    global $app_strings;
    global $mod_strings;
    $tabid = getTabid($module);
    $query = "select fieldname,fieldlabel from ec_field where tabid=" . $tabid . " and fieldname  not in ('createdtime','modifiedtime')";
    $result = $adb->query($query);
    $no_rows = $adb->num_rows($result);
    for ($i = 0; $i < $no_rows; $i++) {
        $fld_name = $adb->query_result($result, $i, "fieldname");
        if (getFieldVisibilityPermission($module, $current_user->id, $fld_name) == '0') {
            $fld_array[] = $fld_name;
        }
    }
    $js_arr = $fld_array;
    $focus = new $module();
    if (isset($id_array) && $id_array != '') {
        foreach ($id_array as $value) {
            $focus->id = $value;
            $focus->retrieve_entity_info($value, $module);
            $field_values[] = $focus->column_fields;
        }
    }
    $tabid = getTabid($module);
    $query = "select fieldname,uitype,fieldlabel from ec_field where tabid=" . $tabid . " and fieldname not in ('createdtime','modifiedtime','lastcontacttime')";
    $result = $adb->query($query);
    $no_rows = $adb->num_rows($result);
    $labl_array = array();
    $value_pair = array();
    $c = 0;
    for ($i = 0; $i < $no_rows; $i++) {
        $fld_name = $adb->query_result($result, $i, "fieldname");
        $fld_label = $adb->query_result($result, $i, "fieldlabel");
        if (isset($mod_strings[$fld_label])) {
            $fld_label = $mod_strings[$fld_label];
        }
        $ui_type = $adb->query_result($result, $i, "uitype");
        if (getFieldVisibilityPermission($module, $current_user->id, $fld_name) == '0') {
            $record_values[$c][$fld_label] = array();
            $ui_value[] = $ui_type;
            for ($j = 0; $j < count($field_values); $j++) {
                if ($ui_type == 56) {
                    if ($field_values[$j][$fld_name] == 0) {
                        $value_pair['disp_value'] = $app_strings['no'];
                    } else {
                        $value_pair['disp_value'] = $app_strings['yes'];
                    }
                } elseif ($ui_type == 51 || $ui_type == 50) {
                    $account_id = $field_values[$j][$fld_name];
                    $account_name = getAccountName($account_id);
                    $value_pair['disp_value'] = $account_name;
                } elseif ($ui_type == 53) {
                    $user_id = $field_values[$j][$fld_name];
                    $username = getUserName($user_id);
                    $group_info = getGroupName($field_values[$j]['record_id'], $module);
                    $groupname = $group_info[0];
                    $groupid = $group_info[1];
                    if ($user_id != 0) {
                        $value_pair['disp_value'] = $username;
                    } else {
                        $value_pair['disp_value'] = $groupname;
                    }
                } elseif ($ui_type == 57) {
                    $contact_id = $field_values[$j][$fld_name];
                    if ($contact_id != '') {
                        $contactname = getContactName($contact_id);
                    }
                    $value_pair['disp_value'] = $contactname;
                } elseif ($ui_type == 75 || $ui_type == 81) {
                    $vendor_id = $field_values[$j][$fld_name];
                    if ($vendor_id != '') {
                        $vendor_name = getVendorName($vendor_id);
                    }
                    $value_pair['disp_value'] = $vendor_name;
                } elseif ($ui_type == 52) {
                    $user_id = $field_values[$j][$fld_name];
                    $user_name = getUserName($user_id);
                    $value_pair['disp_value'] = $user_name;
                } elseif ($ui_type == 68) {
                    $parent_id = $field_values[$j][$fld_name];
                    $value_pair['disp_value'] = getAccountName($parent_id);
                    if ($value_pair['disp_value'] == '' || $value_pair['disp_value'] == NULL) {
                        $value_pair['disp_value'] = getContactName($parent_id);
                    }
                } elseif ($ui_type == 59) {
                    $product_name = getProductName($field_values[$j][$fld_name]);
                    if ($product_name != '') {
                        $value_pair['disp_value'] = $product_name;
                    } else {
                        $value_pair['disp_value'] = '';
                    }
                } elseif ($ui_type == 58) {
                    $campaign_name = getCampaignName($field_values[$j][$fld_name]);
                    if ($campaign_name != '') {
                        $value_pair['disp_value'] = $campaign_name;
                    } else {
                        $value_pair['disp_value'] = '';
                    }
//.........这里部分代码省略.........
开发者ID:ruckfull,项目名称:taobaocrm,代码行数:101,代码来源:CommonUtils.php


示例16: seo_start

          </span></div>
        <?php 
                    }
                    ?>
        <div class="section-blog">
          <div class="section">Раздел:</div>
          <?php 
                    seo_start();
                    ?>
          <div class="small"> <a href="<?php 
                    echo getFriendlyURL("blog_group", $theme['id_gr']);
                    echo $theme['t'] ? "?t=prof" : "";
                    ?>
">
            <?php 
                    echo getGroupName($theme['id_gr'], $theme['t']);
                    ?>
            </a> </div>
        </div>
        <?php 
                    echo seo_end();
                    ?>
        <div class="commline">
          <?php 
                    if (!$mod && $theme['deleted']) {
                        ?>
          <a href="/blogs/viewgroup.php?id=<?php 
                        echo $theme['id'];
                        ?>
&amp;action=restore&page=<?php 
                        echo $page;
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:viewgr_cnt.php


示例17: Webforms

 ********************************************************************************/
global $app_strings, $mod_strings, $current_language, $currentModule, $theme, $current_user, $adb, $log;
require_once 'Smarty_setup.php';
require_once 'modules/Webforms/Webforms.php';
require_once 'modules/Webforms/model/WebformsModel.php';
require_once 'modules/Webforms/model/WebformsFieldModel.php';
require_once 'include/utils/CommonUtils.php';
Webforms::checkAdminAccess($current_user);
if (isset($_REQUEST['id'])) {
    $webformModel = Webforms_Model::retrieveWithId($_REQUEST['id']);
    $webform = new Webforms();
    $smarty = new vtigerCRM_Smarty();
    $category = getParentTab();
    $username = getUserFullName($webformModel->getOwnerId());
    if (empty($username)) {
        list($username) = getGroupName($webformModel->getOwnerId());
    }
    $smarty->assign('WEBFORMMODEL', $webformModel);
    $smarty->assign('WEBFORM', $webform);
    $smarty->assign('OWNER', $username);
    $smarty->assign('THEME', $theme);
    $smarty->assign('MOD', $mod_strings);
    $smarty->assign('APP', $app_strings);
    $smarty->assign('MODULE', $currentModule);
    $smarty->assign('CATEGORY', $category);
    $smarty->assign('IMAGE_PATH', "themes/{$theme}/images/");
    $smarty->assign('WEBFORMFIELDS', Webforms::getFieldInfos($webformModel->getTargetModule()));
    $smarty->assign('ACTIONPATH', $site_URL . '/modules/Webforms/capture.php');
    $smarty->assign('LANGUAGE', $current_language);
    $smarty->display(vtlib_getModuleTemplate($currentModule, 'DetailView.tpl'));
}
开发者ID:kduqi,项目名称:corebos,代码行数:31,代码来源:WebformsDetailView.php


示例18: out

 function out()
 {
     $groupId = $_GET['id'];
     $userId = $this->mid;
     if (!empty($groupId) && !empty($userId)) {
         $dao = D('GroupMember');
         $user = $dao->find("userId='{$userId}' and groupId='{$groupId}'");
         if ($user->level == 2) {
             $this->error("管理员不能直接退出群!", -1);
         }
         if ($dao->delete("userId='{$userId}' and groupId='{$groupId}'")) {
             /* add_user_feed */
             $feedTitle = "退出了群:<a href=\"/Group/show/id/{$groupId}\">" . getGroupName($groupId) . "</a>";
             $this->addUserFeed($userId, 'out', 'group', $groupId, $feedTitle);
             /* /add_user_feed */
             $this->success("操作成功,你已退出该圈子。", 1);
         } else {
             $this->error("系统错误!请稍后再试。", 0);
         }
     } else {
         $this->error("操作错误!请登陆后选择要退出的办公圈。");
     }
 }
开发者ID:skiman100,项目名称:thinksns,代码行数:23,代码来源:GroupAction.class.php


示例19: getReportHeaderInfo

 public function getReportHeaderInfo($noofrows = 0)
 {
     $final_return = $return = $return_name = $return_val = "";
     $return_arr = $col_order_arr = $summ_order_arr = array();
     $colspan = 2;
     global $default_charset;
     if (isset($this->reportinformations["reports4youid"]) && $this->reportinformations["reports4youid"] != "") {
         /*
          if (isset($this->reportinformations["reports4youid"]) && $this->reportinformations["reports4youid"] != "") {
          $return_val = $this->reportinformations["reports4youname"];
          } else {
          $return_val = vtranslate("LBL_REPORT_NAME", $this->currentModule);
          }
          $return_arr["reportname"] =  array("val"=>$return_val,"colspan"=>$colspan);
         */
         $return_val = "<b>" . vtranslate("LBL_Module", $this->currentModule) . ": </b>";
         $primarymodule_id = $this->reportinformations["primarymodule"];
         $primarymodule = vtlib_getModuleNameById($primarymodule_id);
         $return_val .= vtranslate($primarymodule, $primarymodule);
         $return_arr[] = array("val" => $return_val, "colspan" => "");
         $return_val = "<b>" . vtranslate("LBL_TOTAL", $this->currentModule) . ": </b><span id='_reportrun_total'>{$noofrows}</span> " . vtranslate("LBL_RECORDS", "ITS4YouReports");
         $return_arr[] = array("val" => $return_val, "colspan" => "");
         $return_val = "<b>" . vtranslate("LBL_TEMPLATE_OWNER", $this->currentModule) . ": </b>";
         $return_val .= getUserFullName($this->reportinformations["owner"]);
         $return_arr[] = array("val" => $return_val, "colspan" => "");
         $return_val = "<b>" . vtranslate("LBL_GroupBy", $this->currentModule) . ": </b>";
         for ($gi = 1; $gi < 4; $gi++) {
             if (isset($this->reportinformations["Group{$gi}"]) && $this->reportinformations["Group{$gi}"] != "" && $this->reportinformations["Group{$gi}"] != "none") {
                 $group_col_info = array();
                 // columns visibility control !!!!!!
                 if ($this->getColumnVisibilityPerm($this->reportinformations["Group{$gi}"]) == 0) {
                     $gp_column_lbl = $this->getColumnStr_Label($this->reportinformations["Group{$gi}"], "SC");
                     $group_col_info[] = $gp_column_lbl;
                     $group_col_info[] = vtranslate($this->reportinformations["Sort{$gi}"]);
                     if (isset($this->reportinformations["timeline_columnstr{$gi}"]) && $this->reportinformations["timeline_columnstr{$gi}"] != "" && $this->reportinformations["timeline_columnstr{$gi}"] != "@vlv@") {
                         $tr_arr = explode("@vlv@", $this->reportinformations["timeline_columnstr{$gi}"]);
                         $tl_option = "TL_" . $tr_arr[1];
                         $group_col_info[] = vtranslate("LBL_BY", $this->currentModule);
                         $group_col_info[] = vtranslate($tl_option, $this->currentModule);
                     }
                     $group_cols[] = implode(" ", $group_col_info);
                 }
             }
         }
         if (empty($group_cols)) {
             $group_cols[] = vtranslate("LBL_NONE", $this->currentModule);
         }
         $return_val .= implode(", ", $group_cols);
         $return_arr[] = array("val" => $return_val, "colspan" => "");
         $return_val = "<b>" . vtranslate("LBL_Sharing", $this->currentModule) . ": </b>";
         if (isset($this->reportinformations["sharingtype"]) && $this->reportinformations["sharingtype"] != "") {
             $sharingtype = vtranslate($this->reportinformations["sharingtype"]);
         }
         $sharing_with = "";
         if ($this->reportinformations["sharingtype"] == "share") {
             $sharingMemberArray = $this->reportinformations["members_array"];
             $sharingMemberArray = array_unique($sharingMemberArray);
             if (count($sharingMemb 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getGroupOrder函数代码示例发布时间:2022-05-15
下一篇:
PHP getGroupInfo函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap