本文整理汇总了PHP中Customer::getSupportLevelAssocList方法的典型用法代码示例。如果您正苦于以下问题:PHP Customer::getSupportLevelAssocList方法的具体用法?PHP Customer::getSupportLevelAssocList怎么用?PHP Customer::getSupportLevelAssocList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Customer
的用法示例。
在下文中一共展示了Customer::getSupportLevelAssocList方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getAssociatedSupportLevels
/**
* Method used to get the list of associated support levels for a given
* FAQ entry.
*
* @access public
* @param integer $prj_id The project ID
* @param integer $faq_id The FAQ ID
* @return array The list of projects
*/
function getAssociatedSupportLevels($prj_id, $faq_id)
{
$stmt = "SELECT\n fsl_support_level_id\n FROM\n " . APP_DEFAULT_DB . "." . APP_TABLE_PREFIX . "faq_support_level\n WHERE\n fsl_faq_id=" . Misc::escapeInteger($faq_id);
$ids = $GLOBALS["db_api"]->dbh->getCol($stmt);
$t = array();
$levels = Customer::getSupportLevelAssocList(Misc::escapeInteger($prj_id));
foreach ($levels as $support_level_id => $support_level) {
if (in_array($support_level_id, $ids)) {
$t[$support_level_id] = $support_level;
}
}
return $t;
}
示例2: elseif
$tpl->assign("result", FAQ::update());
} elseif (@$HTTP_POST_VARS["cat"] == "delete") {
FAQ::remove();
} elseif (!empty($HTTP_GET_VARS['prj_id'])) {
$tpl->assign("info", array('faq_prj_id' => $HTTP_GET_VARS['prj_id']));
$backend_uses_support_levels = Customer::doesBackendUseSupportLevels($HTTP_GET_VARS['prj_id']);
$tpl->assign("backend_uses_support_levels", $backend_uses_support_levels);
if ($backend_uses_support_levels) {
$tpl->assign("support_levels", Customer::getSupportLevelAssocList($HTTP_GET_VARS['prj_id']));
}
}
if (@$HTTP_GET_VARS["cat"] == "edit") {
$info = FAQ::getDetails($HTTP_GET_VARS["id"]);
if (!empty($HTTP_GET_VARS['prj_id'])) {
$info['faq_prj_id'] = $HTTP_GET_VARS['prj_id'];
}
$backend_uses_support_levels = Customer::doesBackendUseSupportLevels($info['faq_prj_id']);
$tpl->assign("backend_uses_support_levels", $backend_uses_support_levels);
if ($backend_uses_support_levels) {
$tpl->assign("support_levels", Customer::getSupportLevelAssocList($info['faq_prj_id']));
}
$tpl->assign("info", $info);
} elseif (@$HTTP_GET_VARS["cat"] == "change_rank") {
FAQ::changeRank($HTTP_GET_VARS['id'], $HTTP_GET_VARS['rank']);
}
$tpl->assign("list", FAQ::getList());
$tpl->assign("project_list", Project::getAll());
} else {
$tpl->assign("show_not_allowed_msg", true);
}
$tpl->displayTemplate();
示例3: getAllRow
/**
* Returns the "all" row, that is the row that always appears at the top of the report
* and covers all support levels and customers regardless of what is selected.
*
* @access private
* @return array The array of data for this row.
*/
function getAllRow()
{
$row = array("title" => "Aggregate");
// get complete list of customers.
$all_levels = array();
$levels = Customer::getSupportLevelAssocList($this->prj_id);
foreach ($levels as $level_id => $level_name) {
$all_levels[] = $level_id;
}
if ($this->exclude_expired_contracts) {
$support_option = CUSTOMER_EXCLUDE_EXPIRED;
} else {
$support_option = array();
}
$this->current_customers = Customer::getListBySupportLevel($this->prj_id, $all_levels, $support_option);
// get customers
$row["customer_counts"] = $this->getCustomerCounts("All");
// get total # of issues, avg issues per customer, median issues per customer
$row['issue_counts'] = $this->getIssueCounts("All");
// get actions counts such as # of customer actions per issue, avg customer actions per issue,
// median customer actions per issue.
$row['email_counts'] = $this->getEmailCounts();
// get time tracking information
$row['time_tracking'] = $this->getTimeTracking();
// get other time related stats such as avg and median time between issues and avg and median time to close.
$row['time_stats'] = $this->getTimeStats();
return $row;
}
示例4: array_flip
$priorities = array_flip(Priority::getAssocList($info['rem_prj_id']));
unset($priorities['Not Prioritized']);
$tpl->assign("priorities", array_flip($priorities));
} elseif (@$HTTP_GET_VARS["cat"] == "change_rank") {
Reminder::changeRank($HTTP_GET_VARS['id'], $HTTP_GET_VARS['rank']);
} elseif (!empty($HTTP_GET_VARS['prj_id'])) {
$tpl->assign("info", array('rem_prj_id' => $HTTP_GET_VARS['prj_id']));
$tpl->assign('issues', Reminder::getIssueAssocListByProject($HTTP_GET_VARS['prj_id']));
// wouldn't make much sense to create a reminder for a 'Not Prioritized'
// issue, so let's remove that as an option
$priorities = array_flip(Priority::getAssocList($HTTP_GET_VARS['prj_id']));
unset($priorities['Not Prioritized']);
$tpl->assign("priorities", array_flip($priorities));
// only show customers and support levels if the selected project really needs it
$project_has_customer_integration = Customer::hasCustomerIntegration($HTTP_GET_VARS['prj_id']);
$tpl->assign("project_has_customer_integration", $project_has_customer_integration);
if ($project_has_customer_integration) {
$tpl->assign("customers", Customer::getAssocList($HTTP_GET_VARS['prj_id']));
$backend_uses_support_levels = Customer::doesBackendUseSupportLevels($HTTP_GET_VARS['prj_id']);
if ($backend_uses_support_levels) {
$tpl->assign("support_levels", Customer::getSupportLevelAssocList($HTTP_GET_VARS['prj_id']));
}
$tpl->assign("backend_uses_support_levels", $backend_uses_support_levels);
}
}
$tpl->assign("project_list", Project::getAll());
$tpl->assign("list", Reminder::getAdminList());
} else {
$tpl->assign("show_not_allowed_msg", true);
}
$tpl->displayTemplate();
示例5: getSpecializedHeaders
/**
* Generates the specialized headers for an email.
*
* @access public
* @param integer $issue_id The issue ID
* @param string $type The type of message this is
* @param string $headers The existing headers of this message.
* @param integer $sender_usr_id The id of the user sending this email.
* @return array An array of specialized headers
*/
function getSpecializedHeaders($issue_id, $type, $headers, $sender_usr_id)
{
$new_headers = array();
if (!empty($issue_id)) {
$prj_id = Issue::getProjectID($issue_id);
if (count(Group::getAssocList($prj_id)) > 0) {
// group issue is currently assigned too
$new_headers['X-Eventum-Group-Issue'] = Group::getName(Issue::getGroupID($issue_id));
// group of whoever is sending this message.
if (empty($sender_usr_id)) {
$new_headers['X-Eventum-Group-Replier'] = $new_headers['X-Eventum-Group-Issue'];
} else {
$new_headers['X-Eventum-Group-Replier'] = Group::getName(User::getGroupID($sender_usr_id));
}
// group of current assignee
$assignees = Issue::getAssignedUserIDs($issue_id);
if (empty($assignees[0])) {
$new_headers['X-Eventum-Group-Assignee'] = '';
} else {
$new_headers['X-Eventum-Group-Assignee'] = @Group::getName(User::getGroupID($assignees[0]));
}
}
if (Customer::hasCustomerIntegration($prj_id)) {
if (empty($support_levels)) {
$support_levels = Customer::getSupportLevelAssocList($prj_id);
}
$customer_id = Issue::getCustomerID($issue_id);
if (!empty($customer_id)) {
$customer_details = Customer::getDetails($prj_id, $customer_id);
$new_headers['X-Eventum-Customer'] = $customer_details['customer_name'];
}
if (count($support_levels) > 0) {
$new_headers['X-Eventum-Level'] = $support_levels[Customer::getSupportLevelID($prj_id, $customer_id)];
}
}
$new_headers['X-Eventum-Category'] = Category::getTitle(Issue::getCategory($issue_id));
$new_headers['X-Eventum-Project'] = Project::getName($prj_id);
}
$new_headers['X-Eventum-Type'] = $type;
return $new_headers;
}