*
* This file is included from compose.php
*
- * @copyright © 1999-2006 The SquirrelMail Project Team
+ * @copyright © 1999-2007 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package squirrelmail
* init.php.
*/
if (!isset($bInit)) {
+ /** This is the addrbook_search_html page */
+ define('PAGE_NAME', 'addrbook_search_html');
+
include('../include/init.php');
}
* Insert hidden data
*/
function addr_insert_hidden() {
- global $body, $subject, $send_to, $send_to_cc, $send_to_bcc, $mailbox,
- $identity, $session;
+ global $body, $subject, $send_to, $send_to_cc, $send_to_bcc, $mailbox, $mailprio,
+ $request_mdn, $request_dr, $identity, $session, $composeMessage;
+//FIXME Do not echo HTML from the core. This file already uses templates mostly, so why are we echoing here at all?!?
if (substr($body, 0, 1) == "\r") {
echo addHidden('body', "\n".$body);
} else {
echo addHidden('body', $body);
}
+ if (is_object($composeMessage) && $composeMessage->entities)
+ echo addHidden('attachments', serialize($composeMessage->entities));
+
echo addHidden('session', $session).
addHidden('subject', $subject).
addHidden('send_to', $send_to).
addHidden('send_to_bcc', $send_to_bcc).
addHidden('send_to_cc', $send_to_cc).
+ addHidden('mailprio', $mailprio).
+ addHidden('request_mdn', $request_mdn).
+ addHidden('request_dr', $request_dr).
addHidden('identity', $identity).
addHidden('mailbox', $mailbox).
addHidden('from_htmladdr_search', 'true');
* @param bool $includesource If true, adds backend column to address listing
*/
function addr_display_result($res, $includesource = true) {
- global $color, $PHP_SELF, $squirrelmail_language;
-
- global $oTemplate, $oErrorHandler;
+ global $PHP_SELF, $oTemplate, $oErrorHandler;
- if (sizeof($res) <= 0) return;
echo addForm($PHP_SELF, 'post', 'addressbook').
addHidden('html_addr_search_done', 'true');
addr_insert_hidden();
-
+
$oTemplate->assign('use_js', false);
$oTemplate->assign('include_abook_name', $includesource);
$oTemplate->assign('addresses', formatAddressList($res));
}
/** set correct value of $default_charset */
-global $default_charset;
set_my_charset();
/* Initialize addressbook */
}
if ($addrquery == '' || sizeof($res) == 0) {
+//FIXME don't echo HTML from core -- especially convoluted given that there is template code immediately above AND below this block
echo '<div style="text-align: center;">'.
addForm('compose.php','post','k');
addr_insert_hidden();
echo '<hr />';
$oTemplate->display('footer.tpl');
-?>