当前位置: 首页>>代码示例>>PHP>>正文


PHP file_allow_project_upload函数代码示例

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


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

示例1: require_api

 * @uses file_api.php
 * @uses form_api.php
 * @uses html_api.php
 * @uses lang_api.php
 * @uses utility_api.php
 */
require_once 'core.php';
require_api('access_api.php');
require_api('config_api.php');
require_api('file_api.php');
require_api('form_api.php');
require_api('html_api.php');
require_api('lang_api.php');
require_api('utility_api.php');
# Check if project documentation feature is enabled.
if (OFF == config_get('enable_project_documentation') || !file_is_uploading_enabled() || !file_allow_project_upload()) {
    access_denied();
}
access_ensure_project_level(config_get('upload_project_file_threshold'));
$t_max_file_size = (int) min(ini_get_number('upload_max_filesize'), ini_get_number('post_max_size'), config_get('max_file_size'));
html_page_top();
?>

<br />
<div>
<form method="post" enctype="multipart/form-data" action="proj_doc_add.php">
<?php 
echo form_security_field('proj_doc_add');
?>
<table class="width75" cellspacing="1">
<tr>
开发者ID:gtn,项目名称:mantisbt,代码行数:31,代码来源:proj_doc_add_page.php

示例2: print_doc_menu

function print_doc_menu($p_page = '')
{
    $t_documentation_html = config_get('manual_url');
    $t_proj_doc_page = 'proj_doc_page.php';
    $t_proj_doc_add_page = 'proj_doc_add_page.php';
    switch ($p_page) {
        case $t_documentation_html:
            $t_documentation_html = '';
            break;
        case $t_proj_doc_page:
            $t_proj_doc_page = '';
            break;
        case $t_proj_doc_add_page:
            $t_proj_doc_add_page = '';
            break;
    }
    print_bracket_link($t_documentation_html, lang_get('user_documentation'));
    print_bracket_link($t_proj_doc_page, lang_get('project_documentation'));
    if (file_allow_project_upload()) {
        print_bracket_link($t_proj_doc_add_page, lang_get('add_file'));
    }
}
开发者ID:amjadtbssm,项目名称:website,代码行数:22,代码来源:html_api.php

示例3: print_doc_menu

/**
 * Print the menu for the docs section
 * @param string $p_page specifies the current page name so it's link can be disabled
 * @return null
 */
function print_doc_menu($p_page = '')
{
    $t_documentation_html = config_get('manual_url');
    $t_pages[$t_documentation_html] = array('url' => $t_documentation_html, 'label' => 'user_documentation');
    $t_pages['proj_doc_page.php'] = array('url' => 'proj_doc_page.php', 'label' => 'project_documentation');
    if (file_allow_project_upload()) {
        $t_pages['proj_doc_add_page.php'] = array('url' => 'proj_doc_add_page.php', 'label' => 'add_file');
    }
    # Remove the link from the current page
    if (isset($t_pages[$p_page])) {
        $t_pages[$p_page]['url'] = '';
    }
    echo '<div id="doc-menu">';
    echo '<ul class="menu">';
    foreach ($t_pages as $t_page) {
        if ($t_page['url'] == '') {
            echo '<li>', lang_get($t_page['label']), '</li>';
        } else {
            echo '<li><a href="' . helper_mantis_url($t_page['url']) . '">' . lang_get($t_page['label']) . '</a></li>';
        }
    }
    echo '</ul>';
    echo '</div>';
}
开发者ID:nextgens,项目名称:mantisbt,代码行数:29,代码来源:html_api.php

示例4: require_once

/**
 * MantisBT Core API's
 */
require_once( 'core.php' );
require_api( 'access_api.php' );
require_api( 'config_api.php' );
require_api( 'file_api.php' );
require_api( 'form_api.php' );
require_api( 'html_api.php' );
require_api( 'lang_api.php' );
require_api( 'utility_api.php' );

# Check if project documentation feature is enabled.
if ( OFF == config_get( 'enable_project_documentation' ) ||
	!file_is_uploading_enabled() ||
	!file_allow_project_upload() ) {
	access_denied();
}

access_ensure_project_level( config_get( 'upload_project_file_threshold' ) );

$t_max_file_size = (int)min( ini_get_number( 'upload_max_filesize' ), ini_get_number( 'post_max_size' ), config_get( 'max_file_size' ) );

html_page_top();
?>

<br />
<div>
<form method="post" enctype="multipart/form-data" action="proj_doc_add.php">
<?php echo form_security_field( 'proj_doc_add' ) ?>
<table class="width75" cellspacing="1">
开发者ID:rombert,项目名称:mantisbt,代码行数:31,代码来源:proj_doc_add_page.php

示例5: print_doc_menu

/**
 * Print the menu for the documentation section
 * @param string $p_page Specifies the current page name so it's link can be disabled.
 * @return void
 */
function print_doc_menu($p_page = '')
{
    # User Documentation
    $t_doc_url = config_get('manual_url');
    if (is_null(parse_url($t_doc_url, PHP_URL_SCHEME))) {
        # URL has no scheme, so it is relative to MantisBT root
        if (is_blank($t_doc_url) || !file_exists(config_get_global('absolute_path') . $t_doc_url)) {
            # Local documentation not available, use online docs
            $t_doc_url = 'http://www.mantisbt.org/documentation.php';
        } else {
            $t_doc_url = helper_mantis_url($t_doc_url);
        }
    }
    $t_pages[$t_doc_url] = array('url' => $t_doc_url, 'label' => 'user_documentation');
    # Project Documentation
    $t_pages['proj_doc_page.php'] = array('url' => helper_mantis_url('proj_doc_page.php'), 'label' => 'project_documentation');
    # Add File
    if (file_allow_project_upload()) {
        $t_pages['proj_doc_add_page.php'] = array('url' => helper_mantis_url('proj_doc_add_page.php'), 'label' => 'add_file');
    }
    # Remove the link from the current page
    if (isset($t_pages[$p_page])) {
        $t_pages[$p_page]['url'] = '';
    }
    echo '<div id="doc-menu">';
    echo '<ul class="menu">';
    foreach ($t_pages as $t_page) {
        if ($t_page['url'] == '') {
            echo '<li>', lang_get($t_page['label']), '</li>';
        } else {
            echo '<li><a href="' . $t_page['url'] . '">' . lang_get($t_page['label']) . '</a></li>';
        }
    }
    echo '</ul>';
    echo '</div>';
}
开发者ID:derrickweaver,项目名称:mantisbt,代码行数:41,代码来源:html_api.php


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