⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 page.extensions.php

📁 最近在做软交换时研究的一个软交换的东东
💻 PHP
📖 第 1 页 / 共 2 页
字号:
					<option value="Always" <?php  echo ($record_out == "Always") ? 'selected' : '' ?>><?php echo _("Always")?>					<option value="Never" <?php  echo ($record_out == "Never") ? 'selected' : '' ?>><?php echo _("Never")?>				</select>			</td>		</tr>				<tr>			<td colspan="2">				<h5><br><?php echo _("Device Options")?><hr></h5>			</td>		</tr>		<?phpswitch(strtolower($tech)) {	case "zap":		$basic = array(			'channel' => '',		);		$advanced = array(			'context' => 'from-internal',			'signalling' => 'fxo_ks',			'echocancel' => 'yes',			'echocancelwhenbridged' => 'no',			'echotraining' => '800',			'busydetect' => 'no',			'busycount' => '7',			'callprogress' => 'no',			'dial' => '',			'accountcode' => '',			'mailbox' => ''		);	break;	case "iax2":		$basic = array(			'secret' => '',		);		$advanced = array(			'notransfer' => 'yes',			'context' => 'from-internal',			'host' => 'dynamic',			'type' => 'friend',			'port' => '4569',			'qualify' => 'no',			'disallow' => '',			'allow' => '',			'dial' => '',			'accountcode' => '',			'mailbox' => ''		);			break;	case "sip":		$basic = array(			'secret' => '',			'dtmfmode' => 'rfc2833'		);		$advanced = array(			'canreinvite' => 'no',			'context' => 'from-internal',			'host' => 'dynamic',			'type' => 'friend',			'nat' => 'never',			'port' => '5060',			'qualify' => 'no',			'callgroup' => '',			'pickupgroup' => '',			'disallow' => '',			'allow' => '',			'dial' => '',			'accountcode' => '',			'mailbox' => ''		);	break;	case "custom":		$basic = array(			'dial' => '',		);		$advanced = array();	break;}if($extdisplay != '') {	foreach($basic as $key => $value) {		echo "<tr><td>"._("{$key}")."</td><td><input type=\"text\" name=\"{$key}\" value=\"{$$key}\"/></td></tr>";	}	foreach($advanced as $key => $value) {		echo "<tr><td>"._("{$key}")."</td><td><input type=\"text\" name=\"{$key}\" value=\"{$$key}\"/></td></tr>";	}} else {	foreach($basic as $key => $value) {		echo "<tr><td>{$key}</td><td><input type=\"text\" name=\"{$key}\" value=\"{$value}\"/></td></tr>";	}	foreach($advanced as $key => $value) {		echo "<input type=\"hidden\" name=\"{$key}\" value=\"{$value}\"/>";	}}?>			<tr><td colspan=2>				<h5><br><br><?php echo _("Voicemail & Directory:")?>&nbsp;&nbsp;&nbsp;&nbsp;					<select name="vm" onchange="checkVoicemail(addNew);">						<option value="enabled" <?php  echo ($vm) ? 'selected' : '' ?>><?php echo _("Enabled");?></option> 						<option value="disabled" <?php  echo (!$vm) ? 'selected' : '' ?>><?php echo _("Disabled");?></option> 					</select>				<hr></h5>			</td></tr>			<tr><td colspan=2>				<table id="voicemail" <?php  echo ($vm) ? '' : 'style="display:none;"' ?>>				<tr>					<td>						<a href="#" class="info"><?php echo _("voicemail password")?><span><?php echo _("This is the password used to access the voicemail system.<br><br>This password can only contain numbers.<br><br>A user can change the password you enter here after logging into the voicemail system (*98) with a phone.")?><br><br></span></a>: 					</td><td>						<input size="10" type="text" name="vmpwd" value="<?php echo isset($vmpwd)?$vmpwd:'' ?>"/>					</td>				</tr>				<tr>					<td><a href="#" class="info"><?php echo _("email address")?><span><?php echo _("The email address that voicemails are sent to.")?></span></a>: </td>					<td><input type="text" name="email" value="<?php echo htmlspecialchars(isset($email)?$email:''); ?>"/></td>				</tr>				<tr>					<td><a href="#" class="info"><?php echo _("pager email address")?><span><?echo _("Pager/mobile email address that short voicemail notifcations are sent to.")?></span></a>: </td>					<td><input type="text" name="pager" value="<?php echo htmlspecialchars(isset($pager)?$pager:''); ?>"/></td>				</tr>				<tr> 					<td><a href="#" class="info"><?php echo _("email attachment")?><span><?php echo _("Option to attach voicemails to email.")?></span></a>: </td> 					<?php if (isset($vmops_attach) && $vmops_attach == "yes"){?> 					<td><input  type="radio" name="attach" value="attach=yes" checked=checked/> <?php echo _("yes");?> &nbsp;&nbsp;&nbsp;&nbsp;<input  type="radio" name="attach" value="attach=no"/> <?php echo _("no");?></td> 					<?php } else{ ?> 					<td><input  type="radio" name="attach" value="attach=yes" /> <?php echo _("yes");?> &nbsp;&nbsp;&nbsp;&nbsp;<input  type="radio" name="attach" value="attach=no" checked=checked /> <?php echo _("no");?></td> <?php }?> 				</tr> 				<tr> 					<td><a href="#" class="info"><?php echo _("Play CID")?><span><?php echo _("Read back caller's telephone number prior to playing the incoming message, and just after announcing the date and time the message was left.")?></span></a>: </td> 					<?php if (isset($vmops_saycid) && $vmops_saycid == "yes"){?> 					<td><input  type="radio" name="saycid" value="saycid=yes" checked=checked/> <?php echo _("yes");?> &nbsp;&nbsp;&nbsp;&nbsp;<input  type="radio" name="saycid" value="saycid=no"/> <?php echo _("no");?></td> 					<?php } else{ ?> 					<td><input  type="radio" name="saycid" value="saycid=yes" /> <?php echo _("yes");?> &nbsp;&nbsp;&nbsp;&nbsp;<input  type="radio" name="saycid" value="saycid=no" checked=checked /> <?php echo _("no");?></td> <?php }?> 				</tr>				<tr> 					<td><a href="#" class="info"><?php echo _("Play Envelope")?><span><?php echo _("Envelope controls whether or not the voicemail system will play the message envelope (date/time) before playing the voicemail message. This settng does not affect the operation of the envelope option in the advanced voicemail menu.")?></span></a>: </td> 					<?php if (isset($vmops_envelope) && $vmops_envelope == "yes"){?> 					<td><input  type="radio" name="envelope" value="envelope=yes" checked=checked/> <?php echo _("yes");?> &nbsp;&nbsp;&nbsp;&nbsp;<input  type="radio" name="envelope" value="envelope=no"/> <?php echo _("no");?></td> 					<?php } else{ ?> 					<td><input  type="radio" name="envelope" value="envelope=yes" /> <?php echo _("yes");?> &nbsp;&nbsp;&nbsp;&nbsp;<input  type="radio" name="envelope" value="envelope=no" checked=checked /> <?php echo _("no");?></td> <?php }?> 				</tr>				<tr> 					<td><a href="#" class="info"><?php echo _("Delete Vmail")?><span><?php echo _("If set to \"yes\" the message will be deleted from the voicemailbox (after having been emailed). Provides functionality that allows a user to receive their voicemail via email alone, rather than having the voicemail able to be retrieved from the Webinterface or the Extension handset.  CAUTION: MUST HAVE attach voicemail to email SET TO YES OTHERWISE YOUR MESSAGES WILL BE LOST FOREVER.")?></span></a>: </td> 					<?php if (isset($vmops_delete) && $vmops_delete == "yes"){?> 					<td><input  type="radio" name="delete" value="delete=yes" checked=checked/> <?php echo _("yes");?> &nbsp;&nbsp;&nbsp;&nbsp;<input  type="radio" name="delete" value="delete=no"/> <?php echo _("no");?></td> 					<?php } else{ ?> 					<td><input  type="radio" name="delete" value="delete=yes" /> <?php echo _("yes");?> &nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="delete" value="delete=no" checked=checked /> <?php echo _("no");?></td> <?php }?> 				</tr> 				 				<tr>					<td><a href="#" class="info"><?php echo _("vm options")?><span><?php echo _("Separate options with pipe ( | )")?><br><br><?php echo _("ie: review=yes|maxmessage=60")?></span></a>: </td>					<td><input size="20" type="text" name="options" value="<?php  echo htmlspecialchars(isset($options)?$options:''); ?>" /></td>				</tr>				<tr>					<td><?php echo _("vm context:")?> </td>					<td><input size="20" type="text" name="vmcontext" value="<?php  echo $vmcontext; ?>" /></td>				</tr>			</table>		</td></tr>						<tr>			<td colspan=2>				<br><br><h6><input name="Submit" type="submit" value="<?php echo _("Submit")?>">			</td>		</tr>		</table><script language="javascript"><!--var theForm = document.addNew;if (theForm.extension.value == "") {	theForm.extension.focus();} else {	theForm.description.focus();}function addNew_onsubmit() {	var msgInvalidExtNum = "<?php echo _('Please enter a valid extension number.'); ?>";	var msgInvalidDevDesc = "<?php echo _('Please enter a valid Description for this device'); ?>";	var msgInvalidOutboundCID = "<?php echo _('Please enter a valid Outbound CID'); ?>";	var msgInvalidEmergCID = "<?php echo _('Please enter a valid Emergency CID'); ?>";	var msgInvalidDTMFMODE = "<?php echo _('Please enter the dtmfmode for this device'); ?>";	var msgInvalidChannel = "<?php echo _('Please enter the channel for this device'); ?>";	var msgInvalidVmPwd = "<?php echo _('Please enter a valid Voicemail Password, using digits only'); ?>";	var msgInvalidEmail = "<?php echo _('Please enter a valid Email Address'); ?>";	var msgInvalidPager = "<?php echo _('Please enter a valid Pager Email Address'); ?>";	var msgInvalidVMContext = "<?php echo _('VM Context cannot be blank'); ?>";	var msgConfirmSecret = "<?php echo _('You have not entered a Secret for this device, although this is possible it is generally bad practice to not assign a Secret to a device.\n\nAre you sure you want to leave the Secret empty?'); ?>";	defaultEmptyOK = false;	if (!isInteger(theForm.extension.value))		return warnInvalid(theForm.extension, msgInvalidExtNum);	if (!isCallerID(theForm.description.value))		return warnInvalid(theForm.description, msgInvalidDevDesc);	defaultEmptyOK = true;	if (!isCallerID(theForm.outboundcid.value))		return warnInvalid(theForm.outboundcid, msgInvalidOutboundCID);	if (!isCallerID(theForm.emergency_cid.value))		return warnInvalid(theForm.emergency_cid, msgInvalidEmergCID);	defaultEmptyOK = false;	if (theForm.dtmfmode != undefined && isEmpty(theForm.dtmfmode.value))		return warnInvalid(theForm.dtmfmode, msgInvalidDTMFMODE);	if (theForm.channel != undefined && isEmpty(theForm.channel.value))		return warnInvalid(theForm.channel, msgInvalidChannel);	// voicemail stuff	if (theForm.vm.value == "enabled") {		defaultEmptyOK = false;		if (!isInteger(theForm.vmpwd.value))			return warnInvalid(theForm.vmpwd, msgInvalidVmPwd);				defaultEmptyOK = true;		if (!isEmail(theForm.email.value))			return warnInvalid(theForm.email, msgInvalidEmail);					if (!isEmail(theForm.pager.value))			return warnInvalid(theForm.pager, msgInvalidPager);					defaultEmptyOK = false;		if (isEmpty(theForm.vmcontext.value) || isWhitespace(theForm.vmcontext.value))			return warnInvalid(theForm.vmcontext, msgInvalidVMContext);			}	if (theForm.secret != undefined && isEmpty(theForm.secret.value)) {		var cnf = confirm(msgConfirmSecret);		if (!cnf) {			theForm.secret.focus();			return false;		}	}	return true;}function checkVoicemail(theForm) {	$vm = theForm.elements["vm"].value;	if ($vm == 'disabled') {		document.getElementById('voicemail').style.display='none';		theForm.vmpwd.value = '';		theForm.email.value = '';		theForm.pager.value = '';	} else {		document.getElementById('voicemail').style.display='block';	}}//--></script>		</form><?php 			} //end if action == delGRP	?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -