**
**/
+ session_start();
+
if(!isset($logged_in)) {
- echo _("You must ");
- echo _("login");
- echo _(" first.");
+ echo _("You must login first.");
exit;
}
if(!isset($username) || !isset($key)) {
// Create search form
if($show == "form") {
- printf("<FORM NAME=sform TARGET=abookres ACTION=\"%s\" METHOD=GET>\n",
+ printf("<FORM NAME=sform TARGET=abookres ACTION=\"%s\" METHOD=\"POST\">\n",
$PHP_SELF);
printf("<TABLE BORDER=0 WIDTH=\"100%%\" HEIGHT=\"100%%\">");
printf("<TR><TD NOWRAP VALIGN=middle>\n");
var prefix = "";
var pwintype = typeof parent.opener.document.compose;
+ $addr = $addr.replace(/ {1,35}$/, "");
+
if(pwintype != "undefined" ) {
if ( parent.opener.document.compose.send_to.value ) {
prefix = ", ";
parent.opener.document.compose.send_to.value =
- parent.opener.document.compose.send_to.value + ", " + $addr;
+ parent.opener.document.compose.send_to.value + ", " + $addr;
+
} else {
parent.opener.document.compose.send_to.value = $addr;
}
var prefix = "";
var pwintype = typeof parent.opener.document.compose;
+ $addr = $addr.replace(/ {1,35}$/, "");
+
if(pwintype != "undefined" ) {
if ( parent.opener.document.compose.send_to_cc.value ) {
prefix = ", ";
function bcc_address($addr) {
var prefix = "";
var pwintype = typeof parent.opener.document.compose;
+
+ $addr = $addr.replace(/ {1,35}$/, "");
if(pwintype != "undefined" ) {
if ( parent.opener.document.compose.bcc.value ) {
$res = $abook->s_search($query);
if(!is_array($res)) {
+ printf("<P ALIGN=center><BR>%s:<br>%s</P>\n</BODY></HTML>\n",
+ _("Your search failed with the following error(s)"),
+ $abook->error);
+ exit;
+ }
+
+ if(sizeof($res) == 0) {
printf("<P ALIGN=center><BR>%s.</P>\n</BODY></HTML>\n",
_("No persons matching your search was found"));
exit;
// List search results
$line = 0;
- print "<table border=0 width=100%>";
- print "<tr bgcolor=\"$color[9]\"><TH align=left> <TH align=left>Name<TH align=left>E-mail<TH align=left>Info<TH align=left>Source</tr>\n";
+ print "<table border=0 width=\"98%\" align=center>";
+ printf("<tr bgcolor=\"$color[9]\"><TH align=left> ".
+ "<TH align=left> %s<TH align=left> %s".
+ "<TH align=left> %s<TH align=left width=\"10%%\">".
+ " %s</tr>\n",
+ _("Name"), _("E-mail"), _("Info"), _("Source"));
while(list($key, $row) = each($res)) {
- printf("<tr%s nowrap><td nowrap><a href=\"javascript:to_address('%s');\">To</A> | <a href=\"javascript:cc_address('%s');\">Cc</A><td nowrap>%s <td nowrap>%s <td nowrap>%s <td nowrap>%s</tr>\n",
+ printf("<tr%s nowrap><td nowrap align=center width=\"5%%\">".
+ "<a href=\"javascript:to_address('%s');\">To</A> | ".
+ "<a href=\"javascript:cc_address('%s');\">Cc</A>".
+ "<td nowrap> %s <td nowrap> %s ".
+ "<td nowrap> %s <td nowrap> %s</tr>\n",
($line % 2) ? " bgcolor=\"$color[0]\"" : "", $row["email"],
$row["email"], $row["name"], $row["email"], $row["label"],
$row["source"]);