• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP ewiki_make_title函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中ewiki_make_title函数的典型用法代码示例。如果您正苦于以下问题:PHP ewiki_make_title函数的具体用法?PHP ewiki_make_title怎么用?PHP ewiki_make_title使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了ewiki_make_title函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: ewiki_addpage

function ewiki_addpage($id, &$data, $version)
{
    $o = ewiki_make_title($id, $id, 2);
    #-- output page creation dialog
    if (empty($_REQUEST["new_id"])) {
        $o .= ewiki_t('<form action="' . ewiki_script("", $id) . '" method="POST" enctype="multipart/formdata"> ' . '_{name of the new page} <input type="text" name="new_id" size="26" value="">' . '<br />' . '<input type="submit" value="_{create}">' . '<br /><br />' . '<input type="checkbox" name="add_link_from" value="1" checked="checked">' . ' _{link it from} ' . '<input type="text" name="link_from" size="20" value="_{AddedPages}">' . '</form>');
    } else {
        $new_id = trim($_REQUEST["new_id"]);
        #-- add a link to new page
        if ($_REQUEST["add_link_from"] && ($from = $_REQUEST["link_from"])) {
            $row = ewiki_db::GET($from);
            if ($row && $row["version"]) {
                if (($row["flags"] & EWIKI_DB_F_TYPE) == EWIKI_DB_F_TEXT) {
                    $row["version"]++;
                    $row["content"] .= "\n* [{$new_id}]";
                    ewiki_scan_wikiwords($row["content"], $row["refs"], "_STRIP_EMAIL=1");
                    $row["refs"] = "\n\n" . implode("\n", array_keys($row["refs"])) . "\n\n";
                } else {
                    $row = false;
                }
            } else {
                $row = array("id" => $from, "version" => 1, "flags" => EWIKI_DB_F_TEXT, "created" => time(), "lastmodified" => time(), "hits" => 0, "meta" => "", "content" => "\n* [{$new_id}]", "refs" => "\n\n{$new_id}\n\n");
            }
            if ($row) {
                ewiki_db::WRITE($row);
            }
        }
        #-- call edit <form>
        $o = ewiki_page($new_id);
    }
    return $o;
}
开发者ID:gpuenteallott,项目名称:rox,代码行数:32,代码来源:addnewpage.php


示例2: ewiki_page_recentchanges

function ewiki_page_recentchanges($recentchanges, $data, $action)
{
    global $ewiki_plugins, $ewiki_links;
    #-- start output
    $ewiki_links = true;
    $o = "";
    $o .= ewiki_make_title($recentchanges, $recentchanges, 2);
    #-- options
    $minor_edits = $_GET["minor"] ? 1 : 0;
    #-- select timeframe
    if (($days = $_REQUEST["days"]) < 1) {
        $days = 7;
    }
    $timeframe = time() - $days * 24 * 3600;
    #-- fetch pages modified in given timeframe
    $result = ewiki_db::GETALL(array("meta", "lastmodified", "author"));
    $changes = array();
    $meta = array();
    while ($row = $result->get(0, 0x137, EWIKI_DB_F_TEXT)) {
        if ($row["lastmodified"] >= $timeframe) {
            #-- id->time array
            $id = $row["id"];
            $changes[$id] = $row["lastmodified"];
            #-- collect also info for previous changes of current page
            $meta[$id] = array();
            ewiki_page_rc_more($row, $meta[$id], $timeframe, $minor_edits);
        }
    }
    #-- sort results into date catalogue
    arsort($changes);
    $last_date = "";
    $datestr = ewiki_t("DAY");
    $e = array();
    foreach ($changes as $id => $date) {
        $date = strftime($datestr, $date);
        if ($date != $last_date) {
            $last_date = $date;
        }
        $e[$date][] = $id;
        unset($changes[$id]);
    }
    #-- mk output
    $o .= $ewiki_plugins["rc"][0]($e, $meta);
    #-- add an <form>
    if ($days == 7) {
        $days = 30;
    }
    $url = ewiki_script("", $recentchanges);
    $o .= ewiki_t(<<<EOT
   <br />
   <form action="{$url}" method="GET">
     <input type="hidden" name="id" value="{$recentchanges}">
     _{show last} <input type="text" name="days" value="{$days}" size="5">
     <input type="submit" value="_{days}">
   </form>
   <br />
EOT
);
    return $o;
}
开发者ID:gpuenteallott,项目名称:rox,代码行数:60,代码来源:recentchanges.php


