<?php
require('path.inc.php');

$page->title =  $page->title.' - 删除房源';

if($page->action == 'delete'){
	//保存在ajax页面	
	$house_id = intval($_GET['house_id']);
	$deletePwd = $_POST['deletePwd'];
   	$house = new HouseSell($query);
	//判断管理密码是否一直
	$housePwd = $house->getInfo($house_id,"owner_notes");
	if($housePwd == $deletePwd){
		$house->delete($house_id);
		$page->goto('index.php','信息删除成功');
		}else{
			$page->goto('d-'.$house_id.'.html','密码错误');
			}
}else{
	$page->name = 'delete';
}
$page->show();
?>