insert($insert); $rs = getReply($reply['commid']); foreach($rs as $v){ $str .= '
  • '.$v['username'].'  '.$v["descript"].'
    '.format_date('Y年m月d日 H:i',$v['uptime']).'
  • '; } $result['html'] .= $str; $result['id'] = $reply['reply_view']; json($result,'updater'); } break; case 'thieve_reply': require_once(dirname(dirname(__FILE__)) . '/include/function/reply.php'); if(is_post()){ $reply = $_POST; $reply['uptime'] = time(); $reply['masterid'] = $reply['userid']; $reply['thieveid'] = $login_user['id']; if(empty($reply['descript'])){ Session::Set('notice', '操作登记失败!信息填写不完整'); json('信息不能为空','alert'); } if(!isset($reply['parentid'])){ $r = DB::GetQueryResult('select * from thieve_reply where thieveid='.$reply['thieveid']." and parentid=0"); if($u) $reply['parentid'] = $r['id']; else $reply['parentid'] = 0; } $insert = array('commid','masterid','thieveid','descript','uptime','parentid'); $table = new Table('thieve_reply',$reply); $ss = $table->insert($insert); if($reply['parentid'] > 0){ $child_replys=getThieveReply($reply['commid'],$reply['parentid']); $html = render("block_area_thievechildreply"); } else{ $replys = getThieveReply($reply['commid'],0); $html = render("block_area_thievereply"); } json(array('id'=>$reply['reply_view'],'html'=>$html),'updater'); } break; case 'showarea': $area = Table::Fetch('area',$id); $lease = Table::Fetch('lease',$id,'areaid'); $user = Table::Fetch('user',$lease['userid']); $html = render('ajax_dialog_user_areadetail'); json($html, 'dialog'); break; case 'areadetail': need_partner(); $area = Table::Fetch('area',$id); $lease = Table::Fetch('lease',$id,'areaid'); $user = Table::Fetch('user',$lease['userid']); $html = render('ajax_dialog_areadetail'); json($html, 'dialog'); break; case 'arearemove': need_partner(); $id = strval($_GET['id']); $area = Table::Fetch('area', $id); if (!$area) json('没有相关的地块', 'alert'); $lease = Table::Fetch('lease',$id,'areaid'); if($lease) json('此地块已出租,不能删除', 'alert'); Table::Delete('area', $id); Session::Set('notice', $area['title']." 删除成功!"); json(null, 'refresh'); break; case 'leaseremove': need_partner(); $id = strval($_GET['id']); $area = Table::Fetch('lease', $id,'areaid'); if (!$area) json('没有相关的租赁信息', 'alert'); Table::Delete('operate', $id,'leaseid'); //删除操作记录 Table::Delete('command', $id,'leaseid'); //删除操作指今 Table::Delete('reply', $id,'leaseid'); //删除操作指今的回复 Table::Delete('lease', $id,'areaid'); //删除租赁信息 Session::Set('notice', $area['title']." 退租成功!"); json(null, 'refresh'); break; case 'operate': need_partner(); $area = Table::Fetch('area',$id); $lease = Table::Fetch('lease',$id,'areaid'); $html = render('ajax_dialog_areaoperate'); json($html, 'dialog'); break; case 'sendcommand': $lease = Table::Fetch('lease',$id); $area = Table::Fetch('area',$lease['areaid']); $html = render('ajax_dialog_areasendcommand'); json($html, 'dialog'); break; case 'sendthievecommand': $lease = Table::Fetch('lease',$id); $area = Table::Fetch('area',$lease['areaid']); $html = render('ajax_dialog_thievecommand.html'); json($html, 'dialog'); break; } ?>