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


PHP Customer::getRecordsByGroupid方法代码示例

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


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

示例1: setCampaign

function setCampaign($groupid)
{
    $objResponse = new xajaxResponse();
    $res = Customer::getRecordsByGroupid($groupid, "campaign");
    //添加option
    while ($res->fetchInto($row)) {
        $objResponse->addScript("addOption('campaignid','" . $row['id'] . "','" . $row['campaignname'] . "');");
    }
    return $objResponse;
}
开发者ID:ljhcj,项目名称:IRISCC,代码行数:10,代码来源:diallist.server.php

示例2: formEdit

    /**
     *  Imprime la forma para editar un nuevo registro sobre el DIV identificado por "formDiv".
     *
     *	@param $id		(int)		Identificador del registro a ser editado.
     *	@return $html	(string) Devuelve una cadena de caracteres que contiene la forma con los datos 
     *									a extraidos de la base de datos para ser editados 
     */
    function formEdit($id)
    {
        global $locate;
        $remindercalls =& Customer::getRecordByID($id, 'remindercalls');
        $groupoptions = '';
        $group = astercrm::getGroups();
        if ($_SESSION['curuser']['usertype'] == 'admin') {
            $groupoptions .= '<select id="groupid" name="groupid" onchange="setAsteriskcalls();">';
            $groupoptions .= '<option value="0"></option>';
            while ($group->fetchInto($row)) {
                $groupoptions .= '<option value="' . $row['groupid'] . '"';
                if ($row['groupid'] == $remindercalls['groupid']) {
                    $groupoptions .= ' selected ';
                }
                $groupoptions .= '>' . $row['groupname'] . '</option>';
            }
            $groupoptions .= '</select>';
        } else {
            while ($group->fetchInto($row)) {
                if ($row['id'] == $_SESSION['curuser']['groupid']) {
                    $groupoptions .= $row['groupname'] . '<input type="hidden" value="' . $row['id'] . '" name="groupid" id="groupid">';
                    break;
                }
            }
        }
        $asteriskcalls = Customer::getRecordsByGroupid($remindercalls['groupid'], 'asteriskcalls');
        if ($_SESSION['curuser']['usertype'] == 'admin' || $_SESSION['curuser']['usertype'] == 'groupadmin') {
            $asteriskcallsoptions .= '<select id="asteriskcallsid" name="asteriskcallsid">';
            $asteriskcallsoptions .= "<OPTION value='0'></OPTION>";
            while ($asteriskcalls->fetchInto($row)) {
                if ($row['id'] == $remindercalls['asteriskcallsid']) {
                    $asteriskcallsoptions .= "<OPTION value='" . $row['id'] . "' selected>" . $row['asteriskcallsname'] . "</OPTION>";
                } else {
                    $asteriskcallsoptions .= "<OPTION value='" . $row['id'] . "' >" . $row['asteriskcallsname'] . "</OPTION>";
                }
            }
            $asteriskcallsoptions .= '</select>';
        } else {
            while ($group->fetchInto($row)) {
                if ($row['id'] == $remindercalls['asteriskcallsid']) {
                    $asteriskcallsoptions .= $row['asteriskcallsname'] . '<input type="hidden" value="' . $row['id'] . '" name="asteriskcallsid" id="asteriskcallsid">';
                    break;
                }
            }
        }
        $html = '
			<!-- No edit the next line -->
			<form method="post" name="f" id="f">
			
			<table border="1" width="100%" class="adminlist">
				<tr>
					<td nowrap align="left">' . $locate->Translate("Phone number") . ' *</td>
					<td align="left"><input type="text" id="phonenumber" name="phonenumber" size="30" maxlength="50" value="' . $remindercalls['phonenumber'] . '"></td>
				</tr>
				<tr>
					<td nowrap align="left">' . $locate->Translate("Note") . '</td>
					<td align="left"><input type="text" id="note" name="note" size="50" maxlength="255" value="' . $remindercalls['note'] . '"></td>
				</tr>
				<tr>
					<td nowrap align="left">' . $locate->Translate("Group") . '</td>
					<td align="left">' . $groupoptions . '</td>
				</tr>
				<tr>
					<td nowrap align="left">' . $locate->Translate("Call plan") . ' *</td>
					<td align="left">' . $asteriskcallsoptions . '</td>
				</tr>
				<tr>
					<td colspan="2" align="center"><button id="submitButton" onClick=\'xajax_save(xajax.getFormValues("f"));return false;\'>' . $locate->Translate("continue") . '</button></td>
				</tr>

			 </table>
			';
        $html .= '
			</form>
			' . $locate->Translate("obligatory_fields") . '
			';
        return $html;
    }
