Example #1
0
 /**
  * @param $cId
  * @param $salOnPage
  * @return mixed
  */
 function get_com_salary($cId, $salOnPage)
 {
     $salCity = encodeUrlParameter(@$_GET['city']);
     $salJob = encodeUrlParameter(@$_GET['position']);
     $page = @$_GET['page'];
     if (strlen($salCity) > 30) {
         die('Error city parameter');
     }
     if (isset($page) && (!is_numeric($page) || $page < 1 || $page == '')) {
         die('Wrong page');
     }
     $ft = $this->countFromToPages($page, $salOnPage);
     $from = $ft[0];
     $to = $ft[1];
     $this->db->select('*')->from('salary')->where('cId', $cId)->like('city', $salCity)->like('position', $salJob)->limit($to, $from)->order_by('addDate DESC, minSal DESC');
     $a = $this->db->get()->result();
     $this->db->select('COUNT(*)')->from('salary')->where('cId', $cId)->like('city', $salCity)->like('position', $salJob);
     $a['salNum'] = $this->db->count_all_results();
     return $a;
 }
Example #2
0
<link rel="stylesheet" href="/css/salary.css">
<link rel="stylesheet" href="/js/ionSlider/css/ion.rangeSlider.css">
<link rel="stylesheet" href="/js/ionSlider/css/ion.rangeSlider.skinModern.css">
<script src="/js/ionSlider/js/ion-rangeSlider/ion.rangeSlider.js"></script>
<script src="/js/filters.js"></script>

<?php 
$salJob = encodeUrlParameter(@$_GET['position']);
$salCity = encodeUrlParameter(@$_GET['city']);
?>
<input type="hidden" id="this_page" value="<?php 
echo $this_page;
?>
">
<div class="container">
    <div class="row" style="height:70px;">&nbsp;</div>
    <div class="row">
        <div class="filtersCnt">
            <div class="input-group input-group-sm">
                <label>должность <input class="form-control filFilTxt" id="filFilJob" type="text" value="<?php 
echo isset($salJob) ? $salJob : '';
?>
"></label>
                <label>город <input class="form-control filFilTxt" id="filFilCity" type="text" value="<?php 
echo isset($salCity) ? $salCity : '';
?>
"></label><BR>
                <input type="button" class="btn btn-sm btn-success" id="filBtn" value="найти" rcn="<?php 
echo @$gets[0];
?>
">