Skip to content

Commit

Permalink
Search by uri & lj & vk & fb
Browse files Browse the repository at this point in the history
  • Loading branch information
leotsarev committed May 22, 2024
1 parent e55ac66 commit 7443173
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
9 changes: 8 additions & 1 deletion public_html/appcode/logic/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ function get_search($search_string)
$search_string = $sql -> QuoteAndClean("%$search_string%");

return _get_games ("kg.deleted_flag = 0 AND kgd.\"order\" = 0
AND (kg.name ILIKE $search_string OR kg.mg ILIKE $search_string OR kg.email ILIKE $search_string OR kp.polygon_name ILIKE $search_string)");
AND (kg.name ILIKE $search_string
OR kg.mg ILIKE $search_string
OR kg.email ILIKE $search_string
OR kp.polygon_name ILIKE $search_string
OR kg.uri ILIKE $search_string
OR kg.lj_comm ILIKE $search_string
OR kg.fb_comm ILIKE $search_string
)");
}

function get_search_by_name($search_string)
Expand Down
9 changes: 3 additions & 6 deletions public_html/search/index.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
<?php
require_once 'funcs.php';
require_once 'mysql.php';
require_once 'common.php';
require_once 'user_funcs.php';
require_once 'logic.php';
require_once 'logic/search.php';
require_once 'calendar.php';
require_once 'top_menu.php';

$search_string = array_key_exists('search', $_GET) ? trim($_GET['search']) : '';

$result = get_search($search_string);
$result = get_search($search_string);

$topmenu = new TopMenu();
$topmenu -> pagename = 'Поиск';
Expand All @@ -21,6 +18,6 @@
$calendar -> write_calendar();

echo "<p><strong>Замечания, предложения по работе поиска?</strong> Напиши $mailto_editors!";
write_footer(TRUE, "'/search/'");
write_footer();

?>

0 comments on commit 7443173

Please sign in to comment.