X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Faddrbook_search_html.php;h=f6c28fe75bb2355ee6ef59a73a3e7650ea318c0d;hb=0b97a708e71c931153cd1ceee1495c9f4e1e209b;hp=d7c18f8b7d60c272112892ac02cd7b42fddb6307;hpb=7b7834759e60809a314dbf7be376f5cac26d1c90;p=squirrelmail.git diff --git a/src/addrbook_search_html.php b/src/addrbook_search_html.php index d7c18f8b..f6c28fe7 100644 --- a/src/addrbook_search_html.php +++ b/src/addrbook_search_html.php @@ -17,14 +17,30 @@ * $Id$ */ -require_once('../src/validate.php'); -require_once('../functions/date.php'); -require_once('../functions/smtp.php'); -require_once('../functions/display_messages.php'); -require_once('../functions/addressbook.php'); -require_once('../functions/plugin.php'); -require_once('../functions/strings.php'); -require_once('../functions/html.php'); +/* Path for SquirrelMail required files. */ +define('SM_PATH','../'); + +/* SquirrelMail required files. */ +require_once(SM_PATH . 'include/validate.php'); +require_once(SM_PATH . 'functions/date.php'); +require_once(SM_PATH . 'functions/smtp.php'); +require_once(SM_PATH . 'functions/display_messages.php'); +require_once(SM_PATH . 'functions/addressbook.php'); +require_once(SM_PATH . 'functions/plugin.php'); +require_once(SM_PATH . 'functions/strings.php'); +require_once(SM_PATH . 'functions/html.php'); + +$session = $_POST['session']; +$mailbox = $_POST['mailbox']; +if ( isset($_POST['addrquery']) ) { + $addrquery = $_POST['addrquery']; +} +if ( isset($_POST['listall']) ) { + $listall = $_POST['listall']; +} +if ( isset($_POST['backend'] ) ) { + $backend = $_POST['backend']; +} /* Insert hidden data */ function addr_insert_hidden() { @@ -99,19 +115,20 @@ if ($javascript_on) { foreach ($res as $row) { $tr_bgcolor = ''; + $email = AddressBook::full_address($row); if ($line % 2) { $tr_bgcolor = $color[0]; } echo html_tag( 'tr', '', '', $tr_bgcolor, 'nowrap' ) . html_tag( 'td', ' ' . _("To") . ' ' . + htmlspecialchars($email) . '"> ' . _("To") . ' ' . ' ' . _("Cc") . ' ' . + htmlspecialchars($email) . '"> ' . _("Cc") . ' ' . ' ' . _("Bcc") . ' ' , + htmlspecialchars($email) . '"> ' . _("Bcc") . ' ' , 'center', '', 'width="5%" nowrap' ) . - html_tag( 'td', ' ' . $row['name'] . ' ', 'left', '', 'nowrap' ) . - html_tag( 'td', ' ' . $row['email'] . ' ', 'left', '', 'nowrap' ) . - html_tag( 'td', ' ' . $row['label'] . ' ', 'left', '', 'nowrap' ); + html_tag( 'td', ' ' . htmlspecialchars($row['name']) . ' ', 'left', '', 'nowrap' ) . + html_tag( 'td', ' ' . htmlspecialchars($row['email']) . ' ', 'left', '', 'nowrap' ) . + html_tag( 'td', ' ' . htmlspecialchars($row['label']) . ' ', 'left', '', 'nowrap' ); if ($includesource) { echo html_tag( 'td', ' ' . $row['source'] . ' ', 'left', '', 'nowrap' ); @@ -133,7 +150,6 @@ if ($javascript_on) { /* --- End functions --- */ -global $mailbox; if ($compose_new_win == '1') { compose_Header($color, $mailbox); }