示例3: ewiki_uservar_collect

function ewiki_uservar_collect($id, $data, $action)
{
    global $ewiki_plugins, $ewiki_config;
    if (!isset($GLOBALS['ewiki_auth_user'])) {
        return;
    }
    //Authenticate on the UserInfo page that we will be submitting to.
    if (EWIKI_PROTECTED_MODE && EWIKI_PROTECTED_MODE_HIDING && !ewiki_auth('UserInfo', $uu, "view")) {
        return;
    }
    foreach ($ewiki_config["CollectedUserData"] as $checkVar => $uu) {
        if (strlen(ewiki_get_uservar($checkVar)) == 0) {
            $currVar = $checkVar;
            break;
        }
    }
    if (isset($currVar)) {
        $o = ewiki_make_title($id, "User data update", 2);
        $o .= "Our database does not include your {$currVar}, please enter it below:";
        $o .= '<p><form method="post" action="' . ewiki_script('UserInfo') . '"><table border="1" cellpadding="1">';
        $o .= '<tr><th>' . $currVar . '</th><td><input name="text_' . $currVar . '" type="text"></td></tr>';
        $o .= '<tr><td></td><td><input value="Submit Changes" type="submit" name="submit_changeaccount" /></td></tr>';
        $o .= '</table></form>';
        return $o;
    }
}
开发者ID:gpuenteallott,项目名称:rox,代码行数:26,代码来源:collectuserdata.php


示例4: ewiki_page_pluginstall

function ewiki_page_pluginstall($id, $data, $action)
{
    global $ewiki_config, $ewiki_plugins;
    $jpi_support = function_exists("js_compile") && function_exists("jsa_generate");
    $jpi_access = XPI_EVERYBODY_JPI && $jsi_support;
    #-- title
    $o .= ewiki_make_title($id, $id, 2);
    $o .= '<form action="' . $_SERVER["REQUEST_URI"] . '" method="POST" enctype="multipart/form-data">' . '<input type="hidden" name="id" value="' . htmlentities($id) . '">';
    #-- pw, access
    $access = 0;
    $o .= ewiki_xpi_password($access, $jpi_access);
    #-- upload & install
    if ($access || $jpi_access) {
        $o .= '<div class="xpi-upload"><h4>.xpi plugin upload</h4>';
        #-- if filename received => upload+install
        if ($xpi_install_fn = $_REQUEST["install_remote_xpi"] or $_REQUEST["install_xpi"] && ($xpi_install_fn = $_FILES["xpi_file"]["tmp_name"])) {
            $o .= ewiki_xpi_install($xpi_install_fn, $access, $jsi_access, $jsi_support);
        } else {
            $o .= ewiki_xpi_show_remote_repository();
            $o .= ewiki_xpi_upload_form();
        }
        $o .= '</div><br />';
    }
    #-- plugin control
    $o .= ewiki_xpi_plugin_control_centre();
    return $o;
}
开发者ID:gpuenteallott,项目名称:rox,代码行数:27,代码来源:xpi.php


示例5: ewiki_extract

function ewiki_extract($id, $data, $action)
{
    global $ewiki_links, $ewiki_config, $ewiki_plugins, $ewiki_ring, $ewiki_title;
    $extracttypes = $ewiki_config["extracttypes"][$action];
    $o = ewiki_make_title($id, ewiki_t(strtoupper($action) . "FROM") . $ewiki_title, 2, $action, "", "_MAY_SPLIT=1");
    //ignore any number of list markup tags in front of an @@{todotype},
    //extract only the @@, the types, and their message
    //or
    //extract any header line
    //1 2         3  4-Class                      5     6
    preg_match_all("/^(([-;:#\\* ]*)(@@(" . implode("|", $extracttypes) . ")(.*))|(!+.*))\$/im", $data["content"], $matches);
    for ($index = 0; $index < sizeof($matches[0]); $index++) {
        //a line will be either header or todo, concatenate the two sub expressions
        $extractedContent .= $matches[3][$index] . $matches[6][$index] . "\n\n";
    }
    //Render extracted lines as a wiki page, this code extracted from ewiki_page
    #-- render requested wiki page  <-- goal !!!
    $o .= "<div class='ewiki_page_todolist'>" . $ewiki_plugins["render"][0]($extractedContent . ewiki_t(strtoupper($action) . "POSTSCRIPT"), 1, EWIKI_ALLOW_HTML || @$data["flags"] & EWIKI_DB_F_HTML) . "</div>";
    #-- control line + other per-page info stuff
    if ($pf_a = $ewiki_plugins["view_append"]) {
        ksort($pf_a);
        foreach ($pf_a as $n => $pf) {
            $o .= $pf($id, $data, $action);
        }
    }
    if ($pf_a = $ewiki_plugins["view_final"]) {
        ksort($pf_a);
        foreach ($pf_a as $n => $pf) {
            if (!preg_match('/_title/', $pf)) {
                $pf($o, $id, $data, $action);
            }
        }
    }
    return $o;
}
开发者ID:gpuenteallott,项目名称:rox,代码行数:35,代码来源:extract.php


