$numpath = $_GET["p"]; $brdarr = array(); $bid = $numpath; settype($bid, "integer"); if ($bid == 0) { html_error_quit("错误的版面"); } $board = bbs_getbname($bid); if (!$board) { html_error_quit("错误的讨论区"); } if ($bid != bbs_getboard($board, $brdarr)) { html_error_quit("错误的讨论区"); } $board = $brdarr['NAME']; $path = bbs_ann_num2path($numpath, $currentuser["userid"]); if ($path == false) { html_error_quit("错误的文章"); } $path = substr($path, 10, strlen($path) - 9); } else { if (isset($_GET['path'])) { $path = trim($_GET['path']); } else { $path = ""; } } if (strstr($path, '.Names') || strstr($path, '..') || strstr($path, 'SYSHome')) { html_error_quit('不存在该目录'); } $board = '';
$numpath = $_GET["p"]; $brdarr = array(); $bid = $numpath; settype($bid, "integer"); if ($bid == 0) { html_error_quit("╢МнС╣д╟ФцФ"); } $board = bbs_getbname($bid); if (!$board) { html_error_quit("╢МнС╣длжбшгЬ"); } if ($bid != bbs_getboard($board, $brdarr)) { html_error_quit("╢МнС╣длжбшгЬ"); } $board = $brdarr['NAME']; $filename = bbs_ann_num2path($numpath, $currentuser["userid"]); if ($filename == false) { html_error_quit("╢МнС╣дндуб"); } if (!file_exists($filename) || is_dir($filename)) { html_error_quit("╢МнС╣дндуб..."); } bbs_set_onboard($bid, 1); if (bbs_normalboard($board)) { if (cache_header('public', filemtime($filename), 300)) { return; } } $up_dirs = array(); $up_cnt = bbs_ann_updirs($filename, $board, $up_dirs); } else {