function show($data) { header("Content-Type: application/javascript"); ob_start("ob_gzhandler"); if (empty($_GET['callback'])) { echo LPC_JSON::encode($data); exit; } echo $_GET['callback']."(". LPC_JSON::encode($data). ");"; exit; }
function prepare() { if (!count($this->excel) || $this->renderMode=='Excel') { if (isset($this->content[$this->metaKey])) unset($this->content[$this->metaKey]); return; } $meta=new LPC_HTML_node('span'); $meta->setClass($this->metaClass); $meta->setAttr('style','display:none'); $meta->compact=true; $meta->a(LPC_JSON::encode($this->excel)); $this->content[$this->metaKey]=$meta; }