本文整理汇总了PHP中getContactName函数的典型用法代码示例。如果您正苦于以下问题:PHP getContactName函数的具体用法?PHP getContactName怎么用?PHP getContactName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getContactName函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getContact
function getContact($idContact)
{
//Realiza el query en la base de datos
$mysqli = makeSqlConnection();
$sql = "SELECT * FROM contacts a LEFT JOIN contacts_cstm ac ON a.id = ac.id_c WHERE id = '{$idContact}'";
$res = $mysqli->query($sql);
$rows = array();
while ($r = mysqli_fetch_assoc($res)) {
$obj = (object) $r;
$obj->email_address = getEmail($idContact);
$obj->idAccount = getAccountId($idContact);
$obj->nameAccount = getAccountName($obj->idAccount);
$obj->reports_to_name = getContactName($obj->reports_to_id);
$obj->created_by_name = getUserName($obj->created_by);
$obj->modified_user_name = getUserName($obj->modified_user_id);
$obj->assigned_user_name = getUserName($obj->user_id_c);
$obj->nameCampaign = getCampaignName($obj->campaign_id);
$a = (array) $obj;
$rows[] = $a;
}
if (empty($rows)) {
return '{"results" :[]}';
} else {
//Convierte el arreglo en json y lo retorna
$temp = json_encode(utf8ize($rows));
return '{"results" :' . $temp . '}';
}
}
开发者ID:ekutor,项目名称:hermes,代码行数:28,代码来源:getContact.php
示例2: getInfoFromBD
function getInfoFromBD($sql)
{
//Realiza el query en la base de datos
$mysqli = makeSqlConnection();
$res = $mysqli->query($sql);
$rows = array();
while ($r = mysqli_fetch_assoc($res)) {
$obj = (object) $r;
$obj->contact_name = getContactName($obj->contact_id);
$obj->parent_name = getParentName($obj->parent_type, $obj->parent_id);
$a = (array) $obj;
$rows[] = $a;
}
if (empty($rows)) {
return '{"results" :[]}';
} else {
//Convierte el arreglo en json y lo retorna
$temp = json_encode(utf8ize($rows));
return '{"results" :' . $temp . '}';
}
}
开发者ID:ekutor,项目名称:hermes,代码行数:21,代码来源:getSubTasks.php
示例3: getListViewEntries2
//.........这里部分代码省略.........
if (($module == 'Calendar' || $module == 'Emails' || $module == 'HelpDesk' || $module == 'Invoice' || $module == 'Leads' || $module == 'Contacts') && ($fieldname == 'parent_id' || $name == 'Contact Name' || $name == 'Close' || $fieldname == 'firstname')) {
if ($module == 'Calendar') {
if ($fieldname == 'status') {
if ($activitytype == 'Task') {
$fieldname = 'taskstatus';
} else {
$fieldname = 'eventstatus';
}
}
if ($activitytype == 'Task') {
if (getFieldVisibilityPermission('Calendar', $current_user->id, $fieldname) == '0') {
$has_permission = 'yes';
} else {
$has_permission = 'no';
}
} else {
if (getFieldVisibilityPermission('Events', $current_user->id, $fieldname) == '0') {
$has_permission = 'yes';
} else {
$has_permission = 'no';
}
}
}
if ($module != 'Calendar' || $module == 'Calendar' && $has_permission == 'yes') {
if ($fieldname == 'parent_id') {
$value = getRelatedTo($module, $list_result, $i - 1);
}
if ($name == 'Contact Name') {
$contact_id = $adb->query_result($list_result, $i - 1, "contactid");
$contact_name = getFullNameFromQResult($list_result, $i - 1, "Contacts");
$value = "";
//Added to get the contactname for activities custom view - t=2190
if ($contact_id != '' && !empty($contact_name)) {
$contact_name = getContactName($contact_id);
}
if ($contact_name != "" && $contact_id != 'NULL') {
// Fredy Klammsteiner, 4.8.2005: changes from 4.0.1 migrated to 4.2
$value = "<a href='index.php?module=Contacts&action=DetailView&parenttab=" . $tabname . "&record=" . $contact_id . "' style='" . $P_FONT_COLOR . "'>" . $contact_name . "</a>";
// Armando Lüscher 05.07.2005 -> §priority -> Desc: inserted style="$P_FONT_COLOR"
}
}
if ($fieldname == "firstname") {
$first_name = textlength_check($adb->query_result($list_result, $i - 1, "firstname"));
$value = '<a href="index.php?action=DetailView&module=' . $module . '&parenttab=' . $tabname . '&record=' . $entity_id . '">' . $first_name . '</a>';
}
if ($name == 'Close') {
$status = $adb->query_result($list_result, $i - 1, "status");
$activityid = $adb->query_result($list_result, $i - 1, "activityid");
if (empty($activityid)) {
$activityid = $adb->query_result($list_result, $i - 1, "tmp_activity_id");
}
$activitytype = $adb->query_result($list_result, $i - 1, "activitytype");
// TODO - Picking activitytype when it is not present in the Custom View.
// Going forward, this column should be added to the select list if not already present as a performance improvement.
if (empty($activitytype)) {
$activitytypeRes = $adb->pquery('SELECT activitytype FROM vtiger_activity WHERE activityid=?', array($activityid));
if ($adb->num_rows($activitytypeRes) > 0) {
$activitytype = $adb->query_result($activitytypeRes, 0, 'activitytype');
}
}
if ($activitytype != 'Task' && $activitytype != 'Emails') {
$eventstatus = $adb->query_result($list_result, $i - 1, "eventstatus");
if (isset($eventstatus)) {
$status = $eventstatus;
}
}
开发者ID:jmangarret,项目名称:vtigercrm,代码行数:67,代码来源:ListViewUtils2.php
示例4: getActivityMailInfo
function getActivityMailInfo($return_id, $status, $activity_type)
{
$mail_data = array();
global $adb;
$qry = "select * from vtiger_activity where activityid=?";
$ary_res = $adb->pquery($qry, array($return_id));
$send_notification = $adb->query_result($ary_res, 0, "sendnotification");
$subject = $adb->query_result($ary_res, 0, "subject");
$priority = $adb->query_result($ary_res, 0, "priority");
$st_date = $adb->query_result($ary_res, 0, "date_start");
$st_time = $adb->query_result($ary_res, 0, "time_start");
$end_date = $adb->query_result($ary_res, 0, "due_date");
$end_time = $adb->query_result($ary_res, 0, "time_end");
$location = $adb->query_result($ary_res, 0, "location");
$owner_qry = "select smownerid from vtiger_crmentity where crmid=?";
$res = $adb->pquery($owner_qry, array($return_id));
$owner_id = $adb->query_result($res, 0, "smownerid");
$usr_res = $adb->pquery("select count(*) as count from vtiger_users where id=?", array($owner_id));
if ($adb->query_result($usr_res, 0, 'count') > 0) {
$assignType = "U";
$usr_id = $owner_id;
} else {
$assignType = "T";
$group_qry = "select groupname from vtiger_groups where groupid=?";
$grp_res = $adb->pquery($group_qry, array($owner_id));
$grp_name = $adb->query_result($grp_res, 0, "groupname");
}
$desc_qry = "select description from vtiger_crmentity where crmid=?";
$des_res = $adb->pquery($desc_qry, array($return_id));
$description = $adb->query_result($des_res, 0, "description");
$rel_qry = "select case vtiger_crmentity.setype when 'Leads' then vtiger_leaddetails.lastname when 'Accounts' then vtiger_account.accountname when 'Potentials' then vtiger_potential.potentialname when 'Quotes' then vtiger_quotes.subject when 'PurchaseOrder' then vtiger_purchaseorder.subject when 'SalesOrder' then vtiger_salesorder.subject when 'Invoice' then vtiger_invoice.subject when 'Campaigns' then vtiger_campaign.campaignname when 'HelpDesk' then vtiger_troubletickets.title end as relname from vtiger_seactivityrel inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_seactivityrel.crmid left join vtiger_leaddetails on vtiger_leaddetails.leadid = vtiger_seactivityrel.crmid left join vtiger_account on vtiger_account.accountid=vtiger_seactivityrel.crmid left join vtiger_potential on vtiger_potential.potentialid=vtiger_seactivityrel.crmid left join vtiger_quotes on vtiger_quotes.quoteid= vtiger_seactivityrel.crmid left join vtiger_purchaseorder on vtiger_purchaseorder.purchaseorderid = vtiger_seactivityrel.crmid left join vtiger_salesorder on vtiger_salesorder.salesorderid = vtiger_seactivityrel.crmid left join vtiger_invoice on vtiger_invoice.invoiceid = vtiger_seactivityrel.crmid left join vtiger_campaign on vtiger_campaign.campaignid = vtiger_seactivityrel.crmid left join vtiger_troubletickets on vtiger_troubletickets.ticketid = vtiger_seactivityrel.crmid where vtiger_seactivityrel.activityid=?";
$rel_res = $adb->pquery($rel_qry, array($return_id));
$rel_name = $adb->query_result($rel_res, 0, "relname");
$cont_qry = "select * from vtiger_cntactivityrel where activityid=?";
$cont_res = $adb->pquery($cont_qry, array($return_id));
$cont_id = $adb->query_result($cont_res, 0, "contactid");
$cont_name = '';
if ($cont_id != '') {
$cont_name = getContactName($cont_id);
}
$mail_data['mode'] = "edit";
$mail_data['activity_mode'] = $activity_type;
$mail_data['sendnotification'] = $send_notification;
$mail_data['user_id'] = $usr_id;
$mail_data['subject'] = $subject;
$mail_data['status'] = $status;
$mail_data['taskpriority'] = $priority;
$mail_data['relatedto'] = $rel_name;
$mail_data['contact_name'] = $cont_name;
$mail_data['description'] = $description;
$mail_data['assingn_type'] = $assignType;
$mail_data['group_name'] = $grp_name;
$value = getaddEventPopupTime($st_time, $end_time, '24');
$start_hour = $value['starthour'] . ':' . $value['startmin'] . '' . $value['startfmt'];
if ($activity_type != 'Task') {
$end_hour = $value['endhour'] . ':' . $value['endmin'] . '' . $value['endfmt'];
}
$mail_data['st_date_time'] = getDisplayDate($st_date) . " " . $start_hour;
$mail_data['end_date_time'] = getDisplayDate($end_date) . " " . $end_hour;
$mail_data['location'] = $location;
return $mail_data;
}
开发者ID:vtiger-jp,项目名称:vtigercrm-5.1.x-ja,代码行数:62,代码来源:CalendarCommon.php
示例5: createXls
function createXls($accountinfs)
{
$headArr = array('合同订单编号', '状态', '客户名称', '联系人姓名', '签约日期', '合同金额', '产品名称', '产品编码', '数量', '价格', '备注');
$filepath = $this->accountfile;
if (is_array($accountinfs) && count($accountinfs) > 0) {
$objPHPExcel = new PHPExcel();
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, "Excel5");
$objWorksheet = $objPHPExcel->getActiveSheet();
$rowIndex = 1;
$cellIndex = 0;
$headrows = $headArr;
foreach ($headrows as $headcell) {
$objWorksheet->getCellByColumnAndRow($cellIndex, $rowIndex)->setValue($headcell);
$cellIndex += 1;
}
$rowIndex += 1;
$cellIndex = 0;
$accountrelation = array('subject', 'sostatus', 'account_id', 'contact_id', 'duedate', 'salestotal', 'productname', 'productcode', 'quantity', 'listprice', 'commet');
foreach ($accountinfs as $accountinf) {
foreach ($accountrelation as $pos => $propname) {
$accountval = $accountinf[$propname];
if ($propname == 'account_id') {
$accountval = getAccountName($accountval);
}
if ($propname == 'contact_id') {
$accountval = getContactName($accountval);
}
$objWorksheet->getCellByColumnAndRow($pos, $rowIndex)->setValueExplicit($accountval, PHPExcel_Cell_DataType::TYPE_STRING);
}
$rowIndex += 1;
}
$objWriter->save($filepath);
}
}
开发者ID:honj51,项目名称:taobaocrm,代码行数:34,代码来源:ImportSalesOrder.php
示例6: header
$navtitle = 'Customers';
$keywords = '';
$description = '';
include "/srv/athenace/lib/shared/common.php";
include "/srv/athenace/lib/intranet/common.php";
include "/srv/athenace/lib/shared/functions_form.php";
include "/srv/athenace/lib/shared/athena_mail.php";
include "/srv/athenace/lib/shared/functions_email.php";
if (!is_numeric($_GET['id'])) {
header("Location: /customers/?id=notFound");
exit;
}
$done = '';
if (isset($_GET['go']) && $_GET['go'] == "y") {
$logContent = sendContactAccessMail($_GET['cid']);
$name = getContactName($_GET['cid']);
$done = "An email has been sent to {$name} with access details for the Customer Control Panel";
$logresult = logEvent(26, $logContent);
}
include "../tmpl/header.php";
$sqltext = "SELECT * FROM customer WHERE custid=?";
// print "<br>$sqltext";
$q = $db->select($sqltext, array($_GET['id']), 'i');
$r = $q[0];
$adds = getAddress($r->addsid);
if ($done != '') {
?>
<div id=help>
<?php
echo $done;
?>
开发者ID:athenasystems,项目名称:athena,代码行数:31,代码来源:view.php
示例7: computeSheetBodyDCInventory
//.........这里部分代码省略.........
$devSpec['Cabinet'] = $cab->Location;
$devSpec['Position'] = 1;
$devSpec['Height'] = $cab->CabinetHeight;
$devSpec['Device'] = '__EMPTY';
$invData[] = $devSpec;
} else {
usort($device_list, 'cmpDevPos');
$low_idx = 1;
foreach ($device_list as $dev) {
if ($low_idx < $dev->Position) {
// range of empty slots
if ($dev->Position <= $cab_height) {
$height = $dev->Position - $low_idx;
} else {
$height = $cab_height - $low_idx + 1;
}
if ($height > 0) {
$dcStats['Rk_UtE'] += $height;
$devSpec = makeEmptySpec($sheetColumns, $dcContainerList);
${$devSpec}['Zone'] = $zoneName;
$devSpec['Row'] = $rowName;
$devSpec['DC Name'] = $dc->Name;
$devSpec['Cabinet'] = $cab->Location;
$devSpec['Position'] = $low_idx;
$devSpec['Height'] = $height;
$devSpec['Device'] = '__EMPTY';
$invData[] = $devSpec;
}
$low_idx = $dev->Position;
}
// device in cabinet
$reserved = $dev->Reservation ? 'reserved' : null;
list($manufacturer, $model) = getDeviceTemplateName($devTemplates, $dev);
$devSpec = makeEmptySpec($sheetColumns, $dcContainerList);
$devSpec['DevID'] = $dev->DeviceID;
$devSpec['Zone'] = $zoneName;
$devSpec['Row'] = $rowName;
$devSpec['DC Name'] = $dc->Name;
$devSpec['Cabinet'] = $cab->Location;
$devSpec['Position'] = $dev->Position;
$devSpec['Half Depth'] = getDeviceDepthPos($dev);
$devSpec['Height'] = $dev->Height;
$devSpec['Device'] = $dev->Label;
$devSpec['Parent Device'] = null;
$devSpec['Manufacturer'] = $manufacturer;
$devSpec['Model'] = $model;
$devSpec['Device Type'] = $dev->DeviceType;
$devSpec['Asset Number'] = $dev->AssetTag;
$devSpec['Serial No.'] = $dev->SerialNo;
$devSpec['Install Date'] = $dev->InstallDate;
$devSpec['Warranty End'] = $dev->WarrantyExpire;
$devSpec['Owner'] = getOwnerName($dev, $deptList);
$devSpec['Power (W)'] = $dev->NominalWatts;
$devSpec['Reservation'] = $reserved;
$devSpec['Contact'] = getContactName($contactList, $dev->PrimaryContact);
$devSpec['Tags'] = getTagsString($dev);
$devSpec['Notes'] = html_entity_decode(strip_tags($dev->Notes), ENT_COMPAT, 'UTF-8');
$invData[] = $devSpec;
$dcStats['Watts'] += $dev->NominalWatts;
// devices can be installed at the same position and
// could be of different height; count only the free
// rack units which are not covered by any device
if ($low_idx == $dev->Position) {
$low_idx += $dev->Height;
$dcStats['Rk_UtU'] += $dev->Height;
} else {
$rest_height = $dev->Position + $dev->Height - $low_idx;
$rest_height = $rest_height > 0 ? $rest_height : 0;
$low_idx += $rest_height;
$dcStats['Rk_UtU'] += $rest_height;
}
if ($dev->DeviceType == 'Chassis') {
list($watts, $invData) = computeDeviceChildren($sheetColumns, $invData, $dev, $dc->Name, $cab, $devTemplates, $deptList, $contactList, $dcContainerList);
$dcStats['Watts'] += $watts;
}
}
if ($low_idx <= $cab->CabinetHeight) {
// empty range at the top of the cabinet, $low_idx is
// the potentially free location
$height = $cab->CabinetHeight - $low_idx + 1;
$dcStats['Rk_UtE'] += $height;
$devSpec = makeEmptySpec($sheetColumns, $dcContainerList);
$devSpec['Zone'] = $zoneName;
$devSpec['Row'] = $rowName;
$devSpec['DC Name'] = $dc->Name;
$devSpec['Cabinet'] = $cab->Location;
$devSpec['Position'] = $low_idx;
$devSpec['Height'] = $height;
$devSpec['Device'] = '__EMPTY';
$invData[] = $devSpec;
}
}
}
}
assignStatsVal($Stats, $dc, $dcStats);
$percentDone += $incrementalPercent;
JobQueue::updatePercentage($sessID, $percentDone);
}
return array($Stats, $invData, $invCab, $limitedUser);
}
开发者ID:dc-admin,项目名称:openDCIM,代码行数:101,代码来源:report_asset_Excel-new.php
示例8: getDuplicateRecordsArr
/** Function to return the duplicate records data as a formatted array */
function getDuplicateRecordsArr($module)
{
global $adb, $app_strings, $list_max_entries_per_page, $theme;
$field_values_array = getFieldValues($module);
$field_values = $field_values_array['fieldnames_list'];
$fld_arr = $field_values_array['fieldnames_array'];
$col_arr = $field_values_array['columnnames_array'];
$fld_labl_arr = $field_values_array['fieldlabels_array'];
$ui_type = $field_values_array['fieldname_uitype'];
$dup_query = getDuplicateQuery($module, $field_values, $ui_type);
// added for page navigation
$dup_count_query = substr($dup_query, stripos($dup_query, 'FROM'), strlen($dup_query));
$dup_count_query = "SELECT count(*) as count " . $dup_count_query;
$count_res = $adb->query($dup_count_query);
$no_of_rows = $adb->query_result($count_res, 0, "count");
if ($no_of_rows <= $list_max_entries_per_page) {
$_SESSION['dup_nav_start' . $module] = 1;
} else {
if (isset($_REQUEST["start"]) && $_REQUEST["start"] != "" && $_SESSION['dup_nav_start' . $module] != $_REQUEST["start"]) {
$_SESSION['dup_nav_start' . $module] = ListViewSession::getRequestStartPage();
}
}
$start = $_SESSION['dup_nav_start' . $module] != "" ? $_SESSION['dup_nav_start' . $module] : 1;
$navigation_array = getNavigationValues($start, $no_of_rows, $list_max_entries_per_page);
$start_rec = $navigation_array['start'];
$end_rec = $navigation_array['end_val'];
$navigationOutput = getTableHeaderNavigation($navigation_array, "", $module, "FindDuplicate", "");
if ($start_rec == 0) {
$limit_start_rec = 0;
} else {
$limit_start_rec = $start_rec - 1;
}
$dup_query .= " LIMIT {$limit_start_rec}, {$list_max_entries_per_page}";
//ends
$nresult = $adb->query($dup_query);
$no_rows = $adb->num_rows($nresult);
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
require_once $theme_path . 'layout_utils.php';
if ($no_rows == 0) {
if ($_REQUEST['action'] == 'FindDuplicateRecords') {
//echo "<br><br><center>".$app_strings['LBL_NO_DUPLICATE']." <a href='javascript:window.history.back()'>".$app_strings['LBL_GO_BACK'].".</a></center>";
//die;
echo "<link rel='stylesheet' type='text/css' href='themes/{$theme}/style.css'>";
echo "<table border='0' cellpadding='5' cellspacing='0' width='100%' height='450px'><tr><td align='center'>";
echo "<div style='border: 3px solid rgb(153, 153, 153); background-color: rgb(255, 255, 255); width: 55%; position: relative; z-index: 10000000;'>\n\t\t\n\t\t\t\t<table border='0' cellpadding='5' cellspacing='0' width='98%'>\n\t\t\t\t<tbody><tr>\n\t\t\t\t<td rowspan='2' width='11%'><img src='" . vtiger_imageurl('empty.jpg', $theme) . "' ></td>\n\t\t\t\t<td style='border-bottom: 1px solid rgb(204, 204, 204);' nowrap='nowrap' width='70%'><span class='genHeaderSmall'>{$app_strings['LBL_NO_DUPLICATE']}</span></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t<td class='small' align='right' nowrap='nowrap'>\t\t\t \t\n\t\t\t\t<a href='javascript:window.history.back();'>{$app_strings['LBL_GO_BACK']}</a><br> </td>\n\t\t\t\t</tr>\n\t\t\t\t</tbody></table> \n\t\t\t\t</div>";
echo "</td></tr></table>";
exit;
} else {
echo "<br><br><table align='center' class='reportCreateBottom big' width='95%'><tr><td align='center'>" . $app_strings['LBL_NO_DUPLICATE'] . "</td></tr></table>";
die;
}
}
$rec_cnt = 0;
$temp = array();
$sl_arr = array();
$grp = "group0";
$gcnt = 0;
$ii = 0;
//ii'th record in group
while ($rec_cnt < $no_rows) {
$result = $adb->fetchByAssoc($nresult);
//echo '<pre>';print_r($result);echo '</pre>';
if ($rec_cnt != 0) {
$sl_arr = array_slice($result, 2);
array_walk($temp, 'lower_array');
array_walk($sl_arr, 'lower_array');
$arr_diff = array_diff($temp, $sl_arr);
if (count($arr_diff) > 0) {
$gcnt++;
$temp = $sl_arr;
$ii = 0;
}
$grp = "group" . $gcnt;
}
$fld_values[$grp][$ii]['recordid'] = $result['recordid'];
for ($k = 0; $k < count($col_arr); $k++) {
if ($rec_cnt == 0) {
$temp[$fld_labl_arr[$k]] = $result[$col_arr[$k]];
}
if ($ui_type[$fld_arr[$k]] == 56) {
if ($result[$col_arr[$k]] == 0) {
$result[$col_arr[$k]] = $app_strings['no'];
} else {
$result[$col_arr[$k]] = $app_strings['yes'];
}
}
if ($ui_type[$fld_arr[$k]] == 75 || $ui_type[$fld_arr[$k]] == 81) {
$vendor_id = $result[$col_arr[$k]];
if ($vendor_id != '') {
$vendor_name = getVendorName($vendor_id);
}
$result[$col_arr[$k]] = $vendor_name;
}
if ($ui_type[$fld_arr[$k]] == 57) {
$contact_id = $result[$col_arr[$k]];
if ($contact_id != '') {
$contactname = getContactName($contact_id);
}
//.........这里部分代码省略.........
开发者ID:vtiger-jp,项目名称:vtigercrm-5.1.x-ja,代码行数:101,代码来源:utils.php
示例9: getValue
//.........这里部分代码省略.........
$slashes_temp_val = popup_from_html($temp_val);
$slashes_temp_val = htmlspecialchars($slashes_temp_val, ENT_QUOTES, $default_charset);
$bill_street = str_replace(array("\r", "\n"), array('\\r', '\\n'), popup_decode_html($acct_focus->column_fields['bill_street']));
$ship_street = str_replace(array("\r", "\n"), array('\\r', '\\n'), popup_decode_html($acct_focus->column_fields['ship_street']));
$value = '<a href="javascript:window.close();" onclick=\'set_return_contact_address("' . $entity_id . '", "' . nl2br(decode_html($slashes_temp_val)) . '", "' . $bill_street . '", "' . $ship_street . '", "' . popup_decode_html($acct_focus->column_fields['bill_city']) . '", "' . popup_decode_html($acct_focus->column_fields['ship_city']) . '", "' . popup_decode_html($acct_focus->column_fields['bill_state']) . '", "' . popup_decode_html($acct_focus->column_fields['ship_state']) . '", "' . popup_decode_html($acct_focus->column_fields['bill_code']) . '", "' . popup_decode_html($acct_focus->column_fields['ship_code']) . '", "' . popup_decode_html($acct_focus->column_fields['bill_country']) . '", "' . popup_decode_html($acct_focus->column_fields['ship_country']) . '","' . popup_decode_html($acct_focus->column_fields['bill_pobox']) . '", "' . popup_decode_html($acct_focus->column_fields['ship_pobox']) . '");\'>' . $temp_val . '</a>';
} elseif ($popuptype == "specific_potential_account_address") {
$slashes_temp_val = popup_from_html($temp_val);
$slashes_temp_val = htmlspecialchars($slashes_temp_val, ENT_QUOTES, $default_charset);
// For B2C support, Potential was enabled to be linked to Contacts also.
// Hence we need case handling for it.
$relatedid = $adb->query_result($list_result, $list_result_count, "related_to");
$relatedentity = getSalesEntityType($relatedid);
if ($relatedentity == 'Accounts') {
require_once 'modules/Accounts/Accounts.php';
$acct_focus = new Accounts();
$acct_focus->retrieve_entity_info($relatedid, "Accounts");
$account_name = getAccountName($relatedid);
$slashes_account_name = popup_from_html($account_name);
$slashes_account_name = htmlspecialchars($slashes_account_name, ENT_QUOTES, $default_charset);
$xyz = array('bill_street', 'bill_city', 'bill_code', 'bill_pobox', 'bill_country', 'bill_state', 'ship_street', 'ship_city', 'ship_code', 'ship_pobox', 'ship_country', 'ship_state');
for ($i = 0; $i < 12; $i++) {
if (getFieldVisibilityPermission('Accounts', $current_user->id, $xyz[$i]) == '0') {
$acct_focus->column_fields[$xyz[$i]] = $acct_focus->column_fields[$xyz[$i]];
} else {
$acct_focus->column_fields[$xyz[$i]] = '';
}
}
$bill_street = str_replace(array("\r", "\n"), array('\\r', '\\n'), popup_decode_html($acct_focus->column_fields['bill_street']));
$ship_street = str_replace(array("\r", "\n"), array('\\r', '\\n'), popup_decode_html($acct_focus->column_fields['ship_street']));
$value = '<a href="javascript:window.close();" onclick=\'set_return_address("' . $entity_id . '", "' . nl2br(decode_html($slashes_temp_val)) . '", "' . $relatedid . '", "' . nl2br(decode_html($slashes_account_name)) . '", "' . $bill_street . '", "' . $ship_street . '", "' . popup_decode_html($acct_focus->column_fields['bill_city']) . '", "' . popup_decode_html($acct_focus->column_fields['ship_city']) . '", "' . popup_decode_html($acct_focus->column_fields['bill_state']) . '", "' . popup_decode_html($acct_focus->column_fields['ship_state']) . '", "' . popup_decode_html($acct_focus->column_fields['bill_code']) . '", "' . popup_decode_html($acct_focus->column_fields['ship_code']) . '", "' . popup_decode_html($acct_focus->column_fields['bill_country']) . '", "' . popup_decode_html($acct_focus->column_fields['ship_country']) . '","' . popup_decode_html($acct_focus->column_fields['bill_pobox']) . '", "' . popup_decode_html($acct_focus->column_fields['ship_pobox']) . '");\'>' . $temp_val . '</a>';
} else {
if ($relatedentity == 'Contacts') {
require_once 'modules/Contacts/Contacts.php';
$contact_name = getContactName($relatedid);
$slashes_contact_name = popup_from_html($contact_name);
$slashes_contact_name = htmlspecialchars($slashes_contact_name, ENT_QUOTES, $default_charset);
$value = '<a href="javascript:window.close();" onclick=\'set_return_contact("' . $entity_id . '", "' . nl2br(decode_html($slashes_temp_val)) . '", "' . $relatedid . '", "' . nl2br(decode_html($slashes_contact_name)) . '");\'>' . $temp_val . '</a>';
} else {
$value = $temp_val;
}
}
} elseif ($popuptype == "set_return_emails") {
if ($module == 'Accounts') {
$name = $adb->query_result($list_result, $list_result_count, 'accountname');
$accid = $adb->query_result($list_result, $list_result_count, 'accountid');
if (CheckFieldPermission('email1', $module) == "true") {
$emailaddress = $adb->query_result($list_result, $list_result_count, "email1");
$email_check = 1;
} else {
$email_check = 0;
}
if ($emailaddress == '') {
if (CheckFieldPermission('email2', $module) == 'true') {
$emailaddress2 = $adb->query_result($list_result, $list_result_count, "email2");
$email_check = 2;
} else {
if ($email_check == 1) {
$email_check = 4;
} else {
$email_check = 3;
}
}
}
$querystr = "SELECT fieldid,fieldlabel,columnname FROM vtiger_field WHERE tabid=? and uitype=13 and vtiger_field.presence in (0,2)";
$queryres = $adb->pquery($querystr, array(getTabid($module)));
//Change this index 0 - to get the vtiger_fieldid based on email1 or email2
开发者ID:latechdirect,项目名称:vtiger,代码行数:67,代码来源:ListViewUtils.php
示例10: x0e
private function x0e($emodule, $efocus, $is_related = false, $is_inventory = false)
{
global $x0b, $x0c, $x0d, $x0e, $x0f, $x10, $x11, $x12, $x13, $x14, $x15, $x16, $x17, $x18, $x19, $x1a, $x1b, $x1c, $x1d, $x1e, $x1f, $x20, $x21, $x22, $x23, $x24, $x25, $x26;
$related_fieldnames = array("related_to", "relatedto", "parent_id", "parentid", "product_id", "productid", "service_id", "serviceid", "vendor_id", "product", "account", "invoiceid", "linktoaccountscontacts", "projectid", "sc_related_to");
if ($is_inventory) {
$inventory_content = array();
}
$tabid = getTabid($emodule);
if ($is_related) {
$related = "R_";
} else {
$related = "";
}
$Checkboxes = array();
$Picklists = array();
$Textareas = array();
$Datefields = array();
$Multipicklists = array();
$NumbersField = array();
$sql = "SELECT fieldname, uitype FROM vtiger_field WHERE tabid = '" . $tabid . "'";
$result = $this->db->query($sql);
while ($row = $this->db->fetchByAssoc($result)) {
if ($row["uitype"] == "19" || $row["uitype"] == "20" || $row["uitype"] == "21" || $row["uitype"] == "24") {
$Textareas[] = $row["fieldname"];
} elseif ($row["uitype"] == "5" || $row["uitype"] == "23" || $row["uitype"] == "70") {
$Datefields[] = $row["fieldname"];
} elseif ($row["uitype"] == "15" || $row["fieldname"] == "salutationtype") {
$Picklists[] = $row["fieldname"];
} elseif ($row["uitype"] == "56") {
$Checkboxes[] = $row["fieldname"];
} elseif ($row["uitype"] == "33") {
$Multipicklists[] = $row["fieldname"];
} elseif ($row["uitype"] == "71") {
$NumbersField[] = $row["fieldname"];
}
}
foreach ($efocus->column_fields as $fieldname => $value) {
if ($fieldname == "assigned_user_id") {
$value = $this->x19($value);
} elseif ($fieldname == "account_id") {
$value = getAccountName($value);
} elseif ($fieldname == "potential_id") {
$value = getPotentialName($value);
} elseif ($fieldname == "contact_id") {
$value = getContactName($value);
} elseif ($fieldname == "quote_id") {
$value = getQuoteName($value);
} elseif ($fieldname == "salesorder_id") {
$value = getSoName($value);
} elseif ($fieldname == "campaignid") {
$value = getCampaignName($value);
} elseif ($fieldname == "terms_conditions") {
$value = $this->x20($value);
} elseif ($fieldname == "comments") {
$value = $this->x21($efocus);
} elseif ($fieldname == "folderid") {
$value = $this->x22($value);
} elseif ($x16($fieldname, $related_fieldnames)) {
if ($value != "") {
$parent_module = getSalesEntityType($value);
$displayValueArray = getEntityName($parent_module, $value);
if (!empty($displayValueArray)) {
foreach ($displayValueArray as $key => $p_value) {
$value = $p_value;
}
}
if ($fieldname == "invoiceid" && $value == "0") {
$value = "";
}
}
}
if ($x16($fieldname, $Datefields)) {
$value = getValidDisplayDate($value);
} elseif ($x16($fieldname, $Picklists)) {
if (!$x16($x26($value), $this->ignored_picklist_values)) {
$value = $this->x1b($value, $emodule);
} else {
$value = "";
}
} elseif ($x16($fieldname, $Checkboxes)) {
$pdf_app_strings = return_application_language($this->language);
if ($value == 1) {
$value = $pdf_app_strings["yes"];
} else {
$value = $pdf_app_strings["no"];
}
} elseif ($x16($fieldname, $Textareas)) {
$value = $x1a($value);
} elseif ($x16($fieldname, $Multipicklists)) {
$value = $x1f(' |##| ', ', ', $value);
} elseif ($x16($fieldname, $NumbersField)) {
$value = $this->x1e($value);
}
if ($is_inventory) {
$inventory_content[$x22($emodule . "_" . $fieldname)] = $value;
} else {
$this->replacements["\$" . $related . $x22($emodule . "_" . $fieldname) . "\$"] = $value;
}
}
if ($is_inventory) {
//.........这里部分代码省略.........
开发者ID:jmangarret,项目名称:vtigercrm,代码行数:101,代码来源:InventoryPDF.php
示例11: getOutputHtml
//.........这里部分代码省略.........
$editview_label[] = getTranslatedString($fieldlabel, $module_name);
if ($value == '') {
$value = 1;
}
$options = array();
$pick_query = "select * from vtiger_duration_minutes order by sortorderid";
$pickListResult = $adb->pquery($pick_query, array());
$noofpickrows = $adb->num_rows($pickListResult);
$salt_value = $col_fields["duration_minutes"];
for ($j = 0; $j < $noofpickrows; $j++) {
$pickListValue = $adb->query_result($pickListResult, $j, "duration_minutes");
if ($salt_value == $pickListValue) {
$chk_val = "selected";
} else {
$chk_val = '';
}
$options[$pickListValue] = $chk_val;
}
$fieldvalue[] = $value;
$fieldvalue[] = $options;
} elseif ($uitype == 64) {
$editview_label[] = getTranslatedString($fieldlabel, $module_name);
$date_format = parse_calendardate($app_strings['NTC_DATE_FORMAT']);
$fieldvalue[] = $value;
} elseif ($uitype == 156) {
$editview_label[] = getTranslatedString($fieldlabel, $module_name);
$fieldvalue[] = $value;
$fieldvalue[] = $is_admin;
} elseif ($uitype == 56) {
$editview_label[] = getTranslatedString($fieldlabel, $module_name);
$fieldvalue[] = $value;
} elseif ($uitype == 57) {
if ($value != '') {
$contact_name = getContactName($value);
} elseif (isset($_REQUEST['contact_id']) && $_REQUEST['contact_id'] != '') {
if ($_REQUEST['module'] == 'Contacts' && ($fieldname = 'contact_id')) {
$contact_name = '';
} else {
$value = $_REQUEST['contact_id'];
$contact_name = getContactName($value);
}
}
//Checking for contacts duplicate
$editview_label[] = getTranslatedString($fieldlabel, $module_name);
$fieldvalue[] = $contact_name;
$fieldvalue[] = $value;
} elseif ($uitype == 58) {
if ($value != '') {
$campaign_name = getCampaignName($value);
} elseif (isset($_REQUEST['campaignid']) && $_REQUEST['campaignid'] != '') {
if ($_REQUEST['module'] == 'Campaigns' && ($fieldname = 'campaignid')) {
$campaign_name = '';
} else {
$value = $_REQUEST['campaignid'];
$campaign_name = getCampaignName($value);
}
}
$editview_label[] = getTranslatedString($fieldlabel, $module_name);
$fieldvalue[] = $campaign_name;
$fieldvalue[] = $value;
} elseif ($uitype == 61) {
if ($value != '') {
$assigned_user_id = $value;
} else {
$assigned_user_id = $current_user->id;
}
开发者ID:joomlacorner,项目名称:vtigerthai,代码行数:67,代码来源:EditViewUtils.php
示例12: getDetailViewOutputHtml
//.........这里部分代码省略.........
$label_fld[] = $mod_strings[$fieldlabel];
$label_fld[] = $account_name;
$label_fld["secid"] = $account_id;
$label_fld["link"] = "index.php?module=Accounts&action=DetailView&record=" . $account_id;
} elseif ($uitype == 52 || $uitype == 77 || $uitype == 101) {
$label_fld[] = $mod_strings[$fieldlabel];
$user_id = $col_fields[$fieldname];
$user_name = getUserName($user_id);
$label_fld[] = $user_name;
} elseif ($uitype == 53) {
$user_id = $col_fields[$fieldname];
$user_name = getUserName($user_id);
$label_fld[] = $mod_strings[$fieldlabel];
$label_fld[] = $user_name;
} elseif ($uitype == 1004) {
if (isset($mod_strings[$fieldlabel])) {
$label_fld[] = $mod_strings[$fieldlabel];
} else {
$label_fld[] = $fieldlabel;
}
$value = $col_fields[$fieldname];
$label_fld[] = getUserName($value);
} elseif ($uitype == 56) {
$label_fld[] = $mod_strings[$fieldlabel];
$value = $col_fields[$fieldname];
if ($value == 1) {
//Since "yes" is not been translated it is given as app strings here..
$display_val = $app_strings['yes'];
} else {
$display_val = '';
}
$label_fld[] = $display_val;
} elseif ($uitype == 57) {
$label_fld[] = $mod_strings[$fieldlabel];
$contact_id = $col_fields[$fieldname];
$contact_name = "";
if (trim($contact_id) != '') {
$contact_name = getContactName($contact_id);
}
$label_fld[] = $contact_name;
$label_fld["secid"] = $contact_id;
$label_fld["link"] = "index.php?module=Contacts&action=DetailView&record=" . $contact_id;
} elseif ($uitype == 59) {
$label_fld[] = $mod_strings[$fieldlabel];
$product_id = $col_fields[$fieldname];
if ($product_id != '') {
$product_name = getProductName($product_id);
}
//Account Name View
$label_fld[] = $product_name;
$label_fld["secid"] = $product_id;
$label_fld["link"] = "index.php?module=Products&action=DetailView&record=" . $product_id;
} elseif ($uitype == 71 || $uitype == 72) {
$label_fld[] = $mod_strings[$fieldlabel];
$display_val = $col_fields[$fieldname];
$label_fld[] = $display_val;
} elseif ($uitype == 76) {
$label_fld[] = $mod_strings[$fieldlabel];
$potential_id = $col_fields[$fieldname];
if ($potential_id != '') {
$potential_name = getPotentialName($potential_id);
}
$label_fld[] = $potential_name;
$label_fld["secid"] = $potential_id;
$label_fld["link"] = "index.php?module=Potentials&action=DetailView&record=" . $potential_id;
} elseif ($uitype == 80) {
$label_fld[] = $mod_strings[$fieldlabel];
$salesorder_id = $col_fields[$fieldname];
if ($salesorder_id != '') {
$salesorder_name = getSoName($salesorder_id);
}
$label_fld[] = $salesorder_name;
$label_fld["secid"] = $salesorder_id;
$label_fld["link"] = "index.php?module=SalesOrder&action=DetailView&record=" . $salesorder_id;
} elseif ($uitype == 85) {
$label_fld[] = $mod_strings[$fieldlabel];
$label_fld[] = $col_fields[$fieldname];
} elseif ($uitype == 86) {
$label_fld[
|
请发表评论