当前位置: 首页>>代码示例>>PHP>>正文


PHP astercrm::getCustomerByID方法代码示例

本文整理汇总了PHP中astercrm::getCustomerByID方法的典型用法代码示例。如果您正苦于以下问题:PHP astercrm::getCustomerByID方法的具体用法?PHP astercrm::getCustomerByID怎么用?PHP astercrm::getCustomerByID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在astercrm的用法示例。


在下文中一共展示了astercrm::getCustomerByID方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: showCustomerRecord

    /**
     *  Muestra todos los datos de un registro sobre el DIV identificado por "formDiv".
     *
     *	@param $id		(int)		Identificador del registro a ser mostrado.
     *	@return $html	(string) Devuelve una cadena de caracteres que contiene una tabla con los datos 
     *									a extraidos de la base de datos para ser mostrados 
     */
    function showCustomerRecord($id, $type = "customer")
    {
        global $locate;
        $customer =& astercrm::getCustomerByID($id, $type);
        $contactList =& astercrm::getContactListByID($customer['id']);
        $html = '
				<table border="0" width="100%">
				<tr>
					<td nowrap align="left" width="160">' . $locate->Translate("customer_name") . '&nbsp;[<a href=? onclick="xajax_showNote(\'' . $customer['id'] . '\',\'customer\');return false;">' . $locate->Translate("note") . '</a>]</td>
					<td align="left">' . $customer['customer'] . '&nbsp;[<a href=? onclick="xajax_edit(\'' . $customer['id'] . '\',\'customer\');return false;">' . $locate->Translate("edit") . '</a>]&nbsp; [<a href=? onclick="
							if (xajax.$(\'hidCustomerBankDetails\').value == \'OFF\'){
								showObj(\'trCustomerBankDetails\');
								xajax.$(\'hidCustomerBankDetails\').value = \'ON\';
							}else{
								hideObj(\'trCustomerBankDetails\');
								xajax.$(\'hidCustomerBankDetails\').value = \'OFF\';
							}
							return false;">' . $locate->Translate("bank") . '</a>]<input type="hidden" value="OFF" name="hidCustomerBankDetails" id="hidCustomerBankDetails"></td>
				</tr>
				<tr>
					<td nowrap align="left">' . $locate->Translate("city") . '/' . $locate->Translate("state") . '[' . $locate->Translate("zipcode") . ']' . '</td>
					<td align="left">' . $customer['city'] . '/' . $customer['state'] . '[' . $customer['zipcode'] . ']' . '</td>
				</tr>
				<tr>
					<td nowrap align="left">' . $locate->Translate("address") . '</td>
					<td align="left">' . $customer['address'] . '</td>
				</tr>
				<!--**********************-->
				<tr>
					<td nowrap align="left">' . $locate->Translate("mobile") . '</td>
					<td align="left"><a href=? onclick="xajax_dial(\'' . $customer['mobile'] . '\');return false;">' . $customer['mobile'] . '</a></td>
				</tr>
				<tr>
					<td nowrap align="left">' . $locate->Translate("fax") . '</td>
					<td align="left"><a href=? onclick="xajax_dial(\'' . $customer['fax'] . '\');return false;">' . $customer['fax'] . '</a></td>
				</tr>
				<tr>
					<td nowrap align="left">' . $locate->Translate("email") . '</td>
					<td align="left">' . $customer['email'] . '</td>
				</tr>	
				<!--**********************-->
				<tr>
					<td nowrap align="left">' . $locate->Translate("website") . '</td>
					<td align="left"><a href="' . $customer['website'] . '" target="_blank">' . $customer['website'] . '</a></td>
				</tr>
				<tr>
					<td nowrap align="left">' . $locate->Translate("customer_contact") . '</td>
					<td align="left">' . $customer['contact'] . '&nbsp;&nbsp;(' . $locate->Translate($customer['contactgender']) . ')</td>
				</tr>
				<tr>
					<td nowrap align="left">' . $locate->Translate("customer_phone") . '</td>
					<td align="left"><a href=? onclick="xajax_dial(\'' . $customer['phone'] . '\');return false;">' . $customer['phone'] . '</a></td>
				</tr>
				<tr>
					<td nowrap align="left">' . $locate->Translate("category") . '</td>
					<td align="left">' . $customer['category'] . '</td>
				</tr>
				<tr id="trCustomerBankDetails" name="trCustomerBankDetails" style="display:none">
					<td nowrap align="left">' . $locate->Translate("bank_name") . '</td>
					<td align="left">' . $customer['bankname'] . '</td>
				</tr>
				<tr id="trCustomerBankDetails" name="trCustomerBankDetails" style="display:none">
					<td nowrap align="left">' . $locate->Translate("bank_zip") . '</td>
					<td align="left">' . $customer['bankzip'] . '</td>
				</tr>
				<tr id="trCustomerBankDetails" name="trCustomerBankDetails" style="display:none">
					<td nowrap align="left">' . $locate->Translate("bank_account_name") . '</td>
					<td align="left">' . $customer['bankaccountname'] . '</td>
				</tr>
				<tr id="trCustomerBankDetails" name="trCustomerBankDetails" style="display:none">
					<td nowrap align="left">' . $locate->Translate("bank_account") . '</td>
					<td align="left">' . $customer['bankaccount'] . '</td>
				</tr>
				<tr>
					<td nowrap align="left">' . $locate->Translate("create_time") . '</td>
					<td align="left">' . $customer['cretime'] . '</td>
				</tr>
				<tr>
					<td nowrap align="left">' . $locate->Translate("create_by") . '</td>
					<td align="left">' . $customer['creby'] . '</td>
				</tr>
				<tr>
					<td colspan=2>
						<table width="100%">
							<tr>
							<td>
					<a href=? onclick="if (xajax.$(\'allContact\').value==\'off\'){xajax.$(\'contactList\').style.display=\'block\';xajax.$(\'allContact\').value=\'on\'}else{xajax.$(\'contactList\').style.display=\'none\';xajax.$(\'allContact\').value=\'off\'} return false;">' . $locate->Translate("display_all") . '</a>
							</td>
							<td>
							<a href="?" onclick="xajax_noteAdd(\'' . $customer['id'] . '\',0);return false;">' . $locate->Translate("add_note") . '</a>
							</td>
							<td>
							<a href="?" onclick="xajax_surveyAdd(\'' . $customer['id'] . '\',0);return false;">' . $locate->Translate("add_survey") . '</a>
//.........这里部分代码省略.........
开发者ID:ljhcj,项目名称:IRISCC,代码行数:101,代码来源:astercrm.class.php

示例2: waitingCalls


//.........这里部分代码省略.........
                // $config['system']['allow_popup_when_aleady_popup'] 客户弹屏存在是否重新弹出客户窗口
                if ($myValue['popup'] == 'yes' || $config['system']['enable_external_crm'] || $config['system']['allow_popup_when_already_popup']) {
                    if ($config['system']['enable_external_crm'] == false) {
                        $objResponse->loadXML(getContact($call['callerid'], 0, $campaign_id, 0, $call['srcname']));
                        if ($config['system']['browser_maximize_when_pop_up'] == true) {
                            $objResponse->addScript('maximizeWin();');
                        }
                    } else {
                        //print_r($call);exit;
                        //use external link
                        $myurl = $config['system']['external_crm_url'];
                        $method = "dial_in";
                        $callerid = $call['callerid'];
                        $calleeid = $_SESSION['curuser']['extension'];
                        $uniqueid = $call['uniqueid'];
                        $calldate = $call['calldate'];
                        $didnumber = $call['didnumber'];
                        $cur_srcname = Customer::getSrcnameByCurid($call['curid']);
                        $curHtml = '<form id="external_crm_form" action="' . $myurl . '?curid=' . $call['curid'] . '&srcname=' . $cur_srcname . '" target="_blank" method="post">
								<input type="hidden" name="callerid" value="' . $callerid . '" />
								<input type="hidden" name="calleeid" value="' . $calleeid . '" />
								<input type="hidden" name="method" value="' . $method . '" />
								<input type="hidden" name="uniqueid" value="' . $uniqueid . '" />
								<input type="hidden" name="calldate" value="' . $calldate . '" />
								<input type="hidden" name="didnumber" value="' . $didnumber . '" />
							';
                        if ($config['system']['external_url_parm'] != '') {
                            if ($config['system']['detail_level'] == 'all') {
                                $customerid = astercrm::getCustomerByCallerid($call['callerid']);
                            } else {
                                $customerid = astercrm::getCustomerByCallerid($call['callerid'], $_SESSION['curuser']['groupid']);
                            }
                            if ($customerid != '') {
                                $customer = astercrm::getCustomerByID($customerid, "customer");
                                $url_parm = split(',', $config['system']['external_url_parm']);
                                foreach ($url_parm as $parm) {
                                    if ($parm != '') {
                                        $curHtml .= '<input type="hidden" name="' . $parm . '" value="' . urlencode($customer[$parm]) . '" />';
                                    }
                                }
                            }
                        }
                        $curHtml .= "</form>";
                        if ($config['system']['open_new_window'] == 'internal') {
                            $mycrm = '<iframe id="mycrm" name="mycrm" width="100%"  frameBorder=0 scrolling=auto height="600"></iframe>';
                            $objResponse->addAssign("divCrm", "innerHTML", $mycrm);
                            $curHtml = preg_replace("/\\_blank/", "mycrm", $curHtml);
                            $objResponse->addAssign("external_crmDiv", "innerHTML", $curHtml);
                            $objResponse->addScript("document.getElementById('external_crm_form').submit();");
                            $objResponse->addAssign("external_crmDiv", "innerHTML", "");
                        } else {
                            if ($config['system']['open_new_window'] == 'external') {
                                $objResponse->addAssign("external_crm_openNewDiv", "innerHTML", $curHtml);
                                $objResponse->addScript("document.getElementById('external_crm_form').submit();");
                                $objResponse->addAssign("external_crm_openNewDiv", "innerHTML", "");
                            } else {
                                $mycrm = '<iframe id="mycrm" name="mycrm" width="100%"  frameBorder=0 scrolling=auto height="600"></iframe>';
                                $objResponse->addAssign("divCrm", "innerHTML", $mycrm);
                                $internal_curHtml = preg_replace("/\\_blank/", "mycrm", $curHtml);
                                $external_curHtml = preg_replace("/external_crm_form/", "external_crm_openNew_form", $curHtml);
                                $objResponse->addAssign("external_crmDiv", "innerHTML", $internal_curHtml);
                                $objResponse->addScript("document.getElementById('external_crm_form').submit();");
                                $objResponse->addAssign("external_crmDiv", "innerHTML", "");
                                $objResponse->addAssign("external_crm_openNewDiv", "innerHTML", $external_curHtml);
                                $objResponse->addScript("document.getElementById('external_crm_openNew_form').submit();");
                                $objResponse->addAssign("external_crm_openNewDiv", "innerHTML", "");
开发者ID:ljhcj,项目名称:IRISCC,代码行数:67,代码来源:portal.server.php

示例3: showCustomerRecord

    /**
     *  Muestra todos los datos de un registro sobre el DIV identificado por "formDiv".
     *
     *	@param $id		(int)		Identificador del registro a ser mostrado.
     *	@return $html	(string) Devuelve una cadena de caracteres que contiene una tabla con los datos 
     *									a extraidos de la base de datos para ser mostrados 
     */
    function showCustomerRecord($id, $type = "customer", $callerid = '')
    {
        global $locate;
        //echo $callerid;exit;
        $customer =& astercrm::getCustomerByID($id, $type);
        if ($customer['id'] > 0) {
            $contactList =& astercrm::getContactListByID($customer['id']);
        }
        $html = '
				<table border="0" width="100%">
				<tr>
					<td nowrap align="left" width="160">' . $locate->Translate("customer_name") . '&nbsp;[<a href=? onclick="xajax_showNote(\'' . $customer['id'] . '\',\'customer\');return false;">' . $locate->Translate("note") . '</a>]</td>
					<td align="left">';
        if ($_SESSION['curuser']['language'] != 'ZH' && $_SESSION['curuser']['country'] != 'cn') {
            $html .= $locate->Translate($customer['customertitle']) . '&nbsp;<b>' . $customer['customer'] . '</b>';
        } else {
            $html .= '&nbsp;<b>' . $customer['customer'] . '</b>' . $locate->Translate($customer['customertitle']);
        }
        $html .= '&nbsp;[<a href=? onclick="xajax_edit(\'' . $customer['id'] . '\',\'customer\');return false;">' . $locate->Translate("edit") . '</a>]&nbsp; [<a href=? onclick="
							if (xajax.$(\'hidCustomerBankDetails\').value == \'OFF\'){
								showObj(\'trCustomerBankDetails\');
								xajax.$(\'hidCustomerBankDetails\').value = \'ON\';
							}else{
								hideObj(\'trCustomerBankDetails\');
								xajax.$(\'hidCustomerBankDetails\').value = \'OFF\';
							}
							return false;">' . $locate->Translate("bank") . '</a>]<input type="hidden" value="OFF" name="hidCustomerBankDetails" id="hidCustomerBankDetails">&nbsp;[<a href=? onclick="showDiallist(\'' . $_SESSION['curuser']['extension'] . '\',' . $customer['id'] . ',0,5,\'\',\'\',\'\',\'formDiallist\',\'\',\'\');return false;">' . $locate->Translate("diallist") . '</a>]&nbsp;[<a href=? onclick="xajax_showRecords(\'' . $customer['id'] . '\');return false;">' . $locate->Translate("Cdr") . '</a>]
							&nbsp; [<a href=? onclick="addSchedulerDial(\'' . $customer['id'] . '\'); return false;">' . $locate->Translate("Scheduler Dial") . '</a>]
							&nbsp; [<a href=? onclick="addTicket(\'' . $customer['id'] . '\'); return false;">' . $locate->Translate("Ticket") . '</a>]
						</td>
					</tr>
					<tr id="trAddSchedulerDial" name="trAddSchedulerDial" style="display:none"></tr>
				<tr>
					<td nowrap align="left">' . $locate->Translate("city") . '/' . $locate->Translate("state") . '/' . $locate->Translate("country") . '[' . $locate->Translate("zipcode") . ']' . '</td>
					<td align="left">' . $customer['city'] . '/' . $customer['state'] . '/' . $customer['country'] . '[' . $customer['zipcode'] . ']' . '</td>
				</tr>
				<tr>
					<td nowrap align="left">' . $locate->Translate("address") . ' | <a href="?" onclick="showMap(\'' . $customer['city'] . ' ' . $customer['state'] . ' ' . $customer['zipcode'] . ' ' . $customer['address'] . '\');return false;">Map</a>' . '</td>
					<td align="left">' . $customer['address'] . '</td>
				</tr>
				<!--**********************-->
				<tr>
					<td nowrap align="left">' . $locate->Translate("mobile") . '</td>
					<td align="left"><a href=? onclick="dial(\'' . $customer['mobile'] . '\',\'\',xajax.getFormValues(\'myForm\'));return false;">' . $customer['mobile'] . '</a></td>
				</tr>
				<tr>
					<td nowrap align="left">' . $locate->Translate("fax") . '</td>
					<td align="left"><a href=? onclick="dial(\'' . $customer['fax'] . '\',\'\',xajax.getFormValues(\'myForm\'));return false;">' . $customer['fax'] . '</a>-<a href=? onclick="dial(\'' . $customer['fax'] . '\',\'\',xajax.getFormValues(\'myForm\'),\'' . $customer['fax_ext'] . '\');return false;">' . $customer['fax_ext'] . '</a></td>
				</tr>
				<tr>
					<td nowrap align="left">' . $locate->Translate("email") . '</td>
					<td align="left"><a href="mailto:' . $customer['email'] . '">' . $customer['email'] . '</a></td>
				</tr>	
				<!--**********************-->
				<tr>
					<td nowrap align="left">' . $locate->Translate("website") . '</td>
					<td align="left"><a href="' . $customer['website'] . '" target="_blank">' . $customer['website'] . '</a></td>
				</tr>
				<tr>
					<td nowrap align="left">' . $locate->Translate("customer_contact") . '</td>
					<td align="left">' . $customer['contact'] . '&nbsp;&nbsp;(' . $locate->Translate($customer['contactgender']) . ')</td>
				</tr>
				<tr>
					<td nowrap align="left">' . $locate->Translate("customer_phone") . '</td>
					<td align="left"><a href=? onclick="dial(\'' . $customer['phone'] . '\',\'\',xajax.getFormValues(\'myForm\'));return false;">' . $customer['phone'] . '</a>-<a href=? onclick="dial(\'' . $customer['phone'] . '\',\'\',xajax.getFormValues(\'myForm\'),\'' . $customer['phone_ext'] . '\');return false;">' . $customer['phone_ext'] . '</a></td>
				</tr>
				<tr>
					<td nowrap align="left">' . $locate->Translate("category") . '</td>
					<td align="left">' . $customer['category'] . '</td>
				</tr>
				<tr id="trCustomerBankDetails" name="trCustomerBankDetails" style="display:none">
					<td nowrap align="left">' . $locate->Translate("bank_name") . '</td>
					<td align="left">' . $customer['bankname'] . '</td>
				</tr>
				<tr id="trCustomerBankDetails" name="trCustomerBankDetails" style="display:none">
					<td nowrap align="left">' . $locate->Translate("bank_zip") . '</td>
					<td align="left">' . $customer['bankzip'] . '</td>
				</tr>
				<tr id="trCustomerBankDetails" name="trCustomerBankDetails" style="display:none">
					<td nowrap align="left">' . $locate->Translate("bank_account_name") . '</td>
					<td align="left">' . $customer['bankaccountname'] . '</td>
				</tr>
				<tr id="trCustomerBankDetails" name="trCustomerBankDetails" style="display:none">
					<td nowrap align="left">' . $locate->Translate("bank_account") . '</td>
					<td align="left">' . $customer['bankaccount'] . '</td>
				</tr>
				<tr>
					<td nowrap align="left">' . $locate->Translate("create_time") . '</td>
					<td align="left">' . $customer['cretime'] . '</td>
				</tr>
				<tr>
					<td nowrap align="left">' . $locate->Translate("create_by") . '</td>
					<td align="left">' . $customer['creby'] . '</td>
//.........这里部分代码省略.........
开发者ID:ljhcj,项目名称:IRISCC,代码行数:101,代码来源:astercrm.class.php


注:本文中的astercrm::getCustomerByID方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。