本文整理汇总了PHP中rex_select::setid方法的典型用法代码示例。如果您正苦于以下问题:PHP rex_select::setid方法的具体用法?PHP rex_select::setid怎么用?PHP rex_select::setid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类rex_select
的用法示例。
在下文中一共展示了rex_select::setid方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
$sel_smtpsecure->setAttribute('class', 'form-control');
$sel_smtpsecure->setSelected($this->getConfig('smtpsecure'));
foreach (['' => $this->i18n('no'), 'ssl' => 'ssl', 'tls' => 'tls'] as $type => $name) {
$sel_smtpsecure->addOption($name, $type);
}
$sel_encoding = new rex_select();
$sel_encoding->setId('phpmailer-encoding');
$sel_encoding->setName('settings[encoding]');
$sel_encoding->setSize(1);
$sel_encoding->setAttribute('class', 'form-control');
$sel_encoding->setSelected($this->getConfig('encoding'));
foreach (['7bit', '8bit', 'binary', 'base64', 'quoted-printable'] as $enc) {
$sel_encoding->addOption($enc, $enc);
}
$sel_priority = new rex_select();
$sel_priority->setid('phpmailer-priority');
$sel_priority->setName('settings[priority]');
$sel_priority->setSize(1);
$sel_priority->setAttribute('class', 'form-control');
$sel_priority->setSelected($this->getConfig('priority'));
foreach ([1 => $this->i18n('high'), 3 => $this->i18n('normal'), 5 => $this->i18n('low')] as $no => $name) {
$sel_priority->addOption($name, $no);
}
if ($message != '') {
echo rex_view::success($message);
}
$content = '';
$content .= '<fieldset><legend>' . $this->i18n('email_options') . '</legend>';
$formElements = [];
$n = [];
$n['label'] = '<label for="phpmailer-fromname">' . $this->i18n('sender_name') . '</label>';
示例2:
$sel_mailer->setName('mailer');
$sel_mailer->setSize(1);
$sel_mailer->setSelected($mailer);
foreach (array('mail', 'sendmail', 'smtp') as $type) {
$sel_mailer->addOption($type, $type);
}
$sel_encoding = new rex_select();
$sel_encoding->setId('encoding');
$sel_encoding->setName('encoding');
$sel_encoding->setSize(1);
$sel_encoding->setSelected($encoding);
foreach (array('7bit', '8bit', 'binary', 'base64', 'quoted-printable') as $enc) {
$sel_encoding->addOption($enc, $enc);
}
$sel_priority = new rex_select();
$sel_priority->setid('priority');
$sel_priority->setName('priority');
$sel_priority->setSize(1);
$sel_priority->setSelected($priority);
foreach (array(1 => $I18N_A93->msg('high'), 3 => $I18N_A93->msg('normal'), 5 => $I18N_A93->msg('low')) as $no => $name) {
$sel_priority->addOption($name, $no);
}
if ($message != '') {
echo rex_warning($message);
}
?>
<div class="rex-addon-editmode">
<form action="" method="post">
<fieldset>
<legend class="rex-lgnd"><?php
示例3:
$sel_encoding->setAttribute('class', 'form-control');
$sel_encoding->setSelected($this->getConfig('encoding'));
foreach (['7bit', '8bit', 'binary', 'base64', 'quoted-printable'] as $enc) {
$sel_encoding->addOption($enc, $enc);
}
$sel_priority = new rex_select();
$sel_priority->setid('phpmailer-priority');
$sel_priority->setName('settings[priority]');
$sel_priority->setSize(1);
$sel_priority->setAttribute('class', 'form-control');
$sel_priority->setSelected($this->getConfig('priority'));
foreach ([0 => $this->i18n('disabled'), 1 => $this->i18n('high'), 3 => $this->i18n('normal'), 5 => $this->i18n('low')] as $no => $name) {
$sel_priority->addOption($name, $no);
}
$sel_debug = new rex_select();
$sel_debug->setid('phpmailer-smtp_debug');
$sel_debug->setName('settings[smtp_debug]');
$sel_debug->setSize(1);
$sel_debug->setAttribute('class', 'form-control');
$sel_debug->setSelected($this->getConfig('smtp_debug'));
foreach ([0 => $this->i18n('smtp_debug_0'), 1 => $this->i18n('smtp_debug_1'), 2 => $this->i18n('smtp_debug_2'), 3 => $this->i18n('smtp_debug_3'), 4 => $this->i18n('smtp_debug_4')] as $no => $name) {
$sel_debug->addOption($name, $no);
}
if ($message != '') {
echo rex_view::success($message);
}
$content = '';
$content .= '<fieldset><legend>' . $this->i18n('email_options') . '</legend>';
$formElements = [];
$n = [];
$n['label'] = '<label for="phpmailer-fromname">' . $this->i18n('sender_name') . '</label>';