当前位置: 首页>>代码示例>>PHP>>正文


PHP rcube_utils::rep_specialchars_output方法代码示例

本文整理汇总了PHP中rcube_utils::rep_specialchars_output方法的典型用法代码示例。如果您正苦于以下问题:PHP rcube_utils::rep_specialchars_output方法的具体用法?PHP rcube_utils::rep_specialchars_output怎么用?PHP rcube_utils::rep_specialchars_output使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在rcube_utils的用法示例。


在下文中一共展示了rcube_utils::rep_specialchars_output方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: gen_form

 function gen_form()
 {
     $confirm = $this->rcmail_inst->config->get('password_confirm_current');
     $pwl = $this->rcmail_inst->config->get('password_min_length');
     if (!empty($pwl)) {
         $pwl = max(6, $pwl);
     } else {
         $pwl = 6;
     }
     $this->rcmail_inst->output->add_label('ispconfig3_pass.nopassword', 'ispconfig3_pass.nocurpassword', 'ispconfig3_pass.passwordinconsistency', 'ispconfig3_pass.changepasswd', 'ispconfig3_pass.passwordminlength');
     $this->rcmail_inst->output->add_script('var pw_min_length =' . $pwl . ';');
     $this->rcmail_inst->output->set_env('framed', true);
     $out .= '<fieldset><legend>' . $this->gettext('password') . '</legend>' . "\n";
     $table = new html_table(array('cols' => 2, 'class' => 'propform'));
     if ($confirm) {
         $input_newpasswd = new html_passwordfield(array('name' => '_curpasswd', 'id' => 'curpasswd', 'size' => 20));
         $table->add('title', rcube_utils::rep_specialchars_output($this->gettext('curpasswd')));
         $table->add('', $input_newpasswd->show());
     }
     $input_newpasswd = new html_passwordfield(array('name' => '_newpasswd', 'id' => 'newpasswd', 'size' => 20));
     $table->add('title', rcube_utils::rep_specialchars_output($this->gettext('newpasswd')));
     $table->add('', $input_newpasswd->show() . '<div id="pass-check">');
     $input_confpasswd = new html_passwordfield(array('name' => '_confpasswd', 'id' => 'confpasswd', 'size' => 20));
     $table->add('title', rcube_utils::rep_specialchars_output($this->gettext('confpasswd')));
     $table->add('', $input_confpasswd->show());
     $out .= $table->show();
     $out .= "</fieldset>\n";
     return $out;
 }
开发者ID:rickygestalt,项目名称:ispconfig3_roundcube,代码行数:29,代码来源:ispconfig3_pass.php

示例2: JQ

 /**
  * Quote a given string for javascript output.
  * Shortcut function for rcube_utils::rep_specialchars_output()
  *
  * @return string JS-quoted string
  */
 public static function JQ($str)
 {
     return rcube_utils::rep_specialchars_output($str, 'js');
 }
开发者ID:npk,项目名称:roundcubemail,代码行数:10,代码来源:rcmail.php

示例3: test_rep_specialchars_output

 /**
  * Test for rep_specialchars_output
  * @dataProvider data_rep_specialchars_output
  */
 function test_rep_specialchars_output($type, $mode, $str, $res)
 {
     $result = rcube_utils::rep_specialchars_output($str, $type ? $type : 'html', $mode ? $mode : 'strict');
     $this->assertEquals($result, $res);
 }
开发者ID:netcon-source,项目名称:roundcubemail,代码行数:9,代码来源:Utils.php

示例4: gen_js_list

 function gen_js_list()
 {
     // create JS version of rule list for updating UI via AJAX
     $this->_startup();
     if (sizeof($this->script) == 0) {
         // no rules exist, clear rule list
         $this->api->output->command('sieverules_update_list', 'add-first', -1, rcube_utils::rep_specialchars_output($this->gettext('nosieverules')));
     } else {
         foreach ($this->script as $idx => $filter) {
             $args = rcube::get_instance()->plugins->exec_hook('sieverules_list_rules', array('idx' => $idx, 'name' => $filter['name']));
             // skip the vacation and aborted rules
             if ($args['abort'] || $this->vacation_ui && $idx == $this->vacation_rule_position && $filter['name'] == $this->vacation_rule_name) {
                 $this->api->output->command('sieverules_update_list', $idx == 0 ? 'add-first' : 'add', 'rcmrow' . $idx, '', '', true);
             } else {
                 $parts = $this->_rule_list_parts($idx, $filter);
                 $parts['control'] = str_replace("'", "\\'", $parts['control']);
                 // send rule to UI
                 $this->api->output->command('sieverules_update_list', $idx == 0 ? 'add-first' : 'add', 'rcmrow' . $idx, rcmail::JQ($parts['name']), $parts['control'], $args['abort']);
             }
         }
     }
     $this->api->output->send();
 }
