當前位置: 首頁>>代碼示例>>PHP>>正文


PHP media_filelist函數代碼示例

本文整理匯總了PHP中media_filelist函數的典型用法代碼示例。如果您正苦於以下問題:PHP media_filelist函數的具體用法?PHP media_filelist怎麽用?PHP media_filelist使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了media_filelist函數的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: tpl_mediaContent

/**
 * prints the "main content" in the mediamanger popup
 *
 * Depending on the user's actions this may be a list of
 * files in a namespace, the meta editing dialog or
 * a message of referencing pages
 *
 * Only allowed in mediamanager.php
 *
 * @triggers MEDIAMANAGER_CONTENT_OUTPUT
 * @param bool $fromajax - set true when calling this function via ajax
 * @author Andreas Gohr <andi@splitbrain.org>
 */
function tpl_mediaContent($fromajax = false)
{
    global $IMG;
    global $AUTH;
    global $INUSE;
    global $NS;
    global $JUMPTO;
    global $INPUT;
    $do = $INPUT->extract('do')->str('do');
    if (in_array($do, array('save', 'cancel'))) {
        $do = '';
    }
    if (!$do) {
        if ($INPUT->bool('edit')) {
            $do = 'metaform';
        } elseif (is_array($INUSE)) {
            $do = 'filesinuse';
        } else {
            $do = 'filelist';
        }
    }
    // output the content pane, wrapped in an event.
    if (!$fromajax) {
        ptln('<div id="media__content">');
    }
    $data = array('do' => $do);
    $evt = new Doku_Event('MEDIAMANAGER_CONTENT_OUTPUT', $data);
    if ($evt->advise_before()) {
        $do = $data['do'];
        if ($do == 'filesinuse') {
            media_filesinuse($INUSE, $IMG);
        } elseif ($do == 'filelist') {
            media_filelist($NS, $AUTH, $JUMPTO);
        } elseif ($do == 'searchlist') {
            media_searchlist($INPUT->str('q'), $NS, $AUTH);
        } else {
            msg('Unknown action ' . hsc($do), -1);
        }
    }
    $evt->advise_after();
    unset($evt);
    if (!$fromajax) {
        ptln('</div>');
    }
}
開發者ID:neosunchess,項目名稱:dokuwiki,代碼行數:58,代碼來源:template.php

示例2: ajax_medialist

/**
 * Return list of files for the Mediamanager
 *
 * @author Andreas Gohr <andi@splitbrain.org>
 */
function ajax_medialist()
{
    global $conf;
    require_once DOKU_INC . 'inc/media.php';
    media_filelist($_POST['ns']);
}
開發者ID:jalemanyf,項目名稱:wsnlocalizationscala,代碼行數:11,代碼來源:ajax.php

示例3: media_tab_files

/**
 * Prints tab that displays a list of all files
 *
 * @author Kate Arzamastseva <pshns@ukr.net>
 */
function media_tab_files($ns, $auth = null, $jump = '')
{
    global $lang;
    if (is_null($auth)) {
        $auth = auth_quickaclcheck("{$ns}:*");
    }
    if ($auth < AUTH_READ) {
        echo '<div class="nothing">' . $lang['media_perm_read'] . '</div>' . NL;
    } else {
        media_filelist($ns, $auth, $jump, true, _media_get_sort_type());
    }
}
開發者ID:yjliugit,項目名稱:dokuwiki,代碼行數:17,代碼來源:media.php

示例4: tpl_mediaContent

/**
 * prints the "main content" in the mediamanger popup
 *
 * Depending on the user's actions this may be a list of
 * files in a namespace, the meta editing dialog or
 * a message of referencing pages
 *
 * Only allowed in mediamanager.php
 *
 * @author Andreas Gohr <andi@splitbrain.org>
 */
function tpl_mediaContent()
{
    global $IMG;
    global $AUTH;
    global $INUSE;
    global $NS;
    global $JUMPTO;
    ptln('<div id="media__content">');
    if ($_REQUEST['edit']) {
        media_metaform($IMG, $AUTH);
    } elseif (is_array($INUSE)) {
        media_filesinuse($INUSE, $IMG);
    } else {
        media_filelist($NS, $AUTH, $JUMPTO);
    }
    ptln('</div>');
}
開發者ID:jalemanyf,項目名稱:wsnlocalizationscala,代碼行數:28,代碼來源:template.php


注:本文中的media_filelist函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。