Ver Mensaje Individual
  #1 (permalink)  
Antiguo 15/08/2011, 16:53
Dav36id
 
Fecha de Ingreso: enero-2010
Mensajes: 20
Antigüedad: 14 años, 3 meses
Puntos: 0
Como modifico éste codigo para que busque también en la categoria "city"?

Hola! estoy montando una web de anuncios clasificados y en el cuadro de busqueda está el siguiente codigo en php; el tema es que tansolo busca en "catid", como puedo hacer que busque también en "city"??
Ahí val el código:

Código:
<?php $link = JRoute::_("index.php?option=com_adsmanager&view=result&Itemid=".$itemid); ?>
<form action="<?php echo $link; ?>" method="post">
<input class="inputbox" type="text" name="tsearch" size="60" value="<?php echo $text_search; ?>" /><br/>
<?php if ($search_by_cat == 1)
{
?>
	<div class='mod_adsmanager_search_cats'><select class="inputbox" name="catid" id="category">
	<option value="0" <?php if ($catid == -1) echo "selected='selected'"; ?>><?php echo JText::_('ADSMANAGER_MENU_ALL_ADS'); ?></option>
	<?php adsmanagerModuleSelectCategories(0,"",$cats,$catid); ?>
	</select></div>
<?php
}
if (isset($searchfields)) {
if ($type == "table")
	echo "<table width='100%' border='0'>";
foreach($searchfields as $fsearch) {
	if (($catid == 0)||(strpos($fsearch->catsid, ",$catid,") !== false)||(strpos($fsearch->catsid, ",-1,") !== false))
	{
		$currentvalue = JRequest::getVar($fsearch->name, "" );
		if ($type == "table")
			echo "<tr><td>";
		else
			echo "<div class='mod_adsmanager_search_field'>";
			
		if (($fsearch->display_title & 2) == 2)
		{
			//echo getAdsManagerLangDefinition($fsearch->title);
			if ($type == "div")
				echo "&nbsp;";
		}
		else if ($type == "table")
			echo "&nbsp;";
			
		if ($type == "table")
			echo "</td><td>";
			
		$field->showFieldSearch($fsearch,$catid,$defaultvalues);
			
		if ($type == "table")
			echo "</td></tr>";
		else
			echo "</div>";
	}
}
if ($type == "table")
	echo "</table>";
}?>

<input type="hidden" value="1" name="new_search" />
<input type="submit" class="button" value="<?php echo JText::_('ADSMANAGER_SEARCH_TITLE'); ?>"/>
</form>
<?php if ($advanced_search == 1)
{
?>
<div><a href="<?php echo JRoute::_("index.php?option=com_adsmanager&view=search&catid=$catid&Itemid=$itemid");?>"><?php echo JText::_('ADSMANAGER_ADVANCED_SEARCH'); ?></a></div>
<?php
}

Muchas gracias de antemano.
1 Saludo!