Модуль custom_search

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

Аватар пользователя navigator1278 navigator1278 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 {
            
$min $x-50;
            
$output .= '<option class="price_max" ' $active ' value=' $x '> From $' $min ' to $' $x '</option>';
        }
        
$active "";
    }    
    
$output .= '<option id="finish_price" class="price_max" ' $active ' value=' $x '> From $' $x '</option>';
    
$output .= '</select>';
    
$taxonomy taxonomy_get_tree(1);
    
$output .= '<label class="custom_search">Category: </label>';
    
$output .= '<select class="custom-search" name = "name">';
    
$output .= '<option value="">Find of category</option>';
    foreach (
$taxonomy as $key => $value){
        if(
$_GET['special'] == $value->name){
            
$active 'selected="selected"';
        }
       
$output .= "<option $active value='$value->name'>" $value->name "</option>";
    }
    
$output .= '</select>';
    
$output .= '<label class="custom_search">Name: </label>';
    
$output .= '<input class="custom-search" type="text" name="title" size="20" maxlength="50" value="">';
$output .= '<label class="custom_search">Only Today\'s Deals: </label>';>
$output .= '<input class="custom-search" type="checkbox" name="todaydeals">';
    
$output .= '<input class="custom_search_input" type="submit" value="search">';
    
$output .= '</form>';
    return 
$output;
}
?>

Этот код работает на уже существующем сайте, от меня требуется добавить обработку чек-бокса (name="todaydeals"). Content type к продуктам в админке добавил - при добавлении нового продукта можно выбирать, является ли продукт todaydeals. Но вот фильтрования в зависимости от состояния чекбокса не происходит. Какой sql-запрос (какая ф-ция) обрабатывает запрос?