<?php
/**
 * Rocky Zhang 2012.5.28
*/

class ome_order_modifier{
    function showEdit(&$content){
        setcookie('ome_notify_url',$_GET['ome_notify_url']);
        
        $origion = array(
            '/<ul class="btn-bar">[\S\s]*?<\/ul>/i',
            '/<b ([\s\S]+?)submitBtn([\S\s]*?)(保存并关闭窗口)([\S\s]+?)<\/b>/i',
            '/<b isclosedialogbtn([\s\S]+?)(关闭)([\s\S]+?)<\/b>/i',
            '/target="{update:\'messagebox\'}"/i',
        );
        $replace = array(
        '<script hold="true">window.close=function()}{};window.onclose=function(){};</script>',
        '','','target="{update:document.createElement(\'div\')}"');

        return $content = preg_replace($origion,$replace,$content);
    }
}
