当前位置: 首页>>代码示例>>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;未经允许,请勿转载。