开发者ID:Kofl,项目名称:Roundcube-Plugin-SieveRules-Managesieve,代码行数:23,代码来源:sieverules.php

示例5: _address_row

 private function _address_row($address_table, $field, $value, $attrib)
 {
     if (!isset($field)) {
         $address_table->set_row_attribs(array('style' => 'display: none;'));
     }
     $hidden_action = new html_hiddenfield(array('name' => '_address_rule_act[]', 'value' => ''));
     $hidden_field = new html_hiddenfield(array('name' => '_address_rule_field[]', 'value' => $field));
     $hidden_text = new html_hiddenfield(array('name' => '_address_rule_value[]', 'value' => $value));
     switch ($field) {
         case "whitelist_from":
             $fieldtxt = rcube_utils::rep_specialchars_output($this->gettext('whitelist_from'));
             break;
         case "blacklist_from":
             $fieldtxt = rcube_utils::rep_specialchars_output($this->gettext('blacklist_from'));
             break;
         case "whitelist_to":
             $fieldtxt = rcube_utils::rep_specialchars_output($this->gettext('whitelist_to'));
             break;
     }
     $address_table->add(array('class' => $field), $fieldtxt);
     $address_table->add(array('class' => 'email'), $value);
     $del_button = $this->api->output->button(array('command' => 'plugin.sauserprefs.addressrule_del', 'type' => 'link', 'class' => 'delete', 'label' => 'delete', 'content' => ' '));
     $address_table->add('control', $del_button . $hidden_action->show() . $hidden_field->show() . $hidden_text->show());
     return $address_table;
 }
开发者ID:elurofilico,项目名称:i-MSCP-plugins,代码行数:25,代码来源:sauserprefs.php

示例6: gen_table

 function gen_table($attrib)
 {
     $this->rcmail_inst->output->set_env('framed', true);
     $out = '<fieldset><legend>' . $this->gettext('wblistentries') . '</legend>' . "\n";
     $rule_table = new html_table(array('id' => 'rule-table', 'class' => 'records-table', 'cellspacing' => '0', 'cols' => 4));
     $rule_table->add_header("", $this->gettext('wblistentries'));
     $rule_table->add_header(array('width' => '16px'), '');
     $rule_table->add_header(array('width' => '20px'), '');
     $rule_table->add_header(array('width' => '16px'), '');
     try {
         $session_id = $this->soap->login($this->rcmail_inst->config->get('remote_soap_user'), $this->rcmail_inst->config->get('remote_soap_pass'));
         $mail_user = $this->soap->mail_user_get($session_id, array('login' => $this->rcmail_inst->user->data['username']));
         $spam_user = $this->soap->mail_spamfilter_user_get($session_id, array('email' => $mail_user[0]['email']));
         $wblist = $this->soap->mail_spamfilter_whitelist_get($session_id, array('rid' => $spam_user[0]['id']));
         //$blist = $this->soap->mail_spamfilter_blacklist_get($session_id, array('rid' => $spam_user[0]['id']));
         //$wblist = array_merge($wlist, $blist);
         $this->soap->logout($session_id);
         for ($i = 0; $i < count($wblist); $i++) {
             $class = $class == 'odd' ? 'even' : 'odd';
             if ($wblist[$i]['wblist_id'] == rcube_utils::get_input_value('_id', RCUBE_INPUT_GET)) {
                 $class = 'selected';
             }
             $rule_table->set_row_attribs(array('class' => $class, 'id' => 'rule_' . $wblist[$i]['wblist_id']));
             $this->_rule_row($rule_table, $wblist[$i]['email'], $wblist[$i]['wb'], $wblist[$i]['active'], $wblist[$i]['wblist_id'], $attrib);
         }
     } catch (SoapFault $e) {
         $this->rcmail_inst->output->command('display_message', 'Soap Error: ' . $e->getMessage(), 'error');
     }
     if (count($wblist) == 0) {
         $rule_table->add(array('colspan' => '4'), rcube_utils::rep_specialchars_output($this->gettext('wblistnorules')));
         $rule_table->set_row_attribs(array('class' => 'odd'));
         $rule_table->add_row();
     }
     $out .= "<div id=\"rule-cont\">" . $rule_table->show() . "</div>\n";
     $out .= "</fieldset>\n";
     return $out;
 }
