\"$friend\""; $url = "friend=$friend"; } elseif($friendsof != "") { $owner_info = mysql_fetch_assoc(mysql_query("SELECT u_id FROM bhost_users WHERE username='$friendsof'")); $user_query = "SELECT bhost_users.u_id, bhost_users.username, bhost_users.profile_privacy, bhost_users.show_name, bhost_users.display_name, bhost_users.fname, bhost_users.lname, bhost_users.avatar, bhost_users.city, bhost_users.state, bhost_users.country, bhost_users.last_login, bhost_users.g_id FROM bhost_friends LEFT JOIN bhost_users ON bhost_friends.friend_u_id=bhost_users.u_id WHERE bhost_friends.u_id='$owner_info[u_id]' AND bhost_users.verified=1 ORDER BY bhost_users.username"; $words = "$browse21 \"$friendsof\""; $url = "friendsof=$friendsof"; } elseif($category != "") { $category_info = mysql_fetch_assoc(mysql_query("SELECT wc_id FROM bhost_categories WHERE name='$category'")); $weblog_query = "SELECT u_id,weblog, title FROM bhost_weblogs WHERE wc_id='$category_info[wc_id]'"; $words = "$browse20 \"$category\""; $url = "category=".str_replace(" ", "+", $category); } elseif($fname != "" & $admin_info[search_fname] == "2") { $user_query = "SELECT u_id, username, profile_privacy, show_name, fname, lname, display_name, avatar, city, state, country, last_login, g_id FROM bhost_users WHERE fname='$fname' AND show_name='1' AND verified=1"; $words = "$browse5 \"$fname\""; $url = "fname=".str_replace(" ", "+", $fname); } elseif($lname != "" & $admin_info[search_lname] == "2") { $user_query = "SELECT u_id, username, profile_privacy, show_name, fname, lname, display_name, avatar, city, state, country, last_login, g_id FROM bhost_users WHERE lname='$lname' AND show_name='1' AND verified=1"; $words = "$browse6 \"$lname\""; $url = "lname=".str_replace(" ", "+", $lname); } elseif($display_name != "" & $admin_info[search_display_name] == "2") { $user_query = "SELECT u_id, username, profile_privacy, show_name, fname, lname, display_name, avatar, city, state, country, last_login, g_id FROM bhost_users WHERE display_name='$display_name' AND verified=1"; $words = "$browse7 \"$display_name\""; $url = "display_name=".str_replace(" ", "+", $display_name); } elseif($gender != "" & $admin_info[search_gender] == "2") { $user_query = "SELECT u_id, username, profile_privacy, show_name, fname, lname, display_name, avatar, city, state, country, last_login, g_id FROM bhost_users WHERE gender='$gender' AND verified=1"; $words = "$browse8 \"$gender\""; $url = "gender=".str_replace(" ", "+", $gender); } elseif($birthday != "" & $admin_info[search_birthday] == "2") { $user_query = "SELECT u_id, username, profile_privacy, show_name, fname, lname, display_name, avatar, city, state, country, last_login, g_id FROM bhost_users WHERE birthday='$birthday' AND verified=1"; $words = "$browse9 \"".cdate("F j, Y", $birthday)."\""; $url = "birthday=".str_replace(" ", "+", $birthday); } elseif($age != "" & $admin_info[search_birthday] == "2") { $current_day = cdate("j", time()); $current_month = cdate("n", time()); $current_year = cdate("Y", time()); $from_year = $current_year-$age-1; $to_year = $current_year-$age; $from_date = MakeTime("0", "0", "0", "$current_month", "$current_day", "$from_year"); $to_date = MakeTime("0", "0", "0", "$current_month", "$current_day", "$to_year"); $user_query = "SELECT u_id, username, profile_privacy, show_name, fname, lname, display_name, avatar, city, state, country, last_login, g_id FROM bhost_users WHERE birthday<='$to_date' AND birthday>'$from_date' AND verified=1"; $words = "$browse10 \"$age\""; $url = "age=".str_replace(" ", "+", $age); } elseif($city != "" & $admin_info[search_city] == "2") { $user_query = "SELECT u_id, username, profile_privacy, show_name, fname, lname, display_name, avatar, city, state, country, last_login, g_id FROM bhost_users WHERE city='$city' AND verified=1"; $words = "$browse11 \"$city\""; $url = "city=".str_replace(" ", "+", $city); } elseif($state != "" & $admin_info[search_state] == "2") { $user_query = "SELECT u_id, username, profile_privacy, show_name, fname, lname, display_name, avatar, city, state, country, last_login, g_id FROM bhost_users WHERE state='$state' AND verified=1"; $words = "$browse12 \"$state\""; $url = "state=".str_replace(" ", "+", $state); } elseif($country != "" & $admin_info[search_country] == "2") { $user_query = "SELECT u_id, username, profile_privacy, show_name, fname, lname, display_name, avatar, city, state, country, last_login, g_id FROM bhost_users WHERE country='$country' AND verified=1"; $words = "$browse13 \"$country\""; $url = "country=".str_replace(" ", "+", $country); } elseif($interest != "" & $admin_info[search_interests] == "2") { $user_query = "SELECT u_id, username, profile_privacy, show_name, fname, lname, display_name, avatar, city, state, country, last_login, g_id FROM bhost_users WHERE interests LIKE '$interest,%' OR interests LIKE '%,$interest' OR interests LIKE '%,$interest,%' OR interests LIKE '$interest' AND verified=1"; $words = "$browse14 \"$interest\""; $url = "interest=".str_replace(" ", "+", $interest); } else { $custom_fields = mysql_query("SHOW COLUMNS FROM bhost_profile FROM `$mysql_database`"); $custom_field = ""; $custom_value = ""; while($custom = mysql_fetch_assoc($custom_fields)) { if($custom[Field] != "p_id" & $custom[Field] != "u_id") { $custom_field = $custom[Field]; $custom_value = str_replace("+", " ", $_GET[$custom_field]); $custom_search = substr($custom_field, -1); if($custom_value != "" & $custom_search == "2") { break; } } } if($custom_value == "") { $all_users = mysql_query("SELECT u_id FROM bhost_profile"); $u_ids = "u_id='0'"; while($profiles = mysql_fetch_assoc($all_users)) { $u_ids .= " OR u_id='$profiles[u_id]'"; } $user_query = "SELECT u_id, username, profile_privacy, show_name, fname, lname, display_name, avatar, city, state, country, last_login, g_id FROM bhost_users WHERE $u_ids AND verified=1"; $words = "$browse28"; $new_words = "yes"; } else { $all_users = mysql_query("SELECT u_id FROM bhost_profile WHERE $custom_field LIKE '$custom_value,%' OR $custom_field LIKE '%,$custom_value' OR $custom_field LIKE '%,$custom_value,%' OR $custom_field LIKE '$custom_value'"); $u_ids = "u_id='0'"; while($profiles = mysql_fetch_assoc($all_users)) { $u_ids .= " OR u_id='$profiles[u_id]'"; } $user_query = "SELECT u_id, username, profile_privacy, show_name, fname, lname, display_name, avatar, city, state, country, last_login, g_id FROM bhost_users WHERE $u_ids AND verified=1"; $words = "$browse15 $custom_field: \"$custom_value\""; $url = "$custom_field=".str_replace(" ", "+", $custom_value); } } if($browse == "weblogs") { $total_weblogs = mysql_num_rows(mysql_query($weblog_query)); $weblogs_per_page = 12; if(($total_weblogs % $weblogs_per_page) != 0) { $maxpage = ($total_weblogs) / $weblogs_per_page + 1; } else { $maxpage = ($total_weblogs) / $weblogs_per_page; } $maxpage = (int) $maxpage; if($page > $maxpage) { $page = $maxpage; } elseif($page < 1) { $page = 1; } $start = ($page - 1) * $weblogs_per_page; $weblog_query .= " LIMIT $start, $weblogs_per_page"; $pp = ""; $np = ""; if($maxpage != 0 & $maxpage != 1) { if($page - 1 > 0 & $maxpage != 1) { $prev = $page - 1; $pp = "« $browse29 |"; } else { $pp = "« $browse29 |"; } if($page + 1 <= $maxpage & $maxpage != 1) { $next = $page + 1; $np = "$browse30 »"; } else { $np = "$browse30 »"; } $first = $start+1; if($page == $maxpage) { $last = $total_weblogs; } else { $last = $start+$weblogs_per_page; } $middle_text = "$browse31 $first-$last $browse32 $total_weblogs"; } $weblogs = mysql_query($weblog_query); if($total_weblogs == 0) { echo $head; echo "

$browse16

$browse17
"; echo $foot; exit(); } echo $head; if($category=="BDSM") { echo "

Racconti BDSM - $browse18 ($total_weblogs)

$browse19 $words

$pp $middle_text $np "; } else { echo "

$browse18 ($total_weblogs)

$browse19 $words

$pp $middle_text $np "; } if($total_weblogs>12) echo "

"; // SHOW WEBLOGS echo ""; echo "
$pp $middle_text $np
".$foot; } else { $total_users = mysql_num_rows(mysql_query($user_query)); $users_per_page = 9; if(($total_users % $users_per_page) != 0) { $maxpage = ($total_users) / $users_per_page + 1; } else { $maxpage = ($total_users) / $users_per_page; } $maxpage = (int) $maxpage; if($page > $maxpage) { $page = $maxpage; } elseif($page < 1) { $page = 1; } $start = ($page - 1) * $users_per_page; $user_query .= " LIMIT $start, $users_per_page"; $pp = ""; $np = ""; if($maxpage != 0 & $maxpage != 1) { if($page - 1 > 0 & $maxpage != 1) { $prev = $page - 1; $pp = "« $browse29 |"; } else { $pp = "« $browse29 |"; } if($page + 1 <= $maxpage & $maxpage != 1) { $next = $page + 1; $np = "| $browse30 »"; } else { $np = "| $browse30 »"; } $first = $start+1; if($page == $maxpage) { $last = $total_users; } else { $last = $start+$users_per_page; } $middle_text = "$browse31 $first-$last $browse32 $total_users"; } $users = mysql_query($user_query); if($total_users == 0) { echo $head; echo "

$browse3

$browse4
"; echo $foot; exit(); } echo $head; echo "

$browse1 ($total_users)

"; if($new_words == "yes") { echo "$words"; } else { echo "$browse2 $words"; } echo "

$pp $middle_text $np "; if($total_users>9) echo "

"; // SHOW USERS echo "
$pp $middle_text $np
"; echo $foot; } ?>