' . '' . "" . ''; } function showPartsShop($con) { global $data; if (isset($_REQUEST['parts_show'])) { $name = $_REQUEST['parts_name']; $price_bottom = $_REQUEST['parts_price_bottom']; $price_upper = $_REQUEST['parts_price_upper']; $category_id = $_REQUEST['parts_categorys']; $sort = $_REQUEST['parts_sort']; $show_absent = 0; if (isset($_REQUEST['show_absent'])) $show_absent = $_REQUEST['show_absent']; } else { $name = ''; $price_bottom = 0; $price_upper = 1000000; $category_id = 0; $sort = 0; $show_absent = 0; } $data[0] = $name; $data[1] = $price_bottom; $data[2] = $price_upper; $data[3] = $category_id; $data[4] = $sort; if (isset($_COOKIE['login'])) { $login = $_COOKIE['login']; $sql = "SELECT getUserShop('$login') AS 'result';"; $query = mysqli_query($con, $sql); $r = mysqli_fetch_assoc($query); $shop = $r['result']; } else $shop = 1; if ($show_absent == 1) $data[5] = 'checked'; $sql = "SELECT s.name FROM shop s WHERE s.id = $shop"; $query = mysqli_query($con, $sql); $r = mysqli_fetch_assoc($query); $shop_name = $r['name']; $sql = "CALL selectPartsShopping('$name', $price_bottom, $price_upper, $category_id, $sort, $show_absent, $shop);"; $query = mysqli_query($con, $sql); echo "