navigator1278: Блог

Главные вкладки

Модуль custom_search

7 октября 2011 в 16:20

Добрый день, подскажите, пожалуйста, где в Друпале производится обработка данных, отправленных через форму модуля custom search. Код единственного файла модуля (в директории /custom_search/custom_search.module) следующий:

<?php
function custom_search_block($op='list'$delta=0) {
  if(
$delta == 'custom_search-0'){
  if (
$op == "list") {
    
$block[0]["info"] = 'Search';
    return 
$block;
  }
  else if (
$op == 'view') {
    
$block['subject'] = '<h2>'.t('PRODUCT SEARCH').'</h2>';
    
$block['content'] = bilding_form();
    return 
$block;
  }
  }
}
/*building a search form*/
function bilding_form(){
    
$active "";
    
$x "";
    
$output '<form method="get" action="/proteinbars">';
    
$output .= '<input id="select_price_hiden" name="sell_price[min]" type="hidden" value="">';
    
$output .= '<input id="select_price_op_hiden" name="sell_price_op" type="hidden" value="">';
    
$output .= '<input id="select_price_val_hiden" name="sell_price[value]" type="hidden" value="">';
    
$output .= '<label class="custom_search">Price: </label>';
    
$output .= '<select class="custom-search" id="select_price_max" name = "sell_price[max]">';
    
$output .= '<option class="price_max"' $active ' value=' $x '>Find of price</option>';
    for(
$x 50$x <= 200$x $x 50){
        if(
$_GET['sell_price']['max'] == $x){
             
$active 'selected="selected"';
        }
        if(
$x == 50){
            
$output .= '<option class="price_max" ' $active ' value=' $x '>Under $' $x '</option>';
        } else {
?>