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

PHP nv_check_path_upload函数代码示例

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

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



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

示例1: die

/**
 * @Project NUKEVIET 4.x
 * @Author VINADES.,JSC ([email protected])
 * @Copyright (C) 2014 VINADES.,JSC. All rights reserved
 * @License GNU/GPL version 2 or any later version
 * @Createdate 2-9-2010 14:43
 */
if (!defined('NV_IS_FILE_ADMIN')) {
    die('Stop!!!');
}
$page_title = $lang_module['upload_manager'];
$contents = '';
$path = defined('NV_IS_SPADMIN') ? '' : NV_UPLOADS_DIR;
$path = nv_check_path_upload($nv_Request->get_string('path', 'get', $path));
$currentpath = nv_check_path_upload($nv_Request->get_string('currentpath', 'get', $path));
$type = $nv_Request->get_string('type', 'get');
$popup = $nv_Request->get_int('popup', 'get', 0);
$area = htmlspecialchars(trim($nv_Request->get_string('area', 'get')), ENT_QUOTES);
$alt = htmlspecialchars(trim($nv_Request->get_string('alt', 'get')), ENT_QUOTES);
if (empty($currentpath)) {
    $currentpath = NV_UPLOADS_DIR;
}
if ($type != 'image' and $type != 'flash') {
    $type = 'file';
}
$xtpl = new XTemplate('main.tpl', NV_ROOTDIR . '/themes/' . $global_config['module_theme'] . '/modules/' . $module_file);
if ($popup) {
    $lang_module['browse_file'] = $lang_global['browse_file'];
    $xtpl->assign('NV_BASE_SITEURL', NV_BASE_SITEURL);
    $xtpl->assign('ADMIN_THEME', $global_config['module_theme']);
开发者ID:lzhao18,项目名称:nukeviet,代码行数:30,代码来源:main.php


示例2: nv_check_path_upload

<?php

/**
 * @Project NUKEVIET 4.x
 * @Author Mr.Thang ([email protected])
 * @License GNU/GPL version 2 or any later version
 * @Createdate 16-03-2015 12:55
 */
$path = nv_check_path_upload(NV_UPLOADS_DIR . '/' . $mod_name);
$check_allow_upload_dir = nv_check_allow_upload_dir($path);
$data = $nv_Request->get_string('data', 'post', '');
if (isset($check_allow_upload_dir['upload_file']) and in_array('images', $admin_info['allow_files_type']) and preg_match_all('/<\\s*img [^\\>]*src\\s*=\\s*[\\""\']?([^\\""\'\\s>]*)/i', $data, $matches)) {
    $imageMatch = array_unique($matches[1]);
    $mod_name = $nv_Request->get_title('module_name', 'post', '');
    $pathsave = $nv_Request->get_title('pathsave', 'post', '');
    $upload_real_dir_page = NV_ROOTDIR . '/' . NV_UPLOADS_DIR . '/' . $mod_name;
    if (!empty($pathsave)) {
        if (!preg_match('/^[a-z0-9\\-\\_]+$/i', $module_name)) {
            $pathsave = change_alias($pathsave);
        }
        $pathsave = $mod_name . '/' . $pathsave;
        $e = explode('/', $pathsave);
        if (!empty($e)) {
            $cp = '';
            foreach ($e as $p) {
                if (!empty($p) and !is_dir(NV_ROOTDIR . '/' . NV_UPLOADS_DIR . '/' . $cp . $p)) {
                    $mk = nv_mkdir(NV_ROOTDIR . '/' . NV_UPLOADS_DIR . '/' . $cp, $p);
                    if ($mk[0] > 0) {
                        $upload_real_dir_page = $mk[2];
                    }
                } elseif (!empty($p)) {
开发者ID:lzhao18,项目名称:nukeviet,代码行数:31,代码来源:download.php


示例3: die

<?php

/**
 * @Project NUKEVIET 4.x
 * @Author VINADES.,JSC ([email protected])
 * @Copyright (C) 2014 VINADES.,JSC. All rights reserved
 * @License GNU/GPL version 2 or any later version
 * @Createdate 2-2-2010 12:55
 */
if (!defined('NV_IS_FILE_ADMIN')) {
    die('Stop!!!');
}
$path = nv_check_path_upload($nv_Request->get_string('path', 'post'));
$check_allow_upload_dir = nv_check_allow_upload_dir($path);
if (!isset($check_allow_upload_dir['create_file'])) {
    die('ERROR_' . $lang_module['notlevel']);
}
$width = $nv_Request->get_int('width', 'post');
$height = $nv_Request->get_int('height', 'post');
$imagename = htmlspecialchars(trim($nv_Request->get_string('img', 'post')), ENT_QUOTES);
$imagename = basename($imagename);
$file = preg_replace('/^(.*)(\\.[a-zA-Z]+)$/', '\\1_' . $width . '_' . $height . '\\2', $imagename);
$i = 1;
while (file_exists(NV_ROOTDIR . '/' . $path . '/' . $file)) {
    $file = preg_replace('/^(.*)(\\.[a-zA-Z]+)$/', '\\1_' . $width . '_' . $height . '_' . $i . '\\2', $imagename);
    ++$i;
}
if (isset($array_thumb_config[$path])) {
    $thumb_config = $array_thumb_config[$path];
} else {
    $thumb_config = $array_thumb_config[''];
开发者ID:nukeplus,项目名称:nuke,代码行数:31,代码来源:createimg.php


示例4: die

<?php

/**
 * @Project NUKEVIET 3.x
 * @Author VINADES.,JSC ([email protected])
 * @Copyright (C) 2012 VINADES.,JSC. All rights reserved
 * @Createdate 2-2-2010 12:55
 */
if (!defined('NV_IS_FILE_ADMIN')) {
    die('Stop!!!');
}
$pathimg = nv_check_path_upload($nv_Request->get_string('path', 'get', NV_UPLOADS_DIR));
$check_allow_upload_dir = nv_check_allow_upload_dir($pathimg);
if (isset($check_allow_upload_dir['view_dir'])) {
    $type = $nv_Request->get_string('type', 'get', 'file');
    if ($type != "image" and $type != "flash") {
        $type = "file";
    }
    $selectfile = htmlspecialchars(trim($nv_Request->get_string('imgfile', 'get', '')), ENT_QUOTES);
    $selectfile = basename($selectfile);
    $author = $nv_Request->isset_request('author', 'get') ? true : false;
    $refresh = $nv_Request->isset_request('refresh', 'get') ? true : false;
    $results = nv_filesList($pathimg, $refresh);
    if (!empty($results)) {
        $xtpl = new XTemplate("listimg.tpl", NV_ROOTDIR . "/themes/" . $global_config['module_theme'] . "/modules/" . $module_file);
        $xtpl->assign("NV_BASE_SITEURL", NV_BASE_SITEURL);
        $author = $author === true ? $admin_info['userid'] : 0;
        foreach ($results as $title => $file) {
            if ($type == "file" or $type != "file" and $file[2] == $type) {
                if (!$author or $author == $file[8]) {
                    $file = array_combine(array('name0', 'ext', 'type', 'filesize', 'src', 'srcWidth', 'srcHeight', 'name', 'author', 'mtime'), $file);
开发者ID:atarubi,项目名称:nuke-viet,代码行数:31,代码来源:imglist.php


示例5: die

<?php

/**
 * @Project NUKEVIET 3.x
 * @Author VINADES.,JSC ([email protected])
 * @Copyright (C) 2012 VINADES.,JSC. All rights reserved
 * @Createdate 2-9-2010 14:43
 */
if (!defined('NV_IS_FILE_ADMIN')) {
    die('Stop!!!');
}
$CKEditorFuncNum = $nv_Request->get_string('CKEditorFuncNum', 'post,get', 0);
$imgfolder = nv_check_path_upload($nv_Request->get_string('currentpath', 'post,get'));
$check_allow_upload_dir = nv_check_allow_upload_dir($imgfolder);
/**
 * SendUploadResults()
 * 
 * @param mixed $errorNumber
 * @param string $fileUrl
 * @param string $fileName
 * @param string $customMsg
 * @return void
 */
function SendUploadResults($errorNumber, $fileUrl = "", $fileName = "", $customMsg = "")
{
    global $CKEditorFuncNum;
    if ($CKEditorFuncNum) {
        echo "<script type=\"text/javascript\">window.parent.CKEDITOR.tools.callFunction(" . $CKEditorFuncNum . ", '" . $fileUrl . "', '" . $customMsg . "');</script>";
    } else {
        echo "<script type=\"text/javascript\">(function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\\.|\$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})();window.parent.OnUploadCompleted({$errorNumber},\"" . $fileUrl . "\",\"" . $fileName . "\", \"" . $customMsg . "\");</script>";
    }
开发者ID:atarubi,项目名称:nuke-viet,代码行数:31,代码来源:quickupload.php


示例6: nv_check_path_upload

                $xtpl->assign('TREE_CONTENT', $content2);
                $xtpl->parse('tree.tree_content');
            }
            $xtpl->parse('tree');
            $content .= $xtpl->text('tree');
        }
    }
    return $content;
}
$path = nv_check_path_upload($nv_Request->get_string('path', 'get,post', NV_UPLOADS_DIR));
if (empty($path)) {
    if ($global_config['idsite'] or !defined('NV_IS_SPADMIN')) {
        $path = NV_UPLOADS_DIR;
    }
}
$currentpath = nv_check_path_upload($nv_Request->get_string('currentpath', 'request', NV_UPLOADS_DIR));
$check_allow_upload_dir = nv_check_allow_upload_dir($path);
$data = array();
$data['style'] = $path == $currentpath ? ' style="color:red"' : '';
$data['class'] = nv_set_dir_class($check_allow_upload_dir) . ' pos' . nv_string_to_filename($path);
$data['title'] = $path;
$data['titlepath'] = empty($path) ? NV_BASE_SITEURL : $path;
$content = viewdirtree($path, $currentpath);
$xtpl = new XTemplate('foldlist.tpl', NV_ROOTDIR . '/themes/' . $global_config['module_theme'] . '/modules/' . $module_file);
$xtpl->assign('DATA', $data);
$xtpl->assign('PATH', $path);
$xtpl->assign('CURRENTPATH', $currentpath);
$check_allow_upload_dir = nv_check_allow_upload_dir($currentpath);
$xtpl->assign('VIEW_DIR', (isset($check_allow_upload_dir['view_dir']) and $check_allow_upload_dir['view_dir'] === true) ? 1 : 0);
$xtpl->assign('CREATE_DIR', (isset($check_allow_upload_dir['create_dir']) and $check_allow_upload_dir['create_dir'] === true) ? 1 : 0);
$xtpl->assign('RENAME_DIR', (isset($check_allow_upload_dir['rename_dir']) and $check_allow_upload_dir['rename_dir'] === true) ? 1 : 0);
开发者ID:lzhao18,项目名称:nukeviet,代码行数:31,代码来源:folderlist.php


示例7: die

/**
 * @Project NUKEVIET 4.x
 * @Author VINADES.,JSC ([email protected])
 * @Copyright (C) 2014 VINADES.,JSC. All rights reserved
 * @License GNU/GPL version 2 or any later version
 * @Createdate 2-2-2010 12:55
 */
if (!defined('NV_IS_FILE_ADMIN')) {
    die('Stop!!!');
}
$path = nv_check_path_upload($nv_Request->get_string('path', 'post'));
$check_allow_upload_dir = nv_check_allow_upload_dir($path);
if (!isset($check_allow_upload_dir['move_file'])) {
    die("ERROR#" . $lang_module['notlevel']);
}
$newfolder = nv_check_path_upload($nv_Request->get_string('newpath', 'post'));
$check_allow_upload_dir = nv_check_allow_upload_dir($newfolder);
if (!isset($check_allow_upload_dir['create_file'])) {
    die("ERROR#" . $lang_module['notlevel']);
}
$images = array_map("basename", explode("|", htmlspecialchars(trim($nv_Request->get_string('file', 'post')), ENT_QUOTES)));
// Check choose file
if (empty($images)) {
    die('ERROR#' . $lang_module['errorNotSelectFile']);
}
// Check file exists
foreach ($images as $file) {
    if (!nv_is_file(NV_BASE_SITEURL . $path . '/' . $file, $path)) {
        die('ERROR#' . $lang_module['file_no_exists'] . ': ' . $file);
    }
}
开发者ID:nukeplus,项目名称:nuke,代码行数:31,代码来源:moveimg.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP nv_check_valid_email函数代码示例发布时间:2022-05-15
下一篇:
PHP nv_check_allow_upload_dir函数代码示例发布时间: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