开发者ID:rickygestalt,项目名称:ispconfig3_roundcube,代码行数:37,代码来源:ispconfig3_wblist.php

示例7: gen_table

 function gen_table($attrib)
 {
     $this->rcmail_inst->output->set_env('framed', true);
     $out = '<fieldset><legend>' . $this->gettext('fetchmail_entries') . '</legend>' . "\n";
     $fetch_table = new html_table(array('id' => 'fetch-table', 'class' => 'records-table', 'cellspacing' => '0', 'cols' => 3));
     $fetch_table->add_header("", $this->gettext('fetchmailserver'));
     $fetch_table->add_header(array('width' => '20px'), '');
     $fetch_table->add_header(array('width' => '16px'), '');
     try {
         $session_id = $this->soap->login($this->rcmail_inst->config->get('remote_soap_user'), $this->rcmail_inst->config->get('remote_soap_pass'));
         $mail_user = $this->soap->mail_user_get($session_id, array('login' => $this->rcmail_inst->user->data['username']));
         $fetchmail = $this->soap->mail_fetchmail_get($session_id, array('destination' => $mail_user[0]['email']));
         $this->soap->logout($session_id);
         for ($i = 0; $i < count($fetchmail); $i++) {
             $class = $class == 'odd' ? 'even' : 'odd';
             if ($fetchmail[$i]['mailget_id'] == rcube_utils::get_input_value('_id', RCUBE_INPUT_GET)) {
                 $class = 'selected';
             }
             $fetch_table->set_row_attribs(array('class' => $class, 'id' => 'fetch_' . $fetchmail[$i]['mailget_id']));
             $this->_fetch_row($fetch_table, $fetchmail[$i]['source_username'] . '@' . $fetchmail[$i]['source_server'], $fetchmail[$i]['active'], $fetchmail[$i]['mailget_id'], $attrib);
         }
     } catch (SoapFault $e) {
         $this->rcmail_inst->output->command('display_message', 'Soap Error: ' . $e->getMessage(), 'error');
     }
     if (count($fetchmail) == 0) {
         $fetch_table->add(array('colspan' => '3'), rcube_utils::rep_specialchars_output($this->gettext('nofetch')));
         $fetch_table->set_row_attribs(array('class' => 'odd'));
         $fetch_table->add_row();
     }
     $out .= "<div id=\"fetch-cont\">" . $fetch_table->show() . "</div>\n";
     $out .= "</fieldset>\n";
     return $out;
 }
开发者ID:rickygestalt,项目名称:ispconfig3_roundcube,代码行数:33,代码来源:ispconfig3_fetchmail.php

示例8: gen_js_list

 function gen_js_list()
 {
     // create JS version of rule list for updating UI via AJAX
     $this->_startup();
     if (sizeof($this->script) == 0) {
         // no rules exist, clear rule list
         $this->api->output->command('sieverules_update_list', 'add-first', -1, rcube_utils::rep_specialchars_output($this->gettext('nosieverules')));
     } else {
         foreach ($this->script as $idx => $filter) {
             $parts = $this->_rule_list_parts($idx, $filter);
             $parts['control'] = str_replace("'", "\\'", $parts['control']);
             // send rule to UI
             $this->api->output->command('sieverules_update_list', $idx == 0 ? 'add-first' : 'add', 'rcmrow' . $idx, rcmail::JQ($parts['name']), $parts['control']);
         }
     }
     $this->api->output->send();
 }
开发者ID:ereslibre,项目名称:Roundcube-Plugin-SieveRules-Managesieve,代码行数:17,代码来源:sieverules.php

