<?php
    $conf_basedir	= "../../";	//相对主目录的位置
    $conf_where		= "admin";	//选择调用相应模块
    $directory		= basename(dirname(__FILE__));	//定义当前所在的目录，引入模块公用函数
    include_once($conf_basedir."base.inc.php");
    include_once(CORE_LIB.'/class_apply.php');
    checkAuth('31');	//判断登录和权限
    $title = "图片审核";
    //此处还需获取审核状态
    if(isset($preid) && $preid!=0)
    {  
       if($config_GrowthCredit == 1){
            $sql = "select id,blockname,uid from admin_pic_entry where blockid=".intval($preid)." and sort=".intval($sort);     
            $deleteArr = $dbback->GetAll($sql);     
            if(!empty($deleteArr)&&is_array($deleteArr)){
                foreach($deleteArr as $value){
                  $key = $value['id'];
                  $q = "update growth_pic_check_log set pic_status = 2 where sid = $key";//审核状态         
                  $db->Execute($q);   
                  $title = "小区外景图审核未通过";
                  $msg = "感谢您参与小区外景图完善，您提交的关于".$value['blockname']."的外景图没有通过审核，请您查证准确外景图片后再来试试吧！";
                  apply::send_systemmsg($value['uid'], $title, $msg);
                }           
            }
           
       }
           
       $q="delete from admin_pic_entry where blockid=".intval($preid)." and sort=".intval($sort);
       $db->Execute($q);          
      //if($id==0)
        //{
      //echo "已结束";exit;
      //}
    }
   
	if ($actiontype) doaction($actiontype,$actionid);

    $js = "<script type='text/javascript' src='http://esfadmin.house365.com/script/js/showpic.js'></script>
    <script type='text/javascript' src='http://esfadmin.house365.com/script/js/public.js'></script>";
    
    $tbl='block';
    //获得数据当前页面数据
    $sql = "select * from $tbl where id=".$id."";
    $data_info = $dbback->GetAll($sql);
    //读取权限组
  //  $q = "select id,groupname from broker_group ";
  //  $broker_group = $db->GetAssoc($q);
//echo 333;exit;
    $tpl = $sort == 0 ? "block/entry_audit" : "block/entry_audit1";
    //引用模版文件
    include_once(Template("header"));
    include_once(Template($tpl));
    include_once(Template("footer"));
?>