<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2657.73">
<TITLE>RE: [maplab-users] links from map to jpg</TITLE>
</HEAD>
<BODY>
<BR>
<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">Hello,</FONT>
</P>
<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">see your if instruction.</FONT>
<BR><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">you have one open parenthesis but you have not close parenthesis.</FONT>
<BR><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">the correct syntax is :</FONT>
</P>
<UL>
<P><FONT SIZE=2 FACE="sans-serif"> if (strcasecmp($key, "Long_DD") == "Long_DD" ||</FONT><FONT FACE="Arial"><BR>
</FONT><FONT SIZE=2 FACE="sans-serif"> strcasecmp($key, "Lat_DD") == "Lat_DD"||</FONT><FONT FACE="Arial"><BR>
</FONT><FONT SIZE=2 FACE="sans-serif"> strcasecmp($key, "MS_PATH2") == "MS_PATH2")</FONT><FONT FACE="Arial"><BR>
</FONT><FONT SIZE=2 FACE="sans-serif"> </FONT><BR>
<FONT SIZE=2 FACE="sans-serif"> $szReturnValue .= "<td bgcolor=\"E2EFF5\"><font face=\"Arial, Helvetica, sans-serif\" size=\"2\">".$key."</font></td>\n";</FONT><FONT FACE="Arial"> </FONT></P>
<BR>
</UL>
<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">Good luck </FONT>
</P>
<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">Franck</FONT>
</P>
<UL>
<P><FONT SIZE=1 FACE="Arial">-----Message d'origine-----</FONT>
<BR><B><FONT SIZE=1 FACE="Arial">De: </FONT></B> <FONT SIZE=1 FACE="Arial">maplab-users-bounces@lists.maptools.org [SMTP:maplab-users-bounces@lists.maptools.org]</FONT><B></B><B> <FONT SIZE=1 FACE="Arial">À la place de</FONT></B> <FONT SIZE=1 FACE="Arial">kgrootendorst@baird.com</FONT></P>
<P><B><FONT SIZE=1 FACE="Arial">Date: </FONT></B> <FONT SIZE=1 FACE="Arial">mercredi 1 septembre 2004 22:26</FONT>
<BR><B><FONT SIZE=1 FACE="Arial">À:</FONT> </B> <FONT SIZE=1 FACE="Arial">Steffen Macke</FONT>
<BR><B><FONT SIZE=1 FACE="Arial">Cc: </FONT></B> <FONT SIZE=1 FACE="Arial">maplab-users@lists.maptools.org</FONT>
<BR><B><FONT SIZE=1 FACE="Arial">Objet: </FONT></B> <FONT SIZE=1 FACE="Arial">Re: [maplab-users] links from map to jpg</FONT>
</P>
<BR>
<P><FONT SIZE=2 FACE="sans-serif">Steffen,</FONT><BR>
<FONT SIZE=2 FACE="sans-serif">I've switched on some error messages, and I'm getting the following:</FONT><FONT FACE="Arial"><BR>
<BR>
</FONT><B><FONT FACE="Arial">Parse error</FONT></B><FONT FACE="Arial">: parse error, unexpected T_VARIABLE in</FONT><B> <FONT FACE="Arial">C:\Program Files\Apache Group\Apache2\htdocs\maplab-2.2\projects\gmf_apps\IJC_LCC\query.phtml</FONT></B><FONT FACE="Arial"> on line</FONT><B> <FONT FACE="Arial">189</FONT></B><FONT FACE="Arial"><BR>
<BR>
<BR>
</FONT><FONT SIZE=2 FACE="sans-serif">Line 189 is the one that begins "$szReturnValue.=" below:</FONT><FONT FACE="Arial"><BR>
<BR>
<BR>
</FONT><FONT SIZE=2 FACE="sans-serif">// loop and use key for titles</FONT><FONT FACE="Arial"><BR>
</FONT><FONT SIZE=2 FACE="sans-serif"> // $Key is equal to the attribute name, which is also the header of column</FONT><FONT FACE="Arial"><BR>
<BR>
</FONT><FONT SIZE=2 FACE="sans-serif"> foreach ($aRows[0] as $key => $value)</FONT><FONT FACE="Arial"><BR>
</FONT><FONT SIZE=2 FACE="sans-serif"> {</FONT><FONT FACE="Arial"><BR>
</FONT><FONT SIZE=2 FACE="sans-serif"> // The purpose of this if loop is to find the only attribute name we want to display</FONT><FONT FACE="Arial"><BR>
<BR>
</FONT><FONT SIZE=2 FACE="sans-serif"> if (strcasecmp($key, "Long_DD") == "Long_DD" ||</FONT><FONT FACE="Arial"><BR>
</FONT><FONT SIZE=2 FACE="sans-serif"> strcasecmp($key, "Lat_DD") == "Lat_DD"||</FONT><FONT FACE="Arial"><BR>
</FONT><FONT SIZE=2 FACE="sans-serif"> strcasecmp($key, "MS_PATH2") == "MS_PATH2"</FONT><FONT FACE="Arial"><BR>
</FONT><FONT SIZE=2 FACE="sans-serif"> </FONT><BR>
<FONT SIZE=2 FACE="sans-serif"> $szReturnValue .= "<td bgcolor=\"E2EFF5\"><font face=\"Arial, Helvetica, sans-serif\" size=\"2\">".$key."</font></td>\n";</FONT><FONT FACE="Arial"><BR>
</FONT><FONT SIZE=2 FACE="sans-serif"> }</FONT><FONT FACE="Arial"><BR>
</FONT><BR>
<BR>
<FONT SIZE=2 FACE="sans-serif">I'm by no means a PHP programmer, so any tips/tricks would be greatly appreciated.</FONT><FONT FACE="Arial"><BR>
</FONT><FONT SIZE=2 FACE="sans-serif">Thanks.</FONT><FONT FACE="Arial"><BR>
<BR>
</FONT><FONT SIZE=2 FACE="sans-serif">Kevin</FONT><FONT FACE="Arial"> </FONT>
</P>
<BR>
<BR>
<BR>
<BR>
<P><B><FONT SIZE=1 FACE="sans-serif">Steffen Macke <sdteffen@web.de></FONT></B><FONT SIZE=1 FACE="sans-serif"></FONT><BR>
<FONT SIZE=1 FACE="sans-serif">Sent by: maplab-users-bounces@lists.maptools.org</FONT><FONT FACE="Arial"> </FONT>
</P>
<P ALIGN=RIGHT><FONT SIZE=1 FACE="sans-serif">09/01/2004 03:42 PM</FONT><FONT FACE="Arial"></FONT> <FONT SIZE=1 FACE="sans-serif">To</FONT></P>
<P><FONT SIZE=1 FACE="sans-serif">maplab-users@lists.maptools.org</FONT><FONT FACE="Arial"> </FONT>
<P ALIGN=RIGHT><FONT SIZE=1 FACE="sans-serif">cc</FONT></P>
<P ALIGN=RIGHT><FONT SIZE=1 FACE="sans-serif">Subject</FONT></P>
<P><FONT SIZE=1 FACE="sans-serif">Re: [maplab-users] links from map to jpg</FONT>
</P>
<P>
</P>
<BR>
<BR>
<BR>
<P><FONT SIZE=2 FACE="Courier New">Kevin,<BR>
<BR>
> I changed the code, but the link still does not work.<BR>
<BR>
Are you getting any error messages? Please check that you've switched<BR>
on as many error and warning messages in php.ini as possible.<BR>
<BR>
My code snippet had a small problem (I used or instead of ||)<BR>
Could you check the snippet below.<BR>
<BR>
If it's not working and you don't get any error messages, please add some<BR>
debug code E.g.<BR>
echo($key);<BR>
echo($xCell);<BR>
<BR>
and post the results to the list.<BR>
<BR>
Steffen<BR>
<BR>
// loop and add a cell for each result<BR>
foreach ( $aRow as $key => $xCell ) {<BR>
// $xCell is the attribute value, in this case,when the $key attribute name <BR>
// is equal to "Long_DD" and "Lat_DD" only display the value of attribute.<BR>
if((strcasecmp($key, "Long_DD") == 0) ||<BR>
(strcasecmp($key, "Lat_DD") == 0 )) {<BR>
$szReturnValue .= "<td bgcolor=\"#ffffff\">".<BR>
"<font face=\"Arial, Helvetica, sans-serif\" size=\"2\">". <BR>
$xCell."</font></td>\n";<BR>
}<BR>
<BR>
// when the attribute name is equal to MS_PATH2, hyperlink according to the<BR>
// value of attribute, the attribute value of MS_PATH2 should be simliar as <BR>
// <A HREF="http://localhost/photoalbum/image.jpg" TARGET="_blank">http://localhost/photoalbum/image.jpg</A> <BR>
//photoalbum folder with images is put at your web server.<BR>
<BR>
else if(strcasecmp($key, "MS_PATH2") == 0) {<BR>
$szReturnValue .= "<td bgcolor=\"#ffffff\"> <a href=\"".$xCell.<BR>
"\"> Click here to document</a></td>\n";<BR>
} <BR>
}<BR>
<BR>
_______________________________________________<BR>
Maplab-users mailing list<BR>
Maplab-users@lists.maptools.org<BR>
<A HREF="http://lists.maptools.org/mailman/listinfo/maplab-users" TARGET="_blank">http://lists.maptools.org/mailman/listinfo/maplab-users</A><BR>
</FONT><BR>
<FONT FACE="Arial"><< Fichier: ATT213247.txt>></FONT>
</P>
</UL>
</BODY>
</HTML>