<?php

$conf_basedir	= "../../";	//相对主目录的位置
$conf_where		= "admin";	//选择调用相应模块
$directory		= basename(dirname(__FILE__));	//定义当前所在的目录，引入模块公用函数
include_once($conf_basedir."base.inc.php");
checkAuth('86');	//判断登录和权限

$title = "小区完善设置";
$request  = new Request();

$blockLevelInfoFullSetting = new BlockLevelInfoFullSetting();
//echo $blockLevelHeatSetting->getExpWayAlias('A');
//print_r($data_info);
//xdebug_var_dump($data_info);
//echo xdebug_time_index();
//echo xdebug_memory_usage();
if($request->isAjax()) {
    $pv = intval($_POST['pv']);
    $houseNumber = intval($_POST['house_number']);
    $number = $blockLevelInfoFullSetting->update($pv,$houseNumber);
    if($number) {
        $operateRecord->insertData('86', 'update', 
                '更新小区完善度设置的未完善项数量为'.$pv.'和图片数量为'.$houseNumber.'成功', $_SESSION['esfadmin']['username']);
        echo json_encode(array('result'=>1));
    }else {
        $operateRecord->insertData('86', 'update', 
                '更新小区完善度设置的未完善项数量为'.$pv.'和图片数量为'.$houseNumber.'失败', $_SESSION['esfadmin']['username']);
        echo json_encode(array('result'=>0));
    }
    exit;
} else {
    $data_info = $blockLevelInfoFullSetting->findAll();
    include_once(Template("header"));
    include_once(Template("growth_nj/block_level_info_setting"));
    include_once(Template("footer"));
}



?>
