當前位置: 首頁>>代碼示例>>PHP>>正文


PHP astercrm::generateUniquePin方法代碼示例

本文整理匯總了PHP中astercrm::generateUniquePin方法的典型用法代碼示例。如果您正苦於以下問題:PHP astercrm::generateUniquePin方法的具體用法?PHP astercrm::generateUniquePin怎麽用?PHP astercrm::generateUniquePin使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在astercrm的用法示例。


在下文中一共展示了astercrm::generateUniquePin方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: formAdd

    /**
     *  Imprime la forma para agregar un nuevo registro sobre el DIV identificado por "formDiv".
     *
     *	@param ninguno
     *	@return $html	(string) Devuelve una cadena de caracteres que contiene la forma para insertar 
     *							un nuevo registro.
     */
    function formAdd()
    {
        global $locate, $config;
        $pin = astercrm::generateUniquePin(intval($config['system']['pin_len']));
        $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("Pin") . '*</td>
					<td align="left"><input type="text" id="pin" name="pin" size="25" maxlength="30" value="' . $pin . '" readonly><input type="hidden" id="pin" name="pin" value="' . $pin . '"></td>
				</tr>
				<tr>
					<td nowrap align="left">' . $locate->Translate("First name") . '</td>
					<td align="left"><input type="text" id="first_name" name="first_name" size="25" maxlength="50"></td>
				</tr>
				<tr>
					<td nowrap align="left">' . $locate->Translate("Last name") . '</td>
					<td align="left"><input type="text" id="last_name" name="last_name" size="25" maxlength="50"></td>
				</tr>
				<tr>
					<td nowrap align="left">' . $locate->Translate("Discount") . '</td>
					<td align="left"><input type="radio" id="discount_type" name="discount_type" value="0" onclick="selectDiscountType(this.value);" checked>' . $locate->Translate("Dynamic") . '<input type="radio" id="discount_type" name="discount_type" value="1" onclick="selectDiscountType(this.value);">' . $locate->Translate("Static") . '&nbsp;<input type="text" id="discount" name="discount" size="15" maxlength="10" disabled></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,代碼行數:44,代碼來源:customers.grid.inc.php

示例2: formAdd

    /**
     *  Imprime la forma para agregar un nuevo registro sobre el DIV identificado por "formDiv".
     *
     *	@param ninguno
     *	@return $html	(string) Devuelve una cadena de caracteres que contiene la forma para insertar 
     *							un nuevo registro.
     */
    function formAdd()
    {
        global $locate, $config;
        /*
        if ($_SESSION['curuser']['usertype'] == 'reseller'){
        	$group = astercrm::getAll('accountgroup','resellerid',$_SESSION['curuser']['resellerid']);
        }elseif($_SESSION['curuser']['usertype'] == 'admin'){
        	$group = astercrm::getAll('accountgroup');
        }
        
        while	($group->fetchInto($row)){
        	$groupoptions .= "<OPTION value='".$row['id']."'>".$row['groupname']."</OPTION>";
        }
        */
        $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']);
                }
                $reselleroptions .= "<OPTION value='" . $row['id'] . "'>" . $row['resellername'] . "</OPTION>";
            }
            $reselleroptions .= '</select>';
        } else {
            while ($reseller->fetchInto($row)) {
                if ($row['id'] == $_SESSION['curuser']['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', $_SESSION['curuser']['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']);
                }
                $groupoptions .= "<OPTION value='" . $row['id'] . "'>" . $row['groupname'] . "</OPTION>";
            }
            $groupoptions .= '</select>';
        } else {
            while ($group->fetchInto($row)) {
                if ($row['id'] == $_SESSION['curuser']['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;
                }
            }
        }
        $statusoptions = '
							<option value="1">' . $locate->Translate("Avaiable") . '</option>
							<option value="-1">' . $locate->Translate("Lock") . '</option>
						';
        $pin = astercrm::generateUniquePin(intval($config['system']['pin_len']));
        $configstatus = common::read_ini_file($config['system']['astercc_path'] . '/astercc.conf', $asterccConfig);
        if ($configstatus == -2) {
            $html = "(fail to read " . $config['system']['astercc_path'] . "/astercc.conf)";
            return $html;
        } else {
            $billingfield = trim($asterccConfig['system']['billingfield']);
        }
        $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">';
        if ($billingfield == 'accountcode') {
            $html .= $locate->Translate("Accountcode");
        } else {
            $html .= $locate->Translate("Caller ID");
        }
        $html .= '*</td>
					<td align="left"><input type="text" id="clid" name="clid" size="25" maxlength="30" onblur="document.getElementById(\'accountcode\').value = this.value;"></td>
				</tr>';
        if ($billingfield == 'callerid') {
            $html .= '
				<tr>
					<td nowrap align="left">' . $locate->Translate("Accountcode") . '</td>
					<td align="left"><input type="text" id="accountcode" name="accountcode" size="25" maxlength="40"></td>
				</tr>';
        } else {
//.........這裏部分代碼省略.........
開發者ID:ljhcj,項目名稱:IRISCC,代碼行數:101,代碼來源:clid.grid.inc.php


注:本文中的astercrm::generateUniquePin方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。