/** * * AJAX 콜에 대한 응답 * * ajax로 문서 lock 갱신 * * @param array $params {@link NarinEvent) 에서 넘겨주는 파라미터 */ public function on_ajax_call($params) { $member = $this->member; $get = $params['get']; $ns = $get['path']; $recursive = (isset($get['nosub']) ? false : true); $rows = (isset($get['rows']) ? $get['rows'] : 5); $cutstr = (isset($get['title_length']) ? $get['title_length'] : 512); $dateformat = (isset($get['dateformat']) ? $get['dateformat'] : "Y-m-d h:i:s"); $order = (isset($get['order']) ? $get['order'] : 'date'); $reverse = (isset($get['reverse']) ? true : false); $with_content = ($get['type'] == 'webzine' ? true : false); $wild = ''; foreach($get as $k => $v) { if(strpos($k, '*') !== false) { $wild = $k; break; } } define("_LIST_PLUGIN_", 1); include_once dirname(__FILE__).'/list.lib.php'; $list = wiki_list_docs($this->wiki, $this->g4, stripslashes($ns), $order, $wild, $recursive, $dateformat, $rows, $cutstr, $reverse, $with_content); echo wiki_json_encode(array('code'=>1, 'current_time'=>$this->g4['time_ymdhis'], 'list'=>$list)); exit; }
/** * * 자바스크립트를 사용하지 않는 출력 * * @param array $args 최근문서문법에서 분석된 파라미터 * @param array $params {@link NarinParser} 에서 전달하는 파라미터 * @return string HTML 태그 */ protected function wiki_list_nojs($args, $params) { define("_LIST_PLUGIN_", 1); include_once dirname(__FILE__).'/list.lib.php'; $recursive = (isset($args['nosub']) ? false : true); $rows = (isset($args['rows']) ? $args['rows'] : 5); $cutstr = (isset($args['title_length']) ? $args['title_length'] : 512); $dateformat = (isset($args['dateformat']) ? $args['dateformat'] : "Y-m-d h:i:s"); $current_time = $this->g4['time_ymdhis']; $reverse = (isset($args['reverse']) ? true : false); $with_content = ($args['type'] == 'webzine' ? true : false); $args['emp'] = (isset($args['emp']) ? $args['emp'] : 0); $args['emp_style'] = (isset($args['emp_style']) ? $args['emp_style'] : 'font-weight:bold'); $args['field'] = isset($args['field']) ? $args['field'] : 'title,editor,date'; $args['title_length'] = isset($args['title_length']) ? $args['title_length'] : 512; $args['order'] = isset($args['order']) ? $args['order'] : 'date'; $wild = ''; foreach($args as $k => $v) { if(strpos($k, '*') !== false) { $wild = $k; break; } } $list = wiki_list_docs($this->wiki, $this->g4, stripslashes($args['path']), $args['order'], $wild, $recursive, $dateformat, $rows, $cutstr, $reverse, $with_content); // TODO : 웹진모드 (보류) if($args['type'] == 'table' || $args['type'] == 'webzine') return $this->render_table($args, &$list, &$params); else return $this->render_list($args, &$list, &$params); }