示例6: ewiki_action_info_qdiff

function ewiki_action_info_qdiff($id, &$data, $action)
{
    $CLK = "%c";
    $o = ewiki_make_title($id, "history of '{$id}'", 2);
    #-- walk through versions
    $prev = (array) $data;
    $ver = $data["version"] + 1;
    while (--$ver >= 2) {
        #-- get
        if ($d = ewiki_db::GET($id, $ver - 1)) {
            $curr = $prev;
            $prev = $d;
            $d = NULL;
        } else {
            continue;
        }
        #-- info header
        $o .= '<table border="1">' . "\n" . '<tr class="qdiff-header"><td>' . '<b><a href="' . ewiki_script("", $id, "version={$ver}") . "\">version {$ver}</a></b>" . '</td><td>' . ewiki_author_html($curr["author"]) . '</td><td>' . strftime($CLK, $curr["lastmodified"]) . "</td></tr>\n";
        #-- diff part
        $diff = ewiki_stupid_diff($curr["content"], $prev["content"], $show_unchanged = 0, $magic_notes = 1);
        $o .= '<td colspan="3">' . $diff;
        $o .= "\n</td></tr>\n</table>\n<br />\n";
    }
    // add initial version:
    $d = ewiki_db::GET($id, 1);
    $o .= '<table border="1">' . "\n" . '<tr class="qdiff-header"><td>' . '<b><a href="' . ewiki_script("", $id, "version=" . $d["version"]) . "\">version " . $d["version"] . "</a></b>" . '</td><td>' . ewiki_author_html($d["author"]) . '</td><td>' . strftime($CLK, $d["lastmodified"]) . "</td></tr>\n";
    #-- diff part
    $o .= '<td colspan="3">' . nl2br($d["content"]);
    $o .= "\n</td></tr>\n</table>\n<br />\n";
    return $o;
}
开发者ID:gpuenteallott,项目名称:rox,代码行数:31,代码来源:info_qdiff.php


示例7: ewiki_page_wiki_dump_tarball

function ewiki_page_wiki_dump_tarball($id, $data, $action)
{
    #-- return legacy page
    if (empty($_REQUEST["download_tarball"])) {
        $url = ewiki_script("", $id);
        return ewiki_make_title($id, $id, 2) . ewiki_t(<<<END
_{WIKIDUMP}
<br /><br />
<form action="{$url}" method="POST" enctype="multipart/form-data">
<input type="hidden" name="id" value="{$id}">
<input type="submit" name="download_tarball" value="_{download tarball}">
<br /><br />
<input type="checkbox" name="dump_images" value="1"> _{with images}<br />
<input type="checkbox" name="dump_virtual" value="1"> _{include virtual pages}<br />
<input type="checkbox" name="dump_fullhtml" value="1" checked> _{complete .html files}<br />
&nbsp; &nbsp; &nbsp; <input type="checkbox" name="dump_linksto" value="1"> _{with backlink pages}<br />
</form>
END
);
    } else {
        $di = $_REQUEST["dump_images"];
        $fh = $_REQUEST["dump_fullhtml"];
        $bl = $_REQUEST["dump_linksto"];
        $vp = $_REQUEST["dump_virtual"];
        $_REQUEST = $_GET = $_POST = array();
        set_time_limit(180);
        ewiki_page_wiki_dump_send($di, $fh, $vp, $bl);
    }
}
开发者ID:gpuenteallott,项目名称:rox,代码行数:29,代码来源:wikidump.php


示例8: ewiki_createpage

