本文整理汇总了PHP中html_table类的典型用法代码示例。如果您正苦于以下问题:PHP html_table类的具体用法?PHP html_table怎么用?PHP html_table使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了html_table类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render_page
/**
* Callback function when HTML page is rendered
* We'll add an overlay box here.
*/
function render_page($p)
{
if ($_SESSION['plugin.newuserdialog'] && $p['template'] == 'mail') {
$this->add_texts('localization');
$rcmail = rcmail::get_instance();
$identity = $rcmail->user->get_identity();
$identities_level = intval($rcmail->config->get('identities_level', 0));
// compose user-identity dialog
$table = new html_table(array('cols' => 2));
$table->add('title', $this->gettext('name'));
$table->add(null, html::tag('input', array('type' => 'text', 'name' => '_name', 'value' => $identity['name'], 'disabled' => $identities_level == 4)));
$table->add('title', $this->gettext('email'));
$table->add(null, html::tag('input', array('type' => 'text', 'name' => '_email', 'value' => rcube_utils::idn_to_utf8($identity['email']), 'disabled' => in_array($identities_level, array(1, 3, 4)))));
$table->add('title', $this->gettext('organization'));
$table->add(null, html::tag('input', array('type' => 'text', 'name' => '_organization', 'value' => $identity['organization'], 'disabled' => $identities_level == 4)));
$table->add('title', $this->gettext('signature'));
$table->add(null, html::tag('textarea', array('name' => '_signature', 'rows' => '3'), $identity['signature']));
// add overlay input box to html page
$rcmail->output->add_footer(html::tag('form', array('id' => 'newuserdialog', 'action' => $rcmail->url('plugin.newusersave'), 'method' => 'post'), html::p('hint', rcube::Q($this->gettext('identitydialoghint'))) . $table->show() . html::p(array('class' => 'formbuttons'), html::tag('input', array('type' => 'submit', 'class' => 'button mainaction', 'value' => $this->gettext('save'))))));
$title = rcube::JQ($this->gettext('identitydialogtitle'));
$script = "\n\$('#newuserdialog').show()\n .dialog({modal:true, resizable:false, closeOnEscape:false, width:450, title:'{$title}'})\n .submit(function() {\n var i, request = {}, form = \$(this).serializeArray();\n for (i in form)\n request[form[i].name] = form[i].value;\n\n rcmail.http_post('plugin.newusersave', request, true);\n return false;\n });\n\n\$('input[name=_name]').focus();\nrcube_webmail.prototype.new_user_dialog_close = function() { \$('#newuserdialog').dialog('close'); }\n";
// disable keyboard events for messages list (#1486726)
$rcmail->output->add_script($script, 'docready');
$this->include_stylesheet('newuserdialog.css');
}
}
示例2: gen_form
function gen_form()
{
list($form_start, $form_end) = get_form_tags(null, 'plugin.changepasswd_AD.save');
// return the complete form as table
$out = $form_start;
$table = new html_table(array('cols' => 2));
// show old password field
$field_id = 'rcmfd_curpwd';
$input_curpasswd = new html_passwordfield(array('name' => '_curpasswd', 'id' => $field_id));
$table->add('title', html::label($field_id, Q($this->gettext('curpasswd'))));
$table->add(null, $input_curpasswd->show());
// show new password field
$field_id = 'rcmfd_newpwd';
$input_newpasswd = new html_passwordfield(array('name' => '_newpasswd', 'id' => $field_id));
$table->add('title', html::label($field_id, Q($this->gettext('newpasswd'))));
$table->add(null, $input_newpasswd->show());
// show new password confirm field
$field_id = 'rcmfd_cnfpwd';
$input_confpasswd = new html_passwordfield(array('name' => '_confpasswd', 'id' => $field_id));
$table->add('title', html::label($field_id, Q($this->gettext('confpasswd'))));
$table->add(null, $input_confpasswd->show());
$out .= $table->show();
$out .= $form_end;
return $out;
}
示例3: gen_form
function gen_form()
{
$user = $this->rcmail_inst->user->get_prefs();
$this->rcmail_inst->output->add_label('ispconfig3_forward.invalidaddress', 'ispconfig3_forward.forwardingempty');
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');
}
$this->rcmail_inst->output->set_env('framed', TRUE);
$out .= '<fieldset><legend>' . $this->gettext('acc_forward') . '</legend>' . "\n";
$table = new html_table(array('cols' => 2, 'class' => 'propform'));
$input_forwardingaddress = new html_inputfield(array('name' => '_forwardingaddress', 'id' => 'forwardingaddress', 'value' => $forward[1], 'maxlength' => 320, 'size' => 40));
$table->add('title', rep_specialchars_output($this->gettext('forwardingaddress')));
$table->add('', $input_forwardingaddress->show($mail_user[0]['cc']));
$out .= $table->show();
$out .= "</fieldset>\n";
return $out;
}
示例4: render_page
/**
* Callback function when HTML page is rendered
* We'll add an overlay box here.
*/
function render_page($p)
{
if ($_SESSION['plugin.newuserdialog'] && $p['template'] == 'mail') {
$this->add_texts('localization');
$rcmail = rcmail::get_instance();
$identity = $rcmail->user->get_identity();
$identities_level = intval($rcmail->config->get('identities_level', 0));
// compose user-identity dialog
$table = new html_table(array('cols' => 2));
$table->add('title', $this->gettext('name'));
$table->add(null, html::tag('input', array('type' => 'text', 'name' => '_name', 'value' => $identity['name'])));
$table->add('title', $this->gettext('email'));
$table->add(null, html::tag('input', array('type' => 'text', 'name' => '_email', 'value' => rcube_idn_to_utf8($identity['email']), 'disabled' => $identities_level == 1 || $identities_level == 3)));
$table->add('title', $this->gettext('organization'));
$table->add(null, html::tag('input', array('type' => 'text', 'name' => '_organization', 'value' => $identity['organization'])));
$table->add('title', $this->gettext('signature'));
$table->add(null, html::tag('textarea', array('name' => '_signature', 'rows' => '3'), $identity['signature']));
// add overlay input box to html page
$rcmail->output->add_footer(html::div(array('id' => 'newuseroverlay'), html::tag('form', array('action' => $rcmail->url('plugin.newusersave'), 'method' => 'post'), html::tag('h3', null, Q($this->gettext('identitydialogtitle'))) . html::p('hint', Q($this->gettext('identitydialoghint'))) . $table->show() . html::p(array('class' => 'formbuttons'), html::tag('input', array('type' => 'submit', 'class' => 'button mainaction', 'value' => $this->gettext('save')))))));
// disable keyboard events for messages list (#1486726)
$rcmail->output->add_script("rcmail.message_list.key_press = function(){};\n rcmail.message_list.key_down = function(){};\n \$('input[name=_name]').focus();\n ", 'docready');
$this->include_stylesheet('newuserdialog.css');
}
}
示例5: forward_form
public function forward_form()
{
$table = new html_table(array('cols' => 2));
$field_id = 'forwardforwards';
$text_forwardforwards = new html_textarea(array('name' => '_forwardforwards', 'id' => $field_id, 'spellcheck' => 1, 'rows' => 6, 'cols' => 40));
$table->add('title', html::label($field_id, Q($this->gettext('forwardforwards'))));
$table->add(null, $text_forwardforwards->show($this->obj->get_forward_forwards()));
$field_id = 'forwardkeepcopies';
$input_forwardkeepcopies = new html_checkbox(array('name' => '_forwardkeepcopies', 'id' => $field_id, 'value' => 1));
$table->add('title', html::label($field_id, Q($this->gettext('forwardkeepcopies'))));
$table->add(null, $input_forwardkeepcopies->show($this->obj->is_forward_keepcopies() === true || $this->obj->is_forward_keepcopies() == "1" || $this->obj->is_forward_keepcopies() == "t" || $this->obj->is_forward_keepcopies() == "y" || $this->obj->is_forward_keepcopies() == "yes" ? 1 : 0));
$out = html::div(array('class' => "box"), html::div(array('id' => "prefs-title", 'class' => 'boxtitle'), $this->gettext('forward')) . html::div(array('class' => "boxcontent"), $table->show() . html::p(null, $this->rc->output->button(array('command' => 'plugin.forward-save', 'type' => 'input', 'class' => 'button mainaction', 'label' => 'save')))));
$this->rc->output->add_gui_object('forwardform', 'forward-form');
return $this->rc->output->form_tag(array('id' => 'forward-form', 'name' => 'forward-form', 'method' => 'post', 'action' => './?_task=settings&_action=plugin.forward-save'), $out);
}
示例6: password_form
function password_form()
{
$rcmail = rcmail::get_instance();
$this->load_config();
// add some labels to client
$rcmail->output->add_label('imscp_pw_changer.nopassword', 'imscp_pw_changer.passwordinconsistency');
$rcmail->output->set_env('product_name', $rcmail->config->get('product_name'));
$table = new html_table(array('cols' => 2));
// show new password selection
$field_id = 'newpasswd';
$input_newpasswd = new html_passwordfield(array('name' => '_newpasswd', 'id' => $field_id, 'size' => 20, 'autocomplete' => 'off'));
$table->add('title', html::label($field_id, Q($this->gettext('newpasswd'))));
$table->add(null, $input_newpasswd->show());
// show confirm password selection
$field_id = 'confpasswd';
$input_confpasswd = new html_passwordfield(array('name' => '_confpasswd', 'id' => $field_id, 'size' => 20, 'autocomplete' => 'off'));
$table->add('title', html::label($field_id, Q($this->gettext('confpasswd'))));
$table->add(null, $input_confpasswd->show());
$out = html::div(array('class' => 'box'), html::div(array('id' => "prefs-title", 'class' => 'boxtitle'), $this->gettext('changepasswd')) . html::div(array('class' => 'boxcontent'), $table->show() . html::p(null, $rcmail->output->button(array('command' => 'plugin.imscp_pw_changer-save', 'type' => 'input', 'class' => 'button mainaction', 'label' => 'save')))));
$rcmail->output->add_gui_object('passform', 'imscp_pw_changer-form');
return $rcmail->output->form_tag(array('id' => 'imscp_pw_changer-form', 'name' => 'imscp_pw_changer-form', 'method' => 'post', 'action' => './?_task=settings&_action=plugin.imscp_pw_changer-save'), $out);
}
示例7: render_page
/**
* Callback function when HTML page is rendered
* We'll add an overlay box here.
*/
function render_page($p)
{
if ($_SESSION['plugin.newuserdialog']) {
$this->add_texts('localization');
$rcmail = rcmail::get_instance();
$identity = $rcmail->user->get_identity();
$identities_level = intval($rcmail->config->get('identities_level', 0));
// compose user-identity dialog
$table = new html_table(array('cols' => 2));
$table->add('title', $this->gettext('name'));
$table->add(null, html::tag('input', array('type' => "text", 'name' => "_name", 'value' => $identity['name'])));
$table->add('title', $this->gettext('email'));
$table->add(null, html::tag('input', array('type' => "text", 'name' => "_email", 'value' => $identity['email'], 'disabled' => $identities_level == 1 || $identities_level == 3)));
// add overlay input box to html page
$rcmail->output->add_footer(html::div(array('id' => "newuseroverlay"), html::tag('form', array('action' => $rcmail->url('plugin.newusersave'), 'method' => "post"), html::tag('h3', null, Q($this->gettext('identitydialogtitle'))) . html::p('hint', Q($this->gettext('identitydialoghint'))) . $table->show() . html::p(array('class' => "formbuttons"), html::tag('input', array('type' => "submit", 'class' => "button mainaction", 'value' => $this->gettext('save')))))));
$this->include_stylesheet('newuserdialog.css');
}
}
示例8: list_rights
/**
* Creates ACL rights table
*
* @param array $attrib Template object attributes
*
* @return string HTML Content
*/
private function list_rights($attrib = array())
{
// Get ACL for the folder
$acl = $this->rc->storage->get_acl($this->mbox);
if (!is_array($acl)) {
$acl = array();
}
// Keep special entries (anyone/anonymous) on top of the list
if (!empty($this->specials) && !empty($acl)) {
foreach ($this->specials as $key) {
if (isset($acl[$key])) {
$acl_special[$key] = $acl[$key];
unset($acl[$key]);
}
}
}
// Sort the list by username
uksort($acl, 'strnatcasecmp');
if (!empty($acl_special)) {
$acl = array_merge($acl_special, $acl);
}
// Get supported rights and build column names
$supported = $this->rights_supported();
// depending on server capability either use 'te' or 'd' for deleting msgs
$deleteright = implode(array_intersect(str_split('ted'), $supported));
// Use advanced or simple (grouped) rights
$advanced = $this->rc->config->get('acl_advanced_mode');
if ($advanced) {
$items = array();
foreach ($supported as $sup) {
$items[$sup] = $sup;
}
} else {
$items = array('read' => 'lrs', 'write' => 'wi', 'delete' => $deleteright, 'other' => preg_replace('/[lrswi' . $deleteright . ']/', '', implode($supported)));
}
// Create the table
$attrib['noheader'] = true;
$table = new html_table($attrib);
// Create table header
$table->add_header('user', $this->gettext('identifier'));
foreach (array_keys($items) as $key) {
$label = $this->gettext('shortacl' . $key);
$table->add_header(array('class' => 'acl' . $key, 'title' => $label), $label);
}
$js_table = array();
foreach ($acl as $user => $rights) {
if ($this->rc->storage->conn->user == $user) {
continue;
}
// filter out virtual rights (c or d) the server may return
$userrights = array_intersect($rights, $supported);
$userid = rcube_utils::html_identifier($user);
if (!empty($this->specials) && in_array($user, $this->specials)) {
$user = $this->gettext($user);
}
$table->add_row(array('id' => 'rcmrow' . $userid));
$table->add('user', rcube::Q($user));
foreach ($items as $key => $right) {
$in = $this->acl_compare($userrights, $right);
switch ($in) {
case 2:
$class = 'enabled';
break;
case 1:
$class = 'partial';
break;
default:
$class = 'disabled';
break;
}
$table->add('acl' . $key . ' ' . $class, '');
}
$js_table[$userid] = implode($userrights);
}
$this->rc->output->set_env('acl', $js_table);
$this->rc->output->set_env('acl_advanced', $advanced);
$out = $table->show();
return $out;
}
示例9: table_output
/**
* Create a HTML table based on the given data
*
* @param array Named table attributes
* @param mixed Table row data. Either a two-dimensional array or a valid SQL result set
* @param array List of cols to show
* @param string Name of the identifier col
*
* @return string HTML table code
*/
public function table_output($attrib, $table_data, $a_show_cols, $id_col)
{
$table = new html_table();
// add table header
if (!$attrib['noheader']) {
foreach ($a_show_cols as $col) {
$table->add_header($col, $this->Q($this->gettext($col)));
}
}
if (!is_array($table_data)) {
$db = $this->get_dbh();
while ($table_data && ($sql_arr = $db->fetch_assoc($table_data))) {
$table->add_row(array('id' => 'rcmrow' . rcube_utils::html_identifier($sql_arr[$id_col])));
// format each col
foreach ($a_show_cols as $col) {
$table->add($col, $this->Q($sql_arr[$col]));
}
}
} else {
foreach ($table_data as $row_data) {
$class = !empty($row_data['class']) ? $row_data['class'] : '';
$rowid = 'rcmrow' . rcube_utils::html_identifier($row_data[$id_col]);
$table->add_row(array('id' => $rowid, 'class' => $class));
// format each col
foreach ($a_show_cols as $col) {
$table->add($col, $this->Q(is_array($row_data[$col]) ? $row_data[$col][0] : $row_data[$col]));
}
}
}
return $table->show($attrib);
}
示例10: output_individual_question_data
function output_individual_question_data($quiz, $question, $reporturl, $quizstats)
{
global $CFG, $DB, $QTYPES, $OUTPUT;
require_once $CFG->dirroot . '/mod/quiz/report/statistics/statistics_question_table.php';
$this->qtable = new quiz_report_statistics_question_table($question->id);
$downloadtype = $this->table->is_downloading();
if (!$this->table->is_downloading()) {
$datumfromtable = $this->table->format_row($question);
$questioninfotable = new html_table();
$questioninfotable->align = array('center', 'center');
$questioninfotable->width = '60%';
$questioninfotable->add_class('generaltable titlesleft');
$questioninfotable->data = array();
$questioninfotable->data[] = array(get_string('modulename', 'quiz'), $quiz->name);
$questioninfotable->data[] = array(get_string('questionname', 'quiz_statistics'), $question->name . ' ' . $datumfromtable['actions']);
$questioninfotable->data[] = array(get_string('questiontype', 'quiz_statistics'), $datumfromtable['icon'] . ' ' . get_string($question->qtype, 'quiz') . ' ' . $datumfromtable['icon']);
$questioninfotable->data[] = array(get_string('positions', 'quiz_statistics'), $question->_stats->positions);
$questionstatstable = new html_table();
$questionstatstable->align = array('center', 'center');
$questionstatstable->width = '60%';
$questionstatstable->add_class('generaltable titlesleft');
unset($datumfromtable['number']);
unset($datumfromtable['icon']);
$actions = $datumfromtable['actions'];
unset($datumfromtable['actions']);
unset($datumfromtable['name']);
$labels = array('s' => get_string('attempts', 'quiz_statistics'), 'facility' => get_string('facility', 'quiz_statistics'), 'sd' => get_string('standarddeviationq', 'quiz_statistics'), 'random_guess_score' => get_string('random_guess_score', 'quiz_statistics'), 'intended_weight' => get_string('intended_weight', 'quiz_statistics'), 'effective_weight' => get_string('effective_weight', 'quiz_statistics'), 'discrimination_index' => get_string('discrimination_index', 'quiz_statistics'), 'discriminative_efficiency' => get_string('discriminative_efficiency', 'quiz_statistics'));
foreach ($datumfromtable as $item => $value) {
$questionstatstable->data[] = array($labels[$item], $value);
}
echo $OUTPUT->heading(get_string('questioninformation', 'quiz_statistics'));
echo $OUTPUT->table($questioninfotable);
echo $OUTPUT->box(format_text($question->questiontext, $question->questiontextformat) . $actions, 'boxaligncenter generalbox boxwidthnormal mdl-align');
echo $OUTPUT->heading(get_string('questionstatistics', 'quiz_statistics'));
echo $OUTPUT->table($questionstatstable);
} else {
$this->qtable->export_class_instance($this->table->export_class_instance());
$questiontabletitle = !empty($question->number) ? '(' . $question->number . ') ' : '';
$questiontabletitle .= "\"{$question->name}\"";
$questiontabletitle = "<em>{$questiontabletitle}</em>";
if ($downloadtype == 'xhtml') {
$questiontabletitle = get_string('analysisofresponsesfor', 'quiz_statistics', $questiontabletitle);
}
$exportclass =& $this->table->export_class_instance();
$exportclass->start_table($questiontabletitle);
}
if ($QTYPES[$question->qtype]->show_analysis_of_responses()) {
if (!$this->table->is_downloading()) {
echo $OUTPUT->heading(get_string('analysisofresponses', 'quiz_statistics'));
}
$teacherresponses = $QTYPES[$question->qtype]->get_possible_responses($question);
$this->qtable->setup($reporturl, $question, count($teacherresponses) > 1);
if ($this->table->is_downloading()) {
$exportclass->output_headers($this->qtable->headers);
}
$responses = $DB->get_records('quiz_question_response_stats', array('quizstatisticsid' => $quizstats->id, 'questionid' => $question->id), 'credit DESC, subqid ASC, aid ASC, rcount DESC');
$responses = quiz_report_index_by_keys($responses, array('subqid', 'aid'), false);
foreach ($responses as $subqid => $response) {
foreach (array_keys($responses[$subqid]) as $aid) {
uasort($responses[$subqid][$aid], array('quiz_statistics_report', 'sort_answers'));
}
if (isset($responses[$subqid]['0'])) {
$wildcardresponse = new object();
$wildcardresponse->answer = '*';
$wildcardresponse->credit = 0;
$teacherresponses[$subqid][0] = $wildcardresponse;
}
}
$first = true;
$subq = 0;
foreach ($teacherresponses as $subqid => $tresponsesforsubq) {
$subq++;
$qhaswildcards = $QTYPES[$question->qtype]->has_wildcards_in_responses($question, $subqid);
if (!$first) {
$this->qtable->add_separator();
}
uasort($tresponsesforsubq, array('quiz_statistics_report', 'sort_response_details'));
foreach ($tresponsesforsubq as $aid => $teacherresponse) {
$teacherresponserow = new object();
$teacherresponserow->response = $teacherresponse->answer;
$teacherresponserow->rcount = 0;
$teacherresponserow->subq = $subq;
$teacherresponserow->credit = $teacherresponse->credit;
if (isset($responses[$subqid][$aid])) {
$singleanswer = count($responses[$subqid][$aid]) == 1 && $responses[$subqid][$aid][0]->response == $teacherresponserow->response;
if (!$singleanswer && $qhaswildcards) {
$this->qtable->add_separator();
}
foreach ($responses[$subqid][$aid] as $response) {
$teacherresponserow->rcount += $response->rcount;
}
if ($aid != 0 || $qhaswildcards) {
$this->qtable->add_data_keyed($this->qtable->format_row($teacherresponserow));
}
if (!$singleanswer) {
foreach ($responses[$subqid][$aid] as $response) {
if (!$downloadtype || $downloadtype == 'xhtml') {
$indent = ' ';
} else {
$indent = ' ';
//.........这里部分代码省略.........
示例11: gen_table
function gen_table($attrib)
{
$this->rcmail_inst->output->set_env('framed', true);
$out = '<fieldset><legend>' . $this->gettext('policy_entries') . '</legend>' . "\n";
$spam_table = new html_table(array('id' => 'spam-table', 'class' => 'records-table', 'cellspacing' => '0', 'cols' => 4));
$spam_table->add_header(array('width' => '220px'), $this->gettext('policy_entries'));
$spam_table->add_header(array('class' => 'value', 'width' => '150px'), $this->gettext('policy_tag'));
$spam_table->add_header(array('class' => 'value', 'width' => '150px'), $this->gettext('policy_tag2'));
$spam_table->add_header(array('class' => 'value', 'width' => '130px'), $this->gettext('policy_kill'));
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']));
$policies = $this->soap->mail_policy_get($session_id, array(1 => 1));
for ($i = 0; $i < count($policies); $i++) {
$class = $class == 'odd' ? 'even' : 'odd';
if ($policies[$i]['id'] == $spam_user[0]['policy_id']) {
$class = 'selected';
}
$spam_table->set_row_attribs(array('class' => $class));
$this->_spam_row($spam_table, $policies[$i]['policy_name'], $policies[$i]['spam_tag_level'], $policies[$i]['spam_tag2_level'], $policies[$i]['spam_kill_level'], $attrib);
}
$this->soap->logout($session_id);
} catch (SoapFault $e) {
$this->rcmail_inst->output->command('display_message', 'Soap Error: ' . $e->getMessage(), 'error');
}
if (count($policies) == 0) {
$spam_table->add(array('colspan' => '4'), rep_specialchars_output($this->gettext('spamnopolicies')));
$spam_table->set_row_attribs(array('class' => 'odd'));
$spam_table->add_row();
}
$out .= "<div id=\"spam-cont\">" . $spam_table->show() . "</div>\n";
$out .= "</fieldset>\n";
return $out;
}
示例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] == 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'), 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;
}
示例13: infohtml
function infohtml()
{
$rcmail = rcmail::get_instance();
$user = $rcmail->user;
$table = new html_table(array('cols' => 2, 'cellpadding' => 3));
$table->add('title', 'ID');
$table->add('', Q($user->ID));
$table->add('title', Q($this->gettext('username')));
$table->add('', Q($user->data['username']));
$table->add('title', Q($this->gettext('server')));
$table->add('', Q($user->data['mail_host']));
$table->add('title', Q($this->gettext('created')));
$table->add('', Q($user->data['created']));
$table->add('title', Q($this->gettext('lastlogin')));
$table->add('', Q($user->data['last_login']));
$identity = $user->get_identity();
$table->add('title', Q($this->gettext('defaultidentity')));
$table->add('', Q($identity['name'] . ' <' . $identity['email'] . '>'));
return html::tag('h4', null, Q('Infos for ' . $user->get_username())) . $table->show();
}
示例14: password_form
function password_form()
{
$rcmail = rcmail::get_instance();
// add some labels to client
$rcmail->output->add_label('password.nopassword', 'password.nocurpassword', 'password.passwordinconsistency');
$rcmail->output->set_env('product_name', $rcmail->config->get('product_name'));
$table = new html_table(array('cols' => 2));
if ($rcmail->config->get('password_confirm_current')) {
// show current password selection
$field_id = 'curpasswd';
$input_curpasswd = new html_passwordfield(array('name' => '_curpasswd', 'id' => $field_id, 'size' => 20, 'autocomplete' => 'off'));
$table->add('title', html::label($field_id, rcube::Q($this->gettext('curpasswd'))));
$table->add(null, $input_curpasswd->show());
}
// show new password selection
$field_id = 'newpasswd';
$input_newpasswd = new html_passwordfield(array('name' => '_newpasswd', 'id' => $field_id, 'size' => 20, 'autocomplete' => 'off'));
$table->add('title', html::label($field_id, rcube::Q($this->gettext('newpasswd'))));
$table->add(null, $input_newpasswd->show());
// show confirm password selection
$field_id = 'confpasswd';
$input_confpasswd = new html_passwordfield(array('name' => '_confpasswd', 'id' => $field_id, 'size' => 20, 'autocomplete' => 'off'));
$table->add('title', html::label($field_id, rcube::Q($this->gettext('confpasswd'))));
$table->add(null, $input_confpasswd->show());
$rules = '';
$required_length = intval($rcmail->config->get('password_minimum_length'));
if ($required_length > 0) {
$rules .= html::tag('li', array('id' => 'required-length'), $this->gettext(array('name' => 'passwordshort', 'vars' => array('length' => $required_length))));
}
if ($rcmail->config->get('password_require_nonalpha')) {
$rules .= html::tag('li', array('id' => 'require-nonalpha'), $this->gettext('passwordweak'));
}
if (!empty($rules)) {
$rules = html::tag('ul', array('id' => 'ruleslist'), $rules);
}
$out = html::div(array('class' => 'box'), html::div(array('id' => 'prefs-title', 'class' => 'boxtitle'), $this->gettext('changepasswd')) . html::div(array('class' => 'boxcontent'), $table->show() . $rules . html::p(null, $rcmail->output->button(array('command' => 'plugin.password-save', 'type' => 'input', 'class' => 'button mainaction', 'label' => 'save')))));
$rcmail->output->add_gui_object('passform', 'password-form');
return $rcmail->output->form_tag(array('id' => 'password-form', 'name' => 'password-form', 'method' => 'post', 'action' => './?_task=settings&_action=plugin.password-save'), $out);
}
示例15: get_string
$strpages = get_string('modulenameplural', 'page');
$strweek = get_string('week');
$strtopic = get_string('topic');
$strname = get_string('name');
$strintro = get_string('moduleintro');
$strlastmodified = get_string('lastmodified');
$PAGE->set_url('mod/page/index.php', array('id' => $course->id));
$PAGE->set_title($course->shortname . ': ' . $strpages);
$PAGE->set_heading($course->fullname);
$navlinks = array(array('name' => $strpages, 'link' => '', 'type' => 'activityinstance'));
echo $OUTPUT->header(build_navigation($navlinks), navmenu($course));
if (!($pages = get_all_instances_in_course('page', $course))) {
notice(get_string('thereareno', 'moodle', $strpages), "{$CFG->wwwroot}/course/view.php?id={$course->id}");
exit;
}
$table = new html_table();
$table->set_classes(array('generaltable', 'mod_index'));
if ($course->format == 'weeks') {
$table->head = array($strweek, $strname, $strintro);
$table->align = array('center', 'left', 'left');
} else {
if ($course->format == 'topics') {
$table->head = array($strtopic, $strname, $strintro);
$table->align = array('center', 'left', 'left');
} else {
$table->head = array($strlastmodified, $strname, $strintro);
$table->align = array('left', 'left', 'left');
}
}
$modinfo = get_fast_modinfo($course);
$currentsection = '';