?? bbs0anbm.php
字號:
<?phprequire('bbs0anbm_pre.php'); // 執行各種精華區文件批量操作$text = "";if(isset($_POST["annAction"])){ $action = $_POST["annAction"]; $total = $_POST["annCount"]; if($action == "delete") { for($i=1; $i<=$total; $i++) { if(isset($_POST["ann{$i}"])) { $fname = $_POST["ann{$i}"]; if(bbs_ann_delete($filename, $fname) == -1) { $text = "錯誤:精華區目錄不存在。"; exit; } } } } else if(($action == "cut") || ($action == "copy")) { $fnames = ""; for($i=1; $i<=$total; $i++) { if(isset($_POST["ann{$i}"])) { $fnames .= $_POST["ann{$i}"] . ","; } } $ret = bbs_ann_copy($filename, $fnames, ($action == "cut") ? 1 : 0); switch($ret) { case -1: $text = "系統錯誤:無法修改剪貼板。"; break; } } else if($action == "paste") { $ret = bbs_ann_paste($filename); switch($ret) { case -1: $text = "錯誤:精華區目錄不存在。"; break; case -2: $text = "錯誤:找不到要粘貼的文件。"; break; case -5: $text = "錯誤:粘貼失敗,可能有其他版主正在整理同一目錄。"; break; } } else if($action == "move") { $oldnum = $_POST["oldnum"]; $newnum = $_POST["newnum"]; $ret = bbs_ann_move($filename, $oldnum, $newnum); switch($ret) { case -1: $text = "錯誤:精華區目錄不存在。"; break; case -2: $text = "錯誤:找不到要移動的項目。"; break; case -3: $text = "錯誤:移動失敗,可能有其他版主正在整理同一目錄。"; break; } } }function bbs_ann_bm_display_articles($articles, $isBoard) { global $show_none, $has_perm_boards, $path, $text, $title; $pathstr = substr($path, 9, strlen($path) - 9);?><script type="text/javascript"><!--var an = new annWriter('<?php echo rawurlencode($pathstr); ?>',<?php echo $has_perm_boards?"1":"0"; ?>,'<?php echo $text; ?>','<?php echo $title; ?>');<?php if($show_none) {?>document.write('<tr><td align="center" colspan="7">該精華區目錄沒有文章。</td></tr>');<?php } else foreach ($articles as $article) { $title = htmlspecialchars(rtrim($article['TITLE']), ENT_QUOTES); echo 'an.i(' . $article['FLAG'] . ',\'' . $title . '\',\'' . trim($article['BM']) . '\',\'' . rawurlencode($article['FNAME']) . '\',\'' . date('Y-m-d',$article['TIME']) . '\');'; }?>//-->an.f();</script><?php if ($isBoard) echo "</div>"; /* </div>: dirty way ... for closing <div class="doc"> */}$board = '';$articles = array();$path_tmp = '';$ret = bbs_read_ann_dir($path,$board,$path_tmp,$articles,1);$show_none = 0;switch ($ret) { case -1: html_error_quit('精華區目錄不存在'); break; case -2: html_error_quit('無法加載目錄文件'); break; case -3: $show_none = 1; break; case -9: html_error_quit('系統錯誤'); break; default;}$path = $path_tmp;$isBoard = false;$up_cnt = bbs_ann_updirs($path,$board,$up_dirs);$title = bbs_ann_get_title($path);if ($board) { $brdarr = array(); $bid = bbs_getboard($board,$brdarr); if ($bid) { $board = $brdarr['NAME']; $usernum = $currentuser['index']; if (bbs_checkreadperm($usernum, $bid) == 0) html_error_quit('不存在該目錄'); bbs_set_onboard($bid,1); bbs_board_header($brdarr,-1,0); print("<h1 class=\"bt\">{$title}</h1>"); $isBoard = true; } else { $board = ''; bbs_ann_header($board); print("<h1 class=\"bt\">{$title}</h1>"); } }else { $bid = 0; bbs_ann_header(); print("<h1 class=\"bt\">{$title}</h1>");}?><script src="static/www2-addons.js" type="text/javascript"></script><?phpbbs_ann_bm_display_articles($articles, $isBoard); if ($up_cnt >= 2) bbs_ann_bm_foot($up_dirs[$up_cnt - 2]);else bbs_ann_bm_foot('');page_footer();?>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -