主办:中共广州市委宣传部
$v) { if (is_int($k) && $prefix != null) $k = urlencode($prefix . $k); if (!empty($key)) $k = $key.'['.urlencode($k).']'; if (is_array($v) || is_object($v)) array_push($ret, http_build_query($v, '', $sep, $k)); else array_push($ret, $k.'='.urlencode($v)); } if (empty($sep)) $sep = ini_get('arg_separator.output'); return implode($sep, $ret); } } function getPageParam (/* array */$param, /*array*/$avoid_key = null) { if (is_array($param)) { if (!empty($avoid_key)) { foreach ((array)$avoid_key as $v) { unset($param[$v]); } } return http_build_query($param); } return false; } function getBoolean($type) { if ($type === 'true') { return true; }elseif ($type === 'false') { return false; }else { return $type; } } //取得URL数据变量 list($filename, $query) = explode("?", $_SERVER['REQUEST_URI']); parse_str($query, $output); $nodeid = getValue(mysql_escape_string($_GET['nodeid']), $output['nodeid'], mysql_escape_string($_GET['defalutNodeid']), null); if (empty($nodeid)) { echo '参数错误'; exit; } $avoid_search_nid = getValue(array_map('mysql_escape_string', (array)$_GET['a_s_n']), array_map('mysql_escape_string', (array)$output['a_s_n']), array()); $config_shownum = getValue(mysql_escape_string($_GET['c_s']), $output['c_s'], $shownum); $config_colnum = getValue(mysql_escape_string($_GET['c_c']), $output['c_c'], $colnum); $config_template = getValue(mysql_escape_string($_GET['c_t']), $output['c_t'], null); //分页时用的uri $config_uri = getValue(mysql_escape_string($_GET['c_u']), $output['c_u'], null); require_once(dirname(__FILE__)."/../config.dy"); require_once(dirname(__FILE__)."/../include/special.dy"); require_once(dirname(__FILE__)."/../lib_function.dy"); if (($template_path = getTemplatePath($templatedir, rtrim($templatedir, '/').'/'.$config_template)) === false) { die('模板路径不正确'); } if (!file_exists($template_path)) { die('模板不存在'); } $p = (int) getValue(mysql_escape_string($_GET['p']), $output['p'], 1); $p = $p > 0 ? $p : 1; $where = array(); $where['title'] = getValue(mysql_escape_string($_GET['s_t']), $output['s_t'], null); $where['prehead'] = getValue(mysql_escape_string($_GET['s_p']), $output['s_p'], null); $where['subhead'] = getValue(mysql_escape_string($_GET['s_s']), $output['s_s'], null); $where['docket'] = getValue(mysql_escape_string($_GET['s_d']), $output['s_d'], null); $where['keyword'] = getValue(mysql_escape_string($_GET['s_k']), $output['s_k'], null); $where['content'] = getValue(mysql_escape_string($_GET['s_c']), $output['s_c'], null); $whereCondition = ''; //搜索的模式,true时为模糊查找 $useLike = false; if (getValue(mysql_escape_string($_GET['searchType']), $output['searchType'], null) == 'wildcard') { $useLike = true; } foreach ($where as $k => $v) { if (!is_null($v)) $whereCondition .= getWhereSearch($k, $v, $useLike).' AND '; } //时间选定 $start_posttime = getValue(mysql_escape_string($_GET['pt_start']), $output['pt_start'], null); $end_posttime = getValue(mysql_escape_string($_GET['pt_end']), $output['pt_end'], null); if (!is_null($start_posttime)) { $whereCondition .= "$tbpublish.`publishdate` >= ".intval($start_posttime).' AND '; } if (!is_null($end_posttime)) { $whereCondition .= "$tbpublish.`publishdate` <= ".intval($end_posttime).' AND '; } $whereCondition = rtrim($whereCondition, ' AND '); $whereCondition = empty($whereCondition)?'1':$whereCondition; $condition_titleimage = getBoolean(getValue(mysql_escape_string($_GET['con_img']), $output['con_img'], null)); $condition_docket = getBoolean(getValue(mysql_escape_string