本文整理汇总了PHP中getParentName函数的典型用法代码示例。如果您正苦于以下问题:PHP getParentName函数的具体用法?PHP getParentName怎么用?PHP getParentName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getParentName函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getCalls
function getCalls()
{
//Realiza el query en la base de datos
$mysqli = makeSqlConnection();
$sql = "SELECT * FROM calls a LEFT JOIN calls_cstm ac ON a.id = ac.id_c ";
$sql .= "WHERE a.parent_type IN('Accounts', 'Opportunities','Tasks') AND deleted = '0' ORDER BY name ASC";
$res = $mysqli->query($sql);
$rows = array();
while ($r = mysqli_fetch_assoc($res)) {
$obj = (object) $r;
$obj->created_by_name = getNombreUsuario($obj->created_by);
$obj->assigned_user_name = getNombreUsuario($obj->assigned_user_id);
$obj->parent_name = getParentName($obj->parent_id, $obj->parent_type);
$obj->campaign_name = getCampaignName($obj->id);
$obj->campaign_id = getCampaignId($obj->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,代码行数:26,代码来源:getCalls.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->parent_name = getParentName($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,代码行数:20,代码来源:getNotes.php
示例3: buildDocumentModel
function buildDocumentModel()
{
global $app_strings;
try {
$model = parent::buildDocumentModel();
$this->generateEntityModel($this->focus, 'SPPayments', 'payment_', $model);
$this->generateUi10Models($model);
$this->generateRelatedListModels($model);
$model->set('payment_owner', getUserFullName($this->focusColumnValue('assigned_user_id')));
$model->set('payment_payer', getParentName($this->focusColumnValue('payer')));
return $model;
} catch (Exception $e) {
echo '<meta charset="utf-8" />';
if ($e->getMessage() == $app_strings['LBL_RECORD_DELETE']) {
echo $app_strings['LBL_RECORD_INCORRECT'];
echo '<br><br>';
} else {
echo $e->getMessage();
echo '<br><br>';
}
return null;
}
}
开发者ID:DeliveryPLANET,项目名称:vTiger,代码行数:23,代码来源:SPPaymentsPDFController.php
示例4: getGenericCall
function getGenericCall($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->created_by_name = getNombreUsuario($obj->created_by);
$obj->assigned_user_name = getNombreUsuario($obj->assigned_user_id);
$obj->parent_name = getParentName($obj->parent_id, $obj->parent_type);
$obj->campaign_name = getCampaignName($obj->id);
$obj->campaign_id = getCampaignId($obj->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,代码行数:24,代码来源:getCall.php
示例5: getPortalTicketEmailContents
public static function getPortalTicketEmailContents($entityData)
{
require_once 'config.inc.php';
global $PORTAL_URL;
$moduleName = $entityData->getModuleName();
$wsId = $entityData->getId();
$parts = explode('x', $wsId);
$entityId = $parts[1];
$wsParentId = $entityData->get('parent_id');
$parentIdParts = explode('x', $wsParentId);
$parentId = $parentIdParts[1];
$portalUrl = "<a href='" . $PORTAL_URL . "/index.php?module=HelpDesk&action=index&ticketid=" . $entityId . "&fun=detail'>" . getTranslatedString('LBL_TICKET_DETAILS', $moduleName) . "</a>";
$contents = getTranslatedString('Dear', $moduleName) . " " . getParentName(parentId) . ",<br><br>";
$contents .= getTranslatedString('reply', $moduleName) . ' <b>' . $entityData->get('ticket_title') . '</b>' . getTranslatedString('customer_portal', $moduleName);
$contents .= getTranslatedString("link", $moduleName) . '<br>';
$contents .= $portalUrl;
$contents .= '<br><br>' . getTranslatedString("Thanks", $moduleName) . '<br><br>' . getTranslatedString("Support_team", $moduleName);
return $contents;
}
开发者ID:kikojover,项目名称:corebos,代码行数:19,代码来源:HelpDesk.php
示例6: getDuplicateRecordsArr
//.........这里部分代码省略.........
$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 != '') {
$parent_module = 'Contacts';
$displayValueArray = getEntityName($parent_module, $contact_id);
if (!empty($displayValueArray)) {
foreach ($displayValueArray as $key => $field_value) {
$contactname = $field_value;
}
}
}
$result[$col_arr[$k]] = $contactname;
}
if ($ui_type[$fld_arr[$k]] == 15 || $ui_type[$fld_arr[$k]] == 16) {
$result[$col_arr[$k]] = getTranslatedString($result[$col_arr[$k]], $module);
}
if ($ui_type[$fld_arr[$k]] == 33) {
$fieldvalue = explode(' |##| ', $result[$col_arr[$k]]);
$result[$col_arr[$k]] = array();
foreach ($fieldvalue as $picklistValue) {
$result[$col_arr[$k]][] = getTranslatedString($picklistValue, $module);
}
$result[$col_arr[$k]] = implode(', ', $result[$col_arr[$k]]);
}
if ($ui_type[$fld_arr[$k]] == 68) {
$parent_id = $result[$col_arr[$k]];
if ($parent_id != '') {
$parentname = getParentName($parent_id);
}
$result[$col_arr[$k]] = $parentname;
}
if ($ui_type[$fld_arr[$k]] == 53 || $ui_type[$fld_arr[$k]] == 52) {
if ($result[$col_arr[$k]] != '') {
$owner = getOwnerName($result[$col_arr[$k]]);
}
$result[$col_arr[$k]] = $owner;
}
if ($ui_type[$fld_arr[$k]] == 50 or $ui_type[$fld_arr[$k]] == 51) {
if ($module != 'Products') {
$entity_name = getAccountName($result[$col_arr[$k]]);
} else {
$entity_name = getProductName($result[$col_arr[$k]]);
}
if ($entity_name != '') {
$result[$col_arr[$k]] = $entity_name;
} else {
$result[$col_arr[$k]] = '';
}
}
if ($ui_type[$fld_arr[$k]] == 58) {
$campaign_name = getCampaignName($result[$col_arr[$k]]);
if ($campaign_name != '') {
$result[$col_arr[$k]] = $campaign_name;
} else {
$result[$col_arr[$k]] = '';
}
}
if ($ui_type[$fld_arr[$k]] == 59) {
$product_name = getProductName($result[$col_arr[$k]]);
if ($product_name != '') {
开发者ID:jgjermeni,项目名称:corebos,代码行数:67,代码来源:utils.php
示例7: getPortalTicketEmailContents
public static function getPortalTicketEmailContents($entityData)
{
require_once 'config/config.php';
global $PORTAL_URL, $HELPDESK_SUPPORT_NAME;
$moduleName = $entityData->getModuleName();
$wsId = $entityData->getId();
if (strpos($wsId, 'x')) {
$parts = explode('x', $wsId);
$entityId = $parts[1];
} else {
$entityId = $wsId;
}
$wsParentId = $entityData->get('contact_id');
$parentIdParts = explode('x', $wsParentId);
// If this function is being triggered as part of Eventing API
// Then the reference field ID will not matching the webservice format.
// Regardless of the entry we need just the ID
$parentId = array_pop($parentIdParts);
$portalUrl = "<a href='" . $PORTAL_URL . "/index.php?module=HelpDesk&action=index&ticketid=" . $entityId . "&fun=detail'>" . getTranslatedString('LBL_TICKET_DETAILS', $moduleName) . "</a>";
$contents = getTranslatedString('Dear', $moduleName) . ' ';
$contents .= $parentId ? getParentName($parentId) : '';
$contents .= ",<br>";
$contents .= getTranslatedString('reply', $moduleName) . ' <b>' . $entityData->get('ticket_title') . '</b> ' . getTranslatedString('customer_portal', $moduleName);
$contents .= getTranslatedString("link", $moduleName) . '<br>';
$contents .= $portalUrl;
$contents .= '<br><br>' . getTranslatedString("Thanks", $moduleName) . '<br>' . $HELPDESK_SUPPORT_NAME;
return $contents;
}
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:28,代码来源:HelpDesk.php
示例8: getParentName
function getParentName($id)
{
$cat = ProductCategory::getInstance($id);
return $cat->vals['parent_id'] ? getParentName($cat->vals['parent_id']) . '/' . $cat->vals['name'] : $cat->vals['name'];
}
开发者ID:raylouis,项目名称:kvwebme,代码行数:5,代码来源:api-admin.php
示例9: listSeo
/**
* 栏目页SEO信息
* @param int $cat
* @param int $page
* @param string $kw
* @return array
*/
function listSeo($cat, $page = 1, $kw = NULL)
{
$config = App::get_config();
$meta_title = $meta_keywords = $meta_description = '';
if ($kw) {
$meta_title = (empty($cat) ? lang('fun-2', array('1' => $kw)) : lang('fun-2', array('1' => $kw))) . '-' . $config['SITE_NAME'];
$meta_title = $page > 1 ? lang('fun-1', array('1' => $page)) . '-' . $meta_title : $meta_title;
} else {
$meta_title = empty($cat['meta_title']) ? getParentName($cat['catid'], '-', 0) : $cat['meta_title'];
$meta_title = $meta_title ? $meta_title . '-' . $config['SITE_NAME'] : $config['SITE_NAME'];
$meta_title = isset($cat['stitle']) && $cat['stitle'] ? $cat['stitle'] . '-' . $meta_title : ($page > 1 ? lang('fun-1', array('1' => $page)) . '-' . $meta_title : $meta_title);
$meta_keywords = empty($cat['meta_keywords']) ? getParentName($cat['catid'], ',', 0) . ',' . $config['SITE_KEYWORDS'] : $cat['meta_keywords'];
$meta_description = empty($cat['meta_description']) ? $config['SITE_DESCRIPTION'] : $cat['meta_description'];
}
return array('meta_title' => $meta_title, 'meta_keywords' => $meta_keywords, 'meta_description' => $meta_description);
}
开发者ID:kennyhonghui,项目名称:zhuoxi,代码行数:23,代码来源:function.php
示例10: class_config
<?php
//INCLUDE ALL OF OUR MODULE CLASSES
include '../class/class_config.php';
include '../class/class_db.php';
//CREATE OUR CONFIG
$cfg = new class_config();
//CREATE OUR DATABASE
$db = new class_db($cfg->db_host, $cfg->db_name, $cfg->db_user, $cfg->db_pass);
//CONNECT TO OUR DATABASE
$database_connection = $db->DB_CONNECT();
//CONSTRUCT THE FILEPATH
$parent_page = $_REQUEST['parent_page'];
$tmp_array = explode("/", getParentName($db, $parent_page, $cfg));
for ($i = count($tmp_array) - 2; $i >= 0; $i--) {
$tmp_path .= $tmp_array[$i] . "/";
}
$file_path = "../../{$tmp_path}" . $_REQUEST['file'];
//CLOSE OUT CONNECTION TO THE DATABASE
$db->DB_CLOSE($database_connection);
if (file_exists($file_path)) {
echo "true";
} else {
echo "false";
}
//
function getParentName($db, $parent_page, $cfg)
{
if ($parent_page != 0) {
$sql = "SELECT * FROM " . $cfg->db_prefix . "_block_page WHERE id = {$parent_page}";
$results = $db->DB_Q_C($sql);
开发者ID:jackmolnar,项目名称:glit_website_new,代码行数:31,代码来源:checkpageexsists.php
示例11: save_module
function save_module($module)
{
global $adb;
//Handling module specific save
//Insert into seactivity rel
if (isset($this->column_fields['parent_id']) && $this->column_fields['parent_id'] != '') {
$this->insertIntoEntityTable("vtiger_seactivityrel", $module);
} elseif ($this->column_fields['parent_id'] == '' && $insertion_mode == "edit") {
$this->deleteRelation("vtiger_seactivityrel");
}
//Insert into cntactivity rel
if (isset($this->column_fields['contact_id']) && $this->column_fields['contact_id'] != '') {
$this->insertIntoEntityTable('vtiger_cntactivityrel', $module);
} elseif ($this->column_fields['contact_id'] == '' && $insertion_mode == "edit") {
$this->deleteRelation('vtiger_cntactivityrel');
}
if (!empty($this->column_fields['sendnotification'])) {
$mail_data = array();
$mail_data['user_id'] = $this->column_fields['assigned_user_id'];
$mail_data['subject'] = $this->column_fields['subject'];
$mail_data['status'] = $this->column_fields['activitytype'] == 'Task' ? $this->column_fields['taskstatus'] : $this->column_fields['eventstatus'];
$mail_data['taskpriority'] = $this->column_fields['taskpriority'];
$relatedContacts = getActivityRelatedContacts($this->id);
$mail_data['contact_name'] = implode(',', $relatedContacts);
$mail_data['description'] = $this->column_fields['description'];
$mail_data['st_date_time'] = $this->column_fields['date_start'] . ' ' . $this->column_fields['time_start'];
$mail_data['end_date_time'] = $this->column_fields['due_date'] . ' ' . $this->column_fields['time_end'];
$mail_data['relatedto'] = getParentName($this->column_fields['parent_id']);
$mail_data['location'] = $this->column_fields['location'];
getEventNotification($this->column_fields['activitytype'], $this->column_fields['subject'], $mail_data);
}
$recur_type = '';
if (($recur_type == "--None--" || $recur_type == '') && $this->mode == "edit") {
$sql = 'delete from vtiger_recurringevents where activityid=?';
$adb->pquery($sql, array($this->id));
}
//Handling for recurring type
//Insert into vtiger_recurring event table
if (isset($this->column_fields['recurringtype']) && $this->column_fields['recurringtype'] != '' && $this->column_fields['recurringtype'] != '--None--') {
$recur_type = trim($this->column_fields['recurringtype']);
$recur_data = getrecurringObjValue();
if (is_object($recur_data)) {
$this->insertIntoRecurringTable($recur_data);
}
}
//Insert into vtiger_activity_remainder table
$this->insertIntoReminderTable('vtiger_activity_reminder', $module, "");
//Handling for invitees
$selected_users_string = $_REQUEST['inviteesid'];
$invitees_array = explode(';', $selected_users_string);
$this->insertIntoInviteeTable($module, $invitees_array);
//Inserting into sales man activity rel
$this->insertIntoSmActivityRel($module);
$this->insertIntoActivityReminderPopup($module);
}
开发者ID:hbsman,项目名称:vtigercrm-5.3.0-ja,代码行数:55,代码来源:Activity.php
注:本文中的getParentName函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论