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


PHP nv_is_file函数代码示例

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


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

示例1: elseif

 $site_banner = $nv_Request->get_title('site_banner', 'post');
 if (empty($site_banner)) {
     $array_config['site_banner'] = '';
 } elseif (!nv_is_url($site_banner)) {
     if (nv_is_file($site_banner) === true) {
         $lu = strlen(NV_BASE_SITEURL);
         $array_config['site_banner'] = substr($site_banner, $lu);
     } else {
         $array_config['site_banner'] = '';
     }
 }
 $site_favicon = $nv_Request->get_title('site_favicon', 'post');
 if (empty($site_favicon) or $site_favicon == NV_ASSETS_DIR . '/favicon.ico') {
     $array_config['site_favicon'] = '';
 } elseif (!nv_is_url($site_favicon)) {
     if (nv_is_file($site_favicon) === true) {
         $lu = strlen(NV_BASE_SITEURL);
         $array_config['site_favicon'] = substr($site_favicon, $lu);
     } else {
         $array_config['site_favicon'] = '';
     }
 }
 $array_config['site_home_module'] = nv_substr($nv_Request->get_title('site_home_module', 'post', '', 1), 0, 255);
 if (!isset($site_mods[$array_config['site_home_module']])) {
     $array_config['site_home_module'] = $global_config['site_home_module'];
 }
 $array_config['site_description'] = nv_substr($nv_Request->get_title('site_description', 'post', '', 1), 0, 255);
 $array_config['disable_site_content'] = $nv_Request->get_editor('disable_site_content', '', NV_ALLOWED_HTML_TAGS);
 if (empty($array_config['disable_site_content'])) {
     $array_config['disable_site_content'] = $lang_global['disable_site_content'];
 }
开发者ID:nukeplus,项目名称:nuke,代码行数:31,代码来源:main.php

示例2: nv_admin_theme

}
if ($pro_config['active_gift']) {
    $xtpl->parse('main.gift');
}
if ($rowcontent['id'] > 0 and !$is_copy) {
    $op = 'items';
}
if (empty($rowcontent['alias'])) {
    $xtpl->parse('main.getalias');
}
if (!$pro_config['active_warehouse']) {
    if ($rowcontent['id'] > 0) {
        $xtpl->parse('main.warehouse.edit');
    } else {
        $xtpl->parse('main.warehouse.add');
    }
    $xtpl->parse('main.warehouse');
}
// Custom fiels
if ($pro_config['template_active'] and $rowcontent['listcatid'] and !empty($global_array_shops_cat[$rowcontent['listcatid']]['form'])) {
    $form = $global_array_shops_cat[$rowcontent['listcatid']]['form'];
    if (nv_is_file(NV_BASE_SITEURL . NV_ASSETS_DIR . '/' . $module_name . '/files_tpl/cat_form_' . $form . '.tpl', NV_ASSETS_DIR . '/' . $module_name)) {
        $datacustom_form = nv_show_custom_form($rowcontent['id'], $form, $custom);
        $xtpl->assign('DATACUSTOM_FORM', $datacustom_form);
    }
}
$xtpl->parse('main');
$contents = $xtpl->text('main');
include NV_ROOTDIR . '/includes/header.php';
echo nv_admin_theme($contents);
include NV_ROOTDIR . '/includes/footer.php';
开发者ID:nukeplus,项目名称:shops,代码行数:31,代码来源:content.php

