本文整理汇总了PHP中Customer::getRecordByID方法的典型用法代码示例。如果您正苦于以下问题:PHP Customer::getRecordByID方法的具体用法?PHP Customer::getRecordByID怎么用?PHP Customer::getRecordByID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Customer
的用法示例。
在下文中一共展示了Customer::getRecordByID方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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;
$asteriskcalls =& Customer::getRecordByID($id, 'asteriskcalls');
if ($_SESSION['curuser']['usertype'] == 'admin') {
$grouphtml .= '<select name="groupid" id="groupid" >
<option value=""></option>';
$res = Customer::getGroups();
while ($row = $res->fetchRow()) {
$grouphtml .= '<option value="' . $row['groupid'] . '"';
if ($row['groupid'] == $asteriskcalls['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'] . '">';
}
$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("Name") . ' *</td>
<td align="left"><input type="text" id="asteriskcallsname" name="asteriskcallsname" size="30" maxlength="50" value="' . $asteriskcalls['asteriskcallsname'] . '"></td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("Dialout context") . '</td>
<td align="left"><input type="hidden" id="id" name="id" value="' . $asteriskcalls['id'] . '"><input type="text" id="dialoutcontext" name="dialoutcontext" size="30" maxlength="50" value="' . $asteriskcalls['outcontext'] . '"></td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("Dialin context") . '</td>
<td align="left"><input type="text" id="dialincontext" name="dialincontext" size="30" maxlength="50" value="' . $asteriskcalls['incontext'] . '"></td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("Dialin extension") . '</td>
<td align="left"><input type="text" id="dialinextension" name="dialinextension" size="30" maxlength="50" value="' . $asteriskcalls['inextension'] . '"></td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("Group") . '</td>
<td align="left">' . $grouphtml . '</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;
}
示例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;
$tickets =& Customer::getRecordByID($id, 'tickets');
if ($_SESSION['curuser']['usertype'] == 'admin') {
$grouphtml = '<select name="groupid" id="groupid" onchange="javascript:relateByGid(this.value,document.getElementById(\'id\').value);return false;"><option value="0">' . $locate->Translate("None") . '</option>';
$res = Customer::getGroups();
while ($row = $res->fetchRow()) {
$grouphtml .= '<option value="' . $row['groupid'] . '"';
if ($row['groupid'] == $tickets['groupid']) {
$grouphtml .= ' selected ';
}
$grouphtml .= '>' . $row['groupname'] . '</option>';
}
$grouphtml .= '</select>';
} else {
$grouphtml = '<input type="hidden" name="groupid" id="groupid" value="' . $_SESSION['curuser']['groupid'] . '" />' . $_SESSION['curuser']['group']['groupname'];
}
$campaignOption = Customer::getCampaignByGid($tickets['groupid'], $tickets['campaignid']);
$parentOption = Customer::getParentCateGory($tickets['groupid'], $tickets['fid'], $tickets['id']);
$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("Ticket Name") . '*</td>
<td align="left"><input type="hidden" id="id" name="id" value="' . $tickets['id'] . '"><input type="text" id="ticketname" name="ticketname" size="25" maxlength="100" value="' . $tickets['ticketname'] . '"></td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("Group Name") . '</td>
<td align="left">' . $grouphtml . '</td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("Campaign Name") . '</td>
<td align="left" id="campaignMsg">' . $campaignOption . '</td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("Parent Category") . '</td>
<td align="left" id="parentMsg">' . $parentOption . '</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;
}
示例3: 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, $config;
$campaign =& Customer::getRecordByID($id, 'campaign');
if ($_SESSION['curuser']['usertype'] == 'admin') {
$grouphtml .= '<select name="groupid" id="groupid" >
<option value=""></option>';
$res = Customer::getGroups();
while ($row = $res->fetchRow()) {
$grouphtml .= '<option value="' . $row['groupid'] . '"';
if ($row['groupid'] == $campaign['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'] . '">';
}
$bindqueue = "";
if ($campaign['bindqueue'] == 1) {
$bindqueue = "checked";
}
$dialTochecked = "";
if ($campaign['dialtwoparty'] == "yes") {
$dialTochecked = "checked";
}
$query = "SELECT id,name From servers";
$server_res = $db->query($query);
$serverhtml .= '<select name="serverid" id="serverid">
<option value="0">' . $locate->Translate("Default Server") . '</option>';
while ($server_row = $server_res->fetchRow()) {
$serverhtml .= '<option value="' . $server_row['id'] . '"';
if ($server_row['id'] == $campaign['serverid']) {
$serverhtml .= ' selected ';
}
$serverhtml .= '>' . $server_row['name'] . '</option>';
}
$serverhtml .= '</select>';
$query = "SELECT id,worktimepackage_name From worktimepackages";
if ($_SESSION['curuser']['usertype'] != 'admin') {
$query .= " Where groupid =" . $_SESSION['curuser']['groupid'];
}
$worktimepackage_res = $db->query($query);
$worktimepackagehtml .= '<select name="worktime_package_id" id="worktime_package_id">
<option value="0">' . $locate->Translate("Any time") . '</option>';
while ($worktimepackage_row = $worktimepackage_res->fetchRow()) {
$worktimepackagehtml .= '<option value="' . $worktimepackage_row['id'] . '"';
if ($worktimepackage_row['id'] == $campaign['worktime_package_id']) {
$worktimepackagehtml .= ' selected ';
}
$worktimepackagehtml .= '>' . $worktimepackage_row['worktimepackage_name'] . '</option>';
}
$worktimepackagehtml .= '</select>';
$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("Campaign Name") . '*</td>
<td align="left"><input type="hidden" id="id" name="id" value="' . $campaign['id'] . '"><input type="text" id="campaignname" name="campaignname" size="30" maxlength="60" value="' . $campaign['campaignname'] . '"></td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("Campaign Note") . '</td>
<td align="left"><input type="text" id="campaignnote" name="campaignnote" size="30" maxlength="255" value="' . $campaign['campaignnote'] . '"></td>
</tr>
<tr>
<td align="left" colspan="2">' . $locate->Translate("Enable") . ' <input type="radio" id="enable" name="enable" value="1"';
if ($campaign['enable']) {
$html .= 'checked> ' . $locate->Translate("Disable") . ' <input type="radio" id="enable" name="enable" value="0" ></td>';
} else {
$html .= '> ' . $locate->Translate("Disable") . ' <input type="radio" id="enable" name="enable" value="0" checked></td>';
}
if ($campaign['firstcontext'] != '' && $campaign['nextcontext'] != '') {
$crdchecked = 'checked';
$outcontext = $campaign['firstcontext'];
$crdcontext = $campaign['outcontext'];
$crdtr = '';
$amdchecked = 'checked';
$incontext = $campaign['nextcontext'];
$amdcontext = $campaign['incontext'];
$amdtr = '';
} else {
$outcontext = $campaign['outcontext'];
$crdcontext = $config['system']['crdcontext'];
$crdtr = 'style="display:none"';
$incontext = $campaign['incontext'];
$amdcontext = $config['system']['amdcontext'];
$amdtr = 'style="display:none"';
}
if ($campaign['enablerecyle'] == 'no') {
$recyleno = 'selected';
//.........这里部分代码省略.........
示例4: 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, $config;
$rate =& Customer::getRecordByID($id, 'myrate');
/*
$group = astercrm::getAll('accountgroup');
if ($_SESSION['curuser']['usertype'] == 'admin'){
$groupoptions .= '<select id="groupid" name="groupid">';
while ($group->fetchInto($row)){
if ($row['id'] == $rate['groupid']){
$groupoptions .= "<OPTION value='".$row['id']."' selected>".$row['groupname']."</OPTION>";
}else{
$groupoptions .= "<OPTION value='".$row['id']."'>".$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;
}
}
}
*/
$reselleroptions = '';
$reseller = astercrm::getAll('resellergroup');
if ($_SESSION['curuser']['usertype'] == 'admin') {
$reselleroptions .= '<select id="resellerid" name="resellerid" onchange="setGroup();">';
$reselleroptions .= '<option value="0"></option>';
while ($reseller->fetchInto($row)) {
if ($config['synchronize']['display_synchron_server']) {
$row['resellername'] = astercrm::getSynchronDisplay($row['id'], $row['resellername']);
}
if ($row['id'] == $rate['resellerid']) {
$reselleroptions .= "<OPTION value='" . $row['id'] . "' selected>" . $row['resellername'] . "</OPTION>";
} else {
$reselleroptions .= "<OPTION value='" . $row['id'] . "' >" . $row['resellername'] . "</OPTION>";
}
}
$reselleroptions .= '</select>';
} else {
while ($reseller->fetchInto($row)) {
if ($row['id'] == $rate['resellerid']) {
if ($config['synchronize']['display_synchron_server']) {
$row['resellername'] = astercrm::getSynchronDisplay($row['id'], $row['resellername']);
}
$reselleroptions .= $row['resellername'] . '<input type="hidden" value="' . $row['id'] . '" name="resellerid" id="resellerid">';
break;
}
}
}
$group = astercrm::getAll('accountgroup', 'resellerid', $rate['resellerid']);
if ($_SESSION['curuser']['usertype'] == 'admin' || $_SESSION['curuser']['usertype'] == 'reseller') {
$groupoptions .= '<select id="groupid" name="groupid">';
$groupoptions .= "<OPTION value='0'></OPTION>";
while ($group->fetchInto($row)) {
if ($config['synchronize']['display_synchron_server']) {
$row['groupname'] = astercrm::getSynchronDisplay($row['id'], $row['groupname']);
}
if ($row['id'] == $rate['groupid']) {
$groupoptions .= "<OPTION value='" . $row['id'] . "' selected>" . $row['groupname'] . "</OPTION>";
} else {
$groupoptions .= "<OPTION value='" . $row['id'] . "' >" . $row['groupname'] . "</OPTION>";
}
}
$groupoptions .= '</select>';
} else {
while ($group->fetchInto($row)) {
if ($row['id'] == $rate['groupid']) {
if ($config['synchronize']['display_synchron_server']) {
$row['groupname'] = astercrm::getSynchronDisplay($row['id'], $row['groupname']);
}
$groupoptions .= $row['groupname'] . '<input type="hidden" value="' . $row['id'] . '" name="groupid" id="groupid">';
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("prefix") . '</td>
<td align="left"><input type="hidden" id="id" name="id" value="' . $rate['id'] . '"><input type="text" id="dialprefix" name="dialprefix" size="25" maxlength="30" value="' . $rate['dialprefix'] . '" onKeyUp="xajax_showBuyRate(this.value);" onclick="xajax_showBuyRate(this.value);"> <span id="spanShowBuyRate" name="spanShowBuyRate"></span></td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("length") . '</td>
<td align="left"><input type="text" id="numlen" name="numlen" size="10" maxlength="10" value="' . $rate['numlen'] . '"></td>
</tr>
<tr>
//.........这里部分代码省略.........
示例5: showAccountgroupDetail
/**
* 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 showAccountgroupDetail($id)
{
global $locate, $db;
$account =& Customer::getRecordByID($id, 'astercrm_accountgroup');
$contactList =& astercrm::getGroupMemberListByID($account['groupid']);
$html = '
<table border="1" width="100%" class="adminlist">
<tr>
<td nowrap align="left" width="45%">' . $locate->Translate("groupname") . '</td>
<td align="left" width="55%">' . $account['groupname'] . '</td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("incontext") . '</td>
<td align="left">' . $account['incontext'] . '</td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("outcontext") . '</td>
<td align="left">' . $account['outcontext'] . '</td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("groupid") . '</td>
<td align="left">' . $account['groupid'] . '</td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("force monitor") . '</td>
<td align="left">' . $account['monitorforce'] . '</td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("first ring") . '</td>
<td align="left">' . $locate->Translate($account['firstring']) . '</td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("allowloginqueue") . '</td>
<td align="left">' . $locate->Translate($account['allowloginqueue']) . '</td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("agent interval") . '</td>
<td align="left">' . $account['agentinterval'] . '</td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("clear popup") . '(s)</td>
<td align="left">' . $account['clear_popup'] . '</td>
</tr>';
/*<tr>
<td nowrap align="left">'.$locate->Translate("pdcontext").'</td>
<td align="left">'.$account['pdcontext'].'</td>
</tr>
<tr>
<td nowrap align="left">'.$locate->Translate("pdextensions").'</td>
<td align="left">'.$account['pdextension'].'</td>
</tr>';*/
$html .= '<tr>
<td>
<a href=? onclick="if (xajax.$(\'allMember\').value==\'off\'){xajax.$(\'memberList\').style.display=\'block\';xajax.$(\'allMember\').value=\'on\'}else{xajax.$(\'memberList\').style.display=\'none\';xajax.$(\'allMember\').value=\'off\'} return false;">' . $locate->Translate("display_all_member") . '</a>
<input type="hidden" id="allMember" name="allMember" value="off">
</td>
</tr>
</table>
<table border="0" id="memberList" name="memberList" style="display:none" class="memberlist">
<tr><td colspan="4" width="100%" height="1px" ></td></tr>
';
while ($contactList->fetchInto($row)) {
$html .= '<tr>';
$html .= '
<td align="left">
' . $row['username'] . '
</td>
';
for ($i = 1; $i < 4; $i++) {
if (!$contactList->fetchInto($row)) {
$html .= '<td> </td>';
} else {
$html .= '
<td align="left">
' . $row['username'] . '
</td>
';
}
}
$html .= '</tr>';
}
$html .= '
</table>';
return $html;
}
示例6: showAccountDetail
/**
* 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 showAccountDetail($id)
{
global $locate;
$account =& Customer::getRecordByID($id, 'account');
$html = '
<table border="1" width="100%" class="adminlist">
<tr>
<td nowrap align="left">' . $locate->Translate("username") . '</td>
<td align="left">' . $account['username'] . '</td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("password") . '</td>
<td align="left">' . $account['password'] . '</td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("usertype") . '</td>
<td align="left">' . $account['usertype'] . '</td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("extensions") . '</td>
<td align="left">' . $account['extensions'] . '</td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("account_code") . '</td>
<td align="left">' . $account['accountcode'] . '</td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("Callback") . '</td>
<td align="left">' . $account['callback'] . '</td>
</tr>
</table>
';
return $html;
}
示例7: formEdit
function formEdit($id)
{
global $locate;
$diallist =& Customer::getRecordByID($id, 'diallist');
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 ($diallist['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'] . '">';
}
$campaignlist = Customer::getAll("campaign", "groupid", $diallist['groupid']);
while ($row = $campaignlist->fetchRow()) {
$campaign_options .= '<option value="' . $row['id'] . '"';
if ($diallist['campaignid'] == $row['id']) {
$campaign_options .= ' selected';
}
$campaign_options .= '>' . $row['campaignname'] . '</option>';
}
$html = '
<!-- No edit the next line -->
<form method="post" name="formDiallist" id="formDiallist">
<table border="1" width="100%" class="adminlist">
<tr>
<td nowrap align="left">' . $locate->Translate("number") . '*</td>
<td align="left">
<input type="text" id="dialnumber" name="dialnumber" size="35" value="' . $diallist['dialnumber'] . '">
<input type="hidden" id="id" name="id" value="' . $diallist['id'] . '">
</td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("Name") . '</td>
<td align="left">
<input type="text" id="customername" name="customername" value="' . $diallist['customername'] . '" size="35">
</td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("Assign To") . '</td>
<td align="left">
<input type="text" id="assign" name="assign" size="35" value="' . $diallist['assign'] . '">
</td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("Call Order") . '</td>
<td align="left">
<input type="text" id="callOrder" name="callOrder" size="35" value="' . $diallist['callOrder'] . '">
</td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("Dialtime") . '</td>
<td align="left">
<input type="text" name="dialtime" id="dialtime" size="20" value="' . $diallist['dialtime'] . '">
<INPUT onclick="displayCalendar(document.getElementById(\'dialtime\'),\'yyyy-mm-dd hh:ii\',this,true)" type="button" value="' . $locate->Translate("Cal") . '">
</td>
</tr>';
$html .= '
<tr>
<td align="left" width="25%">' . $locate->Translate("Group Name") . '</td>
<td>' . $groupoptions . '</td>
</tr>';
$html .= '
<tr>
<td align="left" width="25%">' . $locate->Translate("Campaign Name") . '</td>
<td><SELECT id="campaignid" name="campaignid">' . $campaign_options . '</SELECT></td>
</tr>';
$html .= '
<tr>
<td align="left" width="25%">' . $locate->Translate("Memo") . '</td>
<td><textarea id="memo" name="memo" cols="50" rows="8">' . $diallist['memo'] . '</textarea></td>
</tr>';
$html .= '
<tr>
<td nowrap colspan=2 align=right><input type="button" id="btnAddDiallist" name="btnAddDiallist" value="' . $locate->Translate("continue") . '" onclick="xajax_update(xajax.getFormValues(\'formDiallist\'));return false;"></td>
</tr>
<table>
</form>
';
return $html;
}
示例8: 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;
$result =& Customer::getRecordByID($id, 'sms_templates');
$optionHtml = '';
if ($result['belongto'] == 'campaign') {
$optionHtml = Customer::getCurObjId($result['belongto'], $result['campaign_id']);
} else {
if ($result['belongto'] == 'trunk') {
$optionHtml = Customer::getCurObjId($result['belongto'], $result['trunkinfo_id']);
}
}
$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("Template Title") . '*</td>
<td align="left"><input type="text" id="templatetitle" name="templatetitle" value="' . $result['templatetitle'] . '" /><input type="hidden" id="id" name="id" value="' . $result['id'] . '"></td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("Belong To") . '</td>
<td><select id="belongto" name="belongto" onchange="xajax_getCurObjId(this.value);">
<option value="all"';
if ($result['belongto'] == 'all') {
$html .= ' selected';
}
$html .= '>' . $locate->Translate("All") . '</option>
<option value="campaign"';
if ($result['belongto'] == 'campaign') {
$html .= ' selected';
}
$html .= '>' . $locate->Translate("Campaign") . '</option>
<option value="trunk"';
if ($result['belongto'] == 'trunk') {
$html .= ' selected';
}
$html .= '>' . $locate->Translate("Trunk") . '</option>
</select></td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("Object") . '</td>
<td id="objectSelect">' . $optionHtml . '</td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("Is_edit") . '</td>
<td>';
if ($result['is_edit'] == 'yes') {
$html .= '<input type="checkbox" id="is_edit" name="is_edit" checked/>';
} else {
$html .= '<input type="checkbox" id="is_edit" name="is_edit"/>';
}
$html .= '</td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("Content") . '</td>
<td><textarea id="content" name="content" cols="40" rows="5">' . $result['content'] . '</textarea></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;
}
示例9: formTicketEdit
/**
* 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 formTicketEdit($id)
{
global $locate;
$result =& Customer::getRecordByID($id, 'ticket_details');
$categoryHtml = Customer::getTicketCategory($result['ticketcategoryid']);
$ticketHtml = Customer::getTicketByCategory($result['ticketcategoryid'], $result['ticketid']);
$groupHtml = Customer::getGroup($result['ticketcategoryid'], $result['groupid']);
//$customerHtml = Customer::getCustomer($result['groupid'],$result['customerid']);
$customername = Customer::getCustomername($result['customerid']);
$accountHtml = Customer::getAccount($result['groupid'], $result['assignto']);
$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("TicketCategory Name") . '*</td>
<td align="left">' . $categoryHtml . '<input type="hidden" id="id" name="id" value="' . $result['id'] . '"><input type="hidden" id="curTicketid" value="' . $result['ticketid'] . '"></td>
</tr>
<tr>
<td align="left" width="25%">' . $locate->Translate("Ticket Name") . '*</td>
<td id="ticketMsg">' . $ticketHtml . '</td>
</tr>
<tr>
<td align="left" width="25%">' . $locate->Translate("Parent TicketDetail ID") . '</td>
<td><input type="text" id="parent_id" name="parent_id" maxlength="8" value="' . ($result['parent_id'] == '' ? '' : str_pad($result['parent_id'], 8, '0', STR_PAD_LEFT)) . '" /></td>
</tr>
<tr>
<td align="left" width="25%">' . $locate->Translate("Group Name") . '*</td>
<td id="groupMsg">' . $groupHtml . '</td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("Customer Name") . '*</td>
<td id="customerMsg"><input type="text" id="ticket_customer" name="ticket_customer" value="' . $customername . '" onkeyup="ajax_showOptions(this,\'getCustomersByLetters\',event)" size="25" maxlength="50" autocomplete="off" /><input type="hidden" id="ticket_customer_hidden" name="customerid" value="' . $result['customerid'] . '" /></td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("Assignto") . '</td>
<td id="accountMsg">' . $accountHtml . '</td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("Status") . '</td>
<td><select id="status" name="status">
<option value="new"';
if ($result['status'] == 'new') {
$html .= ' selected';
}
$html .= '>' . $locate->Translate("new") . '</option>
<option value="panding"';
if ($result['status'] == 'panding') {
$html .= ' selected';
}
$html .= '>' . $locate->Translate("panding") . '</option>
<option value="closed"';
if ($result['status'] == 'closed') {
$html .= ' selected';
}
$html .= '>' . $locate->Translate("closed") . '</option>
<option value="cancel"';
if ($result['status'] == 'cancel') {
$html .= ' selected';
}
$html .= '>' . $locate->Translate("cancel") . '</option>
</select></td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("Memo") . '</td>
<td><textarea id="memo" name="memo" cols="40" rows="5">' . $result['memo'] . '</textarea></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="button" id="" onclick="xajax_viewSubordinateTicket(' . $result['id'] . ')" value="' . $locate->Translate("Subordinate TicketDetails") . '"> <button id="submitButton" onClick=\'xajax_updateCurTicket(xajax.getFormValues("f"));return false;\'>' . $locate->Translate("continue") . '</button></td>
</tr>
</table>
';
$html .= '
</form>
' . $locate->Translate("obligatory_fields") . '
';
return $html;
}
示例10: playmonitor
function playmonitor($id)
{
global $config, $locate;
$objResponse = new xajaxResponse();
$res = Customer::getRecordByID($id, 'monitorrecord');
$path = $res['filename'] . "." . $res['fileformat'];
$html = Table::Top($locate->Translate("playmonitor"), "formplaymonitor");
if (is_file($path)) {
if ($res['fileformat'] == 'mp3') {
$html .= '<object type="application/x-shockwave-flash" data="skin/default/player_mp3_maxi.swf" width="200" height="20"><param name="movie" value="skin/default/player_mp3_maxi.swf" /><param name="bgcolor" value="#ffffff" /><param name="FlashVars" value="mp3=records.php?file=' . $id . '&loop=0&autoplay=1&autoload=1&volume=75&showstop=1&showinfo=1&showvolume=1&showloading=always" /></object><br><a href="###" onclick="window.location.href=\'records.php?file=' . $id . '\'">' . $locate->Translate("download") . '</a>';
} else {
$html .= '<embed src="records.php?file=' . $id . '" autostart="true" width="300" height="40" name="sound" id="sound" enablejavascript="true"><br><a href="###" onclick="window.location.href=\'records.php?file=' . $id . '\'">' . $locate->Translate("download") . '</a>';
}
} else {
$html .= '<b>404 File not found!</b>';
}
$html .= Table::Footer();
$objResponse->addAssign("formplaymonitor", "style.visibility", "visible");
$objResponse->addAssign("formplaymonitor", "innerHTML", $html);
return $objResponse->getXML();
}
示例11: 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;
$result =& Customer::getRecordByID($id, 'codes');
$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("Code") . '</td>
<td align="left"><input type="text" id="code" name="code" size="25" maxlength="50" value="' . $result['code'] . '"> <input type="hidden" name="id" value="' . $result['id'] . '"></td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("Creby") . '</td>
<td align="left">' . $result['creby'] . '</td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("Cretime") . '</td>
<td align="left">' . $result['cretime'] . '</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;
}
示例12: 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;
$worktimes =& Customer::getRecordByID($id, 'worktimes');
if ($_SESSION['curuser']['usertype'] == 'admin') {
$grouphtml .= '<select name="groupid" id="groupid" >
<option value=""></option>';
$res = Customer::getGroups();
while ($row = $res->fetchRow()) {
$grouphtml .= '<option value="' . $row['groupid'] . '"';
if ($row['groupid'] == $worktimes['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'] . '">';
}
$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"><input type="hidden" id= "id" name="id" value="' . $worktimes['id'] . '">' . $locate->Translate("Time") . '*</td>
<td align="left">' . $locate->Translate("From") . ': <input id="starttime" name="starttime" type="text" value="' . $worktimes['starttime'] . '" readonly onclick="showTimeList(\'timelist\');_SetTime(this)"/> ' . $locate->Translate("To") . ': <input id="endtime" name="endtime" type="text" value="' . $worktimes['endtime'] . '" readonly onclick="showTimeList(\'timelist\');_SetTime(this)"/><div id="timelist" ></div></td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("Week") . '*</td>
<td align="left">' . $locate->Translate("From") . ':
<SELECT id="startweek" name="startweek">
<OPTION value="1"';
if ($worktimes['startweek'] == 1) {
$html .= 'selected';
}
$html .= '>' . $locate->Translate("Monday") . '</OPTION>
<OPTION value="2"';
if ($worktimes['startweek'] == 2) {
$html .= 'selected';
}
$html .= '>' . $locate->Translate("Tuesday") . '</OPTION>
<OPTION value="3"';
if ($worktimes['startweek'] == 3) {
$html .= 'selected';
}
$html .= '>' . $locate->Translate("Wednesday") . '</OPTION>
<OPTION value="4"';
if ($worktimes['startweek'] == 4) {
$html .= 'selected';
}
$html .= '>' . $locate->Translate("Thursday") . '</OPTION>
<OPTION value="5"';
if ($worktimes['startweek'] == 5) {
$html .= 'selected';
}
$html .= '>' . $locate->Translate("Friday") . '</OPTION>
<OPTION value="6"';
if ($worktimes['startweek'] == 6) {
$html .= 'selected';
}
$html .= '>' . $locate->Translate("Saturday") . '</OPTION>
<OPTION value="7"';
if ($worktimes['startweek'] == 7) {
$html .= 'selected';
}
$html .= '>' . $locate->Translate("Sunday") . '</OPTION>
</SELECT> ' . $locate->Translate("To") . ':
<SELECT id="endweek" name="endweek">
<OPTION value="1"';
if ($worktimes['endweek'] == 1) {
$html .= 'selected';
}
$html .= '>' . $locate->Translate("Monday") . '</OPTION>
<OPTION value="2"';
if ($worktimes['endweek'] == 2) {
$html .= 'selected';
}
$html .= '>' . $locate->Translate("Tuesday") . '</OPTION>
<OPTION value="3"';
if ($worktimes['endweek'] == 3) {
$html .= 'selected';
}
$html .= '>' . $locate->Translate("Wednesday") . '</OPTION>
<OPTION value="4"';
if ($worktimes['endweek'] == 4) {
$html .= 'selected';
}
$html .= '>' . $locate->Translate("Thursday") . '</OPTION>
<OPTION value="5"';
if ($worktimes['endweek'] == 5) {
$html .= 'selected';
}
//.........这里部分代码省略.........
示例13: 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;
$result =& Customer::getRecordByID($id, 'user_types');
$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("usertype name") . '*</td>
<td align="left"><input type="hidden" id="id" name="id" value="' . $result['id'] . '"><input type="text" id="usertype_name" name="usertype_name" size="25" maxlength="30" value="' . $result['usertype_name'] . '"></td>
</tr>
<tr>
<td nowrap align="left">' . $locate->Translate("memo") . '*</td>
<td align="left"><textarea rows="8" cols="40" id="memo" name="memo">' . $result['memo'] . '</textarea></td>
</tr>
<tr style="height:200px;">
<td nowrap align="left" colspan="2">
<div style="width:100%;height:198px;overflow:auto;">';
$html .= Customer::getPrivilegePage($id);
$html .= '</div>
</td>
</tr>
<tr>
<td colspan="2" align="center"><button id="submitButton" onclick=\'update(xajax.getFormValues(f));return false;\'>' . $locate->Translate("continue") . '</button></td>
</tr>
</table>
</form>
' . $locate->Translate("obligatory_fields") . '
';
return $html;
}
示例14: trunkdetail
function trunkdetail($trunkid, $order)
{
global $db, $locate;
$trunk =& Customer::getRecordByID($trunkid, 'trunks');
$objResponse = new xajaxResponse();
if ($trunk['id'] > 0) {
$objResponse->addAssign('trunkname', "value", $trunk['trunkname']);
$objResponse->addAssign('protocoltype', "value", $trunk['trunkprotocol']);
$objResponse->addAssign('registrystring', "value", $trunk['registrystring']);
$objResponse->addAssign('trunkprefix', "value", $trunk['trunkprefix']);
$objResponse->addAssign('removeprefix', "value", $trunk['removeprefix']);
$objResponse->addAssign('timeout', "value", $trunk['trunktimeout']);
$objResponse->addAssign('detail', "value", $trunk['trunkdetail']);
}
//print_r($trunk);
//echo $trunkid;exit;
if ($order == 1) {
$objResponse->addAssign('whichtrunk', "value", 1);
$objResponse->addAssign('whichtrunktip', "innerHTML", $locate->Translate("trunk1"));
} else {
$objResponse->addAssign('whichtrunk', "value", 2);
$objResponse->addAssign('whichtrunktip', "innerHTML", $locate->Translate("trunk2"));
}
$objResponse->addScript('document.getElementById(\'trunk\').style.display=\'\'');
return $objResponse;
}
示例15: 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;
}