Файл: adultscript-2.0.3-pro/files/templates/defboot/community.tpl.php
Строк: 283
<?php defined('_VALID') or die('Restricted Access!'); ?>
<link rel="stylesheet" href="<?php echo REL_URL; ?>/misc/bootstrap-slider/css/bootstrap-slider.min.css">
<script type="text/javascript" src="<?php echo REL_URL; ?>/misc/bootstrap-slider/js/bootstrap-slider.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#slider").slider().on('slide', function(slideEvt) {
$("input#range").val(slideEvt.value);
var value = $("input#range").val().replace(',', ' - ');
var split = value.split(' - ');
$("input[name='start']").val(split[0]);
$("input[name='end']").val(split[1]);
$("span#age-range").text(value);
});
$("button[id='submit-reset']").click(function(e) {
e.preventDefault();
window.location = '<?php echo BASE_URL; ?>/community/';
});
});
</script>
<div id="content" class="row">
<div class="col-md-12 collapse" id="collapseSearch">
<div class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title"><?php echo __('search-title'); ?></h2>
</div>
<div class="panel panel-body panel-padding">
<form id="community-form" class="form-horizontal" method="get" action="<?php echo REL_URL; ?>/community/">
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label for="gender" class="col-sm-2 control-label"><?php echo __('gender'); ?></label>
<div class="col-sm-10 col-md-7">
<select name="gender" id="gender" class="form-control">
<option value="all"><?php echo __('all'); ?></option>
<option value="female"<?php if ($this->gender == 'female'): echo ' selected="selected"'; endif; echo '>',__('girls'); ?></option>
<option value="male"<?php if ($this->gender == 'male'): echo ' selected="selected"'; endif; echo '>',__('guys'); ?></option>
</select>
</div>
</div>
<div class="form-group">
<label for="relation" class="col-sm-2 control-label"><?php echo __('relation'); ?></label>
<div class="col-sm-10 col-md-7">
<select name="relation" id="relation" class="form-control">
<option value="all"><?php echo __('all'); ?></option>
<option value="single"<?php if ($this->relation == 'single'): echo ' selected="selected"'; endif; echo '>',__('single'); ?></option>
<option value="open"<?php if ($this->relation == 'open'): echo ' selected="selected"'; endif; echo '>',__('open'); ?></option>
<option value="taken"<?php if ($this->relation == 'taken'): echo ' selected="selected"'; endif; echo '>',__('taken'); ?></option>
</select>
</div>
</div>
<div class="form-group">
<label for="interested" class="col-sm-2 control-label"><?php echo __('interested'); ?></label>
<div class="col-sm-10 col-md-7">
<select name="interested" id="interested" class="form-control">
<option value="all"><?php echo __('all'); ?></option>
<option value="boys"<?php if ($this->interested == 'single'): echo ' selected="selected"'; endif; echo '>',__('girls'); ?></option>
<option value="girls"<?php if ($this->interested == 'open'): echo ' selected="selected"'; endif; echo '>',__('guys'); ?></option>
<option value="boys+girls"<?php if ($this->interested == 'taken'): echo ' selected="selected"'; endif; echo '>',__('both'); ?></option>
</select>
</div>
</div>
<div class="form-group">
<label for="age" class="col-sm-2 control-label"><?php echo __('age'); ?></label>
<div class="col-sm-8 col-md-5">
<label class="checkbox-inline">
<input type="hidden" id="range" value="">
<input name="start" type="hidden" value="18">
<input name="end" type="hidden" value="99">
<input type="text" id="slider" class="col-sm-12" value="" data-slider-min="18" data-slider-max="99" data-slider-step="1" data-slider-value="[<?php echo $this->age_start,',',$this->age_end; ?>]" data-slider-orientation="horizontal" data-slider-selection="none" data-slider-tooltip="show" style="margin-left: 10px;">
<strong><span id="age-range" style="margin-left: 20px;"><?php echo $this->age_start,' - ',$this->age_end; ?></span></strong>
</label>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="username" class="col-sm-2 control-label"><?php echo __('username'); ?></label>
<div class="col-sm-10 col-md-7">
<input name="username" type="text" id="username" class="form-control" value="<?php echo e($this->username); ?>">
</div>
</div>
<div class="form-group">
<label for="country" class="col-sm-2 control-label"><?php echo __('country'); ?></label>
<div class="col-sm-10 col-md-7">
<select name="country" id="country" class="form-control">
<option value=""><?php echo __('country'); ?></option>
<?php foreach ($this->countries as $code => $name): ?>
<option value="<?php echo e($code); ?>"<?php if ($name == $this->country): ?> selected="selected"<?php endif; ?>><?php echo e($name); ?></option>
<?php endforeach; ?>
</select>
</div>
</div>
<div class="form-group">
<label for="city" class="col-sm-2 control-label"><?php echo __('city'); ?></label>
<div class="col-sm-10 col-md-7">
<input name="city" type="text" class="form-control" id="city" value="<?php echo e($this->city); ?>">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<div class="checkbox"><label><input name="online" type="checkbox" value="yes"<?php if ($this->online == 'yes'): echo ' checked="checked"'; endif; ?>> <?php echo __('is-online'); ?></label></div>
<div class="checkbox"><label><input name="avatar" type="checkbox" value="yes"<?php if ($this->avatar == 'yes'): echo ' checked="checked"'; endif; ?>> <?php echo __('has-avatar'); ?></label></div>
</div>
</div>
</div>
<div class="col-sm-12 text-center">
<button id="submit-search" type="submit" class="btn btn-default"><?php echo __('search-button'); ?></button>
<button id="submit-reset" type="button" class="btn btn-default"><?php echo __('reset'); ?></button>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<h1 class="panel-title pull-left"><?php echo __('browse-title'); ?></h1>
<div class="btn-toolbar pull-right" role="group">
<div class="btn-group" role="group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<?php $icons = array('recent' => 'calendar', 'popular' => 'bar-chart', 'videos' => 'video-camera', 'name' => 'heart'); $order = (isset($this->order)) ? $this->order : 'recent'; ?>
<i class="fa fa-<?php echo $icons[$order],'"></i> ',__($order); ?>
<span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>
</button>
<ul class="dropdown-menu" role="menu">
<li<?php if ($this->order == 'recent'): echo ' class="active"'; endif; ?>><a href="<?php echo build_url('recent'),'"><i class="fa fa-calendar"></i> ',__('recent'); ?></a></li>
<li<?php if ($this->order == 'popular'): echo ' class="active"'; endif; ?>><a href="<?php echo build_url('popular'),'"><i class="fa fa-bar-chart"></i> ',__('popular'); ?></a></li>
<li<?php if ($this->order == 'videos'): echo ' class="active"'; endif; ?>><a href="<?php echo build_url('videos'),'"><i class="fa fa-video-camera"></i> ',__('videos'); ?></a></li>
<li<?php if ($this->order == 'name'): echo ' class="active"'; endif; ?>><a href="<?php echo build_url('name'),'"><i class="fa fa-folder"></i> ',__('name'); ?></a></li>
</ul>
</div>
<div class="btn-group" role="group">
<button type="button" class="btn btn-default" data-toggle="collapse" data-target="#collapseSearch" aria-expanded="false" aria-controls="collapseSearch"><i class="fa fa-search"></i> <?php echo __('search'); ?></button>
</div>
</div>
<div class="clearfix"></div>
</div>
<div class="panel-body no-padding">
<ul class="users">
<?php $online = time()-300; foreach ($this->users as $user): ?>
<li class="user-<?php echo $user['user_id']; ?>">
<div class="user">
<?php $avatar = ($user['avatar'] != '') ? USER_URL.'/'.$user['user_id'].'.'.$user['avatar'] : USER_URL.'/'.'nopic-'.$user['gender'].'.gif'; ?>
<a href="<?php echo REL_URL,'/users/',e($user['username']),'/"><img src="',$avatar,'" alt="',e($user['username']),' ',__('avatar'),'" class="img-thumbnail">',
e($user['username']); if ($user['online'] > $online): echo '<span class="user-overlay label label-success">',__('online'),'</span>'; endif; ?>
</a>
</div>
</li>
<?php endforeach; ?>
</ul>
<div class="clearfix"></div>
<?php echo p('adv', 'community-bottom', 'ads-responsive'); ?>
<nav class="text-center"><ul class="pagination pagination-lg"><?php echo p('pagination', $this->pagination, CUR_URL); ?></ul></nav>
</div>
</div>
</div>
</div>