示例3: die

 * @Author VINADES.,JSC (contact@vinades.vn)
 * @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['rename_file'])) {
    die('ERROR_' . $lang_module['notlevel']);
}
$file = htmlspecialchars(trim($nv_Request->get_string('file', 'post')), ENT_QUOTES);
$file = basename($file);
if (empty($file) or !nv_is_file(NV_BASE_SITEURL . $path . '/' . $file, $path)) {
    die('ERROR_' . $lang_module['errorNotSelectFile']);
}
$newname = htmlspecialchars(trim($nv_Request->get_string('newname', 'post')), ENT_QUOTES);
$newname = nv_string_to_filename(basename($newname));
if (empty($newname)) {
    die('ERROR_' . $lang_module['rename_noname']);
}
$newalt = $nv_Request->get_title('newalt', 'post', $newname, 1);
$ext = nv_getextension($file);
$newname = $newname . '.' . $ext;
if ($file != $newname) {
    $newname2 = $newname;
    $i = 1;
    while (file_exists(NV_ROOTDIR . '/' . $path . '/' . $newname2)) {
        $newname2 = preg_replace('/(.*)(\\.[a-zA-Z0-9]+)$/', '\\1_' . $i . '\\2', $newname);
开发者ID:nukeplus,项目名称:nuke,代码行数:31,代码来源:renameimg.php

示例4: die

 $data_insert['last_name'] = $_user['last_name'];
 $data_insert['gender'] = $_user['gender'];
 $data_insert['sig'] = $_user['sig'];
 $data_insert['question'] = $_user['question'];
 $data_insert['answer'] = $_user['answer'];
 $userid = $db->insert_id($sql, 'userid', $data_insert);
 if (!$userid) {
     die(json_encode(array('status' => 'error', 'input' => '', 'mess' => $lang_module['edit_add_error'])));
 }
 $query_field['userid'] = $userid;
 $db->query('INSERT INTO ' . NV_MOD_TABLE . '_info (' . implode(', ', array_keys($query_field)) . ') VALUES (' . implode(', ', array_values($query_field)) . ')');
 nv_insert_logs(NV_LANG_DATA, $module_name, 'log_add_user', 'userid ' . $userid, $admin_info['userid']);
 // Check photo
 if (!empty($_user['photo'])) {
     $tmp_photo = NV_BASE_SITEURL . NV_TEMP_DIR . '/' . $_user['photo'];
     if (!nv_is_file($tmp_photo, NV_TEMP_DIR)) {
         $_user['photo'] = '';
     } else {
         $new_photo_name = $_user['photo'];
         $new_photo_path = NV_ROOTDIR . '/' . SYSTEM_UPLOADS_DIR . '/' . $module_upload . '/';
         $new_photo_name2 = $new_photo_name;
         $i = 1;
         while (file_exists($new_photo_path . $new_photo_name2)) {
             $new_photo_name2 = preg_replace('/(.*)(\\.[a-zA-Z0-9]+)$/', '\\1_' . $i . '\\2', $new_photo_name);
             ++$i;
         }
         $new_photo = $new_photo_path . $new_photo_name2;
         if (nv_copyfile(NV_DOCUMENT_ROOT . $tmp_photo, $new_photo)) {
             $_user['photo'] = substr($new_photo, strlen(NV_ROOTDIR . '/'));
         } else {
             $_user['photo'] = '';
开发者ID:nukeviet,项目名称:nukeviet,代码行数:31,代码来源:user_add.php

示例5: list

$page_title = $lang_module['sources'];
list($sourceid, $title, $link, $logo, $error) = array(0, '', 'http://', '', '');
$savecat = $nv_Request->get_int('savecat', 'post', 0);
if (!empty($savecat)) {
    $sourceid = $nv_Request->get_int('sourceid', 'post', 0);
    $title = $nv_Request->get_title('title', 'post', '', 1);
    $link = strtolower($nv_Request->get_title('link', 'post', ''));
    $url_info = @parse_url($link);
    if (isset($url_info['scheme']) and isset($url_info['host'])) {
        $link = $url_info['scheme'] . '://' . $url_info['host'];
    } else {
        $link = '';
    }
    $logo_old = $db->query('SELECT logo FROM ' . NV_PREFIXLANG . '_' . $module_data . '_sources WHERE sourceid =' . $sourceid)->fetchColumn();
    $logo = $nv_Request->get_title('logo', 'post', '');
    if (!nv_is_url($logo) and nv_is_file($logo, NV_UPLOADS_DIR . '/' . $module_upload . '/source')) {
        $lu = strlen(NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_upload . '/source/');
        $logo = substr($logo, $lu);
    } elseif (!nv_is_url($logo) and file_exists(NV_UPLOADS_REAL_DIR . '/' . $module_upload . '/source/' . $logo_old)) {
        $logo = $logo_old;
    } else {
        $logo = '';
    }
    if ($logo != $logo_old and !empty($logo_old)) {
        $_count = $db->query('SELECT COUNT(*) FROM ' . NV_PREFIXLANG . '_' . $module_data . '_sources WHERE sourceid != ' . $sourceid . ' AND logo =' . $db->quote(basename($logo_old)))->fetchColumn();
        if (empty($_count)) {
            @unlink(NV_ROOTDIR . '/' . NV_UPLOADS_DIR . '/' . $module_upload . '/source/' . $logo_old);
            @unlink(NV_ROOTDIR . '/' . NV_FILES_DIR . '/' . $module_upload . '/source/' . $logo_old);
            $_did = $db->query('SELECT did FROM ' . NV_UPLOAD_GLOBALTABLE . '_dir WHERE dirname=' . $db->quote(dirname(NV_UPLOADS_DIR . '/' . $module_upload . '/source/' . $logo_old)))->fetchColumn();
            $db->query('DELETE FROM ' . NV_UPLOAD_GLOBALTABLE . '_file WHERE did = ' . $_did . ' AND title=' . $db->quote(basename($logo_old)));
        }
开发者ID:nukeplus,项目名称:nuke,代码行数:31,代码来源:sources.php

示例6: die

 * @Author VINADES.,JSC (contact@vinades.vn)
 * @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_DATABASE')) {
    die('Stop!!!');
}
$filename = $nv_Request->get_title('filename', 'get', '');
$checkss = $nv_Request->get_title('checkss', 'get', '');
$log_dir = NV_LOGS_DIR . '/dump_backup';
if ($global_config['idsite']) {
    $log_dir .= '/' . $global_config['site_dir'];
}
$path_filename = NV_BASE_SITEURL . '/' . $log_dir . '/' . $filename;
if (nv_is_file($path_filename, $log_dir) === true and $checkss == md5($filename . NV_CHECK_SESSION)) {
    nv_insert_logs(NV_LANG_DATA, $module_name, $lang_module['download'], 'File name: ' . basename($filename), $admin_info['userid']);
    //Download file
    $name = basename($path_filename);
    $name_arr = explode('_', $name);
    if (sizeof($name_arr) > 1 and strlen($name_arr[0]) == 32) {
        $name = substr($name, 33);
    }
    $download = new NukeViet\Files\Download(NV_DOCUMENT_ROOT . $path_filename, NV_ROOTDIR . '/' . NV_LOGS_DIR . '/dump_backup', $name);
    $download->download_file();
    exit;
} else {
    $contents = 'File not exist !';
    include NV_ROOTDIR . '/includes/header.php';
    echo nv_admin_theme($contents);
    include NV_ROOTDIR . '/includes/footer.php';
开发者ID:nukeviet,项目名称:nukeviet,代码行数:31,代码来源:getfile.php

示例7: strip_tags

$array['alias'] = '';
$array['image'] = '';
$array['description'] = '';
$array['keywords'] = '';
$savecat = $nv_Request->get_int('savecat', 'post', 0);
if (!empty($savecat)) {
    $array['topicid'] = $nv_Request->get_int('topicid', 'post', 0);
    $array['title'] = $nv_Request->get_title('title', 'post', '', 1);
    $array['keywords'] = $nv_Request->get_title('keywords', 'post', '', 1);
    $array['alias'] = $nv_Request->get_title('alias', 'post', '');
    $array['description'] = $nv_Request->get_string('description', 'post', '');
    $array['description'] = strip_tags($array['description']);
    $array['description'] = nv_nl2br(nv_htmlspecialchars($array['description']), '<br />');
    // Xu ly anh minh hoa
    $array['image'] = $nv_Request->get_title('homeimg', 'post', '');
    if (!nv_is_url($array['image']) and nv_is_file($array['image'], NV_UPLOADS_DIR . '/' . $module_upload . '/topics')) {
        $lu = strlen(NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_upload . '/topics/');
        $array['image'] = substr($array['image'], $lu);
    } else {
        $array['image'] = '';
    }
    $array['alias'] = $array['alias'] == '' ? change_alias($array['title']) : change_alias($array['alias']);
    if (empty($array['title'])) {
        $error = $lang_module['topics_error_title'];
    } elseif ($array['topicid'] == 0) {
        $weight = $db->query("SELECT max(weight) FROM " . NV_PREFIXLANG . "_" . $module_data . "_topics")->fetchColumn();
        $weight = intval($weight) + 1;
        $_sql = "INSERT INTO " . NV_PREFIXLANG . "_" . $module_data . "_topics (title, alias, description, image, weight, keywords, add_time, edit_time) VALUES ( :title, :alias, :description, :image, :weight, :keywords, " . NV_CURRENTTIME . ", " . NV_CURRENTTIME . ")";
        $data_insert = array();
        $data_insert['title'] = $array['title'];
        $data_insert['alias'] = $array['alias'];
开发者ID:nukeplus,项目名称:nuke,代码行数:31,代码来源:topics.php

示例8: die

<?php

/**
 * @Project NUKEVIET 4.x
 * @Author VINADES.,JSC (contact@vinades.vn)
 * @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,get'));
$image = htmlspecialchars(trim($nv_Request->get_string('img', 'post,get')), ENT_QUOTES);
$image = basename($image);
$path_filename = NV_BASE_SITEURL . $path . '/' . $image;
if (!empty($image) and nv_is_file($path_filename, $path) and nv_check_allow_upload_dir($path)) {
    //Download file
    $download = new NukeViet\Files\Download(NV_DOCUMENT_ROOT . $path_filename, NV_ROOTDIR . '/' . $path, $image);
    $download->download_file();
    exit;
} else {
    echo 'file not exist !';
}
开发者ID:nukeplus,项目名称:nuke,代码行数:24,代码来源:dlimg.php

示例9: die

/**
 * @Project NUKEVIET 4.x
 * @Author VINADES.,JSC (contact@vinades.vn)
 * @Copyright (C) 2014 VINADES.,JSC. All rights reserved
 * @License GNU/GPL version 2 or any later version
 * @Createdate 28/10/2012, 14:51
 */
if (!defined('NV_IS_FILE_SETTINGS')) {
    die('Stop!!!');
}
$errormess = $lang_module['plugin_info'];
$pattern_plugin = '/^([a-zA-Z0-9\\_]+)\\.php$/';
if ($nv_Request->isset_request('plugin_file', 'post')) {
    $config_plugin = array();
    $plugin_file = $nv_Request->get_title('plugin_file', 'post');
    if (preg_match($pattern_plugin, $plugin_file) and nv_is_file(NV_BASE_SITEURL . 'includes/plugin/' . $plugin_file, 'includes/plugin')) {
        $plugin_area = $nv_Request->get_int('plugin_area', 'post');
        if ($nv_Request->isset_request('delete', 'post')) {
            $sth = $db->prepare('SELECT COUNT(*) FROM ' . $db_config['prefix'] . '_plugin WHERE plugin_file=:plugin_file');
            $sth->bindParam(':plugin_file', $plugin_file, PDO::PARAM_STR, strlen($title));
            $sth->execute();
            $count = $sth->fetchColumn();
            if (empty($count)) {
                nv_deletefile(NV_ROOTDIR . '/includes/plugin/' . $plugin_file);
            }
        } elseif (!empty($plugin_area)) {
            $_sql = 'SELECT max(weight) FROM ' . $db_config['prefix'] . '_plugin WHERE plugin_area=' . $plugin_area;
            $weight = $db->query($_sql)->fetchColumn();
            $weight = intval($weight) + 1;
            try {
                $sth = $db->prepare('INSERT INTO ' . $db_config['prefix'] . '_plugin (plugin_file, plugin_area, weight) VALUES (:plugin_file, :plugin_area, :weight)');
开发者ID:nukeplus,项目名称:nuke,代码行数:31,代码来源:plugin.php

示例10: serialize

     $post['config']['access_groups_add'] = $nv_Request->get_int('access_groups_add', 'post', 0);
     $post['config']['access_groups_del'] = $nv_Request->get_int('access_groups_del', 'post', 0);
     $post['config']['access_addus'] = $nv_Request->get_int('access_addus', 'post', 0);
     $post['config']['access_waiting'] = $nv_Request->get_int('access_waiting', 'post', 0);
     $post['config']['access_editus'] = $nv_Request->get_int('access_editus', 'post', 0);
     $post['config']['access_delus'] = $nv_Request->get_int('access_delus', 'post', 0);
     $post['config']['access_passus'] = $nv_Request->get_int('access_passus', 'post', 0);
     $post['config'] = serialize($post['config']);
 }
 // Thông tin của tất cả các nhóm kể cả các nhóm hệ thống
 $post['group_color'] = nv_substr($nv_Request->get_title('group_color', 'post', '', 1), 0, 10);
 if (preg_match("/^([0-9a-fA-F]{6})\$/i", $post['group_color']) or preg_match("/^([0-9a-fA-F]{3})\$/i", $post['group_color'])) {
     $post['group_color'] = '#' . $post['group_color'];
 }
 $post['group_avatar'] = $nv_Request->get_title('group_avatar', 'post', '');
 if (!nv_is_url($post['group_avatar']) and nv_is_file($post['group_avatar'], NV_UPLOADS_DIR . '/' . $module_upload)) {
     $lu = strlen(NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_upload . '/');
     $post['group_avatar'] = substr($post['group_avatar'], $lu);
 } elseif (!nv_is_url($post['group_avatar'])) {
     $post['group_avatar'] = '';
 }
 if (isset($post['id'])) {
     if ($nv_Request->isset_request('add', 'get')) {
         $weight = $db->query("SELECT max(weight) FROM " . NV_MOD_TABLE . "_groups WHERE idsite=" . $global_config['idsite'])->fetchColumn();
         $weight = intval($weight) + 1;
         $_sql = "INSERT INTO " . NV_MOD_TABLE . "_groups\n\t\t\t\t\t\t(title, email, description, content, group_type, group_color, group_avatar, is_default, add_time, exp_time, weight, act, idsite, numbers, siteus, config)\n\t\t\t\t\t\tVALUES ( :title, :email, :description, :content, " . $post['group_type'] . ", :group_color,\n\t\t\t\t\t\t:group_avatar, " . $post['is_default'] . ", " . NV_CURRENTTIME . ", " . $post['exp_time'] . ",\n\t\t\t\t\t\t" . $weight . ", 1, " . $global_config['idsite'] . ", 0, " . $post['siteus'] . ", :config)";
         $data_insert = array();
         $data_insert['title'] = $post['title'];
         $data_insert['email'] = $post['email'];
         $data_insert['description'] = $post['description'];
         $data_insert['content'] = $post['content'];
开发者ID:nukeviet,项目名称:nukeviet,代码行数:31,代码来源:groups.php

示例11: die

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['delete_file'])) {
    die('ERROR#' . $lang_module['notlevel']);
}
$files = array_map('basename', explode('|', htmlspecialchars(trim($nv_Request->get_string('file', 'post')), ENT_QUOTES)));
// Check choose file
if (empty($files)) {
    die('ERROR#' . $lang_module['errorNotSelectFile']);
}
// Check file exists
foreach ($files as $file) {
    if (!nv_is_file(NV_BASE_SITEURL . $path . '/' . $file, $path)) {
        die('ERROR#' . $lang_module['file_no_exists'] . ': ' . $file);
    }
}
// Do action: Delete
foreach ($files as $file) {
    @nv_deletefile(NV_ROOTDIR . '/' . $path . '/' . $file);
    if (preg_match('/^' . nv_preg_quote(NV_UPLOADS_DIR) . '\\/(([a-z0-9\\-\\_\\/]+\\/)*([a-z0-9\\-\\_\\.]+)(\\.(gif|jpg|jpeg|png|bmp)))$/i', $path . '/' . $file, $m)) {
        @nv_deletefile(NV_ROOTDIR . '/' . NV_FILES_DIR . '/' . $m[1]);
    }
    if (isset($array_dirname[$path])) {
        $db->query("DELETE FROM " . NV_UPLOAD_GLOBALTABLE . "_file WHERE did = " . $array_dirname[$path] . " AND title='" . $file . "'");
    }
    nv_insert_logs(NV_LANG_DATA, $module_name, $lang_module['upload_delfile'], $path . '/' . $file, $admin_info['userid']);
}
echo 'OK#Success!!!';
开发者ID:nukeviet,项目名称:nukeviet,代码行数:31,代码来源:delimg.php

示例12: max

         $stmt->bindParam(':title', $rowcontent['sourcetext'], PDO::PARAM_STR);
         $stmt->execute();
         $rowcontent['sourceid'] = $stmt->fetchColumn();
         if (empty($rowcontent['sourceid'])) {
             $weight = $db->query('SELECT max(weight) FROM ' . NV_PREFIXLANG . '_' . $module_data . '_sources')->fetchColumn();
             $weight = intval($weight) + 1;
             $_sql = "INSERT INTO " . NV_PREFIXLANG . "_" . $module_data . "_sources (title, link, logo, weight, add_time, edit_time) VALUES ( :title, '', '', " . $weight . " , " . NV_CURRENTTIME . ", " . NV_CURRENTTIME . ")";
             $data_insert = array();
             $data_insert['title'] = $rowcontent['sourcetext'];
             $rowcontent['sourceid'] = $db->insert_id($_sql, 'sourceid', $data_insert);
         }
     }
 }
 // Xu ly anh minh hoa
 $rowcontent['homeimgthumb'] = 0;
 if (!nv_is_url($rowcontent['homeimgfile']) and nv_is_file($rowcontent['homeimgfile'], $uploads_dir_user) === true) {
     $lu = strlen(NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_upload . '/');
     $rowcontent['homeimgfile'] = substr($rowcontent['homeimgfile'], $lu);
     if (file_exists(NV_ROOTDIR . '/' . NV_FILES_DIR . '/' . $module_upload . '/' . $rowcontent['homeimgfile'])) {
         $rowcontent['homeimgthumb'] = 1;
     } else {
         $rowcontent['homeimgthumb'] = 2;
     }
 } elseif (nv_is_url($rowcontent['homeimgfile'])) {
     $rowcontent['homeimgthumb'] = 3;
 } else {
     $rowcontent['homeimgfile'] = '';
 }
 if ($rowcontent['id'] == 0) {
     if (!defined('NV_IS_SPADMIN') and intval($rowcontent['publtime']) < NV_CURRENTTIME) {
         $rowcontent['publtime'] = NV_CURRENTTIME;
开发者ID:nukeplus,项目名称:nuke,代码行数:31,代码来源:content.php

示例13: die

 * @Author VINADES.,JSC (contact@vinades.vn)
 * @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_DATABASE')) {
    die('Stop!!!');
}
$filename = $nv_Request->get_title('filename', 'get', '');
$checkss = $nv_Request->get_title('checkss', 'get', '');
$log_dir = NV_LOGS_DIR . '/dump_backup';
if ($global_config['idsite']) {
    $log_dir .= '/' . $global_config['site_dir'];
}
$path_filename = NV_BASE_SITEURL . '/' . $log_dir . '/' . $filename;
if (nv_is_file($path_filename, $log_dir) === true and $checkss == md5($filename . $client_info['session_id'] . $global_config['sitekey'])) {
    nv_insert_logs(NV_LANG_DATA, $module_name, $lang_module['download'], 'File name: ' . basename($filename), $admin_info['userid']);
    //Download file
    $name = basename($path_filename);
    $name_arr = explode('_', $name);
    if (sizeof($name_arr) > 1 and strlen($name_arr[0]) == 32) {
        $name = substr($name, 33);
    }
    $download = new NukeViet\Files\Download(NV_DOCUMENT_ROOT . $path_filename, NV_ROOTDIR . '/' . NV_LOGS_DIR . '/dump_backup', $name);
    $download->download_file();
    exit;
} else {
    $contents = 'File not exist !';
    include NV_ROOTDIR . '/includes/header.php';
    echo nv_admin_theme($contents);
    include NV_ROOTDIR . '/includes/footer.php';
开发者ID:nukeplus,项目名称:nuke,代码行数:31,代码来源:getfile.php

示例14: strlen

 $array_config['copyright'] = $nv_Request->get_editor('copyright', '', NV_ALLOWED_HTML_TAGS);
 $array_config['showtooltip'] = $nv_Request->get_int('showtooltip', 'post', 0);
 $array_config['tooltip_position'] = $nv_Request->get_string('tooltip_position', 'post', '');
 $array_config['tooltip_length'] = $nv_Request->get_int('tooltip_length', 'post', 0);
 $array_config['showhometext'] = $nv_Request->get_int('showhometext', 'post', 0);
 $array_config['facebookappid'] = $nv_Request->get_title('facebookappid', 'post', '');
 $array_config['socialbutton'] = $nv_Request->get_int('socialbutton', 'post', 0);
 $array_config['show_no_image'] = $nv_Request->get_title('show_no_image', 'post', '', 0);
 $array_config['structure_upload'] = $nv_Request->get_title('structure_upload', 'post', '', 0);
 $array_config['config_source'] = $nv_Request->get_int('config_source', 'post', 0);
 $array_config['imgposition'] = $nv_Request->get_int('imgposition', 'post', 0);
 $array_config['alias_lower'] = $nv_Request->get_int('alias_lower', 'post', 0);
 $array_config['tags_alias'] = $nv_Request->get_int('tags_alias', 'post', 0);
 $array_config['auto_tags'] = $nv_Request->get_int('auto_tags', 'post', 0);
 $array_config['tags_remind'] = $nv_Request->get_int('tags_remind', 'post', 0);
 if (!nv_is_url($array_config['show_no_image']) and nv_is_file($array_config['show_no_image'])) {
     $lu = strlen(NV_BASE_SITEURL);
     $array_config['show_no_image'] = substr($array_config['show_no_image'], $lu);
 } else {
     $array_config['show_no_image'] = '';
 }
 $sth = $db->prepare("UPDATE " . NV_CONFIG_GLOBALTABLE . " SET config_value = :config_value WHERE lang = '" . NV_LANG_DATA . "' AND module = :module_name AND config_name = :config_name");
 $sth->bindParam(':module_name', $module_name, PDO::PARAM_STR);
 foreach ($array_config as $config_name => $config_value) {
     $sth->bindParam(':config_name', $config_name, PDO::PARAM_STR);
     $sth->bindParam(':config_value', $config_value, PDO::PARAM_STR);
     $sth->execute();
 }
 $nv_Cache->delMod('settings');
 $nv_Cache->delMod($module_name);
 Header('Location: ' . NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=' . $op . '&rand=' . nv_genpass());
开发者ID:nukeviet,项目名称:nukeviet,代码行数:31,代码来源:setting.php

示例15: max

         if (empty($rowcontent['sourceid'])) {
             $weight = $db->query('SELECT max(weight) FROM ' . NV_PREFIXLANG . '_' . $module_data . '_sources')->fetchColumn();
             $weight = intval($weight) + 1;
             $_sql = "INSERT INTO " . NV_PREFIXLANG . "_" . $module_data . "_sources (title, link, logo, weight, add_time, edit_time) VALUES ( :title, '', '', " . $weight . " , " . NV_CURRENTTIME . ", " . NV_CURRENTTIME . ")";
             $data_insert = array();
             $data_insert['title'] = $rowcontent['sourcetext'];
             $rowcontent['sourceid'] = $db->insert_id($_sql, 'sourceid', $data_insert);
         }
     }
 }
 // Xu ly anh minh hoa
 $rowcontent['homeimgthumb'] = 0;
 if (empty($rowcontent['homeimgfile']) and ($rowcontent['imgposition'] == 1 or $rowcontent['imgposition'] == 2)) {
     $rowcontent['homeimgfile'] = nv_get_firstimage($rowcontent['bodyhtml']);
 }
 if (!nv_is_url($rowcontent['homeimgfile']) and nv_is_file($rowcontent['homeimgfile'], NV_UPLOADS_DIR . '/' . $module_upload) === true) {
     $lu = strlen(NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_upload . '/');
     $rowcontent['homeimgfile'] = substr($rowcontent['homeimgfile'], $lu);
     if (file_exists(NV_ROOTDIR . '/' . NV_FILES_DIR . '/' . $module_upload . '/' . $rowcontent['homeimgfile'])) {
         $rowcontent['homeimgthumb'] = 1;
     } else {
         $rowcontent['homeimgthumb'] = 2;
     }
 } elseif (nv_is_url($rowcontent['homeimgfile'])) {
     $rowcontent['homeimgthumb'] = 3;
 } else {
     $rowcontent['homeimgfile'] = '';
 }
 if ($rowcontent['id'] == 0) {
     if (!defined('NV_IS_SPADMIN') and intval($rowcontent['publtime']) < NV_CURRENTTIME) {
         $rowcontent['publtime'] = NV_CURRENTTIME;
开发者ID:hongoctrien,项目名称:nukeviet,代码行数:31,代码来源:content.php


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