[Chameleon] Query Result

listserver server chameleon.listserver at gmail.com
Tue Jun 6 02:58:51 EDT 2006


Updating to the last version of chameleon i've noted that
queryreult.phtmlis completely different from the previous version!

In the previous version i added this lines for 2 reason, to remove
SHAPE_INDEX, TILE_INDEX,LAYER_INDEX from query result and for format http
header.

// loop and add a cell for each result
foreach ( $aRow as $key => $xCell )
{
	//String comparison to search for fields that should NOT be returned
in query results.
	if (strcasecmp($key, "SHAPE_INDEX") == 0 ||
             strcasecmp($key, "TILE_INDEX") == 0 ||
             strcasecmp($key, "LAYER_INDEX") == 0)
             continue;
             {
	     //Look for strings containing an http header.  If exists then
format as a link, if not format as normal text.
	     if ( stristr ($xCell, 'http://' <http://%27/> ))
	 	$szReturnValue .= "<td class=\"subContentArea1\"><p
class=\"text\"><a href='". $xCell."' target='_blank'>Click here for more
information</a></p></td>\n";
	     else
		$szReturnValue .= "<td class=\"subContentArea1\"><p
class=\"text\">". $xCell."</p></td>\n";
	     }
             }
                 $szReturnValue .= "</tr>\n";
             }


Can be done something similar also in new queryresult.phtml ??
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/chameleon/attachments/20060606/de67b2d5/attachment.html


More information about the Chameleon mailing list