View contacts from mSQL database

%s

\n", $ERRMSG); fatal(" "); } if (msqlSelectDB($sock,"contacts") < 0) { printf("

%s

\n", $ERRMSG); fatal(" "); } if (msqlQuery($sock, "select name,surname,titula,jobtitle,company,dept,h_street,h_city,h_zip,h_country,h_phone,w_street,w_city,w_zip,w_country,w_phone,mailing_addr,pager,mobil_phone,email,home_page,categories,public,w_account,fax from $user where rbr=$no")<0) { printf("

%s

\n", $ERRMSG); fatal(" "); } $res=msqlStoreResult(); $row=msqlFetchRow($res); if (#$row > 0) { echo("
\n"); echo("

\n"); $nm = $row[1] + ", " + $row[0]; $cmp="1"; if ($row[0] != "" || $row[1] != "") { printf("
Name: | %s, %s
\n", $row[1], $row[0]); $cmp="0"; } if ($row[2] != "") { printf("
Title: | %s
\n", $row[2]); } if ($row[3] != "") { printf("
Job Title: | %s
\n", $row[3]); } if ($row[4] != "") { printf("
Company: | %s
\n", $row[4]); } if ($row[5] != "") { printf("
Department: | %s
\n", $row[5]); } if ($row[11] != "" || $row[12]!="" || $row[14]!="" || $row[15]!="" || $row[23]!="" || $row[24]!="") { printf("
Business Address
\n"); } if ($row[11] != "") { printf("
Street: | %s
\n", $row[11]); } if ($row[12] != "" || $row[13] != "") { printf("
Zip, City: | %s %s
\n", $row[13], $row[12]); } if ($row[14] != "") { printf("
Country: | %s
\n", $row[14]); } if ($row[15] != "") { printf("
Phone: | %s
\n", $row[15]); } if ($row[24] != "") { printf("
Fax: | %s
\n", $row[24]); } if ($row[23] != "") { printf("
Account No: | %s
\n", $row[23]); } if ($row[17] != "") { printf("
Pager: | %s
\n",$row[17]); } if ($row[18] != "") { printf("
Mobile: | %s
\n",$row[18]); } if ($row[19] != "") { printf("
E-mail: | %s
\n",$row[19], $row[19]); } if ($row[20] != "") { printf("
Home Page: | %s
\n",$row[20], $row[20]); } echo(" \
\n \n
\n"); echo(" \n"); echo("\n"); echo(""); echo(" | "); if ($cmp == "0") { echo(" | \n"); echo("\n"); echo("\n"); } echo(" | \n"); echo("\n"); echo(""); echo("
\n \n"); } msqlFreeResult($res); >