Changeset 20 for trunk/index.php
- Timestamp:
- Dec 26, 2018, 11:55:16 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/index.php
r19 r20 127 127 { 128 128 $this->NoFullPage = true; 129 if (array_key_exists('name', $_GET) ) $_SESSION['name'] = $_GET['name']; 130 if (array_key_exists('location', $_GET) ) $_SESSION['location'] = $_GET['location']; 131 if (array_key_exists('message', $_GET) ) $_SESSION['message'] = $_GET['message']; 129 132 if (array_key_exists('vekod', $_GET) ) $_SESSION['vekod'] = $_GET['vekod']; 130 133 if (array_key_exists('vekdo', $_GET) ) $_SESSION['vekdo'] = $_GET['vekdo']; … … 184 187 $Output .= '<h4 style="text-align: center;">Inzeráty:</h4>'; 185 188 $Output .= '<div class="btn-group ma3">'. 189 '<div class="label-box">Pohlaví</div>'. 186 190 '<button class="btn btn-filter cpohlavi btn-ico" onclick="upf(\'pohlavi\',0)" id="pohlavi0" data-toggle="tooltip" '. 187 'data-placement="top" title="Obě pohlaví"><span class="icon-both"></span></button>'.191 'data-placement="top" title="Obě"><span class="icon-both"></span></button>'. 188 192 '<button class="btn btn-filter cpohlavi btn-ico" onclick="upf(\'pohlavi\',1)" id="pohlavi1" data-toggle="tooltip" '. 189 'data-placement="top" title=" Jen muži"><span class="icon-man"></span></button>'.193 'data-placement="top" title="Muži"><span class="icon-man"></span></button>'. 190 194 '<button class="btn btn-filter cpohlavi btn-ico" onclick="upf(\'pohlavi\',2)" id="pohlavi2" data-toggle="tooltip" '. 191 'data-placement="top" title="Jen ženy"><span class="icon-woman"></span></button>'. 192 '</div>'; 195 'data-placement="top" title="Ženy"><span class="icon-woman"></span></button>'. 196 '</div> '; 197 $Output .= '<div class="filter-num-box">'. 198 '<div class="label-box">Jméno</div>'. 199 '<input value="'.$_SESSION['name'].'" onkeyup="if(event.keyCode!=9) upf(\'name\',$(this).val(),(event.keyCode==13?0:1)); '. 200 '" id="name" autocomplete="off" type="text">'. 201 '</div> '; 193 202 $Output .= '<div class="filter-num-box">'. 194 203 '<div class="label-box">Věk</div>'. … … 198 207 '<input value="'.$_SESSION['vekdo'].'" onkeyup="'. 199 208 'if(event.keyCode!=9) upf(\'vekdo\',$(this).val(),(event.keyCode==13?0:1));" '. 200 'id="vekdo" autocomplete="off" type="text"><div class="label-box">let</div></div>'. 209 'id="vekdo" autocomplete="off" type="text">'. 210 '<div class="label-box">let</div>'. 201 211 '</div> '; 202 212 $Output .= '<div class="filter-num-box">'. … … 207 217 '<input value="'.$_SESSION['vyskado'].'" onkeyup="'. 208 218 'if(event.keyCode!=9) upf(\'vyskado\',$(this).val(),(event.keyCode==13?0:1));" '. 209 'id="vyskado" autocomplete="off" type="text"><div class="label-box">cm</div></div>'. 219 'id="vyskado" autocomplete="off" type="text">'. 220 '<div class="label-box">cm</div>'. 210 221 '</div> '; 211 222 $Output .= '<div class="filter-num-box">'. … … 216 227 '<input value="'.$_SESSION['vahado'].'" onkeyup="'. 217 228 'if(event.keyCode!=9) upf(\'vahado\',$(this).val(),(event.keyCode==13?0:1));" '. 218 'id="vahado" autocomplete="off" type="text"><div class="label-box">cm</div></div>'. 219 '</div>'; 229 'id="vahado" autocomplete="off" type="text">'. 230 '<div class="label-box">Kg</div>'. 231 '</div> '; 232 $Output .= '<div class="filter-num-box">'. 233 '<div class="label-box">Umístění</div>'. 234 '<input value="'.$_SESSION['location'].'" onkeyup="if(event.keyCode!=9) upf(\'location\',$(this).val(),(event.keyCode==13?0:1)); '. 235 '" id="location" autocomplete="off" type="text">'. 236 '</div> '; 237 $Output .= '<div class="filter-num-box">'. 238 '<div class="label-box">Zpráva</div>'. 239 '<input value="'.$_SESSION['message'].'" onkeyup="if(event.keyCode!=9) upf(\'message\',$(this).val(),(event.keyCode==13?0:1)); '. 240 '" id="message" autocomplete="off" type="text">'. 241 '</div> '; 220 242 } 221 243 222 244 $Where = ''; 245 if (array_key_exists('name', $_SESSION) and ($_SESSION['name'] != '')) $Where .= ' AND (Name LIKE "%'.$_SESSION['name'].'%")'; 246 if (array_key_exists('location', $_SESSION) and ($_SESSION['location'] != '')) $Where .= ' AND (Location LIKE "%'.$_SESSION['location'].'%")'; 247 if (array_key_exists('message', $_SESSION) and ($_SESSION['message'] != '')) $Where .= ' AND (Message LIKE "%'.$_SESSION['message'].'%")'; 223 248 if (array_key_exists('vekod', $_SESSION) and ($_SESSION['vekod'] != '')) $Where .= ' AND (Age >= '.$_SESSION['vekod'].')'; 224 249 if (array_key_exists('vekdo', $_SESSION) and ($_SESSION['vekdo'] != '')) $Where .= ' AND (Age <= '.$_SESSION['vekdo'].')';
Note:
See TracChangeset
for help on using the changeset viewer.