本文整理汇总了PHP中getRoleName函数的典型用法代码示例。如果您正苦于以下问题:PHP getRoleName函数的具体用法?PHP getRoleName怎么用?PHP getRoleName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getRoleName函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getEditViewDisplayValue
/**
* Function to get the display value in detail view
* @param <Integer> crmid of record
* @return <String>
*/
public function getEditViewDisplayValue($value)
{
if ($value) {
$userName = getRoleName($value);
return $userName;
}
}
开发者ID:cannking,项目名称:vtigercrm-debug,代码行数:12,代码来源:UserRole.php
示例2: getEditViewDisplayValue
/**
* Function to get the display value in detail view
* @param <Integer> crmid of record
* @return <String>
*/
public function getEditViewDisplayValue($value)
{
global $log;
$log->debug("Entering ./uitypes/UserRole.php::getEditViewDisplayValue");
if ($value) {
$userName = getRoleName($value);
return $userName;
}
}
开发者ID:cin-system,项目名称:cinrepo,代码行数:14,代码来源:UserRole.php
示例3: draw
/**
* Draw the ACLInfoPanel
*/
function draw() {
global $lang;
// make sure to get the latest data.
$this->acl->load();
echo "<td class=\"standard\" colspan=\"" . $this->cols . "\">";
echo '<table width="100%" cellpadding="2" cellspacing="2" border="0" class="standardlight">';
// Parent Node
echo '<tr><td class="standard" width="33%"><b>';
echo $lang->get("acl_parent", "Permissions inherited from");
echo '</b></td><td width="66%">';
echo $this->acl->getParentName();
echo '</td></tr>';
// Owner
echo '<tr><td class="standard" width="33%"><b>';
echo $lang->get("acl_owner");
echo '</b></td><td width="66%">';
echo getAccessorName($this->acl->owner);
echo '</td></tr>';
// Groups & roles
echo '<tr><td class="standard" valign="top"><b>';
echo $lang->get("acl_groupsroles", "Foreign Access"). "<br></b>";
echo '</td>';
echo "<td>";
if (!$this->acl->accessors == 0) {
foreach ($this->acl->accessors as $key => $value) {
echo "<b>" . getAccessorName($value["ACCESSOR"]). "</b>";
echo " => ";
echo getRoleName($value["ROLE"]);
br();
}
}
echo "</td></tr>";
echo '</table>';
echo "</td>";
return $this->cols;
}
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:46,代码来源:acl_info.php
示例4: getrole2picklist
<?php
/*********************************************************************************
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*
********************************************************************************/
require_once 'modules/PickList/PickListUtils.php';
require_once 'include/utils/utils.php';
require_once 'Smarty_setup.php';
global $mod_strings, $current_language, $adb;
$roleid = $_REQUEST['roleid'];
if (empty($roleid)) {
echo "role id cannot be empty";
exit;
}
$otherRoles = getrole2picklist();
$otherRoles = array_diff($otherRoles, array($roleid => getRoleName($roleid)));
$smarty = new vtigerCRM_Smarty();
$smarty->assign("ROLES", $otherRoles);
$smarty->assign("MOD", return_module_language($current_language, 'PickList'));
$smarty->assign("APP", $app_strings);
$str = $smarty->fetch("modules/PickList/ShowRoleSelect.tpl");
echo $str;
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:28,代码来源:ShowRoleSelect.php
示例5: getOutputHtml
//.........这里部分代码省略.........
}
$pickcount = 0;
if (!empty($picklistValues)) {
foreach ($picklistValues as $order => $pickListValue) {
if (in_array(trim($pickListValue), $valueArr)) {
$chk_val = "selected";
$pickcount++;
} else {
$chk_val = '';
}
if (isset($_REQUEST['file']) && $_REQUEST['file'] == 'QuickCreate') {
$options[] = array(htmlentities(getTranslatedString($pickListValue, $pickListValue), ENT_QUOTES, $default_charset), $pickListValue, $chk_val);
} else {
$options[] = array(getTranslatedString($pickListValue, $pickListValue), $pickListValue, $chk_val);
}
}
if ($pickcount == 0 && !empty($value)) {
$options[] = array($app_strings['LBL_NOT_ACCESSIBLE'], $value, 'selected');
}
}
$editview_label[] = getTranslatedString($fieldlabel, $module_name);
uasort($options, function ($a, $b) {
return strtolower($a[0]) < strtolower($b[0]) ? -1 : 1;
});
$fieldvalue[] = $options;
} elseif ($uitype == 1024) {
$options = array();
$arr_evo = explode(' |##| ', $value);
$roleid = $current_user->roleid;
$subrole = getRoleSubordinates($roleid);
$uservalues = array_merge($subrole, array($roleid));
for ($i = 0; $i < sizeof($uservalues); $i++) {
$currentValId = $uservalues[$i];
$currentValName = getRoleName($currentValId);
if (in_array(trim($currentValId), $arr_evo)) {
$chk_val = 'selected';
} else {
$chk_val = '';
}
$options[] = array($currentValName, $currentValId, $chk_val);
}
$fieldvalue[] = $options;
$editview_label[] = getTranslatedString($fieldlabel, $module_name);
} elseif ($uitype == 17) {
$editview_label[] = getTranslatedString($fieldlabel, $module_name);
$fieldvalue[] = $value;
} elseif ($uitype == 85) {
$editview_label[] = getTranslatedString($fieldlabel, $module_name);
$fieldvalue[] = $value;
} elseif ($uitype == 14) {
$editview_label[] = getTranslatedString($fieldlabel, $module_name);
$fieldvalue[] = $value;
} elseif ($uitype == 19 || $uitype == 20) {
if (isset($_REQUEST['body'])) {
$value = $_REQUEST['body'];
}
if ($fieldname == 'terms_conditions') {
//Assign the value from focus->column_fields (if we create Invoice from SO the SO's terms and conditions will be loaded to Invoice's terms and conditions, etc.,)
$value = $col_fields['terms_conditions'];
//if the value is empty then only we should get the default Terms and Conditions
if ($value == '' && $mode != 'edit') {
$value = getTermsandConditions();
}
}
$editview_label[] = getTranslatedString($fieldlabel, $module_name);
$fieldvalue[] = $value;
开发者ID:kduqi,项目名称:corebos,代码行数:67,代码来源:EditViewUtils.php
示例6: getListViewRecords
//.........这里部分代码省略.........
}
} elseif ($field->getFieldDataType() == 'url') {
$matchPattern = "^[\\w]+:\\/\\/^";
preg_match($matchPattern, $rawValue, $matches);
if (!empty($matches[0])) {
$value = '<a class="urlField cursorPointer" title="' . $rawValue . '" href="' . $rawValue . '" target="_blank">' . textlength_check($value) . '</a>';
} else {
$value = '<a class="urlField cursorPointer" title="' . $rawValue . '" href="http://' . $rawValue . '" target="_blank">' . textlength_check($value) . '</a>';
}
} elseif ($field->getFieldDataType() == 'email') {
$current_user = vglobal('current_user');
if ($current_user->internal_mailer == 1) {
//check added for email link in user detailview
$value = "<a class='emailField' onclick=\"Vtiger_Helper_Js.getInternalMailer({$recordId}," . "'{$fieldName}','{$module}');\">" . textlength_check($value) . "</a>";
} else {
$value = '<a class="emailField" href="mailto:' . $rawValue . '">' . textlength_check($value) . '</a>';
}
} elseif ($field->getFieldDataType() == 'boolean') {
if ($value === 'on') {
$value = 1;
} else {
if ($value == 'off') {
$value = 0;
}
}
if ($value == 1) {
$value = getTranslatedString('yes', $module);
} elseif ($value == 0) {
$value = getTranslatedString('no', $module);
} else {
$value = '--';
}
} elseif ($field->getUIType() == 98) {
$value = '<a href="index.php?module=Roles&parent=Settings&view=Edit&record=' . $value . '">' . textlength_check(getRoleName($value)) . '</a>';
} elseif ($field->getFieldDataType() == 'multipicklist') {
$value = $value != "" ? str_replace(' |##| ', ', ', $value) : "";
if (!$is_admin && $value != '') {
$valueArray = $rawValue != "" ? explode(' |##| ', $rawValue) : array();
$tmp = '';
$tmpArray = array();
foreach ($valueArray as $index => $val) {
if (!$listview_max_textlength || !(strlen(preg_replace("/(<\\/?)(\\w+)([^>]*>)/i", "", $tmp)) > $listview_max_textlength)) {
$tmpArray[] = $val;
$tmp .= ', ' . $val;
} else {
$tmpArray[] = '...';
$tmp .= '...';
}
}
$value = implode(', ', $tmpArray);
$value = textlength_check($value);
}
} elseif ($field->getFieldDataType() == 'skype') {
$value = $value != "" ? "<a href='skype:{$value}?call'>" . textlength_check($value) . "</a>" : "";
} elseif ($field->getUIType() == 11) {
$outgoingCallPermission = Vtiger_Mobile_Model::checkPermissionForOutgoingCall();
if ($outgoingCallPermission && !empty($value)) {
$phoneNumber = preg_replace('/[-()\\s]/', '', $value);
$value = '<a class="phoneField" data-phoneNumber="' . $phoneNumber . '" record="' . $recordId . '" onclick="Vtiger_Mobile_Js.registerOutboundCall(\'' . $phoneNumber . '\', ' . $recordId . ')">' . textlength_check($value) . '</a>';
$callUsers = Vtiger_Mobile_Model::getPrivilegesUsers();
if ($callUsers) {
$value .= ' <a class="btn btn-xs noLinkBtn" onclick="Vtiger_Mobile_Js.registerOutboundCallToUser(this,\'' . $phoneNumber . '\',' . $recordId . ')" data-placement="right" data-original-title="' . vtranslate('LBL_SELECT_USER_TO_CALL', $module) . '" data-content=\'<select class="select sesectedUser" name="sesectedUser">';
foreach ($callUsers as $key => $item) {
$value .= '<option value="' . $key . '">' . $item . '</option>';
}
$value .= '</select><br /><a class="btn btn-success popoverCallOK">' . vtranslate('LBL_BTN_CALL', $module) . '</a> <a class="btn btn-inverse popoverCallCancel">' . vtranslate('LBL_CANCEL', $module) . '</a>\' data-trigger="manual"><i class="icon-user"></i></a>';
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:67,代码来源:ListViewController.php
示例7: array
$m++;
}
}
if ($mode == 'edit') {
$member = array();
$groupMemberArr = $groupInfo[2];
foreach ($groupMemberArr as $memberType => $memberValue) {
foreach ($memberValue as $memberId) {
if ($memberType == 'groups') {
$memberName = fetchGroupName($memberId);
$memberDisplay = "Group::";
} elseif ($memberType == 'roles') {
$memberName = getRoleName($memberId);
$memberDisplay = "Roles::";
} elseif ($memberType == 'rs') {
$memberName = getRoleName($memberId);
$memberDisplay = "RoleAndSubordinates::";
} elseif ($memberType == 'users') {
$memberName = getUserFullName($memberId);
$memberDisplay = "User::";
}
$member[] = $memberType . '::' . $memberId;
$member[] = $memberDisplay . $memberName;
}
}
$smarty->assign("MEMBER", array_chunk($member, 2));
}
$smarty->assign("MOD", return_module_language($current_language, 'Settings'));
$smarty->assign("IMAGE_PATH", $image_path);
$smarty->assign("APP", $app_strings);
$smarty->assign("CMOD", $mod_strings);
开发者ID:sacredwebsite,项目名称:vtigercrm,代码行数:31,代码来源:createnewgroup.php
示例8: userTable
function userTable($row)
{
?>
<form action="{{BASE}}admin/<?php
if (empty($row)) {
echo "adduser";
} else {
echo "edituser";
}
?>
" method="post">
<input type="hidden" name="which" value="<?php
if (!empty($row)) {
echo $row["idhost"];
}
?>
">
<div class="table-desc" style="background-image:url({{BASE}}img/user.png)"><label for="hostname">Name:</label></div>
<div class="table-item"><input name="hostname" id="hostname" type="text" value="<?php
echo htmlspecialchars($row["hostname"]);
?>
" maxlength="<?php
echo MAX_USERNAME_LENGTH;
?>
" required style="width:50%"></div>
<div class="table-desc" style="background-image:url({{BASE}}img/key.png)"><label for="password">Password:</label></div>
<div class="table-item"><input name="password" id="password" type="password" required style="width:50%"></div>
<div class="table-desc" style="background-image:url({{BASE}}img/key.png)"><label for="password_rep">Again:</label></div>
<div class="table-item"><input name="password_rep" id="password_rep" type="password" required style="width:50%"></div>
<div class="table-desc" style="background-image:url({{BASE}}img/vcard.png)"><label for="role">User Role:</label></div>
<div class="table-item">
<select name="role" id="role" size="1">
<?php
$roles = array(ACCESS_HOST, ACCESS_USERDB, ACCESS_FULLADMIN);
foreach ($roles as $role) {
if (canAddRole($role) || !empty($row) && $role == $row["access_level"]) {
echo '<option value="', $role, '"', $role == $row["access_level"] ? ' selected="selected"' : '', '>', htmlspecialchars(getRoleName($role)), '</option>';
}
}
?>
</select>
</div>
<div class="table-desc"> </div>
<div class="table-item"><input type="submit"></div>
</form>
<?php
}
开发者ID:sagamusix,项目名称:s3m.it,代码行数:53,代码来源:users.php
示例9: getListViewRecords
//.........这里部分代码省略.........
}
} elseif ($field->getFieldDataType() == 'url') {
$matchPattern = "^[\\w]+:\\/\\/^";
preg_match($matchPattern, $rawValue, $matches);
if (!empty($matches[0])) {
$value = '<a class="urlField cursorPointer" href="' . $rawValue . '" target="_blank">' . textlength_check($value) . '</a>';
} else {
$value = '<a class="urlField cursorPointer" href="http://' . $rawValue . '" target="_blank">' . textlength_check($value) . '</a>';
}
} elseif ($field->getFieldDataType() == 'email') {
global $current_user;
if ($current_user->internal_mailer == 1) {
//check added for email link in user detailview
$value = "<a class='emailField' onclick=\"Vtiger_Helper_Js.getInternalMailer({$recordId}," . "'{$fieldName}');\">" . textlength_check($value) . "</a>";
} else {
$value = '<a class="emailField" href="mailto:' . $rawValue . '">' . textlength_check($value) . '</a>';
}
} elseif ($field->getFieldDataType() == 'boolean') {
if ($value === 'on') {
$value = 1;
} else {
if ($value == 'off') {
$value = 0;
}
}
if ($value == 1) {
$value = getTranslatedString('yes', $module);
} elseif ($value == 0) {
$value = getTranslatedString('no', $module);
} else {
$value = '--';
}
} elseif ($field->getUIType() == 98) {
$value = '<a href="index.php?module=Roles&parent=Settings&view=Edit&record=' . $value . '">' . textlength_check(getRoleName($value)) . '</a>';
} elseif ($field->getFieldDataType() == 'multipicklist') {
$value = $value != "" ? str_replace(' |##| ', ', ', $value) : "";
if (!$is_admin && $value != '') {
$valueArray = $rawValue != "" ? explode(' |##| ', $rawValue) : array();
$notaccess = '<font color="red">' . getTranslatedString('LBL_NOT_ACCESSIBLE', $module) . "</font>";
$tmp = '';
$tmpArray = array();
foreach ($valueArray as $index => $val) {
if (!$listview_max_textlength || !(strlen(preg_replace("/(<\\/?)(\\w+)([^>]*>)/i", "", $tmp)) > $listview_max_textlength)) {
if (!$is_admin && $this->picklistRoleMap[$fieldName] && !in_array(trim($val), $this->picklistValueMap[$fieldName])) {
$tmpArray[] = $notaccess;
$tmp .= ', ' . $notaccess;
} else {
$tmpArray[] = $val;
$tmp .= ', ' . $val;
}
} else {
$tmpArray[] = '...';
$tmp .= '...';
}
}
$value = implode(', ', $tmpArray);
$value = textlength_check($value);
}
} elseif ($field->getFieldDataType() == 'skype') {
$value = $value != "" ? "<a href='skype:{$value}?call'>" . textlength_check($value) . "</a>" : "";
} elseif ($field->getFieldDataType() == 'phone') {
if ($useAsterisk == 'true') {
$value = "<a href='javascript:;' onclick='startCall("{$value}", " . ""{$recordId}")'>" . textlength_check($value) . "</a>";
} else {
$value = textlength_check($value);
}
开发者ID:nouphet,项目名称:vtigercrm-6.0.0-ja,代码行数:67,代码来源:ListViewController.php
示例10: getStdOutput
/** Gives the group info and the group member info array
* @param $groupInfoArr -- Group Info Array got by calling getGroupInfo($groupId):: Type array
* @param $groupID -- group id::Type integer
* @param $mod_strings -- i18n mod strings array::Type array
* @returns $returndata:: Type array, Example array format given below
Array
(
[0] => Array
(
[groupname] => vtiger grp
[description] =>
)
[1] => Array
(
[Role] => Array
(
[0] => Array
(
[membername] => CEO
[memberid] => H2
[membertype] => Role
[memberaction] => RoleDetailView
[actionparameter] => roleid
)
)
[Role and Subordinates] => Array
(
[0] => Array
(
[membername] => Vice President
[memberid] => H3
[membertype] => Role and Subordinates
[memberaction] => RoleDetailView
[actionparameter] => roleid
)
)
[User] => Array
(
[0] => Array
(
[membername] => standarduser
[memberid] => 2
[membertype] => User
[memberaction] => DetailView
[actionparameter] => record
)
)
)
)
*
*
*/
function getStdOutput($groupInfoArr, $groupId, $mod_strings)
{
global $adb;
$groupfields['groupname'] = $groupInfoArr[0];
$groupfields['description'] = $groupInfoArr[1];
$row = 1;
$groupMember = $groupInfoArr[2];
$information = array();
foreach ($groupMember as $memberType => $memberValue) {
$memberinfo = array();
foreach ($memberValue as $memberId) {
$groupmembers = array();
if ($memberType == 'roles') {
$memberName = getRoleName($memberId);
$memberAction = "RoleDetailView";
$memberActionParameter = "roleid";
$memberDisplayType = "Role";
} elseif ($memberType == 'rs') {
$memberName = getRoleName($memberId);
$memberAction = "RoleDetailView";
$memberActionParameter = "roleid";
$memberDisplayType = "Role and Subordinates";
} elseif ($memberType == 'groups') {
$memberName = fetchGroupName($memberId);
$memberAction = "GroupDetailView";
$memberActionParameter = "groupId";
$memberDisplayType = "Group";
} elseif ($memberType == 'users') {
$memberName = getUserName($memberId);
$memberAction = "DetailView";
$memberActionParameter = "record";
$memberDisplayType = "User";
}
$groupmembers['membername'] = $memberName;
$groupmembers['memberid'] = $memberId;
$groupmembers['membertype'] = $memberDisplayType;
$groupmembers['memberaction'] = $memberAction;
$groupmembers['actionparameter'] = $memberActionParameter;
$row++;
$memberinfo[] = $groupmembers;
//.........这里部分代码省略.........
开发者ID:hbsman,项目名称:vtigercrm-5.3.0-ja,代码行数:101,代码来源:GroupDetailView.php
示例11: getListViewEntries
//.........这里部分代码省略.........
$value = CurrencyField::appendCurrencySymbol($currencyValue, $currencySymbol);
} else {
//changes made to remove vtiger_currency symbol in front of each potential amount
if ($value != 0) {
$value = CurrencyField::convertToUserFormat($value);
}
}
}
} elseif ($field->getFieldDataType() == 'url') {
$matchPattern = "^[\\w]+:\\/\\/^";
preg_match($matchPattern, $rawValue, $matches);
if (!empty($matches[0])) {
$value = '<a href="' . $rawValue . '" target="_blank">' . textlength_check($value) . '</a>';
} else {
$value = '<a href="http://' . $rawValue . '" target="_blank">' . textlength_check($value) . '</a>';
}
} elseif ($field->getFieldDataType() == 'email') {
if ($_SESSION['internal_mailer'] == 1) {
//check added for email link in user detailview
$fieldId = $field->getFieldId();
$value = "<a href=\"javascript:InternalMailer({$recordId},{$fieldId}," . "'{$fieldName}','{$module}','record_id');\">" . textlength_check($value) . "</a>";
} else {
$value = '<a href="mailto:' . $rawValue . '">' . textlength_check($value) . '</a>';
}
} elseif ($field->getFieldDataType() == 'boolean') {
if ($value == 1) {
$value = getTranslatedString('yes', $module);
} elseif ($value == 0) {
$value = getTranslatedString('no', $module);
} else {
$value = '--';
}
} elseif ($field->getUIType() == 98) {
$value = '<a href="index.php?action=RoleDetailView&module=Settings&parenttab=' . 'Settings&roleid=' . $value . '">' . textlength_check(getRoleName($value)) . '</a>';
} elseif ($field->getUIType() == 69) {
if ($module == 'Products') {
$queryPrdt = 'SELECT vtiger_attachments.path,vtiger_attachments.attachmentsid,vtiger_attachments.`name`
FROM vtiger_attachments
INNER JOIN vtiger_seattachmentsrel ON vtiger_attachments.attachmentsid = vtiger_seattachmentsrel.attachmentsid
INNER JOIN vtiger_products ON vtiger_seattachmentsrel.crmid = vtiger_products.productid
where vtiger_seattachmentsrel.crmid=?';
$resultprdt = $this->db->pquery($queryPrdt, array($recordId));
if ($resultprdt and $this->db->num_rows($resultprdt) > 0) {
$imgpath = $this->db->query_result($resultprdt, 0, 'path');
$attid = $this->db->query_result($resultprdt, 0, 'attachmentsid');
$imgfilename = $this->db->query_result($resultprdt, 0, 'name');
$value = "<div style='text-align:center;width:100%;'><img src='./" . $imgpath . $attid . '_' . $imgfilename . "' height='50'></div>";
} else {
$value = '';
}
} else {
if ($module == 'Contacts') {
$imageattachment = 'Image';
} else {
$imageattachment = 'Attachment';
}
//$imgpath = getModuleFileStoragePath('Contacts').$col_fields[$fieldname];
$sql = "select vtiger_attachments.*,vtiger_crmentity.setype\n\t\t\t\t\t\t from vtiger_attachments\n\t\t\t\t\t\t inner join vtiger_seattachmentsrel on vtiger_seattachmentsrel.attachmentsid = vtiger_attachments.attachmentsid\n\t\t\t\t\t\t inner join vtiger_crmentity on vtiger_crmentity.crmid = vtiger_attachments.attachmentsid\n\t\t\t\t\t\t where vtiger_crmentity.setype='{$module} {$imageattachment}'\n\t\t\t\t\t\t and vtiger_attachments.name = ?\n\t\t\t\t\t\t and vtiger_seattachmentsrel.crmid=?";
$image_res = $this->db->pquery($sql, array(str_replace(' ', '_', $value), $recordId));
$image_id = $this->db->query_result($image_res, 0, 'attachmentsid');
$image_path = $this->db->query_result($image_res, 0, 'path');
$image_name = urlencode(decode_html($this->db->query_result($image_res, 0, 'name')));
$imgpath = $image_path . $image_id . "_" . $image_name;
if ($image_name != '') {
$ftype = $this->db->query_result($image_res, 0, 'type');
$isimage = stripos($ftype, 'image') !== false;
开发者ID:kduqi,项目名称:corebos,代码行数:67,代码来源:ListViewController.php
示例12: isInterfaceForRole
function isInterfaceForRole($interface, $roleNr)
{
return $roleNr == -1 || count($interface['interfaceRoles']) == 0 || in_array(getRoleName($roleNr), $interface['interfaceRoles']);
// an interface is visible if: no role is selected; the interface does not specify roles; or the interface roles contain $role
}
开发者ID:4ZP6Capstone2015,项目名称:ampersand-models,代码行数:5,代码来源:DatabaseUtils.php
示例13: getSelectedValuesToSmarty
//.........这里部分代码省略.........
$owner = isset($_REQUEST['template_owner']) && $_REQUEST['template_owner'] != '' ? $_REQUEST['template_owner'] : $selected_owner;
$smarty_obj->assign("TEMPLATE_OWNER", $owner);
$sharing_types = array("public" => vtranslate("PUBLIC_FILTER"), "private" => vtranslate("PRIVATE_FILTER"), "share" => vtranslate("SHARE_FILTER"));
$smarty_obj->assign("SHARINGTYPES", $sharing_types);
$sharingtype = "public";
if (isset($_REQUEST['sharing']) && $_REQUEST['sharing'] != '') {
$sharingtype = $_REQUEST['sharing'];
} elseif (isset($this->reportinformations["sharingtype"]) && $this->reportinformations["sharingtype"] != "") {
$sharingtype = $this->reportinformations["sharingtype"];
}
$smarty_obj->assign("SHARINGTYPE", $sharingtype);
$cmod = return_specified_module_language($current_language, "Settings");
$smarty_obj->assign("CMOD", $cmod);
$sharingMemberArray = array();
if (isset($_REQUEST['sharingSelectedColumns']) && $_REQUEST['sharingSelectedColumns'] != '') {
$sharingMemberArray = explode("|", trim($_REQUEST['sharingSelectedColumns'], "|"));
} elseif (isset($this->reportinformations["members_array"]) && !empty($this->reportinformations["members_array"])) {
$sharingMemberArray = $this->reportinformations["members_array"];
}
$sharingMemberArray = array_unique($sharingMemberArray);
if (count($sharingMemberArray) > 0) {
$outputMemberArr = array();
foreach ($sharingMemberArray as $setype => $shareIdArr) {
$shareIdArr = explode("::", $shareIdArr);
$shareIdArray = array();
$shareIdArray[$shareIdArr[0]] = $shareIdArr[1];
foreach ($shareIdArray as $shareType => $shareId) {
switch ($shareType) {
case "groups":
$memberName = fetchGroupName($shareId);
$memberDisplay = "Group::";
break;
case "roles":
$memberName = getRoleName($shareId);
$memberDisplay = "Roles::";
break;
case "rs":
$memberName = getRoleName($shareId);
$memberDisplay = "RoleAndSubordinates::";
break;
case "users":
$memberName = getUserFullName($shareId);
$memberDisplay = "User::";
break;
}
$outputMemberArr[] = $shareType . "::" . $shareId;
$outputMemberArr[] = $memberDisplay . $memberName;
}
}
$smarty_obj->assign("MEMBER", array_chunk($outputMemberArr, 2));
}
// ITS4YOU-END
$userGroups = new GetUserGroups();
$userGroups->getAllUserGroups($this->current_user->id);
$user_groups = $userGroups->user_groups;
$groupIdStr = "";
$groupNameStr = "";
$l = 0;
foreach ($user_groups as $i => $grpid) {
$grp_details = getGroupDetails($grpid);
if ($l != 0) {
$groupIdStr .= ",";
$groupNameStr .= ",";
}
$groupIdStr .= "'" . $grp_details[0] . "'";
$groupNameStr .= "'" . escape_single_quotes(decode_html($grp_details[1])) . "'";
开发者ID:cin-system,项目名称:cinrepo,代码行数:67,代码来源:ITS4YouReports.php
示例14: process
//.........这里部分代码省略.........
}
//Constructing the Group Array
$parentGroupArray = array();
$m = 0;
$grpDetails = getAllGroupName();
foreach ($grpDetails as $grpId => $grpName) {
if (!in_array($grpId, $parentGroupArray)) {
if ($m != 0) {
$grpIdStr .= ", ";
$grpNameStr .= ", ";
}
$grpIdStr .= "'" . $grpId . "'";
$grpNameStr .= "'" . addslashes(decode_html($grpName)) . "'";
$m++;
}
}
$viewer->assign("ROLEIDSTR", $roleIdStr);
$viewer->assign("ROLENAMESTR", $roleNameStr);
$viewer->assign("USERIDSTR", $userIdStr);
$viewer->assign("USERNAMESTR", $userNameStr);
$viewer->assign("GROUPIDSTR", $grpIdStr);
$viewer->assign("GROUPNAMESTR", $grpNameStr);
if (count($sharingMemberArray) > 0) {
$outputMemberArr = array();
foreach ($sharingMemberArray as $setype => $shareIdArr) {
foreach ($shareIdArr as $shareId) {
switch ($setype) {
case "groups":
$groupInfo = getGroupName($shareId);
$memberName = $groupInfo[0];
$memberDisplay = "Group::";
break;
case "roles":
$memberName = getRoleName($shareId);
$memberDisplay = "Roles::";
break;
case "rs":
$memberName = getRoleName($shareId);
$memberDisplay = "RoleAndSubordinates::";
break;
case "users":
$memberName = getUserName($shareId);
$memberDisplay = "User::";
break;
}
$outputMemberArr[] = $setype . "::" . $shareId;
$outputMemberArr[] = $memberDisplay . $memberName;
}
}
$viewer->assign("MEMBER", array_chunk($outputMemberArr, 2));
}
//Ignored picklist values
$pvsql = "SELECT value FROM vtiger_pdfmaker_ignorepicklistvalues";
$pvresult = $adb->pquery($pvsql, array());
$pvvalues = "";
while ($pvrow = $adb->fetchByAssoc($pvresult)) {
$pvvalues .= $pvrow["value"] . ", ";
}
$viewer->assign("IGNORE_PICKLIST_VALUES", rtrim($pvvalues, ", "));
$More_Fields = array("CURRENCYNAME" => vtranslate("LBL_CURRENCY_NAME", 'PDFMaker'), "CURRENCYSYMBOL" => vtranslate("LBL_CURRENCY_SYMBOL", 'PDFMaker'), "CURRENCYCODE" => vtranslate("LBL_CURRENCY_CODE", 'PDFMaker'), "TOTALWITHOUTVAT" => vtranslate("LBL_VARIABLE_SUMWITHOUTVAT", 'PDFMaker'), "TOTALDISCOUNT" => vtranslate("LBL_VARIABLE_TOTALDISCOUNT", 'PDFMaker'), "TOTALDISCOUNTPERCENT" => vtranslate("LBL_VARIABLE_TOTALDISCOUNT_PERCENT", 'PDFMaker'), "TOTALAFTERDISCOUNT" => vtranslate("LBL_VARIABLE_TOTALAFTERDISCOUNT", 'PDFMaker'), "VAT" => vtranslate("LBL_VARIABLE_VAT", 'PDFMaker'), "VATPERCENT" => vtranslate("LBL_VARIABLE_VAT_PERCENT", 'PDFMaker'), "VATBLOCK" => vtranslate("LBL_VARIABLE_VAT_BLOCK", 'PDFMaker'), "TOTALWITHVAT" => vtranslate("LBL_VARIABLE_SUMWITHVAT", 'PDFMaker'), "SHTAXTOTAL" => vtranslate("LBL_SHTAXTOTAL", 'PDFMaker'), "SHTAXAMOUNT" => vtranslate("LBL_SHTAXAMOUNT", 'PDFMaker'), "ADJUSTMENT" => vtranslate("LBL_ADJUSTMENT", 'PDFMaker'), "TOTAL" => vtranslate("LBL_VARIABLE_TOTALSUM", 'PDFMaker'));
//formatable VATBLOCK content
$vatblock_table = '<table border="1" cellpadding="3" cellspacing="0" style="border-collapse:collapse;">
<tr>
<td>' . $app_strings["Name"] . '</td>
<td>' . vtranslate("LBL_VATBLOCK_VAT_PERCENT", 'PDFMaker') . '</td>
<td>' . vtranslate("LBL_VATBLOCK_SUM", 'PDFMaker') . '</td>
开发者ID:cin-system,项目名称:cinrepo,代码行数:67,代码来源:Edit.php
示例15: vtlib_purify
<?php
/*+********************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
********************************************************************************/
require_once 'include/utils/utils.php';
require_once 'include/utils/UserInfoUtil.php';
require_once 'Smarty_setup.php';
$delete_role_id = vtlib_purify($_REQUEST['roleid']);
$delete_role_name = getRoleName($delete_role_id);
global $app_strings;
global $app_list_strings;
global $mod_strings;
$smarty = new vtigerCRM_Smarty();
$smarty->assign("APP", $app_strings);
$smarty->assign("MOD", return_module_language($current_language, 'Settings'));
$smarty->assign("THEME", $theme);
$smarty->assign("CMOD", $mod_strings);
global $theme;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
$smarty->assign("IMAGE_PATH", $image_path);
$smarty->assign("ROLEID", $delete_role_id);
$smarty->assign("ROLENAME", $delete_role_name);
$opt = '<a href="javascript:openPopup(\'' . $delete_role_id . '\');"><img src="' . vtiger_imageurl('select.gif', $theme) . '" border="0" align="absmiddle"></a>';
$smarty->assign("ROLEPOPUPBUTTON", $opt);
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:31,代码来源:RoleDeleteStep1.php
示例16: getFldFormatedValue
//.........这里部分代码省略.........
} else {
$fld_value = "<a href='index.php?module={$parent_module}&view=Detail&record={$trimed_fld_value}' >{$displayValue}</a>";
//$fld_value = "<a href='index.php?module=$parent_module&
|
请发表评论