开发者ID:ljhcj,项目名称:IRISCC,代码行数:85,代码来源:remindercalls.grid.inc.php

示例3: setAsteriskcalls

function setAsteriskcalls($groupid)
{
    global $locate;
    $objResponse = new xajaxResponse();
    $res = Customer::getRecordsByGroupid($groupid, 'asteriskcalls');
    //添加option
    while ($res->fetchInto($row)) {
        $objResponse->addScript("addOption('asteriskcallsid','" . $row['id'] . "','" . $row['asteriskcallsname'] . "');");
    }
    return $objResponse;
}
开发者ID:ljhcj,项目名称:IRISCC,代码行数:11,代码来源:remindercalls.server.php

示例4: setCampaign

function setCampaign($groupid)
{
    global $locate;
    $objResponse = new xajaxResponse();
    $res = Customer::getRecordsByGroupid($groupid, "campaign");
    //添加option
    $objResponse->addScript("addSltOption('campaignid','0','" . $locate->Translate("All") . "');");
    while ($res->fetchInto($row)) {
        $objResponse->addScript("addSltOption('campaignid','" . $row['id'] . "','" . $row['campaignname'] . "');");
    }
    return $objResponse;
}
开发者ID:ljhcj,项目名称:IRISCC,代码行数:12,代码来源:survey.server.php

