⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wantedpages.php

📁 很棒的在线教学系统
💻 PHP
字号:
<?php // $Id: wantedpages.php,v 1.3 2007/01/10 03:07:24 toyomoyo Exp $# lists pages, which were referenced# but not yet written$ewiki_plugins["page"]["WantedPages"] = "ewiki_page_wantedpages";#<off># $ewiki_plugins["page"]["DanglingSymlinks"] = "ewiki_page_wantedpages";function ewiki_page_wantedpages($id, $data, $action) {    $wanted=array();    #-- collect referenced pages    $result = ewiki_database("GETALL", array("refs"));    while ($row = $result->get()) {        if (EWIKI_PROTECTED_MODE && EWIKI_PROTECTED_MODE_HIDING && !ewiki_auth($row["id"], $uu, "view")) {            continue;        }           $refs .= $row["refs"];    }    #-- build array    $refs = array_unique(explode("\n", $refs));    #-- strip existing pages from array    $refs = ewiki_database("FIND", $refs);    foreach ($refs as $id=>$exists) {        if (EWIKI_PROTECTED_MODE && EWIKI_PROTECTED_MODE_HIDING && !ewiki_auth($row["id"], $uu, "view")) {            continue;        }           if (!$exists && !strstr($id, "://") && strlen(trim($id))) {            $wanted[] = $id;        }    }    // to prevent empty <ul></ul> getting printed out, we have to interate twice.    // once to make sure the <ul></ul> is needed at all.     // MDL-7861, <ul></ul> does not validate.       $printul = false;     foreach ($wanted as $page) {        $link = ewiki_link_regex_callback(array($page, $page));        if (strstr($link, "?</a>")) {            $printul = true;        }    }    #-- print out       if ($printul) {        $o .= "<ul>";           foreach ($wanted as $page) {            $link = ewiki_link_regex_callback(array($page, $page));            if (strstr($link, "?</a>")) {                $o .= "<li>" . $link . "</li>";            }        }        $o .= "</ul>";    }    return($o);}?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -