function apply($s) { $id = intval($_REQUEST['id']); if ($id!=$_SESSION['last_land_id']) { //header("Location: /index.html"); echo "$id!={$_SESSION['last_land_id']}"; exit(); } $land = new Land(); $status = REALTY_STATUS_APPLY; $user_cond = (isset($_SESSION['user_id'])) ? ' AND user_id='.$_SESSION['user_id'] : ''; $land->updateBy("id=$id",array('status'=>$status)); $block_html = Html::getBlock('Сообщение',"Ваше объявление отправлено на проверку администратором."); $s->assign("block_html",$block_html); $s->display("msg.tpl"); }