function ewiki_createpage($id, &$data, $version)
{
    $o = ewiki_make_title($id, $id, 2);
    #-- output page creation dialog
    $o .= ewiki_t('<form action="' . ewiki_script("", "") . '" method="POST" enctype="multipart/formdata"> ' . '_{name of the new page} <input type="text" name="id" size="26" value="">' . '<br />' . '<input type="submit" value="_{create}">' . '</form>');
    return $o;
}
开发者ID:gpuenteallott,项目名称:rox,代码行数:7,代码来源:createnewpage.php


示例9: ewiki_page_wordindex

function ewiki_page_wordindex($id, $data, $action)
{
    global $ewiki_plugins;
    $o = ewiki_make_title($id, $id, 2);
    $src = "";
    $result = ewiki_db::GETALL(array("flags"));
    while ($row = $result->get()) {
        if (EWIKI_PROTECTED_MODE && EWIKI_PROTECTED_MODE_HIDING && !ewiki_auth($row["id"], $uu, "view")) {
            continue;
        }
        if (($row["flags"] & EWIKI_DB_F_TYPE) == EWIKI_DB_F_TEXT) {
            $src .= " " . $row["id"];
        }
    }
    $src = ewiki_split_title($src, "SPLIT", 0);
    $chars = strtr(EWIKI_CHARS_U . EWIKI_CHARS_L, "_", " ");
    $src = preg_replace("/[^{$chars}]/", " ", $src);
    $src = explode(" ", $src);
    $src = array_unique($src);
    //@ADD: word counting
    unset($src[""]);
    natcasesort($src);
    $sorted = array();
    foreach ($src as $i => $word) {
        if (strlen($word) >= 2) {
            $sorted[] = array(EWIKI_PAGE_POWERSEARCH, array("where" => "id", "q" => $word), $word, "");
        }
    }
    unset($src);
    $pf_list_pages = $ewiki_plugins["list_dict"][0];
    $o .= ewiki_list_pages($sorted, $limit = 0, $vat = 1, $pf_list_pages);
    return $o;
}
开发者ID:gpuenteallott,项目名称:rox,代码行数:33,代码来源:wordindex.php


示例10: ewiki_page_liveuser_chprefs

/**
 * changes user preferences based on form input
 *
 * @param mixed id
 * @param mixed data
 * @return mixed
 */
function ewiki_page_liveuser_chprefs($id, $data)
{
    global $liveuser, $liveuserDB;
    // if form was submitted, write
    if (isset($_REQUEST['submit_prefs'])) {
        return ewiki_t('CHPWFORM');
    }
    ob_start();
    echo ewiki_make_title($id, $id, 2);
    $results = $liveuserDB->getAll('SELECT * FROM ' . LW_PREFIX . '_prefs_fields');
    foreach ($results as $result) {
        if (isset($_REQUEST[$result['field_name']])) {
            liveuser_pref_setPref($liveuser->getHandle(), $result['field_name'], $_REQUEST[$result['field_name']]);
        }
    }
    echo '<form action="" method="post"><table border="1">';
    foreach ($results as $result) {
        echo '<tr><td>';
        echo '<label for="' . $result['field_name'] . '">' . $result['field_name'] . '</label></td><td>';
        echo '<input id="' . $result['field_name'] . '" name="' . $result['field_name'] . '" type="text" ';
        echo ' value=' . liveuser_pref_getPref($liveuser->getHandle(), $result['field_name']) . '></td></tr>';
    }
    echo '<tr><td colspan="2"><input type="reset" text="Reset"><input type="submit"></td></tr></table></form>';
    $o = ob_get_contents();
    ob_end_clean();
    return $o;
}
开发者ID:gpuenteallott,项目名称:rox,代码行数:34,代码来源:pref_liveuser.php


示例11: ewiki_page_aboutplugins