示例5: formEdit

    /**
     *  Imprime la forma para editar un nuevo registro sobre el DIV identificado por "formDiv".
     *
     *	@param $id		(int)		Identificador del registro a ser editado.
     *	@return $html	(string) Devuelve una cadena de caracteres que contiene la forma con los datos 
     *									a extraidos de la base de datos para ser editados 
     */
    function formEdit($id)
    {
        global $locate, $db;
        $campaignresult =& Customer::getRecordByID($id, 'campaignresult');
        if ($_SESSION['curuser']['usertype'] == 'admin') {
            $grouphtml .= '<select name="groupid" id="groupid" onchange="setCampaign();">
																<option value=""></option>';
            $res = Customer::getGroups();
            while ($row = $res->fetchRow()) {
                $grouphtml .= '<option value="' . $row['groupid'] . '"';
                if ($row['groupid'] == $campaignresult['groupid']) {
                    $grouphtml .= ' selected ';
                }
                $grouphtml .= '>' . $row['groupname'] . '</option>';
            }
            $grouphtml .= '</select>';
        } else {
            $grouphtml .= $_SESSION['curuser']['group']['groupname'] . '<input type="hidden" name="groupid" id="groupid" value="' . $_SESSION['curuser']['groupid'] . '">';
        }
        $statusAnswered = "";
        $statusNoanswer = "";
        if ($campaignresult['status'] == 'ANSWERED') {
            $statusAnswered = "checked";
        } else {
            $statusNoanswer = "checked";
        }
        $campaign_res = Customer::getRecordsByGroupid($campaignresult['groupid'], "campaign");
        while ($campaign_row = $campaign_res->fetchRow()) {
            $campaignoption .= '<option value="' . $campaign_row['id'] . '"';
            if ($campaign_row['id'] == $campaignresult['campaignid']) {
                $campaignoption .= ' selected ';
            }
            $campaignoption .= '>' . $campaign_row['campaignname'] . '</option>';
        }
        $parentoption .= '<option value="0"';
        if ($campaignresult['parentid'] == 0) {
            $parentoption .= ' selected ';
        }
        $parentoption .= '>' . $locate->Translate("None") . '</option>';
        $parent_res = Customer::getRecordsByField('campaignid', $campaignresult['campaignid'], 'campaignresult');
        while ($parent_row = $parent_res->fetchRow()) {
            if ($parent_row['parentid'] == 0) {
                $parentoption .= '<option value="' . $parent_row['id'] . '"';
                if ($parent_row['id'] == $campaignresult['parentid']) {
                    $parentoption .= ' selected ';
                }
                $parentoption .= '>' . $parent_row['resultname'] . '</option>';
            }
        }
        $html = '
			<!-- No edit the next line -->
			<form method="post" name="f" id="f">
			
			<table border="1" width="100%" class="adminlist">
				<tr>
					<td nowrap align="left">' . $locate->Translate("Result Name") . '*</td>
					<td align="left"><input type="hidden" id="id" name="id" value="' . $campaignresult['id'] . '"><input type="text" id="resultname" name="resultname" size="30" maxlength="60" value="' . $campaignresult['resultname'] . '"></td>
				</tr>
				<tr>
					<td nowrap align="left">' . $locate->Translate("Result Note") . '</td>				<td align="left"><input type="text" id="resultnote" name="resultnote" size="30" maxlength="255" value="' . $campaignresult['resultnote'] . '"></td>
				</tr>
				<tr>					
					<td align="left" colspan="2">' . $locate->Translate("Answered") . '&nbsp;
					<input type="radio" id="status" name="status" value="Answered" ' . $statusAnswered . '>&nbsp;' . $locate->Translate("Noanswer") . '&nbsp;
					<input type="radio" id="status" name="status" value="Noanswer" ' . $statusNoanswer . '>
					</td>
				</tr>				
				<tr>
					<td nowrap align="left">' . $locate->Translate("Group") . '</td>
					<td align="left">' . $grouphtml . '</td>
				</tr>
				<tr>
					<td align="left" width="25%">' . $locate->Translate("Campaign Name") . '</td>
					<td><SELECT id="campaignid" name="campaignid" onchange="setParentResult();">' . $campaignoption . '</SELECT></td>
				</tr>
				<tr>
					<td align="left" width="25%">' . $locate->Translate("Parent Result Name") . '</td>
					<td><SELECT id="parentid" name="parentid" >' . $parentoption . '</SELECT></td>
				</tr>
				<tr>
					<td colspan="2" align="center"><button id="submitButton" onClick=\'xajax_update(xajax.getFormValues("f"));return false;\'>' . $locate->Translate("continue") . '</button></td>
				</tr>

			 </table>
			';
        $html .= '
				</form>
				' . $locate->Translate("obligatory_fields") . '
				';
        return $html;
    }
开发者ID:ljhcj,项目名称:IRISCC,代码行数:98,代码来源:campaignresult.grid.inc.php

示例6: formAdd


