Файловый менеджер - Редактировать - /home/amitahospital/public_html/amita_master/ajax.php
Назад
<?php require("lib/configure.php"); $obj->dbLogin(); if(isset($_REQUEST['act']) && !empty($_REQUEST['act'])){ $task = $_REQUEST['act']; } switch($task){ case 'searchHotel': $loca_id= $_POST['loca_id']; $json=array(); $hotel=''; $query= 'SELECT * FROM hotel WHERE loca_id="'.$loca_id.'"'; $rs= mysqli_query($obj->mysqli,$query); if(mysqli_num_rows($rs)>0) { $hotel.='<option value="">- Please Select-</option>'; while($row = mysqli_fetch_assoc($rs)) { $hotel.="<option value='".$row['hotel_name']."' data-item='".$row['hotel_name']."'>".$row['hotel_name']."</option>"; } } $json['hotel_name']=$hotel; echo json_encode($json); break; case 'city_search': $search= $_REQUEST['city_name']; $city= $_REQUEST['city']; $sql= "SELECT city_name FROM cities WHERE city_name LIKE '$search%' ORDER BY city_name"; $res= mysqli_query($obj->mysqli,$sql); $num= mysqli_num_rows($res); if($num>0) { $cities= ""; $fun= ($city == 's_city')? 'fill' : 'fill2'; while($data= mysqli_fetch_assoc($res)) { $cities .= "<li onclick=$fun('".$data['city_name']."')>".$data['city_name']."</li>"; } echo $cities; } else{ echo "<li>NO CITY FOUND...</li>"; } break; case 'city_search2': $search= $_REQUEST['city_name2']; $sql= "SELECT city_name FROM cities WHERE city_name LIKE '$search%' ORDER BY city_name"; $res= mysqli_query($obj->mysqli,$sql); $num= mysqli_num_rows($res); if($num>0) { $cities= ""; while($data= mysqli_fetch_assoc($res)) { $cities .= "<li onclick=fill2('".$data['city_name']."')>".$data['city_name']."</li>"; } echo $cities; } else{ echo "NO CITY FOUND..."; } break; case 'city_search3': $search= $_REQUEST['city_name3']; $sql= "SELECT city_name FROM cities WHERE city_name LIKE '$search%' ORDER BY city_name"; $res= mysqli_query($obj->mysqli,$sql); $num= mysqli_num_rows($res); if($num>0) { $cities= ""; while($data= mysqli_fetch_assoc($res)) { $cities .= "<li onclick=fill3('".$data['city_name']."')>".$data['city_name']."</li>"; } echo $cities; } else{ echo "NO CITY FOUND..."; } break; case 'city_search_front': $search= $_REQUEST['city_name']; $city= $_REQUEST['city']; $sql= "SELECT city_name FROM cities WHERE city_name LIKE '$search%' ORDER BY city_name"; $res= mysqli_query($obj->mysqli,$sql); $num= mysqli_num_rows($res); if($num>0) { $cities= ""; $fun= ($city == 'city')? 'fill' : 'fill2'; while($data= mysqli_fetch_assoc($res)) { $cities .= "<li onclick=$fun('".$data['city_name']."')>".$data['city_name']."</li>"; } echo $cities; } else{ echo "<li>NO CITY FOUND...</li>"; } break; } ?>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Генерация страницы: 0.06 |
proxy
|
phpinfo
|
Настройка