示例9: gen_form

 function gen_form()
 {
     try {
         $session_id = $this->soap->login($this->rcmail_inst->config->get('remote_soap_user'), $this->rcmail_inst->config->get('remote_soap_pass'));
         $mail_user = $this->soap->mail_user_get($session_id, array('login' => $this->rcmail_inst->user->data['username']));
         $this->soap->logout($session_id);
     } catch (SoapFault $e) {
         $this->rcmail_inst->output->command('display_message', 'Soap Error: ' . $e->getMessage(), 'error');
     }
     $enabled = $mail_user[0]['autoresponder'];
     if ($enabled == 'y') {
         $enabled = 1;
     } else {
         $enabled = 0;
     }
     if ($mail_user[0]['autoresponder_start_date'] == '0000-00-00 00:00:00') {
         $dt = new DateTime('@' . time());
         $dt->setTimeZone(new DateTimeZone($this->rcmail_inst->config->get('timezone')));
         $mail_user[0]['autoresponder_start_date'] = $dt->format('Y-m-d H:i');
     } else {
         $mail_user[0]['autoresponder_start_date'] = strtotime($mail_user[0]['autoresponder_start_date']);
         $dt = new DateTime('@' . $mail_user[0]['autoresponder_start_date']);
         $dt->setTimeZone(new DateTimeZone($this->rcmail_inst->config->get('timezone')));
         $mail_user[0]['autoresponder_start_date'] = $dt->format('Y-m-d H:i');
     }
     if ($mail_user[0]['autoresponder_end_date'] == '0000-00-00 00:00:00') {
         $dt = new DateTime('@' . (time() + 86400));
         $dt->setTimeZone(new DateTimeZone($this->rcmail_inst->config->get('timezone')));
         $mail_user[0]['autoresponder_end_date'] = $dt->format('Y-m-d H:i');
     } else {
         $mail_user[0]['autoresponder_end_date'] = strtotime($mail_user[0]['autoresponder_end_date']);
         $dt = new DateTime('@' . $mail_user[0]['autoresponder_end_date']);
         $dt->setTimeZone(new DateTimeZone($this->rcmail_inst->config->get('timezone')));
         $mail_user[0]['autoresponder_end_date'] = $dt->format('Y-m-d H:i');
     }
     $this->rcmail_inst->output->set_env('framed', true);
     $out = '<fieldset><legend>' . $this->gettext('acc_autoreply') . '</legend>' . "\n";
     $table = new html_table(array('cols' => 2, 'class' => 'propform'));
     $input_autoreplysubject = new html_inputfield(array('name' => '_autoreplysubject', 'id' => 'autoreplysubject', 'size' => 40));
     $table->add('title', rcube_utils::rep_specialchars_output($this->gettext('subject')));
     $table->add('', $input_autoreplysubject->show($mail_user[0]['autoresponder_subject']));
     $input_autoreplybody = new html_textarea(array('name' => '_autoreplybody', 'id' => 'autoreplybody', 'cols' => 48, 'rows' => 15));
     $table->add('title', rcube_utils::rep_specialchars_output($this->gettext('autoreplymessage')));
     $table->add('', $input_autoreplybody->show($mail_user[0]['autoresponder_text']));
     $input_autoreplystarton = new html_inputfield(array('name' => '_autoreplystarton', 'id' => 'autoreplystarton', 'size' => 20));
     $table->add('title', rcube_utils::rep_specialchars_output($this->gettext('autoreplystarton')));
     $table->add('', $input_autoreplystarton->show($mail_user[0]['autoresponder_start_date']));
     $input_autoreplyendby = new html_inputfield(array('name' => '_autoreplyendby', 'id' => 'autoreplyendby', 'size' => 20));
     $table->add('title', rcube_utils::rep_specialchars_output($this->gettext('autoreplyendby')));
     $table->add('', $input_autoreplyendby->show($mail_user[0]['autoresponder_end_date']));
     $input_autoreplyenabled = new html_checkbox(array('name' => '_autoreplyenabled', 'id' => 'autoreplyenabled', 'value' => 1));
     $table->add('title', rcube_utils::rep_specialchars_output($this->gettext('autoreplyenabled')));
     $table->add('', $input_autoreplyenabled->show($enabled));
     $out .= $table->show();
     $out .= "</fieldset>\n";
     return $out;
 }