function ewiki_page_aboutplugins($id, $data, $action)
{
    global $ewiki_plugins;
    $o = ewiki_make_title($id, $id, 2);
    #-- plugin types
    foreach (array("page", "action", "mpi") as $pclass) {
        $o .= "<u>{$pclass} plugins</u><br />\n";
        switch ($pclass) {
            case "page":
                $o .= "dynamically generated pages<br />\n";
                break;
            case "action":
                $o .= "can be activated on each (real) page<br />\n";
                break;
            case "mpi":
                $o .= "the markup plugins can be utilized to integrate dynamic content into pages<small> (loaded on demand, so rarely shown here)</small><br />\n";
                break;
            default:
        }
        if ($pf_a = $ewiki_plugins[$pclass]) {
            ksort($pf_a);
            if ($pclass == "action") {
                $pf_a = array_merge($pf_a, $ewiki_plugins["action_always"]);
            }
            foreach ($pf_a as $i => $pf) {
                switch ($pclass) {
                    case "page":
                        $i = '<a href="' . ewiki_script("", $i) . '">' . $i . '</a>';
                        break;
                    case "action":
                        $i = '<a href="' . ewiki_script($i, "Notepad") . '">' . $i . '</a>';
                        break;
                    case "mpi":
                        $i = '<a href="' . ewiki_script("mpi/{$i}") . '">&lt;?plugin ' . $i . '?&gt;</a>';
                        break;
                    default:
                }
                $o .= "· <b>{$i}</b> <small>via {$pf}</small><br />\n";
            }
        }
        $o .= "<br />\n";
    }
    #-- task plugins
    $o .= "<u>task plugins</u> (core stuff)<br />\n";
    $o .= "enhance the wiki engine internally, with widely varying functionality enhancements or changes<br />\n";
    foreach ($ewiki_plugins as $i => $a) {
        if (is_array($a)) {
            foreach ($a as $n => $pf) {
                if (is_int($n)) {
                    $o .= "· <b><tt>{$i}</tt></b> <small>via {$pf}</small><br />\n";
                }
            }
        }
    }
    $o .= "<br />\n";
    return $o;
}
开发者ID:gpuenteallott,项目名称:rox,代码行数:57,代码来源:aboutplugins.php


示例12: ewiki_page_gnu_diff_safemode

function ewiki_page_gnu_diff_safemode($id, &$data, $action)
{
    #-- different operation modes of GNU diff:
    $OPTIONS = " -B -u -U 50 ";
    #   $OPTIONS = " -B ";
    #   $OPTIONS = " -c ";
    #   $OPTIONS = " --side-by-side ";
    #-- fetch old wiki source
    if (($old_ver = ($new_ver = $data["version"]) - 1) > 0) {
        $data0 = ewiki_db::GET($id, $old_ver);
    }
    $o = ewiki_make_title($id, "Differences between version {$new_ver} and {$old_ver} of »{$id}«");
    #-- create temporary files from wikipages
    $file0 = tempnam(EWIKI_TMP, "ewiki.diff.gnu.");
    $f = fopen($file0, "w");
    fwrite($f, $data0["content"]);
    fclose($f);
    $file1 = tempnam(EWIKI_TMP, "ewiki.diff.gnu.");
    $f = fopen($file1, "w");
    fwrite($f, $data["content"]);
    fclose($f);
    #-- parse thru GNU diff util
    $fn = addslashes($id);
    $OPTIONS .= " --label='{$fn} (version {$old_ver})' --label='{$fn} (version {$new_ver})' ";
    //following lines replace the original
    //$diff = shell_exec("diff $OPTIONS $file0 $file1");
    $dfd = popen("diff {$OPTIONS} {$file0} {$file1}", "r");
    $diff = "";
    while (!feof($dfd)) {
        $diff .= fread($dfd, 5000);
    }
    pclose($dfd);
    //end of moderation
    #-- remove temporary files
    unlink($file0);
    unlink($file1);
    #-- encolor diff output
    foreach (explode("\n", $diff) as $dl) {
        $str = substr($dl, 1);
        switch (substr($dl, 0, 1)) {
            case "<":
            case "-":
                $o .= "<b>-</b><font color=\"#990000\"> <tt>{$str}</tt></font><br />\n";
                break;
            case ">":
            case "+":
                $o .= "<b>+</b><font color=\"#009900\"> <tt>{$str}</tt></font><br />\n";
                break;
            case "*":
            case "-":
                break;
            default:
                $o .= "<small><tt>{$dl}</tt></small><br />";
        }
    }
    return $o;
}
开发者ID:gpuenteallott,项目名称:rox,代码行数:57,代码来源:diff_gnu_safemode.php


示例13: ewiki_page_wikinews

function ewiki_page_wikinews($newsid, $data, $action)
{
    global $ewiki_config;
    #-- conf
    ($n_num = $ewiki_config["wikinews_num"]) || ($n_num = 10);
    ($n_len = $ewiki_config["wikinews_len"]) || ($n_len = 512);
    ($c_regex = $ewiki_config["wikinews_regex"]) || ($c_regex = false);
    return ewiki_make_title($newsid, $newsid, 2) . ewiki_wikinews_summary($n_num, $n_len, $c_regex);
}
开发者ID:gpuenteallott,项目名称:rox,代码行数:9,代码来源:wikinews.php


