| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
require_once( 'inc/header.inc.php' ); |
|---|
| 22 |
require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' ); |
|---|
| 23 |
require_once( BX_DIRECTORY_PATH_ROOT . "templates/tmpl_{$tmpl}/scripts/BxTemplBrowse.php" ); |
|---|
| 24 |
|
|---|
| 25 |
$_page['name_index'] = 7; |
|---|
| 26 |
$_page['header'] = _t("_Browse Profiles", $site['title']); |
|---|
| 27 |
$_page['header_text'] = _t("_Browse Profiles"); |
|---|
| 28 |
$_page['css_name'] = 'browse.css'; |
|---|
| 29 |
$_page['js_name'] = 'browse.js'; |
|---|
| 30 |
|
|---|
| 31 |
check_logged(); |
|---|
| 32 |
|
|---|
| 33 |
$_ni = $_page['name_index']; |
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 |
|
|---|
| 37 |
$sSex = ( isset($_GET['sex']) ) ? clear_xss($_GET['sex']) : null; |
|---|
| 38 |
$sAge = ( isset($_GET['age']) ) ? clear_xss($_GET['age']) : null; |
|---|
| 39 |
$sCountry = ( isset($_GET['country']) ) ? clear_xss($_GET['country']) : null; |
|---|
| 40 |
$sSort = ( isset($_GET['sort']) ) ? clear_xss($_GET['sort']) : null; |
|---|
| 41 |
|
|---|
| 42 |
$sPhotos = ( isset($_GET['photos_only']) ) ? $_GET['photos_only'] : null; |
|---|
| 43 |
$sOnline = ( isset($_GET['online_only']) ) ? $_GET['online_only'] : null; |
|---|
| 44 |
|
|---|
| 45 |
$sInfoMode = ( isset($_GET['mode']) and $_GET['mode'] == 'extended' ) ? 'extended' : null; |
|---|
| 46 |
|
|---|
| 47 |
$iPage = ( isset($_GET['page']) ) ? (int) $_GET['page'] : 1; |
|---|
| 48 |
if ( $iPage <= 0 ) |
|---|
| 49 |
{ |
|---|
| 50 |
$iPage = 1; |
|---|
| 51 |
} |
|---|
| 52 |
|
|---|
| 53 |
if ( isset($_GET['per_page']) ) |
|---|
| 54 |
{ |
|---|
| 55 |
$iPerPage = (int) $_GET['per_page']; |
|---|
| 56 |
} |
|---|
| 57 |
else |
|---|
| 58 |
{ |
|---|
| 59 |
if ( $sInfoMode == 'extended' ) |
|---|
| 60 |
$iPerPage = 5; |
|---|
| 61 |
else |
|---|
| 62 |
$iPerPage = 32; |
|---|
| 63 |
} |
|---|
| 64 |
|
|---|
| 65 |
if ( $iPerPage <= 0 ) |
|---|
| 66 |
{ |
|---|
| 67 |
$iPerPage = 32; |
|---|
| 68 |
} |
|---|
| 69 |
|
|---|
| 70 |
if ( $iPerPage > 100 ) |
|---|
| 71 |
{ |
|---|
| 72 |
$iPerPage = 100; |
|---|
| 73 |
} |
|---|
| 74 |
|
|---|
| 75 |
|
|---|
| 76 |
$aFilteredSettings = array |
|---|
| 77 |
( |
|---|
| 78 |
'sex' => $sSex, |
|---|
| 79 |
'age' => $sAge, |
|---|
| 80 |
'country' => $sCountry, |
|---|
| 81 |
'photos_only' => $sPhotos, |
|---|
| 82 |
'online_only' => $sOnline, |
|---|
| 83 |
); |
|---|
| 84 |
|
|---|
| 85 |
|
|---|
| 86 |
$aDisplaySettings = array( |
|---|
| 87 |
'page' => $iPage, |
|---|
| 88 |
'per_page' => $iPerPage, |
|---|
| 89 |
'sort' => $sSort, |
|---|
| 90 |
'mode' => $sInfoMode, |
|---|
| 91 |
); |
|---|
| 92 |
|
|---|
| 93 |
$oBrowsePage = &new BxTemplBrowse( $aFilteredSettings, $aDisplaySettings, 'browse_page' ); |
|---|
| 94 |
$sOutputHtml = $oBrowsePage -> getCode(); |
|---|
| 95 |
|
|---|
| 96 |
$_page_cont[$_ni]['page_main_code'] = $sOutputHtml; |
|---|
| 97 |
|
|---|
| 98 |
PageCode(); |
|---|
| 99 |
|
|---|
| 100 |
?> |
|---|