X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Faddrbook_search.php;h=843303cc9e5815503b5b015bb85d7fa7151d143b;hb=190dc452bedb05364a6f5842142b5e484995b1ca;hp=5a4529e8887bddf88bc13c4ff17a0dd3d12b43a8;hpb=2c92ea9da4c11cac1ea3118a1e0fda6407e5d62b;p=squirrelmail.git diff --git a/src/addrbook_search.php b/src/addrbook_search.php index 5a4529e8..843303cc 100644 --- a/src/addrbook_search.php +++ b/src/addrbook_search.php @@ -17,16 +17,10 @@ */ /** - * Path for SquirrelMail required files. - * @ignore + * Include the SquirrelMail initialization file. */ -define('SM_PATH','../'); +require('../include/init.php'); -/** SquirrelMail required files. */ -include_once(SM_PATH . 'include/validate.php'); -include_once(SM_PATH . 'functions/strings.php'); -include_once(SM_PATH . 'functions/global.php'); -include_once(SM_PATH . 'functions/html.php'); include_once(SM_PATH . 'functions/forms.php'); include_once(SM_PATH . 'functions/addressbook.php'); @@ -215,13 +209,15 @@ if ($show == 'form' && ! isset($listall)) { '" method="post">' . "\n" . html_tag( 'table', '', '', '', 'border="0" width="100%" height="100%"' ) . html_tag( 'tr' ) . - html_tag( 'td', ' ' . _("Search for") . "\n", 'left', '', 'style="white-space: nowrap;" valign="middle" width="10%"' ) . + html_tag( 'td', ' \n", 'left', '', + 'style="white-space: nowrap;" valign="middle" width="10%"' ) . html_tag( 'td', '', 'left', '', '' ) . addInput('query', $query, 28); /* List all backends to allow the user to choose where to search */ if ($abook->numbackends > 1) { - echo '' . _("in") . ' '."\n"; + echo ' '."\n"; $selopts = array(); $selopts['-1'] = _("All address books"); @@ -288,7 +284,7 @@ if ($show == 'form' && ! isset($listall)) { if (!is_array($res)) { echo html_tag( 'p', '
' . _("Your search failed with the following error(s)") . - ':
' . $abook->error . "
\n" , + ':
' . nl2br(htmlspecialchars($abook->error)) . "\n" , 'center' ); } elseif (sizeof($res) == 0) { echo html_tag( 'p', '
' . @@ -306,4 +302,4 @@ if ($show == 'form' && ! isset($listall)) { } } $oTemplate->display('footer.tpl'); -?> \ No newline at end of file +?>