* @version DS-E V/3 */ $int_htype = -1; $str_raw_search = ''; $bool_tosell = false; function houses_view_get_search () { // Diese Vars werden hier als Nebenprodukt gesetzt global $int_htype,$str_raw_search,$bool_tosell; // Suche nach Hausname / -nummer $str_raw_search = trim(stripslashes($_REQUEST['search'])); if (!empty($str_raw_search)) { if (strcspn($str_raw_search,'0123456789')<=1) { $search='houseid='.intval($str_raw_search).' AND '; } else { $search = str_create_search_string($str_raw_search); $search='housename LIKE "'.$search.'" AND '; } // Damit Suchergebnis auch sichtbar ist.. $_POST['page'] = null; } else { $search=''; } // Suche in grünen Seiten (nach Haustyp) if(isset($_REQUEST['htype'])) { $int_htype = (int)$_REQUEST['htype']; $search .= ' status='.$int_htype.' AND '; } if(isset($_REQUEST['tosell'])) { $bool_tosell = (bool)$_REQUEST['tosell']; $search .= ' build_state='.HOUSES_BUILD_STATE_SELL.' AND '; } // END Suche in grünen Seiten return($search); } function houses_view_get_out ($int_p,$int_maxp,$search) { global $bool_tosell,$int_htype,$str_raw_search,$session; // Wird zum Erstellen des Zurücklinks nach Hausbio-Aktionen gebraucht $session['houses_bio_ret_querystring'] = 'page='.$int_p.'&search='.urlencode($str_raw_search) .($int_htype > -1 ? '&htype='.$int_htype : '') .($bool_tosell ? '&tosell=1' : ''); $str_tmp = ''; $sql = 'SELECT h.housename,h.houseid,h.owner,h.status,h.build_state,h.gold,h.gems FROM houses h WHERE '.$search.' 1 ORDER BY houseid ASC LIMIT '.(($int_p - 1) * 9).',9'; $result = db_query($sql); $int_count = db_num_rows($result); $str_output .= '