From 64c9e87e68537c4a9a2a20d4d75ea369f0c4a8e1 Mon Sep 17 00:00:00 2001 From: kink Date: Mon, 19 Apr 2004 20:54:00 +0000 Subject: [PATCH] Some more use of forms.php functions which ensure correct encoding. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7179 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/options_order.php | 15 ++++++----- src/read_body.php | 19 ++++++------- src/search.php | 9 ++++--- src/vcard.php | 62 +++++++++++++++++-------------------------- 4 files changed, 48 insertions(+), 57 deletions(-) diff --git a/src/options_order.php b/src/options_order.php index 967b9a28..1e7c42bd 100644 --- a/src/options_order.php +++ b/src/options_order.php @@ -25,6 +25,7 @@ require_once(SM_PATH . 'functions/display_messages.php'); require_once(SM_PATH . 'functions/imap.php'); require_once(SM_PATH . 'functions/plugin.php'); require_once(SM_PATH . 'functions/html.php'); +require_once(SM_PATH . 'functions/forms.php'); /* get globals */ sqgetGlobalVar('num', $num, SQ_GET); @@ -125,8 +126,8 @@ displayPageHeader($color, 'None'); } if (count($index_order) != count($available)) { - echo '
'; - echo ''; - echo ''; - echo ''; + + echo addForm('options_order.php', 'post', 'f'); + echo addSelect('add', $opts, '', TRUE); + echo addHidden('method', 'add'); + echo addSubmit(_("Add"), 'submit'); echo '
'; } diff --git a/src/read_body.php b/src/read_body.php index 60aad1a4..9c88e782 100644 --- a/src/read_body.php +++ b/src/read_body.php @@ -664,14 +664,14 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp $menu_row .= '
'; if (!(isset($passed_ent_id) && $passed_ent_id)) { - $menu_row .= ''; + $menu_row .= addHidden('message', $passed_id); if ($where && $what) { - $menu_row .= ''; - $menu_row .= ''; + $menu_row .= addHidden('where', $where); + $menu_row .= addHidden('what', $what); } else { - $menu_row .= ''; - $menu_row .= ''; + $menu_row .= addHidden('sort', $sort); + $menu_row .= addHidden('startMessage', $startMessage); } $menu_row .= getButton('SUBMIT', 'delete', _("Delete")); $menu_row .= '' . _("Bypass Trash"); @@ -698,10 +698,11 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp } $menu_row .= ''. - ''. - ''. - ''. - ''._("Move to:") . + ''. + addHidden('show_more', '0' ). + addHidden('dmn', '1'). + addHidden('location', $location.$current_box). + addHidden('msg[0]', $passed_id) . _("Move to:") . '' . "\n"; /* Include Subfolders */ - echo _("and subfolders:") . '' . "\n"; + echo _("and subfolders:") . + addCheckBox('sub[' . $row_num .']', $sub) . '' . "\n"; /* Unary operator and Search location */ echo html_tag('td', @@ -597,12 +598,12 @@ function asearch_print_form_row($imapConnection, $boxes, $mailbox, $biop, $unop, 'center'); /* Text input */ - $what_disp = htmlspecialchars($what); - echo html_tag('td', '', 'center') . "\n"; + echo html_tag('td', addInput('what['.$row_num.']', $what, '35'), 'center') . "\n"; /* Exclude criteria */ echo html_tag('td', - _("Exclude Criteria:") . '', 'center', '') . "\n"; + _("Exclude Criteria:") . + addCheckBox('exclude['.$row_num.']', $checked), 'center', '') . "\n"; echo "\n"; } diff --git a/src/vcard.php b/src/vcard.php index 6de409eb..9db7437d 100644 --- a/src/vcard.php +++ b/src/vcard.php @@ -147,70 +147,56 @@ echo '' . _("Add to Addressbook") . '' . '' . - '' . + addForm('../src/addressbook.php', 'POST', 'f_add') . '' . '' . - '' . - '' . + '' . + +echo addSelect('addaddr[label]', $opts, '', TRUE); +echo '' . '' . '
Nickname:
Note Field Contains:' . - ''. + addInput('addaddr[nickname]', $vcard_safe['firstname'] . '-' . $vcard_safe['lastname'], '20'). + '
Note Field Contains:' ; +$opts = array(); if (isset($vcard_nice['url'])) { - echo '\n"; + $opts[$vcard_nice['url']] = _("Web Page"); } if (isset($vcard_nice['adr'])) { - echo '\n"; + $opts[$vcard_nice['adr']] = _("Address"); } if (isset($vcard_nice['title'])) { - echo '\n"; + $opts[$vcard_nice['title']] = _("Title"); } if (isset($vcard_nice['org'])) { - echo '\n"; + $opts[$vcard_nice['org']] = _("Organization / Department"); } if (isset($vcard_nice['title'])) { - echo '\n"; + $opts[$vcard_nice['title'].'; '.$vcard_nice['org']] = _("Title & Org. / Dept."); } if (isset($vcard_nice['tel;work'])) { - echo '\n"; + $opts[$vcard_nice['tel;work']] = _("Work Phone"); } if (isset($vcard_nice['tel;home'])) { - echo '\n"; + $opts[$vcard_nice['tel;home']] = _("Home Phone"); } if (isset($vcard_nice['tel;cell'])) { - echo '\n"; + $opts[$vcard_nice['tel;cell']] = _("Cellular Phone"); } if (isset($vcard_nice['tel;fax'])) { - echo '\n"; + $opts[$vcard_nice['tel;fax']] = _("Fax"); } if (isset($vcard_nice['note'])) { - echo '\n"; + $opts[$vcard_nice['note']] = _("Note"); } -echo '' . - '
' . - '' . - '' . - '' . - '' . + addHidden('addaddr[email]', $vcard_nice['email;internet']). + addHidden('addaddr[firstname]', $vcard_safe['firstname']). + addHidden('addaddr[lastname]', $vcard_safe['lastname']). + addSubmit(_("Add to Address Book"), 'addaddr[SUBMIT]'). '
' . - '' . + '' . '' . '' . '