开发者ID:rickygestalt,项目名称:ispconfig3_roundcube,代码行数:57,代码来源:ispconfig3_autoreply.php

示例10: JQ

function JQ($str)
{
    _deprecation_warning(__FUNCTION__);
    return rcube_utils::rep_specialchars_output($str, 'js');
}
开发者ID:JotapePinheiro,项目名称:roundcubemail,代码行数:5,代码来源:bc.php

示例11: gen_js_list

 function gen_js_list()
 {
     $this->_startup();
     if (sizeof($this->script) == 0) {
         $this->api->output->command('sieverules_update_list', 'add-first', -1, rcube_utils::rep_specialchars_output($this->gettext('nosieverules')));
     } else {
         foreach ($this->script as $idx => $filter) {
             if ($filter['disabled'] == 1) {
                 $filter_name = $filter['name'] . ' (' . $this->gettext('disabled') . ')';
             } else {
                 $filter_name = $filter['name'];
             }
             $tmp_output = new rcube_output_html('settings');
             $dst = $idx - 1;
             $up_link = $tmp_output->button(array('command' => 'plugin.sieverules.move', 'prop' => $dst, 'type' => 'link', 'class' => 'up_arrow', 'title' => 'sieverules.moveup', 'content' => ' '));
             $up_link = str_replace("'", "\\'", $up_link);
             $dst = $idx + 2;
             $down_link = $tmp_output->button(array('command' => 'plugin.sieverules.move', 'prop' => $dst, 'type' => 'link', 'class' => 'down_arrow', 'title' => 'sieverules.movedown', 'content' => ' '));
             $down_link = str_replace("'", "\\'", $down_link);
             $this->api->output->command('sieverules_update_list', $idx == 0 ? 'add-first' : 'add', 'rcmrow' . $idx, rcmail::JQ($filter_name), $down_link, $up_link);
         }
     }
     $this->api->output->send();
 }
开发者ID:netconstructor,项目名称:Roundcube-Plugin-SieveRules-Managesieve,代码行数:24,代码来源:sieverules.php

示例12: gen_table

 function gen_table($attrib)
 {
     $this->rcmail_inst->output->set_env('framed', true);
     $out = '<fieldset><legend>' . $this->gettext('forward_entries') . '</legend>' . "\n";
     $rule_table = new html_table(array('id' => 'rule-table', 'class' => 'records-table', 'cellspacing' => '0', 'cols' => 2));
     $rule_table->add_header("", $this->gettext('forward_entries'));
     $rule_table->add_header(array('width' => '16px'), '');
     try {
         $session_id = $this->soap->login($this->rcmail_inst->config->get('remote_soap_user'), $this->rcmail_inst->config->get('remote_soap_pass'));
         $mail_user = $this->soap->mail_user_get($session_id, array('login' => $this->rcmail_inst->user->data['username']));
         $this->soap->logout($session_id);
         $forward = explode(",", $mail_user[0]['cc']);
         if (!empty($forward[0])) {
             for ($i = 0; $i < count($forward); $i++) {
                 $class = $class == 'odd' ? 'even' : 'odd';
                 if ($forward[$i] == rcube_utils::get_input_value('_forwardingaddress', RCUBE_INPUT_GET)) {
                     $class = 'selected';
                 }
                 $rule_table->set_row_attribs(array('class' => $class, 'id' => 'rule_' . $forward[$i]));
                 $this->_rule_row($rule_table, $forward[$i], $attrib);
             }
         } else {
             $rule_table->add(array('colspan' => '2'), rcube_utils::rep_specialchars_output($this->gettext('forwardnomails')));
             $rule_table->set_row_attribs(array('class' => 'odd'));
             $rule_table->add_row();
         }
     } catch (SoapFault $e) {
         $this->rcmail_inst->output->command('display_message', 'Soap Error: ' . $e->getMessage(), 'error');
     }
     $out .= "<div id=\"rule-cont\">" . $rule_table->show() . "</div>\n";
     $out .= "</fieldset>\n";
     return $out;
 }
开发者ID:rickygestalt,项目名称:ispconfig3_roundcube,代码行数:33,代码来源:ispconfig3_forward.php


注:本文中的rcube_utils::rep_specialchars_output方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。