本文整理汇总了PHP中getFullNameFromArray函数 的典型用法代码示例。如果您正苦于以下问题:PHP getFullNameFromArray函数的具体用法?PHP getFullNameFromArray怎么用?PHP getFullNameFromArray使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getFullNameFromArray函数 的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getTopPotentials
function getTopPotentials($maxval, $calCnt)
{
$log = LoggerManager::getLogger('top opportunity_list');
$log->debug("Entering getTopPotentials() method ...");
require_once "data/Tracker.php";
require_once 'modules/Potentials/Potentials.php';
require_once 'include/logging.php';
require_once 'include/ListView/ListView.php';
global $app_strings;
global $adb;
global $current_language;
global $current_user;
$current_module_strings = return_module_language($current_language, "Potentials");
$title = array();
$title[] = 'myTopOpenPotentials.gif';
$title[] = $current_module_strings['LBL_TOP_OPPORTUNITIES'];
$title[] = 'home_mypot';
$where = "AND vtiger_potential.potentialid > 0 AND vtiger_potential.sales_stage not in ('Closed Won','Closed Lost','" . $current_module_strings['Closed Won'] . "','" . $current_module_strings['Closed Lost'] . "') AND vtiger_crmentity.smownerid='" . $current_user->id . "' AND vtiger_potential.amount > 0";
$header = array();
$header[] = $current_module_strings['LBL_LIST_OPPORTUNITY_NAME'];
//$header[]=$current_module_strings['LBL_LIST_ACCOUNT_NAME'];
$currencyid = fetchCurrency($current_user->id);
$rate_symbol = getCurrencySymbolandCRate($currencyid);
$rate = $rate_symbol['rate'];
$curr_symbol = $rate_symbol['symbol'];
$header[] = $current_module_strings['LBL_LIST_AMOUNT'] . '(' . $curr_symbol . ')';
$list_query = "SELECT vtiger_crmentity.crmid, vtiger_potential.potentialname,\n\t\t\tvtiger_potential.amount, potentialid\n\t\t\tFROM vtiger_potential\n\t\t\tIGNORE INDEX(PRIMARY) INNER JOIN vtiger_crmentity\n\t\t\t\tON vtiger_crmentity.crmid = vtiger_potential.potentialid";
$list_query .= getNonAdminAccessControlQuery('Potentials', $current_user);
$list_query .= "WHERE vtiger_crmentity.deleted = 0 " . $where;
$list_query .= " ORDER BY amount DESC";
$list_query .= " LIMIT " . $adb->sql_escape_string($maxval);
if ($calCnt == 'calculateCnt') {
$list_result_rows = $adb->query(mkCountQuery($list_query));
return $adb->query_result($list_result_rows, 0, 'count');
}
$list_result = $adb->query($list_query);
$open_potentials_list = array();
$noofrows = $adb->num_rows($list_result);
$entries = array();
if ($noofrows) {
for ($i = 0; $i < $noofrows; $i++) {
$open_potentials_list[] = array('name' => $adb->query_result($list_result, $i, 'potentialname'), 'id' => $adb->query_result($list_result, $i, 'potentialid'), 'amount' => $adb->query_result($list_result, $i, 'amount'));
$potentialid = $adb->query_result($list_result, $i, 'potentialid');
$potentialname = $adb->query_result($list_result, $i, 'potentialname');
$Top_Potential = strlen($potentialname) > 20 ? substr($potentialname, 0, 20) . '...' : $potentialname;
$value = array();
$value[] = '<a href="index.php?action=DetailView&module=Potentials&record=' . $potentialid . '">' . $Top_Potential . '</a>';
$value[] = CurrencyField::convertToUserFormat($adb->query_result($list_result, $i, 'amount'));
$entries[$potentialid] = $value;
}
}
$advft_criteria_groups = array('1' => array('groupcondition' => null));
$advft_criteria = array(array('groupid' => 1, 'columnname' => 'vtiger_potential:sales_stage:sales_stage:Potentials_Sales_Stage:V', 'comparator' => 'k', 'value' => 'closed', 'columncondition' => 'and'), array('groupid' => 1, 'columnname' => 'vtiger_potential:amount:amount:Potentials_Amount:N', 'comparator' => 'g', 'value' => '0', 'columncondition' => 'and'), array('groupid' => 1, 'columnname' => 'vtiger_crmentity:smownerid:assigned_user_id:Leads_Assigned_To:V', 'comparator' => 'e', 'value' => getFullNameFromArray('Users', $current_user->column_fields), 'columncondition' => null));
$search_qry = '&advft_criteria=' . Zend_Json::encode($advft_criteria) . '&advft_criteria_groups=' . Zend_Json::encode($advft_criteria_groups) . '&searchtype=advance&query=true';
$values = array('ModuleName' => 'Potentials', 'Title' => $title, 'Header' => $header, 'Entries' => $entries, 'search_qry' => $search_qry);
if (count($open_potentials_list) == 0 || count($open_potentials_list) > 0) {
$log->debug("Exiting getTopPotentials method ...");
return $values;
}
}
开发者ID:casati-dolibarr, 项目名称:corebos, 代码行数:60, 代码来源:ListViewTop.php
示例2: getModifiedByLabel
function getModifiedByLabel() {
global $current_user, $currentModule;
if (isset($current_user) && $current_user->id == $this->whodid) {
return getFullNameFromArray('Users', $current_user->column_fields);
}
return getUserFullName($this->whodid);
}
开发者ID:nvh3010, 项目名称:quancrm, 代码行数:7, 代码来源:ModTracker_Basic.php
示例3: getAccessibleUsers
public function getAccessibleUsers()
{
$adb = PearDatabase::getInstance();
$usersListArray = array();
$query = 'SELECT user_name, first_name, last_name FROM vtiger_users';
$result = $adb->pquery($query, array());
while ($row = $adb->fetchByAssoc($result)) {
$usersListArray[$row['user_name']] = getFullNameFromArray('Users', $row);
}
return $usersListArray;
}
开发者ID:cannking, 项目名称:vtigercrm-debug, 代码行数:11, 代码来源:Record.php
示例4: getMyTickets
/** Function to get the list of tickets for the currently loggedin user
**/
function getMyTickets($maxval, $calCnt)
{
global $log;
$log->debug("Entering getMyTickets() method ...");
global $current_user, $current_language, $adb;
$current_module_strings = return_module_language($current_language, 'HelpDesk');
$search_query = "SELECT vtiger_troubletickets.*, vtiger_crmentity.*\n\t\tFROM vtiger_troubletickets\n\t\tINNER JOIN vtiger_crmentity on vtiger_crmentity.crmid = vtiger_troubletickets.ticketid\n\t\tINNER JOIN vtiger_users on vtiger_users.id = vtiger_crmentity.smownerid\n\t\twhere vtiger_crmentity.smownerid = ? and vtiger_crmentity.deleted = 0 and " . "vtiger_troubletickets.ticketid > 0 and vtiger_troubletickets.status <> 'Closed' " . "AND vtiger_crmentity.setype='HelpDesk' ORDER BY createdtime DESC";
$search_query .= " LIMIT 0," . $adb->sql_escape_string($maxval);
if ($calCnt == 'calculateCnt') {
$list_result_rows = $adb->pquery(mkCountQuery($search_query), array($current_user->id));
return $adb->query_result($list_result_rows, 0, 'count');
}
$tktresult = $adb->pquery($search_query, array($current_user->id));
if ($adb->num_rows($tktresult)) {
$title = array();
$title[] = 'myTickets.gif';
$title[] = $current_module_strings['LBL_MY_TICKETS'];
$title[] = 'home_mytkt';
$header = array();
$header[] = $current_module_strings['LBL_SUBJECT'];
$header[] = $current_module_strings['Related To'];
$noofrows = $adb->num_rows($tktresult);
for ($i = 0; $i < $adb->num_rows($tktresult); $i++) {
$value = array();
$ticketid = $adb->query_result($tktresult, $i, "ticketid");
$viewstatus = $adb->query_result($tktresult, $i, "viewstatus");
if ($viewstatus == 'Unread') {
$value[] = '<a style="color:red;" href="index.php?action=DetailView&module=HelpDesk&record=' . substr($adb->query_result($tktresult, $i, "ticketid"), 0, 20) . '">' . $adb->query_result($tktresult, $i, "title") . '</a>';
} elseif ($viewstatus == 'Marked') {
$value[] = '<a style="color:yellow;" href="index.php?action=DetailView&module=HelpDesk&record=' . substr($adb->query_result($tktresult, $i, "ticketid"), 0, 20) . '">' . $adb->query_result($tktresult, $i, "title") . '</a>';
} else {
$value[] = '<a href="index.php?action=DetailView&module=HelpDesk&record=' . substr($adb->query_result($tktresult, $i, "ticketid"), 0, 20) . '">' . substr($adb->query_result($tktresult, $i, "title"), 0, 20) . '</a>';
}
$parent_id = $adb->query_result($tktresult, $i, "parent_id");
$parent_name = '';
if ($parent_id != '' && $parent_id != NULL) {
$parent_name = getParentLink($parent_id);
}
$value[] = $parent_name;
$entries[$ticketid] = $value;
}
$advft_criteria_groups = array('1' => array('groupcondition' => null));
$advft_criteria = array(array('groupid' => 1, 'columnname' => 'vtiger_troubletickets:status:ticketstatus:HelpDesk_Status:V', 'comparator' => 'n', 'value' => 'Closed', 'columncondition' => 'and'), array('groupid' => 1, 'columnname' => 'vtiger_crmentity:smownerid:assigned_user_id:HelpDesk_Assigned_To:V', 'comparator' => 'e', 'value' => getFullNameFromArray('Users', $current_user->column_fields), 'columncondition' => null));
$search_qry = '&advft_criteria=' . Zend_Json::encode($advft_criteria) . '&advft_criteria_groups=' . Zend_Json::encode($advft_criteria_groups) . '&searchtype=advance&query=true';
$values = array('ModuleName' => 'HelpDesk', 'Title' => $title, 'Header' => $header, 'Entries' => $entries, 'search_qry' => $search_qry);
if ($noofrows == 0 || $noofrows > 0) {
$log->debug("Exiting getMyTickets method ...");
return $values;
}
}
$log->debug("Exiting getMyTickets method ...");
}
开发者ID:sacredwebsite, 项目名称:vtigercrm, 代码行数:54, 代码来源:ListTickets.php
示例5: getAllByTypeForGroup
public static function getAllByTypeForGroup($groupModel, $type)
{
$db = PearDatabase::getInstance();
$members = array();
if ($type == self::MEMBER_TYPE_USERS) {
$sql = 'SELECT vtiger_users.id, vtiger_users.last_name, vtiger_users.first_name FROM vtiger_users
INNER JOIN vtiger_users2group ON vtiger_users2group.userid = vtiger_users.id
WHERE vtiger_users2group.groupid = ?';
$params = array($groupModel->getId());
$result = $db->pquery($sql, $params);
$noOfUsers = $db->num_rows($result);
for ($i = 0; $i < $noOfUsers; ++$i) {
$row = $db->query_result_rowdata($result, $i);
$userId = $row['id'];
$qualifiedId = self::getQualifiedId(self::MEMBER_TYPE_USERS, $userId);
$name = getFullNameFromArray('Users', $row);
$member = new self();
$members[$qualifiedId] = $member->set('id', $qualifiedId)->set('name', $name)->set('userId', $userId);
}
}
if ($type == self::MEMBER_TYPE_GROUPS) {
$sql = 'SELECT vtiger_groups.groupid, vtiger_groups.groupname FROM vtiger_groups
INNER JOIN vtiger_group2grouprel ON vtiger_group2grouprel.containsgroupid = vtiger_groups.groupid
WHERE vtiger_group2grouprel.groupid = ?';
$params = array($groupModel->getId());
$result = $db->pquery($sql, $params);
$noOfGroups = $db->num_rows($result);
for ($i = 0; $i < $noOfGroups; ++$i) {
$row = $db->query_result_rowdata($result, $i);
$qualifiedId = self::getQualifiedId(self::MEMBER_TYPE_GROUPS, $row['groupid']);
$name = $row['groupname'];
$member = new self();
$members[$qualifiedId] = $member->set('id', $qualifiedId)->set('name', $name)->set('groupId', $row['groupid']);
}
}
if ($type == self::MEMBER_TYPE_ROLES) {
$sql = 'SELECT vtiger_role.roleid, vtiger_role.rolename FROM vtiger_role
INNER JOIN vtiger_group2role ON vtiger_group2role.roleid = vtiger_role.roleid
WHERE vtiger_group2role.groupid = ?';
$params = array($groupModel->getId());
$result = $db->pquery($sql, $params);
$noOfRoles = $db->num_rows($result);
for ($i = 0; $i < $noOfRoles; ++$i) {
$row = $db->query_result_rowdata($result, $i);
$qualifiedId = self::getQualifiedId(self::MEMBER_TYPE_ROLES, $row['roleid']);
$name = $row['rolename'];
$member = new self();
$members[$qualifiedId] = $member->set('id', $qualifiedId)->set('name', $name)->set('roleId', $row['roleid']);
}
}
if ($type == self::MEMBER_TYPE_ROLE_AND_SUBORDINATES) {
$sql = 'SELECT vtiger_role.roleid, vtiger_role.rolename FROM vtiger_role
INNER JOIN vtiger_group2rs ON vtiger_group2rs.roleandsubid = vtiger_role.roleid
WHERE vtiger_group2rs.groupid = ?';
$params = array($groupModel->getId());
$result = $db->pquery($sql, $params);
$noOfRoles = $db->num_rows($result);
for ($i = 0; $i < $noOfRoles; ++$i) {
$row = $db->query_result_rowdata($result, $i);
$qualifiedId = self::getQualifiedId(self::MEMBER_TYPE_ROLE_AND_SUBORDINATES, $row['roleid']);
$name = $row['rolename'];
$member = new self();
$members[$qualifiedId] = $member->set('id', $qualifiedId)->set('name', $name)->set('roleId', $row['roleid']);
}
}
return $members;
}
开发者ID:cannking, 项目名称:vtigercrm-debug, 代码行数:67, 代码来源:Member.php
示例6: get_user_array
function get_user_array($add_blank = true, $status = 'Active', $assigned_user = '', $private = '', $module = false)
{
$log = vglobal('log');
$log->debug('Entering get_user_array(' . $add_blank . ',' . $status . ',' . $assigned_user . ',' . $private . ') method ...');
$current_user = vglobal('current_user');
if (isset($current_user) && $current_user->id != '') {
require 'user_privileges/sharing_privileges_' . $current_user->id . '.php';
require 'user_privileges/user_privileges_' . $current_user->id . '.php';
}
static $user_array = null;
if (!$module) {
$module = $_REQUEST['module'];
}
if ($user_array == null) {
require_once 'include/database/PearDatabase.php';
$db = PearDatabase::getInstance();
$temp_result = array();
// Including deleted vtiger_users for now.
if (empty($status)) {
$query = 'SELECT id, user_name, is_admin from vtiger_users';
$params = array();
} else {
if ($private == 'private') {
$log->debug('Sharing is Private. Only the current user should be listed');
$query = "select id as id,user_name as user_name,first_name,last_name,is_admin from vtiger_users where id=? and status='Active' union select vtiger_user2role.userid as id,vtiger_users.user_name as user_name ,\n\t\t\t\t\t\t\t vtiger_users.first_name as first_name ,vtiger_users.last_name as last_name, is_admin \n\t\t\t\t\t\t\t from vtiger_user2role inner join vtiger_users on vtiger_users.id=vtiger_user2role.userid inner join vtiger_role on vtiger_role.roleid=vtiger_user2role.roleid where vtiger_role.parentrole like ? and status='Active' union\n\t\t\t\t\t\t\t select shareduserid as id,vtiger_users.user_name as user_name ,\n\t\t\t\t\t\t\t vtiger_users.first_name as first_name ,vtiger_users.last_name as last_name, is_admin from vtiger_tmp_write_user_sharing_per inner join vtiger_users on vtiger_users.id=vtiger_tmp_write_user_sharing_per.shareduserid where status='Active' and vtiger_tmp_write_user_sharing_per.userid=? and vtiger_tmp_write_user_sharing_per.tabid=?";
$params = array($current_user->id, $current_user_parent_role_seq . "::%", $current_user->id, getTabid($module));
} else {
$log->debug('Sharing is Public. All vtiger_users should be listed');
$query = 'SELECT id, user_name,first_name,last_name,is_admin from vtiger_users WHERE status=?';
$params = array($status);
}
}
if (!empty($assigned_user)) {
$query .= ' OR id=?';
array_push($params, $assigned_user);
}
$query .= ' ORDER BY last_name ASC, first_name ASC';
$result = $db->pquery($query, $params, true, 'Error filling in user array: ');
if ($add_blank == true) {
// Add in a blank row
$temp_result[''] = '';
}
// Get the id and the name.
while ($row = $db->fetchByAssoc($result)) {
if ($current_user->is_admin == 'on' || !(!AppConfig::performance('SHOW_ADMINISTRATORS_IN_USERS_LIST') && $row['is_admin'] == 'on')) {
$temp_result[$row['id']] = getFullNameFromArray('Users', $row);
}
}
$user_array =& $temp_result;
}
$log->debug('Exiting get_user_array method ...');
return $user_array;
}
开发者ID:nikdejan, 项目名称:YetiForceCRM, 代码行数:53, 代码来源:utils.php
示例7: runScheduledImport
public static function runScheduledImport()
{
global $current_user;
$scheduledImports = self::getScheduledImport();
$vtigerMailer = new Vtiger_Mailer();
$vtigerMailer->IsHTML(true);
foreach ($scheduledImports as $scheduledId => $importDataController) {
$current_user = $importDataController->user;
$importDataController->batchImport = false;
if (!$importDataController->initializeImport()) {
continue;
}
$importDataController->importData();
$importStatusCount = $importDataController->getImportStatusCount();
$emailSubject = 'vtiger CRM - Scheduled Import Report for ' . $importDataController->module;
$viewer = new Vtiger_Viewer();
$viewer->assign('FOR_MODULE', $importDataController->module);
$viewer->assign('INVENTORY_MODULES', getInventoryModules());
$viewer->assign('IMPORT_RESULT', $importStatusCount);
$importResult = $viewer->view('Import_Result_Details.tpl', 'Import', true);
$importResult = str_replace('align="center"', '', $importResult);
$emailData = 'vtiger CRM has just completed your import process. <br/><br/>' . $importResult . '<br/><br/>' . 'We recommend you to login to the CRM and check few records to confirm that the import has been successful.';
$userName = getFullNameFromArray('Users', $importDataController->user->column_fields);
$userEmail = $importDataController->user->email1;
$vtigerMailer->to = array(array($userEmail, $userName));
$vtigerMailer->Subject = $emailSubject;
$vtigerMailer->Body = $emailData;
$vtigerMailer->Send();
$importDataController->finishImport();
}
Vtiger_Mailer::dispatchQueue(null);
}
开发者ID:cannking, 项目名称:vtigercrm-debug, 代码行数:32, 代码来源:Data.php
示例8: vtigerCRM_Smarty
require_once 'include/database/PearDatabase.php';
require_once 'modules/Leads/ListViewTop.php';
global $app_strings;
global $app_list_strings;
global $mod_strings;
global $currentModule, $default_charset;
$smarty = new vtigerCRM_Smarty();
$focus = new Users();
if (isset($_REQUEST['record']) && isset($_REQUEST['record'])) {
$smarty->assign("ID", vtlib_purify($_REQUEST['record']));
$mode = 'edit';
if (!is_admin($current_user) && $_REQUEST['record'] != $current_user->id) {
die("Unauthorized access to user administration.");
}
$focus->retrieve_entity_info(vtlib_purify($_REQUEST['record']), 'Users');
$smarty->assign("USERNAME", getFullNameFromArray('Users', $focus->column_fields));
} else {
$mode = 'create';
}
if (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
$focus->id = "";
$focus->user_name = "";
$mode = 'create';
//When duplicating the user the password fields should be empty
$focus->column_fields['user_password'] = '';
$focus->column_fields['confirm_password'] = '';
}
if (empty($focus->column_fields['time_zone'])) {
$focus->column_fields['time_zone'] = DateTimeField::getDBTimeZone();
}
if ($mode != 'edit') {
开发者ID:kduqi, 项目名称:corebos, 代码行数:31, 代码来源:EditView.php
示例9: process
//.........这里部分代码省略.........
$relateto = vtws_getIdComponents($relatedtos[$i]['record']);
$parentIds = $relateto[1] . "@1";
break;
}
}
}
if (isset($parentIds)) {
break;
}
}
if ($parentIds == '') {
if (count($relatedtos) > 0) {
$relateto = vtws_getIdComponents($relatedtos[0]['record']);
$parentIds = $relateto[1] . "@1";
break;
}
}
$cc_string = rtrim($request->get('cc'), ',');
$bcc_string = rtrim($request->get('bcc'), ',');
$subject = $request->get('subject');
$body = $request->get('body');
//Restrict this for users module
if ($relateto[1] != NULL && $relateto[0] != '19') {
$entityId = $relateto[1];
$parent_module = getSalesEntityType($entityId);
$description = getMergedDescription($body, $entityId, $parent_module);
} else {
if ($relateto[0] == '19') {
$parentIds = $relateto[1] . '@-1';
}
$description = $body;
}
$fromEmail = $connector->getFromEmailAddress();
$userFullName = getFullNameFromArray('Users', $current_user->column_fields);
$userId = $current_user->id;
$mailer = new Vtiger_Mailer();
$mailer->IsHTML(true);
$mailer->ConfigSenderInfo($fromEmail, $userFullName, $current_user->email1);
$mailer->Subject = $subject;
$mailer->Body = $description;
$mailer->addSignature($userId);
if ($mailer->Signature != '') {
$mailer->Body .= $mailer->Signature;
}
$ccs = empty($cc_string) ? array() : explode(',', $cc_string);
$bccs = empty($bcc_string) ? array() : explode(',', $bcc_string);
$emailId = $request->get('emailid');
$attachments = $connector->getAttachmentDetails($emailId);
$mailer->AddAddress($to);
foreach ($ccs as $cc) {
$mailer->AddCC($cc);
}
foreach ($bccs as $bcc) {
$mailer->AddBCC($bcc);
}
global $root_directory;
if (is_array($attachments)) {
foreach ($attachments as $attachment) {
$fileNameWithPath = $root_directory . $attachment['path'] . $attachment['fileid'] . "_" . $attachment['attachment'];
if (is_file($fileNameWithPath)) {
$mailer->AddAttachment($fileNameWithPath, $attachment['attachment']);
}
}
}
$status = $mailer->Send(true);
if ($status === true) {
开发者ID:nouphet, 项目名称:vtigercrm-6.0.0-ja, 代码行数:67, 代码来源:Mail.php
示例10: getCustomViewCombo
/** to get the customviewCombo for the class variable customviewmodule
* @param $viewid :: Type Integer
* $viewid will make the corresponding selected
* @returns $customviewCombo :: Type String
*/
function getCustomViewCombo($viewid = '', $markselected = true)
{
global $adb, $current_user;
global $app_strings;
$tabid = getTabid($this->customviewmodule);
require 'user_privileges/user_privileges_' . $current_user->id . '.php';
$shtml_user = '';
$shtml_pending = '';
$shtml_public = '';
$shtml_others = '';
$selected = 'selected';
if ($markselected == false) {
$selected = '';
}
$ssql = "select vtiger_customview.*, vtiger_users.first_name,vtiger_users.last_name from vtiger_customview inner join vtiger_tab on vtiger_tab.name = vtiger_customview.entitytype\n\t\t\t\t\tleft join vtiger_users on vtiger_customview.userid = vtiger_users.id ";
$ssql .= " where vtiger_tab.tabid=?";
$sparams = array($tabid);
if ($is_admin == false) {
$ssql .= " and (vtiger_customview.status=0 or vtiger_customview.userid = ? or vtiger_customview.status = 3 or vtiger_customview.userid in(select vtiger_user2role.userid from vtiger_user2role inner join vtiger_users on vtiger_users.id=vtiger_user2role.userid inner join vtiger_role on vtiger_role.roleid=vtiger_user2role.roleid where vtiger_role.parentrole like '" . $current_user_parent_role_seq . "::%'))";
array_push($sparams, $current_user->id);
}
$ssql .= " ORDER BY viewname";
$result = $adb->pquery($ssql, $sparams);
while ($cvrow = $adb->fetch_array($result)) {
if ($cvrow['viewname'] == 'All') {
$cvrow['viewname'] = $app_strings['COMBO_ALL'];
}
$option = '';
$viewname = $cvrow['viewname'];
if ($cvrow['status'] == CV_STATUS_DEFAULT || $cvrow['userid'] == $current_user->id) {
$disp_viewname = $viewname;
} else {
$userName = getFullNameFromArray('Users', $cvrow);
$disp_viewname = $viewname . " [" . $userName . "] ";
}
if ($cvrow['setdefault'] == 1 && $viewid == '') {
$option = "<option {$selected} value=\"" . $cvrow['cvid'] . "\">" . $disp_viewname . "</option>";
$this->setdefaultviewid = $cvrow['cvid'];
} elseif ($cvrow['cvid'] == $viewid) {
$option = "<option {$selected} value=\"" . $cvrow['cvid'] . "\">" . $disp_viewname . "</option>";
$this->setdefaultviewid = $cvrow['cvid'];
} else {
$option = "<option value=\"" . $cvrow['cvid'] . "\">" . $disp_viewname . "</option>";
}
// Add the option to combo box at appropriate section
if ($option != '') {
if ($cvrow['status'] == CV_STATUS_DEFAULT || $cvrow['userid'] == $current_user->id) {
$shtml_user .= $option;
} elseif ($cvrow['status'] == CV_STATUS_PUBLIC) {
if ($shtml_public == '') {
$shtml_public = "<option disabled>--- " . $app_strings['LBL_PUBLIC'] . " ---</option>";
}
$shtml_public .= $option;
} elseif ($cvrow['status'] == CV_STATUS_PENDING) {
if ($shtml_pending == '') {
$shtml_pending = "<option disabled>--- " . $app_strings['LBL_PENDING'] . " ---</option>";
}
$shtml_pending .= $option;
} else {
if ($shtml_others == '') {
$shtml_others = "<option disabled>--- " . $app_strings['LBL_OTHERS'] . " ---</option>";
}
$shtml_others .= $option;
}
}
}
$shtml = $shtml_user;
if ($is_admin == true) {
$shtml .= $shtml_pending;
}
$shtml = $shtml . $shtml_public . $shtml_others;
return $shtml;
}
开发者ID:sacredwebsite, 项目名称:vtigercrm, 代码行数:78, 代码来源:CustomView.php
示例11: constructEventListView
/**
* Function creates HTML to display Events ListView
* @param array $entry_list - collection of strings(Event Information)
* return string $list_view - html tags in string format
*/
function constructEventListView(&$cal, $entry_list, $navigation_array = '')
{
global $mod_strings, $app_strings, $adb, $cal_log, $current_user, $theme;
$cal_log->debug("Entering constructEventListView() method...");
$format = $cal['calendar']->hour_format;
$date_format = $current_user->date_format;
$date = new DateTimeField(null);
$endDate = new DateTimeField(date("Y-m-d H:i:s", time() + 1 * 24 * 60 * 60));
$hour_startat = $date->getDisplayTime();
$hour_endat = $endDate->getDisplayTime();
$time_arr = getaddEventPopupTime($hour_startat, $hour_endat, $format);
$temp_ts = $cal['calendar']->date_time->ts;
//to get date in user selected date format
$temp_date = $date->getDisplayDate();
if ($cal['calendar']->day_start_hour != 23) {
$endtemp_date = $temp_date;
} else {
$endtemp_date = $endDate->getDisplayDate();
}
$list_view = "";
$start_datetime = $app_strings['LBL_START_DATE_TIME'];
$end_datetime = $app_strings['LBL_END_DATE_TIME'];
//Events listview header labels
$header = array('0' => '#', '1' => $start_datetime, '2' => $end_datetime, '3' => $mod_strings['LBL_EVENTTYPE'], '4' => $mod_strings['LBL_EVENTDETAILS']);
$header_width = array('0' => '5%', '1' => '15%', '2' => '15%', '3' => '10%', '4' => '33%');
if (isPermitted("Calendar", "EditView") == "yes" || isPermitted("Calendar", "Delete") == "yes") {
array_push($header, $mod_strings['LBL_ACTION']);
array_push($header_width, '10%');
}
if (getFieldVisibilityPermission('Events', $current_user->id, 'eventstatus') == '0') {
array_push($header, $mod_strings['LBL_STATUS']);
array_push($header_width, '$10%');
}
array_push($header, $mod_strings['LBL_ASSINGEDTO']);
array_push($header_width, '15%');
$list_view .= "<table style='background-color: rgb(204, 204, 204);' class='small' align='center' border='0' cellpadding='5' cellspacing='1' width='98%'>\n <tr>";
$header_rows = count($header);
$navigationOutput = getTableHeaderSimpleNavigation($navigation_array, $url_string, "Calendar", "index");
if ($navigationOutput != '') {
$list_view .= "<tr width=100% bgcolor=white><td align=center colspan={$header_rows}>";
$list_view .= "<table align=center width='98%'><tr>" . $navigationOutput . "</tr></table></td></tr>";
}
$list_view .= "<tr>";
for ($i = 0; $i < $header_rows; $i++) {
$list_view .= "<td nowrap='nowrap' class='lvtCol' width='" . $header_width[$i] . "'>" . $header[$i] . "</td>";
}
$list_view .= "</tr>";
$rows = count($entry_list);
if ($rows != 0) {
$userName = getFullNameFromArray('Users', $current_user->column_fields);
for ($i = 0; $i < count($entry_list); $i++) {
$list_view .= "<tr class='lvtColData' onmouseover='this.className=\"lvtColDataHover\"' onmouseout='this.className=\"lvtColData\"' bgcolor='white'>";
$userNameSql = getSqlForNameInDisplayFormat(array('first_name' => 'vtiger_users.first_name', 'last_name' => 'vtiger_users.last_name'), 'Users');
$assigned_role_query = $adb->pquery("select vtiger_user2role.roleid,vtiger_user2role.userid\n\t\t\t\t\t\t\t\t\t\t\t\tfrom vtiger_user2role\n\t\t\t\t\t\t\t\t\t\t\t\tINNER JOIN vtiger_users ON vtiger_users.id=vtiger_user2role.userid\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE {$userNameSql}=?", array($entry_list[$i]['assignedto']));
$assigned_user_role_id = $adb->query_result($assigned_role_query, 0, "roleid");
$assigned_user_id = $adb->query_result($assigned_role_query, 0, "userid");
$role_list = $adb->pquery("SELECT * from vtiger_role WHERE parentrole LIKE '" . formatForSqlLike($current_user->column_fields['roleid']) . formatForSqlLike($assigned_user_role_id) . "'", array());
$is_shared = $adb->pquery("SELECT * from vtiger_sharedcalendar where userid=? and sharedid=?", array($assigned_user_id, $current_user->id));
foreach ($entry_list[$i] as $key => $entry) {
if ($key != 'visibility') {
if (($key == 'eventdetail' || $key == 'action') && ($current_user->column_fields['is_admin'] != 'on' && $adb->num_rows($role_list) == 0 && ($adb->num_rows($is_shared) == 0 || $entry_list[$i]['visibility'] == 'Private')) && $userName != $entry_list[$i]['assignedto']) {
if ($key == 'eventdetail') {
$list_view .= "<td nowrap='nowrap'><font color='red'><b>" . $entry_list[$i]['assignedto'] . " - " . $mod_strings['LBL_BUSY'] . "</b></font></td>";
} else {
$list_view .= "<td nowrap='nowrap'><font color='red'>" . $app_strings['LBL_NOT_ACCESSIBLE'] . "</font></td>";
}
} else {
$list_view .= "<td nowrap='nowrap'>{$entry}</td>";
}
}
}
$list_view .= "</tr>";
}
} else {
$list_view .= "<tr><td style='background-color:#efefef;height:340px' align='center' colspan='9'>\n\t\t\t\t";
$list_view .= "<div style='border: 3px solid rgb(153, 153, 153); background-color: rgb(255, 255, 255); width: 45%; position: relative; z-index: 5000;'>\n\t\t\t\t\t<table border='0' cellpadding='5' cellspacing='0' width='98%'>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td rowspan='2' width='25%'>\n\t\t\t\t\t\t\t\t<img src='" . vtiger_imageurl('empty.jpg', $theme) . "' height='60' width='61'></td>\n\t\t\t\t\t\t\t<td style='border-bottom: 1px solid rgb(204, 204, 204);' nowrap='nowrap' width='75%'><span class='genHeaderSmall'>" . $app_strings['LBL_NO'] . " " . $app_strings['Events'] . " " . $app_strings['LBL_FOUND'] . " !</span></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>";
//checking permission for Create/Edit Operation
if (isPermitted("Calendar", "EditView") == "yes") {
$list_view .= "<td class='small' align='left' nowrap='nowrap'>" . $app_strings['LBL_YOU_CAN_CREATE'] . " " . $app_strings['LBL_AN'] . " " . $app_strings['Event'] . " " . $app_strings['LBL_NOW'] . ". " . $app_strings['LBL_CLICK_THE_LINK'] . ":<br>\n\t\t\t\t\t -<a href='javascript:void(0);' onClick='gshow(\"addEvent\",\"Call\",\"" . $temp_date . "\",\"" . $endtemp_date . "\",\"" . $time_arr['starthour'] . "\",\"" . $time_arr['startmin'] . "\",\"" . $time_arr['startfmt'] . "\",\"" . $time_arr['endhour'] . "\",\"" . $time_arr['endmin'] . "\",\"" . $time_arr['endfmt'] . "\",\"listview\",\"event\");'>" . $app_strings['LBL_CREATE'] . " " . $app_strings['LBL_AN'] . " " . $app_strings['Event'] . "</a><br>\n\t\t\t\t\t</td>";
} else {
$list_view .= "<td class='small' align='left' nowrap='nowrap'>" . $app_strings['LBL_YOU_ARE_NOT_ALLOWED_TO_CREATE'] . " " . $app_strings['LBL_AN'] . " " . $app_strings['Event'] . "<br></td>";
}
$list_view .= "</tr>\n </table>\n\t\t\t\t</div>";
$list_view .= "</td></tr>";
}
$list_view .= "</table>";
$cal_log->debug("Exiting constructEventListView() method...");
return $list_view;
}
开发者ID:casati-dolibarr, 项目名称:corebos, 代码行数:94, 代码来源:calendarLayout.php
示例12: array
<table border=0 celspacing=0 cellpadding=5 width=100% align=center bgcolor=white>
<tr>
<td width="50%" class="cellLabel small"><b>' . $mod_strings['LBL_DELETE_USER'] . '</b></td>
<td width="50%" class="cellText small"><b>' . $delete_user_name . '</b></td>
</tr>
<tr>
<td align="left" class="cellLabel small" nowrap><b>' . $mod_strings['LBL_TRANSFER_USER'] . '</b></td>
<td align="left" class="cellText small">';
$output .= '<select class="small" name="transfer_user_id" id="transfer_user_id">';
global $adb;
$sql = "select * from vtiger_users";
$result = $adb->pquery($sql, array());
$temprow = $adb->fetch_array($result);
do {
$user_name = getFullNameFromArray('Users', $temprow);
$user_id = $temprow["id"];
if ($delete_user_id != $user_id) {
$output .= '<option value="' . $user_id . '">' . $user_name . '</option>';
}
} while ($temprow = $adb->fetch_array($result));
$output .= '</td>
</tr>
</table>
</td>
</tr>
</table>
<table border=0 cellspacing=0 cellpadding=5 width=100% class="layerPopupTransport">
<tr>
<td align=center class="small"><input type="button" onclick="transferUser(' . $delete_user_id . ')" name="Delete" value="' . $app_strings["LBL_SAVE_BUTTON_LABEL"] . '" class="small">
开发者ID:sacredwebsite, 项目名称:vtigercrm, 代码行数:31, 代码来源:UserDeleteStep1.php
示例13: module_Chart_HomePageDashboard
/**
* Performance Optimization: Module Chart for Home Page Dashboard
*/
function module_Chart_HomePageDashboard($userinfo)
{
global $adb, $app_strings;
$user_id = $userinfo->id;
$graph_details = array();
$modrecords = array();
// List of modules which needs to be considered for chart
$module_list = array('Accounts', 'Potentials', 'Contacts', 'Leads', 'Quotes', 'SalesOrder', 'PurchaseOrder', 'Invoice', 'HelpDesk', 'Calendar', 'Campaigns');
// List of special module to handle
$spl_modules = array('Leads', 'HelpDesk', 'Potentials', 'Calendar');
// Leads module
$leadcountres = $adb->query("SELECT count(*) as count FROM vtiger_crmentity se INNER JOIN vtiger_leaddetails le on le.leadid = se.crmid\n\t\tWHERE se.deleted = 0 AND se.smownerid = {$user_id} AND (le.converted = 0 OR le.converted IS NULL)");
$modrecords['Leads'] = $adb->query_result($leadcountres, 0, 'count');
// HelpDesk module
$helpdeskcountres = $adb->query("SELECT count(*) as count FROM vtiger_crmentity se INNER JOIN vtiger_troubletickets tt ON tt.ticketid = se.crmid\n\t\tWHERE se.deleted = 0 AND se.smownerid = {$user_id} AND (tt.status != 'Closed' OR tt.status IS NULL)");
$modrecords['HelpDesk'] = $adb->query_result($helpdeskcountres, 0, 'count');
// Potentials module
$potcountres = $adb->query("SELECT count(*) as count FROM vtiger_crmentity se INNER JOIN vtiger_potential pot ON pot.potentialid = se.crmid\n\t\tWHERE se.deleted = 0 AND se.smownerid = {$user_id} AND (pot.sales_stage NOT IN ('" . $app_strings['LBL_CLOSE_WON'] . "','" . $app_strings['LBL_CLOSE_LOST'] . "') OR pot.sales_stage IS NULL)");
$modrecords['Potentials'] = $adb->query_result($potcountres, 0, 'count');
// Calendar moudule
$calcountres = $adb->query("SELECT count(*) as count FROM vtiger_crmentity se INNER JOIN vtiger_activity act ON act.activityid = se.crmid\n\t\tWHERE se.deleted = 0 AND se.smownerid = {$user_id} AND act.activitytype != 'Emails' AND\n\t\t\t((act.status!='Completed' AND act.status!='Deferred') OR act.status IS NULL)\n\t\t\tAND ((act.eventstatus!='Held' AND act.eventstatus!='Not Held') OR act.eventstatus IS NULL)");
$modrecords['Calendar'] = $adb->query_result($calcountres, 0, 'count');
// Ignore the special module
$nor_modules = array_diff($module_list, $spl_modules);
// Prepare module string to use in SQL (check permission)
$inmodulestr = '';
foreach ($nor_modules as $modulename) {
if (isPermitted("{$modulename}", "index", '') == 'yes') {
if ($inmodulestr != '') {
$inmodulestr .= ",'{$modulename}'";
} else {
$inmodulestr = "'{$modulename}'";
}
}
}
// Get count for module that needs special conditions
$query = "SELECT setype, count(setype) setype_count FROM vtiger_crmentity se WHERE \n\t\tse.deleted = 0 AND se.smownerid={$user_id} AND se.setype in ({$inmodulestr}) GROUP BY se.setype";
$queryres = $adb->query($query);
while ($resrow = $adb->fetch_array($queryres)) {
$modrecords[$resrow['setype']] = $resrow['setype_count'];
}
// Get module custom filter info
$cvidres = $adb->query("SELECT cvid,entitytype FROM vtiger_customview WHERE viewname='All' AND entitytype in ('" . implode("','", array_keys($modrecords)) . "')");
$cvidinfo = array();
while ($cvidrow = $adb->fetch_array($cvidres)) {
$cvidinfo[$cvidrow['entitytype']] = $cvidrow['cvid'];
}
$name_val = '';
$cnt_val = '';
$target_val = '';
$urlstring = '';
$cnt_table = '<table border="0" cellpadding="3" cellspacing="1"><tbody><tr><th>Status</th><th>Total</th></tr>';
$test_target_val = '';
$total_records = 0;
foreach ($module_list as $modulename) {
if (isset($modrecords[$modulename])) {
$modrec_count = $modrecords[$modulename];
if ($modrec_count > 0) {
if ($name_val != '') {
$name_val .= '::';
}
$name_val .= $modulename;
if ($cnt_val != '') {
$cnt_val .= '::';
}
$cnt_val .= $modrec_count;
$modviewid = $cvidinfo[$modulename];
$username = getFullNameFromArray('Users', $userinfo->column_fields);
if ($target_val != '') {
$target_val .= '::';
}
$target_val .= urlencode("index.php?module={$modulename}&action=ListView&from_homepagedb=true&type=dbrd&query=true&owner={$username}&viewname={$modviewid}");
if ($test_target_val != '') {
$test_target_val .= 'K';
}
$test_target_val .= urlencode("index.php?module={$modulename}&action=ListView&from_homepagedb=true&type=dbrd&query=true&owner={$username}&viewname={$modviewid}");
$urlstring .= 'K';
$cnt_table .= "<tr><td>{$modulename}</td><td align='center'>{$modrec_count}</td></tr>";
$total_records += $modrec_count;
}
}
}
$cnt_table .= '</tbody></table>';
$graph_details[] = $name_val;
$graph_details[] = $cnt_val;
$graph_details[] = " {$userinfo->user_name} : {$total_records} ";
$graph_details[] = $target_val;
$graph_details[] = '';
$graph_details[] = $urlstring;
$graph_details[] = $cnt_table;
$graph_details[] = $test_target_val;
return $graph_details;
}
开发者ID:sacredwebsite, 项目名称:vtigercrm, 代码行数:96, 代码来源:Entity_charts.php
krishnaik06/Machine-Learning-in-90-days
阅读:1115| 2022-08-18
bazaarvoice/s3-upload-maven-plugin: Allows you to upload a file to S3 from maven
阅读:842| 2022-08-17
在美元的英文“dollar”里面明明没有字母“s”,为什么美元的符号($)是一条竖线穿过字
阅读:1117| 2022-11-06
VCVRack/library: Database for the VCV Library
阅读:432| 2022-08-14
直接看例子吧: WXML:直接看Button,用“data-”(data-total)传值,后台如何获取,
阅读:812| 2022-07-18
sydney0zq/covid-19-detection: The implementation of A Weakly-supervised Framewor
阅读:519| 2022-08-16
Multiple vulnerabilities in Cisco Nexus Dashboard could allow an authenticated,
阅读:622| 2022-07-29
dustinstansbury/medal: Matlab Environment for Deep Architecture Learning
阅读:399| 2022-08-17
长沙城南,有一所以“环保”为名的学校,从1979年创立以来,四易归属、五更其名。 这
阅读:817| 2022-11-06
jupyterlab/jupyterlab-latex: JupyterLab extension for live editing of LaTeX docu
阅读:602| 2022-08-12
请发表评论