示例14: ewiki_password_status

function ewiki_password_status($id, &$data, $action)
{
    global $liveuser;
    $passwd_status = ewiki_get_uservar("passwdstatus", 'expired');
    if ($passwd_status != 'good' && $id != "Logout" && $id != "ChangePassword" && $liveuser->isLoggedIn()) {
        return ewiki_make_title($id, "Change Password:") . "<p>You password has expired</p>" . ewiki_t("CHPW_FORM");
    }
    return 0;
}
开发者ID:gpuenteallott,项目名称:rox,代码行数:9,代码来源:passwd_expire.php


示例15: ewiki_page_ewikilog

function ewiki_page_ewikilog($id, $data, $action)
{
    ob_start();
    echo ewiki_make_title($id, $id, 2);
    echo '<pre>';
    readfile(EWIKI_LOGFILE);
    echo '</pre>';
    $o = ob_get_contents();
    ob_end_clean();
    return $o;
}
开发者ID:gpuenteallott,项目名称:rox,代码行数:11,代码来源:ewikilog.php


示例16: ewiki_page_interwikimap

function ewiki_page_interwikimap($id, $data, $action)
{
    global $ewiki_config;
    $o = ewiki_make_title($id, $id, 1);
    $o .= '<dl id="InterWikiMap">' . "\n";
    foreach ($ewiki_config["interwiki"] as $shortcut => $url) {
        $o .= "<dt>{$shortcut}:</dt>\n" . "   <dd><a href=\"{$url}\">{$url}</a></dd>\n";
    }
    $o .= "</dl>";
    return $o;
}
开发者ID:gpuenteallott,项目名称:rox,代码行数:11,代码来源:interwikimap.php


示例17: ewiki_page_sitemap

function ewiki_page_sitemap($id = 0, $data = 0, $action = 0)
{
    global $ewiki_config;
    //**code hijacked from page_pageindex.php**
    //creates a list of all of the valid wiki pages in the site
    $str_null = NULL;
    $a_validpages = ewiki_valid_pages(0, 1);
    //**end of hijacked code**
    //$time_end=getmicrotime();
    //creates the title bar on top of page
    if ($id == EWIKI_PAGE_SITEMAP) {
        $o = ewiki_make_title($id, ewiki_t($id), 2);
        foreach ($ewiki_config["SiteMap"]["RootList"] as $root) {
            if (isset($a_validpages[$root])) {
                $valid_root = TRUE;
                $str_rootid = $root;
                break;
            }
        }
    } else {
        $o = ewiki_make_title($id, ewiki_t("SMFOR") . " " . $id, 2);
        if (isset($a_validpages[$id])) {
            $valid_root = TRUE;
            $str_rootid = $id;
        }
    }
    $o .= "<p>" . ewiki_t("VIEWSMFOR") . " ";
    foreach ($ewiki_config["SiteMap"]["RootList"] as $root) {
        if (isset($a_validpages[$root])) {
            $o .= '<a href="' . ewiki_script('sitemap/', $root) . '">' . $root . '</a> ';
        }
    }
    $o .= "</p>";
    //checks to see if the user is allowed to view the root page
    if (!isset($a_validpages[$str_rootid])) {
        $o .= ewiki_t("INVALIDROOT");
        return $o;
    }
    //$timesitemap=getmicrotime();
    $a_sitemap = ewiki_sitemap_create($str_rootid, $a_validpages, EWIKI_SITEMAP_DEPTH);
    $timer = array();
    $level = -1;
    $fordump = 0;
    $str_formatted = "<ul>\n<li><a href=\"" . EWIKI_SCRIPT . $str_rootid . "\">" . $str_rootid . "</a></li>";
    $fin_level = format_sitemap($a_sitemap, $str_rootid, $str_formatted, $level, $timer, $fordump);
    $str_formatted .= "</ul>" . str_pad("", $fin_level * 6, "</ul>\n");
    $o .= $str_formatted;
    //$timesitemap_end=getmicrotime();
    //$o.="GetAll: ".($time_end-$time)."\n";
    //$o.="SiteMap: ".($timesitemap_end-$timesitemap)."\n";
    //$o.="Total: ".($timesitemap_end-$time);
    return $o;
}
开发者ID:nicolasconnault,项目名称:moodle2.0,代码行数:53,代码来源:sitemap.php


