本文整理汇总了PHP中featurecode::getCode方法的典型用法代码示例。如果您正苦于以下问题:PHP featurecode::getCode方法的具体用法?PHP featurecode::getCode怎么用?PHP featurecode::getCode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类featurecode
的用法示例。
在下文中一共展示了featurecode::getCode方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showPage
public function showPage()
{
$media = $this->FreePBX->Media();
$action = !empty($_REQUEST['action']) ? $_REQUEST['action'] : "";
switch ($action) {
case "edit":
$data = $this->getRecordingById($_REQUEST['id']);
$fcc = new \featurecode("recordings", 'edit-recording-' . $_REQUEST['id']);
$rec_code = $fcc->getCode();
$data['rec_code'] = $rec_code != '' ? $rec_code : $this->fcbase . $_REQUEST['id'];
case "add":
$data = isset($data) ? $data : array();
$supported = $media->getSupportedFormats();
ksort($supported['in']);
ksort($supported['out']);
$langs = $this->FreePBX->Soundlang->getLanguages();
$default = $this->FreePBX->Soundlang->getLanguage();
$sysrecs = $this->getSystemRecordings();
$jsonsysrecs = json_encode($sysrecs);
$message = '';
if (json_last_error() !== JSON_ERROR_NONE) {
$message = sprintf(_("There was an error reading system recordings (%s)"), json_last_error_msg());
freepbx_log(FPBX_LOG_WARNING, "JSON decode error: " . json_last_error_msg());
$jsonsysrecs = array();
$sysrecs = array();
}
$supportedHTML5 = $media->getSupportedHTML5Formats();
$convertto = array_intersect($supported['out'], $this->convert);
$html = load_view(__DIR__ . "/views/form.php", array("message" => $message, "jsonsysrecs" => $jsonsysrecs, "convertto" => $convertto, "supportedHTML5" => implode(",", $supportedHTML5), "data" => $data, "default" => $default, "supported" => $supported, "langs" => $langs, "sysrecs" => $sysrecs));
break;
case "delete":
$this->delRecording($_REQUEST['id']);
default:
$html = load_view(__DIR__ . "/views/grid.php", array());
break;
}
return $html;
}
示例2: voicemail_configpageload
//.........这里部分代码省略.........
$alloptions = array_keys($vmoptions);
if (isset($alloptions)) {
foreach ($alloptions as $option) {
if ($option != "attach" && $option != "envelope" && $option != "passlogin" && $option != "novmstar" && $option != "saycid" && $option != "delete" && $option != "imapuser" && $option != "imappassword" && $option != '') {
$options .= $option . '=' . $vmoptions[$option] . '|';
}
}
$options = rtrim($options, '|');
// remove the = sign if there are no options set
$options = rtrim($options, '=');
}
extract($vmoptions, EXTR_PREFIX_ALL, "vmops");
} else {
$vmops_novmstar = 'no';
$vmops_passlogin = 'yes';
$vmops_attach = 'no';
$vmops_saycid = 'no';
$vmops_envelope = 'no';
$vmops_delete = 'no';
$vmops_imapuser = null;
$vmops_imappassword = null;
}
if (empty($vmcontext)) {
$vmcontext = isset($_REQUEST['vmcontext']) ? $_REQUEST['vmcontext'] : $incontext;
}
if (empty($vmcontext)) {
$vmcontext = 'default';
}
if ($vm == true) {
$vmselect = "enabled";
} else {
$vmselect = "disabled";
}
$fc_vm = featurecodes_getFeatureCode('voicemail', 'dialvoicemail');
$msgInvalidVmPwd = _("Please enter a valid Voicemail Password, using digits only");
$msgInvalidEmail = _("Please enter a valid Email Address");
$msgInvalidPager = _("Please enter a valid Pager Email Address");
$msgInvalidVMContext = _("VM Context cannot be blank");
$vmops_imapuser = isset($vmops_imapuser) ? $vmops_imapuser : '';
$vmops_imappassword = isset($vmops_imappassword) ? $vmops_imappassword : '';
$section = _("Voicemail");
$class = "fpbx-voicemail";
$category = "voicemail";
$guidefaults = array("elemname" => "", "prompttext" => "", "helptext" => "", "currentvalue" => "", "valarray" => array(), "jsonclick" => '', "jsvalidation" => "", "failvalidationmsg" => "", "canbeempty" => true, "maxchars" => 0, "disable" => false, "inputgroup" => false, "class" => "");
$el = array("elemname" => "vm", "prompttext" => _('Enabled'), "currentvalue" => $vmselect, "valarray" => $currentcomponent->getoptlist('vmena'), "jsonclick" => "frm_{$display}_voicemailEnabled() && frm_{$display}_vmxEnabled()", "pairedvalues" => false);
$currentcomponent->addguielem($section, new gui_radio(array_merge($guidefaults, $el)), $category);
$disable = $vmselect == 'disabled';
$el = array("elemname" => "vmpwd", "prompttext" => _('Voicemail Password'), "helptext" => sprintf(_("This is the password used to access the Voicemail system.%sThis password can only contain numbers.%sA user can change the password you enter here after logging into the Voicemail system (%s) with a phone."), "<br /><br />", "<br /><br />", $fc_vm), "currentvalue" => $vmpwd, "jsvalidation" => "frm_{$display}_isVoiceMailEnabled() && !frm_{$display}_isValidVoicemailPass()", "failvalidationmsg" => $msgInvalidVmPwd, "canbeempty" => false, "class" => $class, "disable" => $disable, "passwordToggle" => true);
$currentcomponent->addguielem($section, new gui_password(array_merge($guidefaults, $el)), $category);
//for passwordless voicemail we need to check some settings
//first lets see if there is an entry in the asteriskDB for this device
//no entry in the db is the same as yes, meaning we need a voicemail password
$passlogin = !empty($extdisplay) ? $astman->connected() && $astman->database_get("AMPUSER", $extdisplay . "/novmpw") : 'yes';
$passlogin = !empty($passlogin) ? 'no' : 'yes';
//now lets get our featurecodes for helptext display niceties
$mvm = new featurecode('voicemail', 'myvoicemail');
$dvm = new featurecode('voicemail', 'dialvoicemail');
$extword = $display == 'extensions' ? _('Extension') : _('Device');
$display_mode = "advanced";
$mode = \FreePBX::Config()->get("FPBXOPMODE");
if (!empty($mode)) {
$display_mode = $mode;
}
if ($display_mode == "basic") {
$tb = $rb = "gui_hidden";
} else {
$tb = "gui_textbox";
$rb = "gui_radio";
}
$el = array("elemname" => "passlogin", "prompttext" => sprintf(_('Require From Same %s'), $extword), "helptext" => sprintf(_("If set to \"no\" then when the user dials %s to access their own voicemail, they will not be asked to enter a password. This does not apply to %s calls, which will always prompt for a password. For security reasons, this should probably be set to \"yes\" in an environment where other users will have physical access to this extension."), $mvm->getCode(), $dvm->getCode()), "currentvalue" => $passlogin, "valarray" => $currentcomponent->getoptlist('vmyn'), "disable" => $disable, "class" => $class);
$currentcomponent->addguielem($section, new $rb(array_merge($guidefaults, $el)), $category);
$novmstar = !empty($extdisplay) ? $astman->connected() && $astman->database_get("AMPUSER", $extdisplay . "/novmstar") : 'yes';
$novmstar = !empty($novmstar) ? 'yes' : 'no';
$el = array("elemname" => "novmstar", "prompttext" => _("Disable (*) in Voicemail Menu"), "helptext" => sprintf(_("If set to \"yes\" then when someone dials this voicemail box they will not be able to access the voicemail menu by pressing (*). If you have no plans to access your mailbox remotely set this to \"yes\""), $mvm->getCode(), $dvm->getCode()), "currentvalue" => $novmstar, "valarray" => $currentcomponent->getoptlist('vmyn'), "disable" => $disable, "class" => $class);
$currentcomponent->addguielem($section, new $rb(array_merge($guidefaults, $el)), $category);
$el = array("elemname" => "email", "prompttext" => _('Email Address'), "helptext" => _("The email address that Voicemails are sent to."), "currentvalue" => $email, "jsvalidation" => "frm_{$display}_isVoiceMailEnabled() && frm_{$display}_isEmailAttachment() && !isEmail()", "failvalidationmsg" => $msgInvalidEmail, "canbeempty" => false, "class" => $class, "disable" => $disable);
$currentcomponent->addguielem($section, new gui_textbox(array_merge($guidefaults, $el)), $category);
$el = array("elemname" => "pager", "prompttext" => _('Pager Email Address'), "helptext" => _("Pager/mobile email address that short Voicemail notifications are sent to."), "currentvalue" => $pager, "jsvalidation" => "frm_{$display}_isVoiceMailEnabled() && !isEmpty() && !isEmail()", "failvalidationmsg" => $msgInvalidEmail, "canbeempty" => false, "class" => $class, "disable" => $disable);
$currentcomponent->addguielem($section, new $tb(array_merge($guidefaults, $el)), $category);
$el = array("elemname" => "attach", "prompttext" => _('Email Attachment'), "helptext" => _("Option to attach Voicemails to email."), "currentvalue" => $vmops_attach, "valarray" => $currentcomponent->getoptlist('vmyn'), "disable" => $disable, "class" => $class);
$currentcomponent->addguielem($section, new $rb(array_merge($guidefaults, $el)), $category);
$el = array("elemname" => "saycid", "prompttext" => _('Play CID'), "helptext" => _("Read back caller's telephone number prior to playing the incoming message, and just after announcing the date and time the message was left."), "currentvalue" => $vmops_saycid, "valarray" => $currentcomponent->getoptlist('vmyn'), "disable" => $disable, "class" => $class);
$currentcomponent->addguielem($section, new $rb(array_merge($guidefaults, $el)), $category);
$el = array("elemname" => "envelope", "prompttext" => _('Play Envelope'), "helptext" => _("Envelope controls whether or not the Voicemail system will play the message envelope (date/time) before playing the Voicemail message. This setting does not affect the operation of the envelope option in the advanced Voicemail menu."), "currentvalue" => $vmops_envelope, "valarray" => $currentcomponent->getoptlist('vmyn'), "disable" => $disable, "class" => $class);
$currentcomponent->addguielem($section, new $rb(array_merge($guidefaults, $el)), $category);
$el = array("elemname" => "vmdelete", "prompttext" => _('Delete Voicemail'), "helptext" => _("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."), "currentvalue" => $vmops_delete, "valarray" => $currentcomponent->getoptlist('vmyn'), "disable" => $disable, "class" => $class);
$currentcomponent->addguielem($section, new $rb(array_merge($guidefaults, $el)), $category);
if ($amp_conf['VM_SHOW_IMAP'] || $vmops_imapuser || $vmops_imappassword) {
$el = array("elemname" => "imapuser", "prompttext" => _('IMAP Username'), "helptext" => sprintf(_("This is the IMAP username, if using IMAP storage"), "<br /><br />"), "currentvalue" => $vmops_imapuser, "class" => $class, "disable" => $disable);
$currentcomponent->addguielem($section, new $tb(array_merge($guidefaults, $el)), $category);
$el = array("elemname" => "imappassword", "prompttext" => _('IMAP Password'), "helptext" => sprintf(_("This is the IMAP password, if using IMAP storage"), "<br /><br />"), "currentvalue" => $vmops_imapuser, "class" => $class, "disable" => $disable);
$currentcomponent->addguielem($section, new $tb(array_merge($guidefaults, $el)), $category);
}
$el = array("elemname" => "options", "prompttext" => _('VM Options'), "helptext" => sprintf(_("Separate options with pipe ( | )%sie: review=yes|maxmessage=60"), "<br /><br />"), "currentvalue" => $options, "class" => $class, "disable" => $disable);
$currentcomponent->addguielem($section, new $tb(array_merge($guidefaults, $el)), $category);
$el = array("elemname" => "vmcontext", "prompttext" => _('VM Context'), "helptext" => _("This is the Voicemail Context which is normally set to default. Do not change unless you understand the implications."), "currentvalue" => $incontext, "class" => $class, "disable" => $disable, "jsvalidation" => "frm_{$display}_isVoiceMailEnabled() && isEmpty()", "failvalidationmsg" => $msgInvalidVMContext);
$currentcomponent->addguielem($section, new $tb(array_merge($guidefaults, $el)), $category);
voicemail_draw_vmxgui($extdisplay, $disable);
}
}
示例3: showPage
public function showPage()
{
if (!empty($_REQUEST['action']) && $_REQUEST['action'] == "delete" && !empty($_REQUEST['id']) && !empty($_REQUEST['ext'])) {
$file = $this->FreePBX->Config->get('ASTSPOOLDIR') . "/outgoing/wuc." . $_REQUEST['id'] . ".ext." . $_REQUEST['ext'] . ".call";
if (file_exists($file)) {
unlink($file);
}
}
$action = !empty($_POST['action']) ? $_POST['action'] : '';
$fcc = new \featurecode('hotelwakeup', 'hotelwakeup');
$code = $fcc->getCode();
switch ($action) {
case "settings":
preg_match('/"(.*)" <(.*)>/', $_POST['callerid'], $matches);
$this->saveConfig(array("operator_mode" => $_POST['operator_mode'], "extensionlength" => $_POST['extensionlength'], "operator_extensions" => $_POST['operator_extensions'], "waittime" => $_POST['waittime'], "retrytime" => $_POST['retrytime'], "maxretries" => $_POST['maxretries'], "cid" => !empty($matches[2]) ? $matches[2] : $code, "cnam" => !empty($matches[1]) ? $matches[1] : _("Wake Up Calls")));
break;
}
$content = load_view(__DIR__ . "/views/grid.php", array("code" => $code, "config" => $this->getConfig()));
return load_view(__DIR__ . "/views/main.php", array("pageContent" => $content));
}
示例4: urlencode
<div class="rnav"><ul>
<li><a id="<?php
echo $itemid == '' ? 'current' : '';
?>
" href="config.php?display=<?php
echo urlencode($dispnum);
?>
&action=add"><?php
echo _("Add Day/Night Code");
?>
</a></li>
<?php
if (isset($daynightcodes)) {
foreach ($daynightcodes as $code) {
$fcc = new featurecode('daynight', 'toggle-mode-' . $code['ext']);
$fc = $fcc->getCode();
unset($fcc);
$dnobj = daynight_get_obj($code['ext']);
$color = $dnobj['state'] == 'DAY' ? "style='color:green'" : "style='color:red'";
echo "<li><a {$color} id=\"" . ($itemid == $code['ext'] ? 'current' : '') . "\" href=\"config.php?display=" . urlencode($dispnum) . "&itemid=" . urlencode($code['ext']) . "&action=edit\">({$fc}) {$code['dest']}</a></li>";
}
}
?>
</ul></div>
<?php
switch ($action) {
case "add":
daynight_show_edit($_POST, 'add');
break;
case "edit":
daynight_show_edit($_POST);
示例5: outn
function outn($text)
{
echo $text;
}
}
$sql = "CREATE TABLE IF NOT EXISTS daynight \n (\n\t\t\t\text varchar(10) NOT NULL default '',\n\t\t\t\tdmode varchar(40) NOT NULL default '',\n\t\t\t dest varchar(255) NOT NULL default '',\n\t\t\t\tPRIMARY KEY (ext, dmode, dest)\n\t\t\t );\n\t\t\t ";
$check = $db->query($sql);
if (DB::IsError($check)) {
die_freepbx("Can not create daynight table");
}
// Get the old feature code if it existed to determine
// if it had been changed and if it was enabled
//
$delete_old = false;
$fcc = new featurecode('daynight', 'toggle-mode');
$code = $fcc->getCode();
if ($code != '') {
$delete_old = true;
$enabled = $fcc->isEnabled();
$fcc->delete();
}
unset($fcc);
// If we found the old one then we must create all the new ones
//
if ($delete_old) {
$list = daynight_list();
foreach ($list as $item) {
$id = $item['ext'];
$fc_description = $item['dest'];
$fcc = new featurecode('daynight', 'toggle-mode-' . $id);
if ($fc_description) {
示例6: getTimeCondition
public function getTimeCondition($id)
{
$sql = "SELECT * FROM timeconditions WHERE timeconditions_id = :id LIMIT 1";
$stmt = $this->db->prepare($sql);
$stmt->execute(array(':id' => $id));
$results = $stmt->fetch();
$fcc = new \featurecode('timeconditions', 'toggle-mode-' . $id);
$c = $fcc->getCodeActive();
$results['tcval'] = $fcc->getCode();
unset($fcc);
if ($c == '') {
$results['tcstate'] = false;
$results['tccode'] = false;
} else {
$results['tccode'] = $c;
if ($this->astman != null) {
$results['tcstate'] = $this->getState($id);
} else {
die_freepbx("No manager connection, can't get Time Condition State");
}
}
return $results;
}
示例7: die
if (!defined('FREEPBX_IS_AUTH')) {
die('No direct script access allowed');
}
//for translation only
if (false) {
_("Info Services");
_("Directory");
_("Call Trace");
_("Echo Test");
_("Speaking Clock");
_("Speak Your Exten Number");
}
//removed # to call directory in 2.10, this doesnt make sense with the current directory module
$fcc = new featurecode('infoservices', 'directory');
if ($fcc->getCode()) {
$fcc->delete();
}
unset($fcc);
$fcc = new featurecode('infoservices', 'calltrace');
$fcc->setDescription('Call Trace');
$fcc->setDefault('*69');
$fcc->update();
unset($fcc);
$fcc = new featurecode('infoservices', 'echotest');
$fcc->setDescription('Echo Test');
$fcc->setDefault('*43');
$fcc->setProvideDest();
$fcc->update();
unset($fcc);
$fcc = new featurecode('infoservices', 'speakingclock');
示例8: recording_editpage
//.........这里部分代码省略.........
</textarea></td>
</tr>
<?php
// This was being called twice: $rec = recordings_get($id);
$rec = $this_recording;
$fn = $rec['filename'];
$files = explode('&', $fn);
$counter = 0;
$arraymax = count($files) - 1;
$sndfile_html = "";
$jq_autofill = "";
foreach ($files as $item) {
$sndfile_html .= recordings_display_sndfile($item, $counter, $arraymax, $recordings_astsnd_path, $rec['fcode']);
$counter++;
// create the jquery autofill statements in advance of the next iteration or the blank one at the end
// on mouseover to the <td> element (since select doesn't have mouseover event), we clone the populated
// select options and put them into this one which is created just with the selected tag. Then set the
// selected value based on what is in the hidden tag. (we skip the hidden tag but for now ...)
//
$jq_autofill .= '
$("#sysrec' . $counter . '").parent().one("mouseover", function(){
$selectload = $("#selectload' . $counter . '").show(80,function(){
$("#sysrec' . $counter . '").empty().append($optlist.clone()).val($("#sysrecval' . $counter . '").val());
$(this).hide();
});
});
';
}
$sndfile_html .= recordings_display_sndfile('', $counter, $arraymax, $recordings_astsnd_path, $rec['fcode']);
if ($arraymax == 0 && isset($files[0]) && substr($files[0], 0, 7) == 'custom/') {
if ($rec['fcode']) {
$fcc = new featurecode("recordings", 'edit-recording-' . $id);
$rec_code = $fcc->getCode();
unset($fcc);
if ($rec_code == '') {
$rec_code = $fcbase . $id;
}
} else {
$rec_code = $fcbase . $id;
}
?>
<tr>
<td><a class="info" href="#"><?php
echo _("Link to Feature Code");
?>
<span><?php
echo _("Check this box to create an options feature code that will allow this recording to be changed directly.");
?>
</span></a>:
</td>
<td>
<input type='checkbox' tabindex="<?php
echo ++$tabindex;
?>
"name='fcode' id="fcode" <?php
if ($rec['fcode'] == "1") {
echo 'CHECKED';
}
?>
OnClick="resetDefaultSound();"; return true;'><?php
echo sprintf(_("Optional Feature Code %s"), $rec_code);
?>
</td>
</tr>
<tr>
示例9: voicemail_configpageload
function voicemail_configpageload()
{
global $currentcomponent;
global $amp_conf;
global $astman;
// Init vars from $_REQUEST[]
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : null;
$ext = isset($_REQUEST['extdisplay']) ? $_REQUEST['extdisplay'] : null;
$extn = isset($_REQUEST['extension']) ? $_REQUEST['extension'] : null;
$display = isset($_REQUEST['display']) ? $_REQUEST['display'] : null;
if ($ext === '') {
$extdisplay = $extn;
} else {
$extdisplay = $ext;
}
if ($action != 'del') {
$vmbox = voicemail_mailbox_get($extdisplay);
if ($vmbox == null) {
$vm = false;
$incontext = 'default';
$vmpwd = null;
$name = null;
$email = null;
$pager = null;
$vmoptions = null;
$vmx_state = '';
} else {
$incontext = isset($vmbox['vmcontext']) ? $vmbox['vmcontext'] : 'default';
$vmpwd = $vmbox['pwd'];
$name = $vmbox['name'];
$email = $vmbox['email'];
$pager = $vmbox['pager'];
$vmoptions = $vmbox['options'];
$vm = true;
$vmxobj = new vmxObject($extdisplay);
$vmx_state = $vmxobj->isEnabled() ? 'checked' : '';
unset($vmxobj);
}
//loop through all options
$options = "";
if (isset($vmoptions) && is_array($vmoptions)) {
$alloptions = array_keys($vmoptions);
if (isset($alloptions)) {
foreach ($alloptions as $option) {
if ($option != "attach" && $option != "envelope" && $option != "passlogin" && $option != "saycid" && $option != "delete" && $option != "imapuser" && $option != "imappassword" && $option != '') {
$options .= $option . '=' . $vmoptions[$option] . '|';
}
}
$options = rtrim($options, '|');
// remove the = sign if there are no options set
$options = rtrim($options, '=');
}
extract($vmoptions, EXTR_PREFIX_ALL, "vmops");
} else {
$vmops_passlogin = 'yes';
$vmops_attach = 'no';
$vmops_saycid = 'no';
$vmops_envelope = 'no';
$vmops_delete = 'no';
$vmops_imapuser = null;
$vmops_imappassword = null;
}
if (empty($vmcontext)) {
$vmcontext = isset($_REQUEST['vmcontext']) ? $_REQUEST['vmcontext'] : $incontext;
}
if (empty($vmcontext)) {
$vmcontext = 'default';
}
if ($vm == true) {
$vmselect = "enabled";
} else {
$vmselect = "disabled";
}
$fc_vm = featurecodes_getFeatureCode('voicemail', 'dialvoicemail');
$msgInvalidVmPwd = _("Please enter a valid Voicemail Password, using digits only");
$msgInvalidEmail = _("Please enter a valid Email Address");
$msgInvalidPager = _("Please enter a valid Pager Email Address");
$msgInvalidVMContext = _("VM Context cannot be blank");
$vmops_imapuser = isset($vmops_imapuser) ? $vmops_imapuser : '';
$vmops_imappassword = isset($vmops_imappassword) ? $vmops_imappassword : '';
$section = _("Voicemail");
$currentcomponent->addguielem($section, new gui_selectbox('vm', $currentcomponent->getoptlist('vmena'), $vmselect, _('Status'), '', false, "frm_{$display}_voicemailEnabled() && frm_{$display}_vmx_disable_fields()"));
$disable = $vmselect == 'disabled';
$currentcomponent->addguielem($section, new gui_textbox('vmpwd', $vmpwd, _('Voicemail Password'), sprintf(_("This is the password used to access the Voicemail system.%sThis password can only contain numbers.%sA user can change the password you enter here after logging into the Voicemail system (%s) with a phone."), "<br /><br />", "<br /><br />", $fc_vm), "frm_{$display}_isVoiceMailEnabled() && !frm_{$display}_verifyEmptyVoiceMailPassword() && !frm_{$display}_isValidVoicemailPass()", $msgInvalidVmPwd, false, 0, $disable));
//for passwordless voicemail we need to check some settings
//first lets see if there is an entry in the asteriskDB for this device
//no entry in the db is the same as yes, meaning we need a voicemail password
$passlogin = !empty($extdisplay) ? $astman->database_get("AMPUSER", $extdisplay . "/novmpw") : 'yes';
$passlogin = !empty($passlogin) ? 'no' : 'yes';
//now lets get our featurecodes for helptext display niceties
$mvm = new featurecode('voicemail', 'myvoicemail');
$dvm = new featurecode('voicemail', 'dialvoicemail');
$extword = $display == 'extensions' ? _('Extension') : _('Device');
$currentcomponent->addguielem($section, new gui_radio('passlogin', $currentcomponent->getoptlist('vmyn'), $passlogin, sprintf(_('Require From Same %s'), $extword), sprintf(_("If set to \"no\" then when the user dials %s to access their own voicemail, they will not be asked to enter a password. This does not apply to %s calls, which will always prompt for a password. For security reasons, this should probably be set to \"yes\" in an environment where other users will have physical access to this extension."), $mvm->getCode(), $dvm->getCode()), $disable));
$currentcomponent->addguielem($section, new gui_textbox('email', $email, _('Email Address'), _("The email address that Voicemails are sent to."), "frm_{$display}_isVoiceMailEnabled() && !isEmail()", $msgInvalidEmail, true, 0, $disable));
$currentcomponent->addguielem($section, new gui_textbox('pager', $pager, _('Pager Email Address'), _("Pager/mobile email address that short Voicemail notifications are sent to."), "frm_{$display}_isVoiceMailEnabled() && !isEmail()", $msgInvalidEmail, true, 0, $disable));
$currentcomponent->addguielem($section, new gui_radio('attach', $currentcomponent->getoptlist('vmyn'), $vmops_attach, _('Email Attachment'), _("Option to attach Voicemails to email."), $disable));
$currentcomponent->addguielem($section, new gui_radio('saycid', $currentcomponent->getoptlist('vmyn'), $vmops_saycid, _('Play CID'), _("Read back caller's telephone number prior to playing the incoming message, and just after announcing the date and time the message was left."), $disable));
$currentcomponent->addguielem($section, new gui_radio('envelope', $currentcomponent->getoptlist('vmyn'), $vmops_envelope, _('Play Envelope'), _("Envelope controls whether or not the Voicemail system will play the message envelope (date/time) before playing the Voicemail message. This setting does not affect the operation of the envelope option in the advanced Voicemail menu."), $disable));
$currentcomponent->addguielem($section, new gui_radio('delete', $currentcomponent->getoptlist('vmyn'), $vmops_delete, _('Delete Voicemail'), _("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."), $disable));
//.........这里部分代码省略.........
示例10: _
</th>
<th data-sortable="true"><?php
echo _("State");
?>
</th>
<th><?php
echo _("Actions");
?>
</th>
</tr>
</thead>
<tbody>
<?php
foreach ($daynightcodes as $row) {
$fcc = new featurecode('daynight', 'toggle-mode-' . $row['ext']);
$fc = $fcc->getCode();
$dnobj = daynight_get_obj($row['ext']);
?>
<tr>
<td><?php
echo $fcc->getCode();
?>
</td>
<td><?php
echo $row['dest'];
?>
</td>
<td><span class="label label-<?php
echo $dnobj['state'] == 'DAY' ? "success" : "danger";
?>
"><?php