//.........这里部分代码省略.........
            } else {
                $enable_html = '<tr>
								<td colspan=2>
								<input type="radio" value="1" id="radEnable" name="radEnable" >' . $locate->Translate("enable") . '
								<input type="radio" value="0" id="radEnable" name="radEnable" checked>' . $locate->Translate("disable");
            }
            $enable_html .= '<input type="button" onclick="xajax_setSurvey(xajax.getFormValues(\'f\'));return false;" value="' . $locate->Translate("update") . '">
								</td>
							 </tr>';
        }
        $options = Customer::getOptions($surveyid);
        if ($options) {
            $ind = 0;
            while ($options->fetchInto($row)) {
                $nameRow = "formDivRow" . $row['id'];
                $nameCell = $nameRow . "Col" . $ind;
                $html .= '<tr id="' . $nameRow . '" >' . "\n";
                $item_html = "";
                if ($row['optiontype'] == "text") {
                } else {
                    $item_html = '(<a href=? onclick="showItem(\'' . $row['id'] . '\');return false;">' . $locate->Translate("Item") . '</a>)';
                }
                $option_item_number = astercrm::getCountByField("optionid", $row['id'], "surveyoptionitems");
                $html .= '
					<td align="left" width="25%">' . $locate->Translate("option") . '(<a href="?" onclick="xajax_edit(\'' . $surveyid . '\',\'' . $row['id'] . '\');return false;"><img src="skin/default/images/edit.png"></a><a href="?" onclick="deleteOption(\'' . $row['id'] . '\',\'' . $nameRow . '\');return false;"><img src="skin/default/images/trash.png"></a>)' . $item_html . '
					</td><td id="' . $nameCell . '" >' . $row['surveyoption'] . "(" . $locate->Translate($row['optiontype']) . ", {$option_item_number} " . $locate->Translate('items') . ")" . '</td></tr>
					<tr>
						<td align="left" width="25%">' . $locate->Translate("Option Note") . '</td>
						<td id="' . $nameCell . '_note">' . $row['optionnote'] . '</td>
					</tr>
					<tr><td colspan="2" height="1" bgcolor="#ccc"></td></tr>
					';
                $ind++;
            }
        }
        $html .= '<tr><td colspan=2>
					' . $locate->Translate("option") . '
				 </td></tr>';
        if ($optionid == 0) {
            $button_value = $locate->Translate("Add Option");
            $optionid = 0;
        } else {
            $button_value = $locate->Translate("Update Option");
            $option = astercrm::getRecordById($optionid, "surveyoptions");
            $optiontype[$option['optiontype']] = "selected";
        }
        $html .= '<tr><td colspan=2>' . $locate->Translate("Title") . ': 
					<input type="text" size="50" maxlength="50" id="surveyoption" name="surveyoption" value="' . $option['surveyoption'] . '"/>
					<SELECT id="optiontype" name="optiontype">
						<option value="radio" ' . $optiontype['radio'] . '>' . $locate->Translate("Radio") . '</option>
						<option value="checkbox" ' . $optiontype['checkbox'] . '>' . $locate->Translate("Checkbox") . '</option>
						<option value="text" ' . $optiontype['text'] . '>' . $locate->Translate("Text") . '</option>
					</SELECT>
					</td></tr>';
        $html .= '<tr><td colspan=2>' . $locate->Translate("Note") . ': 
					<input type="text" size="50" maxlength="254" id="optionnote" name="optionnote" value="' . $option['optionnote'] . '"/>
					<input type="button" value="' . $button_value . '" onclick="addOption(\'f\',\'' . $optionid . '\');return false;">
				 </td></tr>';
        $html .= $enable_html;
        if ($_SESSION['curuser']['usertype'] == 'admin') {
            $res = Customer::getGroups();
            $groupoptions .= '<select name="groupid" id="groupid" onchange="setCampaign();">';
            while ($row = $res->fetchRow()) {
                $groupoptions .= '<option value="' . $row['groupid'] . '"';
                if ($survey['groupid'] == $row['groupid']) {
                    $groupoptions .= ' selected';
                }
                $groupoptions .= '>' . $row['groupname'] . '</option>';
            }
            $groupoptions .= '</select>';
        } else {
            $groupoptions .= $_SESSION['curuser']['group']['groupname'] . '<input id="groupid" name="groupid" type="hidden" value="' . $_SESSION['curuser']['groupid'] . '">';
        }
        if ($survey['campaignid'] == 0) {
            $campaignoptions = '<option value="0">' . $locate->Translate("All") . '</option>';
        }
        $campaignres = Customer::getRecordsByGroupid($survey['groupid'], "campaign");
        while ($row = $campaignres->fetchRow()) {
            $campaignoptions .= '<option value="' . $row['id'] . '"';
            if ($survey['campaignid'] == $row['id']) {
                $campaignoptions .= ' selected';
            }
            $campaignoptions .= '>' . $row['campaignname'] . '</option>';
        }
        $html .= '
					<tr>
						<td align="left" width="25%">' . $locate->Translate("Group Name") . '</td>
						<td>' . $groupoptions . '</td>
					</tr>
					<tr>
						<td align="left" width="25%">' . $locate->Translate("Campaign Name") . '*</td>
						<td><SELECT id="campaignid" name="campaignid">' . $campaignoptions . '</SELECT></td>
					</tr>';
        $html .= '
				</table>
				</form>
				' . $locate->Translate("obligatory_fields") . '
				';
        return $html;
    }
开发者ID:ljhcj,项目名称:IRISCC,代码行数:101,代码来源:survey.grid.inc.php


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