示例18: ewiki_page_wiki_dump_tarball

function ewiki_page_wiki_dump_tarball($id = 0, $data = 0, $action = 0)
{
    #-- return legacy page
    if (empty($_REQUEST["download_tarball"])) {
        if ($action == "wikidump") {
            $url = ewiki_script("", "WikiDump");
            return ewiki_make_title($id, $id, 2) . ewiki_t(<<<END
_{WIKIDUMP}
<br /><br />
<form action="{$url}" method="POST" enctype="multipart/form-data">
<input type="hidden" name="dump_id" value="{$id}">
<input type="hidden" name="dump_depth" value=1>
<input type="submit" name="download_tarball" value= "_{DOWNLOAD_ARCHIVE}">
<br /><br />
<input type="checkbox" name="dump_images" value="1" checked> _{with images}<br />
<input type="hidden" name="dump_fullhtml" value="1">
<input type="hidden" name="dump_virtual" value="0"><br />
Archive Format:
<select NAME="dump_arctype">
  <option VALUE="ZIP">ZIP
  <option VALUE="TAR">TAR
</select>

</form>
END
);
        } else {
            return "";
        }
    } else {
        $di = $_REQUEST["dump_images"];
        $fh = $_REQUEST["dump_fullhtml"];
        $vp = $_REQUEST["dump_virtual"];
        $rp = $_REQUEST["dump_id"];
        #-- $_REQUEST["dump_depth"]==100 will give a complete dump
        if ($_REQUEST["dump_depth"] > EWIKI_WIKIDUMP_MAXLEVEL && $_REQUEST["dump_depth"] != 100) {
            $dd = EWIKI_WIKIDUMP_MAXLEVEL;
        } else {
            $dd = $_REQUEST["dump_depth"];
        }
        $at = $_REQUEST["dump_arctype"];
        $al = 9;
        #$_REQUEST["dump_arclevel"];
        $_REQUEST = $_GET = $_POST = array();
        if (!ewiki_auth($rp, $str_null, "view")) {
            return ewiki_make_title($id, $id, 2) . "<p>You either do not have permission to access the page {$rp} or it does not exist.</p>";
        }
        ewiki_page_wiki_dump_send($di, $fh, $vp, $rp, $dd, $at, $al);
    }
}
开发者ID:gpuenteallott,项目名称:rox,代码行数:50,代码来源:wikidump2.php


示例19: ewiki_page_stupid_diff

function ewiki_page_stupid_diff($id, $data, $action)
{
    if ($uu = $GLOBALS["ewiki_diff_versions"]) {
        list($new_ver, $old_ver) = $uu;
        $data = ewiki_db::GET($id, $new_ver);
    } else {
        $new_ver = $data["version"];
        $old_ver = $new_ver - 1;
    }
    if ($old_ver > 0) {
        $data0 = ewiki_db::GET($id, $old_ver);
    }
    $o = ewiki_make_title($id, "Differences between version {$new_ver} and {$old_ver} of »{$id}«");
    $o .= ewiki_stupid_diff($data["content"], $data0["content"]);
    return $o;
}
开发者ID:gpuenteallott,项目名称:rox,代码行数:16,代码来源:diff.php


示例20: ewiki_page_like

function ewiki_page_like($id, $data, $action)
{
    preg_match_all("/([" . EWIKI_CHARS_U . "][" . EWIKI_CHARS_L . "]+)/", $id, $words);
    $pages = array();
    foreach ($words[1] as $find) {
        $result = ewiki_db::SEARCH("id", $find);
        while ($row = $result->get()) {
            if (EWIKI_PROTECTED_MODE && EWIKI_PROTECTED_MODE_HIDING && !ewiki_auth($row["id"], $row, "view")) {
                continue;
            }
            $pages[$row["id"]] = "";
        }
    }
    $o = ewiki_make_title($id, ewiki_t(strtoupper($action) . "_TITLE"), 3);
    $o .= ewiki_list_pages($pages, 0);
    return $o;
}
开发者ID:gpuenteallott,项目名称:rox,代码行数:17,代码来源:like_pages.php



注:本文中的ewiki_make_title函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ewiki_script函数代码示例发布时间:2022-05-15
下一篇:
PHP ewiki_database函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap