Hiển thị các bài đăng có nhãn Map. Hiển thị tất cả bài đăng
Hiển thị các bài đăng có nhãn Map. Hiển thị tất cả bài đăng

Thứ Sáu, 25 tháng 3, 2016

nhập địa chỉ show map + checkbox lưu,show ra bên ngoài,lấy catid của muc_tintuc


## lấy catid của modules
$uil=new Uil();
$whe= $uil->getWhereCat("tintuc",1);

## save và show (input[type=checkbox])

+ show:
1---------------
$khacbiet = explode(",",$data_2['Khac']); // lấy database xuống field:khac

if(in_array("Phòng khách",$khacbiet)){
echo"yes";
- Nếu có phòng khác thì show ra --->yes
}
2-----------------
$os = explode(",",$data['tool']);
$sql = "SELECT * FROM res_tool WHERE lang_id=1";
$result = $db->sql_query($sql);
while($row = $db->sql_fetchrow($result)){
$id=$row['id'];
if(in_array($id, $os))
<td>".$row['name']."&nbsp;<img src=\"".$site_live."themes/"._THEME_NAME."/images/check.gif\" class='detail-resrealest-pic'></td>
else
<td>".$row['name']."</td>

if($j%4==0)
</tr><tr>
$j++;
}

+ trình diễn

<input type="checkbox" value="Phòng ngủ" name="other[]">
<input type="checkbox" value="Phòng khách" name="other[]">
<input type="checkbox" value="Bếp" name="other[]">

+ Lưu vào database

if($_POST['other']!=""){
$xother = implode(",",$_POST['other']);
}


## nhập địa chỉ vào fields ra ngoài show map đúng vị trí tên nhập

include("../classess/EasyGoogleMap.class.php");

<input class="sition-map" type="textbox" name="map">

if($data['map']){

$gm = & new EasyGoogleMap("ABQIAAAAyc62EJMO4347R0R7Y-hIoRRm9JLgkT58VziY1WRFxi4k-WwfYxRVu4xKP3r3LO91JI9uGpEkLrqDBg");
$gm->SetMarkerIconStyle('STAR');
$gm->SetMapZoom(15);
$gm->SetAddress("".$data['map']." ,VIET NAM");
$gm->SetInfoWindowText($data['map']);

echo "<center>".$gm->GmapsKey().$gm->MapHolder().$gm->InitJs().$gm->UnloadMap()."</center>";
}

--> download: tại đây