本文整理汇总了PHP中Contacts::retrieve_entity_info方法的典型用法代码示例。如果您正苦于以下问题:PHP Contacts::retrieve_entity_info方法的具体用法?PHP Contacts::retrieve_entity_info怎么用?PHP Contacts::retrieve_entity_info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Contacts
的用法示例。
在下文中一共展示了Contacts::retrieve_entity_info方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: buildDocumentModel
function buildDocumentModel()
{
global $app_strings;
try {
$model = parent::buildDocumentModel();
$this->generateEntityModel($this->focus, 'PurchaseOrder', 'purchaseorder_', $model);
$entity = new Contacts();
if ($this->focusColumnValue('contact_id')) {
$entity->retrieve_entity_info($this->focusColumnValue('contact_id'), 'Contacts');
}
$this->generateEntityModel($entity, 'Contacts', 'contact_', $model);
$entity = new Vendors();
if ($this->focusColumnValue('vendor_id')) {
$entity->retrieve_entity_info($this->focusColumnValue('vendor_id'), 'Vendors');
}
$this->generateEntityModel($entity, 'Vendors', 'vendor_', $model);
$this->generateUi10Models($model);
$this->generateRelatedListModels($model);
$model->set('purchaseorder_no', $this->focusColumnValue('purchaseorder_no'));
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;
}
}
示例2: buildDocumentModel
function buildDocumentModel()
{
global $app_strings;
try {
$model = parent::buildDocumentModel();
$this->generateEntityModel($this->focus, 'Potentials', 'potential_', $model);
$entity = new Accounts();
if ($this->focusColumnValue('related_to')) {
$entity->retrieve_entity_info($this->focusColumnValue('related_to'), 'Accounts');
}
$this->generateEntityModel($entity, 'Accounts', 'account_', $model);
$entity = new Contacts();
if ($this->focusColumnValue('contact_id')) {
$entity->retrieve_entity_info($this->focusColumnValue('contact_id'), 'Contacts');
}
$this->generateEntityModel($entity, 'Contacts', 'contact_', $model);
$this->generateUi10Models($model);
$this->generateRelatedListModels($model);
$model->set('potential_no', $this->focusColumnValue('potential_no'));
$model->set('potential_owner', getUserFullName($this->focusColumnValue('assigned_user_id')));
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;
}
}
示例3: buildDocumentModel
function buildDocumentModel()
{
global $app_strings;
try {
$model = parent::buildDocumentModel();
$this->generateEntityModel($this->focus, 'HelpDesk', 'helpdesk_', $model);
$entity = new Products();
if ($this->focusColumnValue('product_id')) {
$entity->retrieve_entity_info($this->focusColumnValue('product_id'), 'Products');
}
$this->generateEntityModel($entity, 'Products', 'product_', $model);
if ($this->focusColumnValue('parent_id')) {
$setype = getSalesEntityType($this->focusColumnValue('parent_id'));
}
$account = new Accounts();
$contact = new Contacts();
if ($setype == 'Accounts') {
$account->retrieve_entity_info($this->focusColumnValue('parent_id'), $setype);
} elseif ($setype == 'Contacts') {
$contact->retrieve_entity_info($this->focusColumnValue('parent_id'), $setype);
}
$this->generateEntityModel($account, 'Accounts', 'account_', $model);
$this->generateEntityModel($contact, 'Contacts', 'contact_', $model);
$this->generateUi10Models($model);
$this->generateRelatedListModels($model);
$model->set('helpdesk_owner', getUserFullName($this->focusColumnValue('assigned_user_id')));
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;
}
}
示例4: array
echo "Load time: {$time_elapsed_us}\n";
$num2create = 100;
$_REQUEST['assigntype'] == 'U';
$recs2del = array();
$start = microtime(true);
for ($i = 0; $i < $num2create; $i++) {
$focus = new Contacts();
$focus->column_fields['firstname'] = 'firstname' . $i;
$focus->column_fields['lastname'] = 'lastname' . $i;
$focus->email_opt_out = 'off';
$focus->do_not_call = 'off';
$focus->column_fields['assigned_user_id'] = $current_user->id;
$focus->save("Contacts");
$recs2del[] = $focus->id;
if ($i % 10 == 0) {
echo $i . "\n";
foreach ($recs2del as $c) {
$f2 = new Contacts();
$f2->retrieve_entity_info($c, 'Contacts');
DeleteEntity('Contacts', 'Contacts', $f2, $c, $c);
}
$recs2del = array();
}
}
foreach ($recs2del as $c) {
$f2 = new Contacts();
$f2->retrieve_entity_info($c, 'Contacts');
DeleteEntity('Contacts', 'Contacts', $f2, $c, $c);
}
$time_elapsed_us = microtime(true) - $start;
echo "Operation time: {$time_elapsed_us}\n";
示例5: getValue
//.........这里部分代码省略.........
} else {
$value = $temp_val;
}
} elseif ($uitype == 25) {
$contactid = $_REQUEST['record'];
$emailid = $adb->query_result($list_result, $list_result_count, "activityid");
$result = $adb->pquery("SELECT access_count FROM vtiger_email_track WHERE crmid=? AND mailid=?", array($contactid, $emailid));
$value = $adb->query_result($result, 0, "access_count");
if (!$value) {
$value = 0;
}
} elseif ($uitype == 8) {
if (!empty($temp_val)) {
$temp_val = html_entity_decode($temp_val, ENT_QUOTES, $default_charset);
$json = new Zend_Json();
$value = vt_suppressHTMLTags(implode(',', $json->decode($temp_val)));
}
} else {
if ($fieldname == $focus->list_link_field) {
if ($mode == "search") {
if ($popuptype == "specific" || $popuptype == "toDospecific") {
// Added for get the first name of contact in Popup window
if ($colname == "lastname" && $module == 'Contacts') {
$temp_val = getFullNameFromQResult($list_result, $list_result_count, "Contacts");
}
$slashes_temp_val = popup_from_html($temp_val);
$slashes_temp_val = htmlspecialchars($slashes_temp_val, ENT_QUOTES, $default_charset);
//Added to avoid the error when select SO from Invoice through AjaxEdit
if ($module == 'SalesOrder') {
$value = '<a href="javascript:window.close();" onclick=\'set_return_specific("' . $entity_id . '", "' . nl2br(decode_html($slashes_temp_val)) . '","' . $_REQUEST['form'] . '");\'>' . $temp_val . '</a>';
} elseif ($module == 'Contacts') {
require_once 'modules/Contacts/Contacts.php';
$cntct_focus = new Contacts();
$cntct_focus->retrieve_entity_info($entity_id, "Contacts");
$slashes_temp_val = popup_from_html($temp_val);
//ADDED TO CHECK THE FIELD PERMISSIONS FOR
$xyz = array('mailingstreet', 'mailingcity', 'mailingzip', 'mailingpobox', 'mailingcountry', 'mailingstate', 'otherstreet', 'othercity', 'otherzip', 'otherpobox', 'othercountry', 'otherstate');
for ($i = 0; $i < 12; $i++) {
if (getFieldVisibilityPermission($module, $current_user->id, $xyz[$i]) == '0') {
$cntct_focus->column_fields[$xyz[$i]] = $cntct_focus->column_fields[$xyz[$i]];
} else {
$cntct_focus->column_fields[$xyz[$i]] = '';
}
}
// For ToDo creation the underlying form is not named as EditView
$form = !empty($_REQUEST['form']) ? $_REQUEST['form'] : '';
if (!empty($form)) {
$form = htmlspecialchars($form, ENT_QUOTES, $default_charset);
}
$value = '<a href="javascript:window.close();" onclick=\'set_return_contact_address("' . $entity_id . '", "' . nl2br(decode_html($slashes_temp_val)) . '", "' . popup_decode_html($cntct_focus->column_fields['mailingstreet']) . '", "' . popup_decode_html($cntct_focus->column_fields['otherstreet']) . '", "' . popup_decode_html($cntct_focus->column_fields['mailingcity']) . '", "' . popup_decode_html($cntct_focus->column_fields['othercity']) . '", "' . popup_decode_html($cntct_focus->column_fields['mailingstate']) . '", "' . popup_decode_html($cntct_focus->column_fields['otherstate']) . '", "' . popup_decode_html($cntct_focus->column_fields['mailingzip']) . '", "' . popup_decode_html($cntct_focus->column_fields['otherzip']) . '", "' . popup_decode_html($cntct_focus->column_fields['mailingcountry']) . '", "' . popup_decode_html($cntct_focus->column_fields['othercountry']) . '","' . popup_decode_html($cntct_focus->column_fields['mailingpobox']) . '", "' . popup_decode_html($cntct_focus->column_fields['otherpobox']) . '","' . $form . '");\'>' . $temp_val . '</a>';
} else {
if ($popuptype == 'toDospecific') {
$value = '<a href="javascript:window.close();" onclick=\'set_return_toDospecific("' . $entity_id . '", "' . nl2br(decode_html($slashes_temp_val)) . '");\'>' . $temp_val . '</a>';
} else {
$value = '<a href="javascript:window.close();" onclick=\'set_return_specific("' . $entity_id . '", "' . nl2br(decode_html($slashes_temp_val)) . '");\'>' . $temp_val . '</a>';
}
}
} elseif ($popuptype == "detailview") {
if ($colname == "lastname" && ($module == 'Contacts' || $module == 'Leads')) {
$temp_val = getFullNameFromQResult($list_result, $list_result_count, $module);
}
$slashes_temp_val = popup_from_html($temp_val);
$slashes_temp_val = htmlspecialchars($slashes_temp_val, ENT_QUOTES, $default_charset);
$focus->record_id = $_REQUEST['recordid'];
if ($_REQUEST['return_module'] == "Calendar") {
$value = '<a href="javascript:window.close();" id="calendarCont' . $entity_id . '" LANGUAGE=javascript onclick=\'add_data_to_relatedlist_incal("' . $entity_id . '","' . decode_html($slashes_temp_val) . '");\'>' . $temp_val . '</a>';
示例6: Contacts
$focus->column_fields['ship_city'] = $acct_focus->column_fields['ship_city'];
$focus->column_fields['bill_street'] = $acct_focus->column_fields['bill_street'];
$focus->column_fields['ship_street'] = $acct_focus->column_fields['ship_street'];
$focus->column_fields['bill_state'] = $acct_focus->column_fields['bill_state'];
$focus->column_fields['ship_state'] = $acct_focus->column_fields['ship_state'];
$focus->column_fields['bill_code'] = $acct_focus->column_fields['bill_code'];
$focus->column_fields['ship_code'] = $acct_focus->column_fields['ship_code'];
$focus->column_fields['bill_country'] = $acct_focus->column_fields['bill_country'];
$focus->column_fields['ship_country'] = $acct_focus->column_fields['ship_country'];
$focus->column_fields['bill_pobox'] = $acct_focus->column_fields['bill_pobox'];
$focus->column_fields['ship_pobox'] = $acct_focus->column_fields['ship_pobox'];
}
if (isset($_REQUEST['contact_id']) && $_REQUEST['contact_id'] != '' && ($_REQUEST['record'] == '' || $_REQUEST['convertmode'] == "potentoinvoice")) {
require_once 'modules/Contacts/Contacts.php';
$cto_focus = new Contacts();
$cto_focus->retrieve_entity_info($_REQUEST['contact_id'], "Contacts");
$focus->column_fields['bill_city'] = $cto_focus->column_fields['mailingcity'];
$focus->column_fields['ship_city'] = $cto_focus->column_fields['othercity'];
$focus->column_fields['bill_street'] = $cto_focus->column_fields['mailingstreet'];
$focus->column_fields['ship_street'] = $cto_focus->column_fields['otherstreet'];
$focus->column_fields['bill_state'] = $cto_focus->column_fields['mailingstate'];
$focus->column_fields['ship_state'] = $cto_focus->column_fields['otherstate'];
$focus->column_fields['bill_code'] = $cto_focus->column_fields['mailingcode'];
$focus->column_fields['ship_code'] = $cto_focus->column_fields['othercode'];
$focus->column_fields['bill_country'] = $cto_focus->column_fields['mailingcountry'];
$focus->column_fields['ship_country'] = $cto_focus->column_fields['othercountry'];
$focus->column_fields['bill_pobox'] = $cto_focus->column_fields['mailingpobox'];
$focus->column_fields['ship_pobox'] = $cto_focus->column_fields['otherpobox'];
}
$disp_view = getView($focus->mode);
$smarty->assign('BLOCKS', getBlocks($currentModule, $disp_view, $focus->mode, $focus->column_fields));
示例7: GetContactRecord
/**
* Get Contact record information based on email.
*/
function GetContactRecord($email)
{
require_once 'modules/Contacts/Contacts.php';
$contactid = $this->LookupContact($email);
$contact_focus = false;
if ($contactid) {
if ($this->_cachedContacts[$contactid]) {
$contact_focus = $this->_cachedContacts[$contactid];
$this->log("Reusing Cached Contact [" . $contact_focus->column_fields[lastname] . '-' . $contact_focus->column_fields[firstname] . "]");
} else {
$contact_focus = new Contacts();
$contact_focus->retrieve_entity_info($contactid, 'Contacts');
$contact_focus->id = $contactid;
$this->log("Caching Contact [" . $contact_focus->column_fields[lastname] . '-' . $contact_focus->column_fields[firstname] . "]");
$this->_cachedContacts[$contactid] = $contact_focus;
}
}
return $contact_focus;
}
示例8: getMergedDescription
$pmodule = 'Users';
$description = getMergedDescription($_REQUEST['description'], $mycrmid, $pmodule);
$mail_status = send_mail('Emails', $emailadd, $from_name, $from_address, $_REQUEST['subject'], $description, '', '', 'all', $focus->id);
$all_to_emailids[] = $emailadd;
$mail_status_str .= $emailadd . "=" . $mail_status . "&&&";
} else {
//Send mail to vtiger_account or lead or contact based on their ids
$pmodule = getSalesEntityType($mycrmid);
for ($j = 1; $j < $nemail; $j++) {
$temp = $realid[$j];
$myquery = 'Select columnname from vtiger_field where fieldid = ? and vtiger_field.presence in (0,2)';
$fresult = $adb->pquery($myquery, array($temp));
if ($pmodule == 'Contacts') {
require_once 'modules/Contacts/Contacts.php';
$myfocus = new Contacts();
$myfocus->retrieve_entity_info($mycrmid, "Contacts");
} elseif ($pmodule == 'Accounts') {
require_once 'modules/Accounts/Accounts.php';
$myfocus = new Accounts();
$myfocus->retrieve_entity_info($mycrmid, "Accounts");
} elseif ($pmodule == 'Leads') {
require_once 'modules/Leads/Leads.php';
$myfocus = new Leads();
$myfocus->retrieve_entity_info($mycrmid, "Leads");
} elseif ($pmodule == 'Vendors') {
require_once 'modules/Vendors/Vendors.php';
$myfocus = new Vendors();
$myfocus->retrieve_entity_info($mycrmid, "Vendors");
} else {
// vtlib customization: Enabling mail send from other modules
$myfocus = CRMEntity::getInstance($pmodule);
示例9: UpdateContacts
function UpdateContacts($username, $session, $cntdtls)
{
if (!validateSession($username, $session)) {
return null;
}
global $adb;
global $current_user;
require_once 'modules/Users/Users.php';
require_once 'modules/Contacts/Contacts.php';
$seed_user = new Users();
$user_id = $seed_user->retrieve_user_id($username);
$current_user = $seed_user;
$current_user->retrieve_entity_info($user_id, "Users");
$contact = new Contacts();
require 'user_privileges/user_privileges_' . $current_user->id . '.php';
require 'user_privileges/sharing_privileges_' . $current_user->id . '.php';
if ($is_admin == true || $profileGlobalPermission[1] == 0 || $profileGlobalPermission[2] == 0) {
$sql1 = "select fieldname,columnname from vtiger_field where tabid=4 and vtiger_field.presence in (0,2)";
$params1 = array();
} else {
$profileList = getCurrentUserProfileList();
$sql1 = "select fieldname,columnname from vtiger_field inner join vtiger_profile2field on vtiger_profile2field.fieldid=vtiger_field.fieldid inner join vtiger_def_org_field on vtiger_def_org_field.fieldid=vtiger_field.fieldid where vtiger_field.tabid=4 and vtiger_field.displaytype in (1,2,4,3) and vtiger_profile2field.visible=0 and vtiger_def_org_field.visible=0 and vtiger_field.presence in (0,2)";
$params1 = array();
if (count($profileList) > 0) {
$sql1 .= " and vtiger_profile2field.profileid in (" . generateQuestionMarks($profileList) . ")";
array_push($params1, $profileList);
}
}
$result1 = $adb->pquery($sql1, $params1);
for ($i = 0; $i < $adb->num_rows($result1); $i++) {
$permitted_lists[] = $adb->query_result($result1, $i, 'fieldname');
}
foreach ($cntdtls as $cntrow) {
if (isset($cntrow)) {
$contact->retrieve_entity_info($cntrow["id"], "Contacts");
$contact->column_fields[salutationtype] = in_array('salutationtype', $permitted_lists) ? $cntrow["title"] : "";
$contact->column_fields[firstname] = in_array('firstname', $permitted_lists) ? $cntrow["firstname"] : "";
if ($cntrow["middlename"] != "") {
$contact->column_fields[lastname] = $cntrow["middlename"] . " " . $cntrow["lastname"];
} elseif ($cntrow["lastname"] != "") {
$contact->column_fields[lastname] = $cntrow["lastname"];
} else {
$contact->column_fields[lastname] = $cntrow["firstname"] . " " . $cntrow["middlename"] . " " . $cntrow["lastname"];
}
$contact->column_fields[birthday] = in_array('birthday', $permitted_lists) ? getDisplayDate($cntrow["birthdate"]) : "";
$contact->column_fields[email] = in_array('email', $permitted_lists) ? $cntrow["emailaddress"] : "";
$contact->column_fields[title] = in_array('title', $permitted_lists) ? $cntrow["jobtitle"] : "";
$contact->column_fields[department] = in_array('department', $permitted_lists) ? $cntrow["department"] : "";
$contact->column_fields[account_id] = in_array('account_id', $permitted_lists) ? retrieve_account_id($cntrow["accountname"], $user_id) : "";
$contact->column_fields[phone] = in_array('phone', $permitted_lists) ? $cntrow["officephone"] : "";
$contact->column_fields[homephone] = in_array('homephone', $permitted_lists) ? $cntrow["homephone"] : "";
$contact->column_fields[otherphone] = in_array('otherphone', $permitted_lists) ? $cntrow["otherphone"] : "";
$contact->column_fields[fax] = in_array('fax', $permitted_lists) ? $cntrow["fax"] : "";
$contact->column_fields[mobile] = in_array('mobile', $permitted_lists) ? $cntrow["mobile"] : "";
$contact->column_fields[assistant] = in_array('assistant', $permitted_lists) ? $cntrow["asstname"] : "";
$contact->column_fields[assistantphone] = in_array('assistantphone', $permitted_lists) ? $cntrow["asstphone"] : "";
//$contact->column_fields[reports_to_id] =retrievereportsto($reportsto,$user_id,$account_id);// NOT FIXED IN SAVEENTITY.PHP
$contact->column_fields[mailingstreet] = in_array('mailingstreet', $permitted_lists) ? $cntrow["mailingstreet"] : "";
$contact->column_fields[mailingcity] = in_array('mailingcity', $permitted_lists) ? $cntrow["mailingcity"] : "";
$contact->column_fields[mailingstate] = in_array('mailingstate', $permitted_lists) ? $cntrow["mailingstate"] : "";
$contact->column_fields[mailingzip] = in_array('mailingzip', $permitted_lists) ? $cntrow["mailingzip"] : "";
$contact->column_fields[mailingcountry] = in_array('mailingcountry', $permitted_lists) ? $cntrow["mailingcountry"] : "";
$contact->column_fields[otherstreet] = in_array('otherstreet', $permitted_lists) ? $cntrow["otherstreet"] : "";
$contact->column_fields[othercity] = in_array('othercity', $permitted_lists) ? $cntrow["othercity"] : "";
$contact->column_fields[otherstate] = in_array('otherstate', $permitted_lists) ? $cntrow["otherstate"] : "";
$contact->column_fields[otherzip] = in_array('otherzip', $permitted_lists) ? $cntrow["otherzip"] : "";
$contact->column_fields[othercountry] = in_array('othercountry', $permitted_lists) ? $cntrow["othercountry"] : "";
$contact->column_fields[assigned_user_id] = in_array('assigned_user_id', $permitted_lists) ? $user_id : "";
$contact->column_fields[description] = in_array('description', $permitted_lists) ? $cntrow["description"] : "";
$contact->id = $cntrow["id"];
$contact->mode = "edit";
//saving date information in 'yyyy-mm-dd' format and displaying it in user's date format
$user_old_date_format = $current_user->date_format;
$current_user->date_format = 'yyyy-mm-dd';
$contact->save("Contacts");
$current_user->date_format = $user_old_date_format;
}
}
$contact = $contact;
return $contact->id;
}
示例10: getOutputHtml
//.........这里部分代码省略.........
if (empty($pmodule)) {
$pmodule = $_REQUEST['par_module'];
}
if ($pmodule == 'Contacts') {
$contact_selected = 'selected';
} elseif ($pmodule == 'Accounts') {
$account_selected = 'selected';
} elseif ($pmodule == 'Leads') {
$lead_selected = 'selected';
} elseif ($pmodule == 'Vendors') {
$vendor_selected = 'selected';
} elseif ($pmodule == 'Users') {
$user_selected = 'selected';
} elseif ($pmodule == 'Project') {
$project_selected = 'selected';
} elseif ($pmodule == 'ProjectTask') {
$projecttask_selected = 'selected';
} elseif ($pmodule == 'Potentials') {
$potentials_selected = 'selected';
} elseif ($pmodule == 'HelpDesk') {
$helpdesk_selected = 'selected';
}
if (isset($_REQUEST['emailids']) && $_REQUEST['emailids'] != '') {
$parent_id = $_REQUEST['emailids'];
$parent_name = '';
$myids = explode("|", $parent_id);
for ($i = 0; $i < count($myids) - 1; $i++) {
$realid = explode("@", $myids[$i]);
$entityid = $realid[0];
$nemail = count($realid);
if ($pmodule == 'Accounts') {
require_once 'modules/Accounts/Accounts.php';
$myfocus = new Accounts();
$myfocus->retrieve_entity_info($entityid, "Accounts");
$fullname = br2nl($myfocus->column_fields['accountname']);
$account_selected = 'selected';
} elseif ($pmodule == 'Contacts') {
require_once 'modules/Contacts/Contacts.php';
$myfocus = new Contacts();
$myfocus->retrieve_entity_info($entityid, "Contacts");
$fname = br2nl($myfocus->column_fields['firstname']);
$lname = br2nl($myfocus->column_fields['lastname']);
$fullname = $lname . ' ' . $fname;
$contact_selected = 'selected';
} elseif ($pmodule == 'Leads') {
require_once 'modules/Leads/Leads.php';
$myfocus = new Leads();
$myfocus->retrieve_entity_info($entityid, "Leads");
$fname = br2nl($myfocus->column_fields['firstname']);
$lname = br2nl($myfocus->column_fields['lastname']);
$fullname = $lname . ' ' . $fname;
$lead_selected = 'selected';
} elseif ($pmodule == 'Project') {
require_once 'modules/Project/Project.php';
$myfocus = new Project();
$myfocus->retrieve_entity_info($entityid, "Project");
$fname = br2nl($myfocus->column_fields['projectname']);
$lname = br2nl($myfocus->column_fields['projectid']);
$fullname = $fname;
$project_selected = 'selected';
} elseif ($pmodule == 'ProjectTask') {
require_once 'modules/ProjectTask/ProjectTask.php';
$myfocus = new ProjectTask();
$myfocus->retrieve_entity_info($entityid, "ProjectTask");
$fname = br2nl($myfocus->column_fields['projecttaskname']);
$lname = br2nl($myfocus->column_fields['projecttaskid']);
示例11: Contacts
$ajaxaction = $_REQUEST["ajxaction"];
if ($ajaxaction == "DETAILVIEW") {
$crmid = $_REQUEST["recordid"];
$tablename = $_REQUEST["tableName"];
$fieldname = $_REQUEST["fldName"];
$fieldvalue = utf8RawUrlDecode($_REQUEST["fieldValue"]);
if ($crmid != "") {
if ((!isset($is_disable_approve) || isset($is_disable_approve) && !$is_disable_approve) && (isset($module_enable_approve) && $module_enable_approve)) {
$sql = "select approved from ec_contacts where deleted=0 and contactsid='" . $crmid . "'";
$result = $adb->query($sql);
$approved = $adb->query_result($result, 0, "approved");
if ($approved == 1) {
echo ":#:FAILURE";
die;
}
}
$modObj = new Contacts();
$modObj->retrieve_entity_info($crmid, "Contacts");
$modObj->column_fields[$fieldname] = $fieldvalue;
$modObj->id = $crmid;
$modObj->mode = "edit";
$modObj->save("Contacts");
if ($modObj->id != "") {
echo ":#:SUCCESS";
} else {
echo ":#:FAILURE";
}
} else {
echo ":#:FAILURE";
}
}
示例12: Contacts
$ACCOUNT_CITY = $account_focus->column_fields["bill_city"];
$ACCOUNT_STATE = $account_focus->column_fields["bill_state"];
$ACCOUNT_CODE = $account_focus->column_fields["bill_code"];
} else {
$ACCOUNT_PHONE = "";
$ACCOUNT_NAME = "";
$ACCOUNT_FAX = "";
$ACCOUNT_STREET = "";
$ACCOUNT_CITY = "";
$ACCOUNT_STATE = "";
$ACCOUNT_CODE = "";
}
$contact_id = $focus->column_fields['contact_id'];
if (!empty($contact_id)) {
$contact_focus = new Contacts();
$contact_focus->retrieve_entity_info($contact_id, "Contacts");
foreach ($contact_focus->column_fields as $key => $value) {
$upperKey = "CONTACT_" . strtoupper($key);
${$upperKey} = $value;
}
$CONTACT_MOBILE = $contact_focus->column_fields["mobile"];
$CONTACT_PHONE = $contact_focus->column_fields["phone"];
$CONTACT_NAME = $contact_focus->column_fields["lastname"];
$CONTACT_EMAIL = $contact_focus->column_fields["email"];
} else {
$CONTACT_NAME = "";
//getContactName($contact_id);
$CONTACT_EMAIL = "";
//getContactPhone($contact_id);
$CONTACT_MOBILE = "";
//getContactMBPhone($contact_id);
示例13: redirect
<?php
require_once 'include/CRMSmarty.php';
require_once 'modules/Contacts/Contacts.php';
require_once 'include/utils/utils.php';
//Redirecting Header for single page layout
require_once 'user_privileges/default_module_view.php';
global $singlepane_view;
if ($singlepane_view == 'true' && $_REQUEST['action'] == 'CallRelatedList') {
redirect("index.php?action=DetailView&module=" . $_REQUEST['module'] . "&record=" . $_REQUEST['record'] . "&parenttab=" . $_REQUEST['parenttab']);
} else {
$focus = new Contacts();
$currentmodule = $_REQUEST['module'];
$RECORD = $_REQUEST['record'];
if (isset($_REQUEST['record']) && $_REQUEST['record'] != '') {
$focus->retrieve_entity_info($_REQUEST['record'], "Contacts");
$focus->id = $_REQUEST['record'];
$focus->contactname = $focus->column_fields['contactname'];
$log->debug("id is " . $focus->id);
$log->debug("name is " . $focus->name);
}
global $mod_strings;
global $app_strings;
global $theme;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
$smarty = new CRMSmarty();
if (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
$focus->id = "";
}
if (isset($_REQUEST['mode']) && $_REQUEST['mode'] != ' ') {
示例14: explode
$return_action = $_REQUEST['return_action'];
global $rstart;
//Added to fix 4600
$url = getBasic_Advance_SearchURL();
if (isset($_REQUEST['start']) && $_REQUEST['start'] != '') {
$rstart = "&start=" . $_REQUEST['start'];
}
$quickedit_field = $_REQUEST['quickedit_field'];
$quickedit_value = $_REQUEST['quickedit_value'];
global $log;
$log->info("quickedit_field=" . $quickedit_field . ",quickedit_value=" . $quickedit_value);
if (isset($idlist)) {
$recordids = explode(';', $idlist);
$_REQUEST['ajxaction'] = "DETAILVIEW";
for ($index = 0; $index < count($recordids); ++$index) {
$recordid = $recordids[$index];
$log->info("recordid=" . $recordid);
if ($recordid == '') {
continue;
}
// Save each module record with update value.
$focus = new Contacts();
$focus->retrieve_entity_info($recordid, 'Contacts');
$focus->mode = 'edit';
$focus->id = $recordid;
$focus->column_fields[$quickedit_field] = $quickedit_value;
$focus->save('Contacts');
// END
}
}
redirect("index.php?module={$return_module}&action=" . $return_module . "Ajax&file=ListView&ajax=changestate" . $rstart . "&viewname=" . $viewid . "&errormsg=" . $errormsg . $url);