本文整理汇总了PHP中getCampaignName函数的典型用法代码示例。如果您正苦于以下问题:PHP getCampaignName函数的具体用法?PHP getCampaignName怎么用?PHP getCampaignName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getCampaignName函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 . '}';
}
}
示例2: 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 . '}';
}
}
示例3: getAdditionalInfoFromBD
function getAdditionalInfoFromBD($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->email_address = getEmail($obj->id);
$obj->campaign_name = 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 . '}';
}
}
示例4: getCliente
function getCliente($idCliente)
{
//Realiza el query en la base de datos
$mysqli = makeSqlConnection();
$sql = "SELECT * FROM leads a LEFT JOIN leads_cstm ac ON a.id = ac.id_c WHERE id = '{$idCliente}'";
//$sql = "SELECT id,first_name,last_name FROM leads";
$res = $mysqli->query($sql);
$rows = array();
while ($r = mysqli_fetch_assoc($res)) {
$obj = (object) $r;
$obj->email_address = getEmail($idCliente);
$obj->campaign_name = getCampaignName($obj->campaign_id);
$obj->assigned_user_name = getUserName($obj->assigned_user_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 . '}';
}
}
示例5: 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 . '}';
}
}
示例6: x10
private function x10($x92, $x93, $x94 = false, $x95 = false)
{
global $x15d, $x15e, $x15f, $x160, $x161, $x162, $x163, $x164, $x165, $x166, $x167, $x168, $x169, $x16a, $x16b, $x16c, $x16d, $x16e, $x16f, $x170, $x171, $x172, $x173, $x174, $x175, $x176, $x177, $x178;
$x96 = Users_Record_Model::getCurrentUserModel();
$x97 = array("related_to", "relatedto", "parent_id", "parentid", "product_id", "productid", "service_id", "serviceid", "vendor_id", "product", "account", "invoiceid", "linktoaccountscontacts", "projectid", "sc_related_to");
if ($x95 !== false) {
$x98 = array();
}
$x51 = getTabid($x92);
$x99 = $x92;
if ($x94 === false) {
$x9a = "";
} else {
$x9a = "R_";
if ($x94 !== true) {
$x99 = $x94;
}
}
$x9b = array();
$x9c = array();
$x9d = array();
$x9e = array();
$x9f = array();
$xa0 = array();
$xa1 = array();
if ($x51 == '9') {
$x3d = "SELECT fieldname, uitype FROM vtiger_field WHERE tabid IN (9,16)";
} else {
$x3d = "SELECT fieldname, uitype FROM vtiger_field WHERE tabid = '" . $x51 . "'";
}
$x3e = self::$x0f->query($x3d);
while ($x42 = self::$x0f->fetchByAssoc($x3e)) {
switch ($x42['uitype']) {
case '19':
case '20':
case '21':
case '24':
$x9d[] = $x42['fieldname'];
break;
case '5':
case '6':
case '23':
case '70':
$x9e[] = $x42['fieldname'];
break;
case '15':
$x9c[] = $x42['fieldname'];
break;
case '56':
$x9b[] = $x42['fieldname'];
break;
case '33':
$x9f[] = $x42['fieldname'];
break;
case '71':
$xa0[] = $x42['fieldname'];
break;
case '9':
$xa1[] = $x42['fieldname'];
break;
}
if ($x42["fieldname"] == "salutationtype") {
$x9c[] = $x42["fieldname"];
}
}
foreach ($x93->column_fields as $xa2 => $x83) {
if ($xa2 == "assigned_user_id") {
$x83 = $this->x1e($x83);
} elseif ($xa2 == "account_id") {
$x83 = getAccountName($x83);
} elseif ($xa2 == "potential_id") {
$x83 = getPotentialName($x83);
} elseif ($xa2 == "contact_id") {
$x83 = getContactName($x83);
} elseif ($xa2 == "quote_id") {
$x83 = getQuoteName($x83);
} elseif ($xa2 == "salesorder_id") {
$x83 = getSoName($x83);
} elseif ($xa2 == "campaignid") {
$x83 = getCampaignName($x83);
} elseif ($xa2 == "terms_conditions") {
$x83 = $this->x25($x83);
} elseif ($xa2 == "comments") {
$x83 = $this->x26($x93);
} elseif ($xa2 == "folderid") {
$x83 = $this->x27($x83);
} elseif ($xa2 == "time_start" || $xa2 == "time_end") {
$xa3 = DateTimeField::convertToUserTimeZone($x83);
$x83 = $xa3->format('H:i');
} elseif ($x168($xa2, $x97)) {
if ($x83 != "") {
$xa4 = getSalesEntityType($x83);
$xa5 = getEntityName($xa4, $x83);
if (!empty($xa5)) {
foreach ($xa5 as $xa6) {
$x83 = $xa6;
}
}
if ($xa2 == "invoiceid" && $x83 == "0") {
$x83 = "";
//.........这里部分代码省略.........
示例7: getDuplicateRecordsArr
//.........这里部分代码省略.........
}
$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 != '') {
$result[$col_arr[$k]] = $product_name;
} else {
$result[$col_arr[$k]] = '';
}
}
/*uitype 10 handling*/
if ($ui_type[$fld_arr[$k]] == 10) {
$result[$col_arr[$k]] = getRecordInfoFromID($result[$col_arr[$k]]);
}
if ($ui_type[$fld_arr[$k]] == 5 || $ui_type[$fld_arr[$k]] == 6 || $ui_type[$fld_arr[$k]] == 23) {
if (${$result}[$col_arr[$k]] != '' && ${$result}[$col_arr[$k]] != '0000-00-00') {
$date = new DateTimeField(${$result}[$col_arr[$k]]);
$value = $date->getDisplayDate();
if (strpos(${$result}[$col_arr[$k]], ' ') > -1) {
$value .= ' ' . $date->getDisplayTime();
}
} elseif (${$result}[$col_arr[$k]] == '0000-00-00') {
$value = '';
} else {
$value = ${$result}[$col_arr[$k]];
}
$result[$col_arr[$k]] = $value;
}
if ($ui_type[$fld_arr[$k]] == 71) {
$result[$col_arr[$k]] = CurrencyField::convertToUserFormat($result[$col_arr[$k]]);
}
if ($ui_type[$fld_arr[$k]] == 72) {
$result[$col_arr[$k]] = CurrencyField::convertToUserFormat($result[$col_arr[$k]], null, true);
}
$fld_values[$grp][$ii][$fld_labl_arr[$k]] = $result[$col_arr[$k]];
}
$fld_values[$grp][$ii]['Entity Type'] = $result['deleted'];
$ii++;
$rec_cnt++;
}
$gro = "group";
for ($i = 0; $i < $no_rows; $i++) {
$ii = 0;
$dis_group[] = $fld_values[$gro . $i][$ii];
$count_group[$i] = count($fld_values[$gro . $i]);
$ii++;
$new_group[] = $dis_group[$i];
}
$fld_nam = $new_group[0];
$ret_arr[0] = $fld_values;
$ret_arr[1] = $fld_nam;
$ret_arr[2] = $ui_type;
$ret_arr["navigation"] = $navigationOutput;
return $ret_arr;
}
示例8: getOutputHtml
//.........这里部分代码省略.........
$fieldvalue[] = $is_admin;
} elseif ($uitype == 56) {
$editview_label[] = getTranslatedString($fieldlabel, $module_name);
$fieldvalue[] = $value;
} elseif ($uitype == 57) {
if ($value != '') {
$displayValueArray = getEntityName('Contacts', $value);
if (!empty($displayValueArray)) {
foreach ($displayValueArray as $key => $field_value) {
$contact_name = $field_value;
}
}
} elseif (isset($_REQUEST['contact_id']) && $_REQUEST['contact_id'] != '') {
if ($_REQUEST['module'] == 'Contacts' && ($fieldname = 'contact_id')) {
$contact_name = '';
} else {
$value = $_REQUEST['contact_id'];
$displayValueArray = getEntityName('Contacts', $value);
if (!empty($displayValueArray)) {
foreach ($displayValueArray as $key => $field_value) {
$contact_name = $field_value;
}
} else {
$contact_name = '';
}
}
}
//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;
}
if ($module_name == 'Emails' && $col_fields['record_id'] != '') {
$attach_result = $adb->pquery("select * from vtiger_seattachmentsrel where crmid = ?", array($col_fields['record_id']));
//to fix the issue in mail attachment on forwarding mails
if (isset($_REQUEST['forward']) && $_REQUEST['forward'] != '') {
global $att_id_list;
}
for ($ii = 0; $ii < $adb->num_rows($attach_result); $ii++) {
$attachmentid = $adb->query_result($attach_result, $ii, 'attachmentsid');
if ($attachmentid != '') {
$attachquery = "select * from vtiger_attachments where attachmentsid=?";
$attachmentsname = $adb->query_result($adb->pquery($attachquery, array($attachmentid)), 0, 'name');
if ($attachmentsname != '') {
$fieldvalue[$attachmentid] = '[ ' . $attachmentsname . ' ]';
}
if (isset($_REQUEST['forward']) && $_REQUEST['forward'] != '') {
示例9: sendDeclinedMailToEntrepreneur
function sendDeclinedMailToEntrepreneur($funding_details_id, $fund_amount, $funder_id)
{
$from_address = FROM_EMAIL_ADDRESS;
$cc_address = SIVI_ADMIN_EMAIL;
global $eID, $aID, $application_fee;
$stripe_fee = 3 + $application_fee;
$server = '//' . $_SERVER['HTTP_HOST'];
list($first_name, $last_name, $username, $email, $pmode) = getAccountDetails($aID);
$campaign_name = getCampaignName($eID);
list($funder_name, $email) = getFullName($funder_id);
$to = $email;
$name_of_project = getProjectName($aID);
#$name_of_campaign
$subject = "Unable To Process Funding for Your {$campaign_name} Campaign on LaunchLeader";
$message = "<html><body>\n Hi {$first_name},<br>\n <br>\n The good news is that your {$campaign_name} for <a href=\"{$server}/profile?u={$username}&pmode={$pmode}\">{$name_of_project}</a> just successfully reached its<br>\n funding goal on LaunchLeader.<br>\n <br>\n\n The bad news is that <br>we are unable to process the following donations because the donor’s credit card has been declined by his/her bank.</b><br>\n This could be due to a variety of reasons such as changes with the card information or passing the expiration date.<br>\n <br>\n -- {$funder_name}, Amount pledged \${$fund_amount} USD<br>\n\n <br>\n Thanks,<br>\n <br>\n The LaunchLeader Team\n </body></html>\n ";
// 'Reply-To: webmaster@example.com' . "\r\n" .
$headers = "From: {$from_address}" . "\r\n";
$headers .= "X-Mailer: PHP/" . phpversion() . "\r\n";
if ($cc_address != "") {
$headers .= "CC: {$cc_address}\r\n";
}
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
mail($to, $subject, $message, $headers);
}
示例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) {
//.........这里部分代码省略.........
示例11: getRecordValues
/** To get the converted record values which have to be display in duplicates merging tpl*/
function getRecordValues($id_array, $module)
{
global $adb, $current_user;
global $app_strings;
global $mod_strings;
$tabid = getTabid($module);
$query = "select fieldname,fieldlabel from ec_field where tabid=" . $tabid . " and fieldname not in ('createdtime','modifiedtime')";
$result = $adb->query($query);
$no_rows = $adb->num_rows($result);
for ($i = 0; $i < $no_rows; $i++) {
$fld_name = $adb->query_result($result, $i, "fieldname");
if (getFieldVisibilityPermission($module, $current_user->id, $fld_name) == '0') {
$fld_array[] = $fld_name;
}
}
$js_arr = $fld_array;
$focus = new $module();
if (isset($id_array) && $id_array != '') {
foreach ($id_array as $value) {
$focus->id = $value;
$focus->retrieve_entity_info($value, $module);
$field_values[] = $focus->column_fields;
}
}
$tabid = getTabid($module);
$query = "select fieldname,uitype,fieldlabel from ec_field where tabid=" . $tabid . " and fieldname not in ('createdtime','modifiedtime','lastcontacttime')";
$result = $adb->query($query);
$no_rows = $adb->num_rows($result);
$labl_array = array();
$value_pair = array();
$c = 0;
for ($i = 0; $i < $no_rows; $i++) {
$fld_name = $adb->query_result($result, $i, "fieldname");
$fld_label = $adb->query_result($result, $i, "fieldlabel");
if (isset($mod_strings[$fld_label])) {
$fld_label = $mod_strings[$fld_label];
}
$ui_type = $adb->query_result($result, $i, "uitype");
if (getFieldVisibilityPermission($module, $current_user->id, $fld_name) == '0') {
$record_values[$c][$fld_label] = array();
$ui_value[] = $ui_type;
for ($j = 0; $j < count($field_values); $j++) {
if ($ui_type == 56) {
if ($field_values[$j][$fld_name] == 0) {
$value_pair['disp_value'] = $app_strings['no'];
} else {
$value_pair['disp_value'] = $app_strings['yes'];
}
} elseif ($ui_type == 51 || $ui_type == 50) {
$account_id = $field_values[$j][$fld_name];
$account_name = getAccountName($account_id);
$value_pair['disp_value'] = $account_name;
} elseif ($ui_type == 53) {
$user_id = $field_values[$j][$fld_name];
$username = getUserName($user_id);
$group_info = getGroupName($field_values[$j]['record_id'], $module);
$groupname = $group_info[0];
$groupid = $group_info[1];
if ($user_id != 0) {
$value_pair['disp_value'] = $username;
} else {
$value_pair['disp_value'] = $groupname;
}
} elseif ($ui_type == 57) {
$contact_id = $field_values[$j][$fld_name];
if ($contact_id != '') {
$contactname = getContactName($contact_id);
}
$value_pair['disp_value'] = $contactname;
} elseif ($ui_type == 75 || $ui_type == 81) {
$vendor_id = $field_values[$j][$fld_name];
if ($vendor_id != '') {
$vendor_name = getVendorName($vendor_id);
}
$value_pair['disp_value'] = $vendor_name;
} elseif ($ui_type == 52) {
$user_id = $field_values[$j][$fld_name];
$user_name = getUserName($user_id);
$value_pair['disp_value'] = $user_name;
} elseif ($ui_type == 68) {
$parent_id = $field_values[$j][$fld_name];
$value_pair['disp_value'] = getAccountName($parent_id);
if ($value_pair['disp_value'] == '' || $value_pair['disp_value'] == NULL) {
$value_pair['disp_value'] = getContactName($parent_id);
}
} elseif ($ui_type == 59) {
$product_name = getProductName($field_values[$j][$fld_name]);
if ($product_name != '') {
$value_pair['disp_value'] = $product_name;
} else {
$value_pair['disp_value'] = '';
}
} elseif ($ui_type == 58) {
$campaign_name = getCampaignName($field_values[$j][$fld_name]);
if ($campaign_name != '') {
$value_pair['disp_value'] = $campaign_name;
} else {
$value_pair['disp_value'] = '';
}
//.........这里部分代码省略.........
示例12: date
$eID = $row1['element_id'];
$todate = date("Y-m-d H:i:s");
$daydiff = $default_milestone + 1 - floor((strtotime($todate) - strtotime($funding_milestones_datetime)) / (3600 * 24));
list($campaignAmount, $campaignRaised) = getCampaignAmount($eID, $aID);
if ($campaignRaised < $campaignAmount && $daydiff <= 0) {
## Campaign Failed
$result2 = mysql_query("select funding_details_id, account_funder_id, fund_amount from funding_details where element_id='{$eID}' AND account_id = '{$aID}'") or die("mysql error @ ___");
while ($row2 = mysql_fetch_array($result2)) {
$funding_details_id = $row2['funding_details_id'];
$account_funder_id = $row2['account_funder_id'];
$fund_amount = $row2['fund_amount'];
#$funding_details_datetime= $row2['funding_details_datetime'];
list($fullName, $email) = getDonorFullName($account_funder_id);
sendMailToDonor($fullName, $email, $fund_amount / 100, $aID, getCampaignName($eID));
}
sendMailToEntrepreneur('', $email, $campaignRaised, $aID, getCampaignName($eID));
$result = mysql_query("UPDATE funding_milestones SET funding_failure_emailed = '1' WHERE funding_milestones_id = '{$funding_milestones_id}' ") or die("mysql error updating funding_milestones_mailed");
} else {
##Successful Campaign
continue;
}
}
}
function sendMailToDonor($fullName, $email, $amount, $userid, $campaign_name)
{
$from_address = FROM_EMAIL_ADDRESS;
$bcc_address = SIVI_ADMIN_EMAIL;
$to = $email;
global $funding_for;
$server = 'https://' . $_SERVER['HTTP_HOST'];
list($first_name, $last_name, $username, $account_email) = getAccountDetails($userid);
示例13: getDetailViewOutputHtml
//.........这里部分代码省略.........
$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 == 154) {
$label_fld[] = $mod_strings[$fieldlabel];
$cangkusid = $col_fields[$fieldname];
$cangkuname = "";
if (trim($cangkusid) != '') {
$cangkuname = getCangkuName($cangkusid);
}
$label_fld[] = $cangkuname;
$label_fld["secid"] = $cangkusid;
$label_fld["link"] = "index.php?module=Cangkus&action=DetailView&record=" . $cangkusid;
} elseif ($uitype == 155) {
$label_fld[] = $mod_strings[$fieldlabel];
$cangkusid = $col_fields[$fieldname];
$cangkuname = "";
if (trim($cangkusid) != '') {
$cangkuname = getCangkuName($cangkusid);
}
$label_fld[] = $cangkuname;
$label_fld["secid"] = $cangkusid;
// $label_fld["link"] = "index.php?module=Cangkus&action=DetailView&record=".$cangkusid;
} elseif ($uitype == 58) {
$label_fld[] = $mod_strings[$fieldlabel];
$campaign_id = $col_fields[$fieldname];
if ($campaign_id != '') {
$campaign_name = getCampaignName($campaign_id);
}
$label_fld[] = $campaign_name;
$label_fld["secid"] = $campaign_id;
$label_fld["link"] = "index.php?module=Campaigns&action=DetailView&record=" . $campaign_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 == 61) {
global $adb;
$label_fld[] = $mod_strings[$fieldlabel];
if ($tabid == 10) {
$attach_result = $adb->query("select * from ec_seattachmentsrel where crmid = " . $col_fields['record_id']);
for ($ii = 0; $ii < $adb->num_rows($attach_result); $ii++) {
$attachmentid = $adb->query_result($attach_result, $ii, 'attachmentsid');
if ($attachmentid != '') {
$attachquery = "select * from ec_attachments where attachmentsid=" . $attachmentid;
$result = $adb->query($attachquery);
$attachmentsname = $adb->query_result($result, 0, 'name');
if ($attachmentsname != '') {
$custfldval = '<a href = "index.php?module=uploads&action=downloadfile&return_module=' . $col_fields['record_module'] . '&fileid=' . $attachmentid . '&entityid=' . $col_fields['record_id'] . '">' . $attachmentsname . '</a>';
} else {
$custfldval = '';
}
}
$label_fld['options'][] = $custfldval;
示例14: getDetailViewOutputHtml
//.........这里部分代码省略.........
$displayValue = $app_strings['no'];
}
$label_fld[] = $displayValue;
} elseif ($uitype == 156) {
$label_fld[] = getTranslatedString($fieldlabel, $module);
$value = $col_fields[$fieldname];
if ($value == 'on') {
//Since "yes" is not been translated it is given as app strings here..
$displayValue = $app_strings['yes'];
} else {
$displayValue = $app_strings['no'];
}
$label_fld[] = $displayValue;
} elseif ($uitype == 57) {
$label_fld[] = getTranslatedString($fieldlabel, $module);
$contact_id = $col_fields[$fieldname];
if ($contact_id != '') {
$displayValueArray = getEntityName('Contacts', $contact_id);
if (!empty($displayValueArray)) {
foreach ($displayValueArray as $key => $field_value) {
$contact_name = $field_value;
}
} else {
$contact_name = '';
}
}
$label_fld[] = $contact_name;
$label_fld["secid"] = $contact_id;
$label_fld["link"] = "index.php?module=Contacts&action=DetailView&record=" . $contact_id;
} elseif ($uitype == 58) {
$label_fld[] = getTranslatedString($fieldlabel, $module);
$campaign_id = $col_fields[$fieldname];
if ($campaign_id != '') {
$campaign_name = getCampaignName($campaign_id);
}
$label_fld[] = $campaign_name;
$label_fld["secid"] = $campaign_id;
$label_fld["link"] = "index.php?module=Campaigns&action=DetailView&record=" . $campaign_id;
} elseif ($uitype == 59) {
$label_fld[] = getTranslatedString($fieldlabel, $module);
$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 == 61) {
global $adb;
$label_fld[] = getTranslatedString($fieldlabel, $module);
if ($tabid == 10) {
$attach_result = $adb->pquery("select * from vtiger_seattachmentsrel where crmid = ?", array($col_fields['record_id']));
for ($ii = 0; $ii < $adb->num_rows($attach_result); $ii++) {
$attachmentid = $adb->query_result($attach_result, $ii, 'attachmentsid');
if ($attachmentid != '') {
$attachquery = "select * from vtiger_attachments where attachmentsid=?";
$attachmentsname = $adb->query_result($adb->pquery($attachquery, array($attachmentid)), 0, 'name');
if ($attachmentsname != '') {
$custfldval = '<a href = "index.php?module=uploads&action=downloadfile&return_module=' . $col_fields['record_module'] . '&fileid=' . $attachmentid . '&entityid=' . $col_fields['record_id'] . '">' . $attachmentsname . '</a>';
} else {
$custfldval = '';
}
}
$label_fld['options'][] = $custfldval;
}