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

PHP nv_function_exists函数代码示例

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

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



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

示例1: nv_block_data_config_html

 function nv_block_data_config_html($module, $data_block, $lang_block)
 {
     global $lang_module;
     if (defined('NV_EDITOR')) {
         require NV_ROOTDIR . '/' . NV_EDITORSDIR . '/' . NV_EDITOR . '/nv.php';
     }
     $htmlcontent = htmlspecialchars(nv_editor_br2nl($data_block['htmlcontent']));
     if (defined('NV_EDITOR') and nv_function_exists('nv_aleditor')) {
         $html = nv_add_editor_js() . nv_aleditor("htmlcontent", '100%', '150px', $htmlcontent);
     } else {
         $html = "<textarea style=\"width: 100%\" name=\"htmlcontent\" id=\"htmlcontent\" cols=\"20\" rows=\"8\">" . $htmlcontent . "</textarea>";
     }
     return '<tr><td colspan="2">' . $lang_block['htmlcontent'] . '<br>' . $html . '</td></tr>';
 }
开发者ID:lzhao18,项目名称:nukeviet,代码行数:14,代码来源:global.html.php


示例2: phpinfo_array

/**
 * phpinfo_array()
 *
 * @param integer $option
 * @param bool $return
 * @return
 * INFO_GENERAL => 1 The configuration line, php.ini location, build date, Web Server, System and more.
 * INFO_CREDITS => 2 PHP Credits. See also phpcredits().
 * INFO_CONFIGURATION => 4 Current Local and Master values for PHP directives. See also ini_get().
 * INFO_MODULES => 8 Loaded modules and their respective settings. See also get_loaded_extensions().
 * INFO_ENVIRONMENT => 16 Environment Variable information that's also available in $_ENV.
 * INFO_VARIABLES => 32 Shows all predefined variables from EGPCS (Environment, GET, POST, Cookie, Server).
 * INFO_LICENSE => 64 PHP License information. See also the license FAQ.
 * INFO_ALL => -1 Shows all of the above.
 */
function phpinfo_array($option = 1, $return = false)
{
    global $sys_info;
    $pi = array();
    if (nv_function_exists('phpinfo')) {
        ob_start();
        phpinfo($option);
        $info = preg_replace(array('#^.*<body>(.*)</body>.*$#ms', '#<h2>PHP License</h2>.*$#ms', '#<h1>Configuration</h1>#', "#\r?\n#", "#</(h1|h2|h3|tr)>#", '# +<#', "#[ \t]+#", '#&nbsp;#', '# +#', '# class=".*?"#', '%&#039;%', '#<tr>(?:.*?)" src="(?:.*?)=(.*?)" alt="PHP Logo" /></a>' . '<h1>PHP Version (.*?)</h1>(?:\\n+?)</td></tr>#', '#<h1><a href="(?:.*?)\\?=(.*?)">PHP Credits</a></h1>#', '#<tr>(?:.*?)" src="(?:.*?)=(.*?)"(?:.*?)Zend Engine (.*?),(?:.*?)</tr>#', "# +#", '#<tr>#', '#</tr>#'), array('$1', '', '', '', '</$1>' . "\n", '<', ' ', ' ', ' ', '', ' ', '<h2>PHP Configuration</h2>' . "\n" . '<tr><td>PHP Version</td><td>$2</td></tr>' . "\n" . '<tr><td>PHP Egg</td><td>$1</td></tr>', '<tr><td>PHP Credits Egg</td><td>$1</td></tr>', '<tr><td>Zend Engine</td><td>$2</td></tr>' . "\n" . '<tr><td>Zend Egg</td><td>$1</td></tr>', ' ', '%S%', '%E%'), ob_get_clean());
        $sections = explode('<h2>', strip_tags($info, '<h2><th><td>'));
        unset($sections[0]);
        foreach ($sections as $section) {
            $n = substr($section, 0, strpos($section, '</h2>'));
            preg_match_all('#%S%(?:<td>(.*?)</td>)?(?:<td>(.*?)</td>)?(?:<td>(.*?)</td>)?%E%#', $section, $askapache, PREG_SET_ORDER);
            foreach ($askapache as $m) {
                $pi[$n][$m[1]] = (isset($m[2]) and !isset($m[3]) || $m[2] == $m[3]) ? $m[2] : array_slice($m, 2);
            }
        }
    }
    return $return === false ? print_r($pi) : $pi;
}
开发者ID:lzhao18,项目名称:nukeviet,代码行数:35,代码来源:phpinfo.php


示例3: nv_admin_theme

function nv_admin_theme($contents, $head_site = 1)
{
    global $global_config, $lang_global, $admin_mods, $site_mods, $admin_menu_mods, $module_name, $module_file, $module_info, $admin_info, $db, $page_title, $submenu, $select_options, $op, $set_active_op, $array_lang_admin, $my_head, $my_footer, $array_mod_title, $array_url_instruction, $op, $client_info;
    $dir_template = '';
    if ($head_site == 1) {
        $file_name_tpl = 'main.tpl';
        if (file_exists(NV_ROOTDIR . '/themes/' . $global_config['admin_theme'] . '/system/' . $file_name_tpl)) {
            $dir_template = NV_ROOTDIR . '/themes/' . $global_config['admin_theme'] . '/system';
        } else {
            $dir_template = NV_ROOTDIR . '/themes/admin_default/system';
            $global_config['admin_theme'] = 'admin_default';
        }
    } else {
        $file_name_tpl = 'content.tpl';
        if (file_exists(NV_ROOTDIR . '/themes/' . $global_config['admin_theme'] . '/system/' . $file_name_tpl)) {
            $dir_template = NV_ROOTDIR . '/themes/' . $global_config['admin_theme'] . '/system';
        } else {
            $dir_template = NV_ROOTDIR . '/themes/admin_default/system';
            $global_config['admin_theme'] = 'admin_default';
        }
    }
    $global_config['site_name'] = empty($global_config['site_name']) ? NV_SERVER_NAME : $global_config['site_name'];
    $xtpl = new XTemplate($file_name_tpl, $dir_template);
    $xtpl->assign('NV_SITE_COPYRIGHT', $global_config['site_name'] . ' [' . $global_config['site_email'] . '] ');
    $xtpl->assign('NV_SITE_NAME', $global_config['site_name']);
    $xtpl->assign('NV_SITE_TITLE', $global_config['site_name'] . ' ' . NV_TITLEBAR_DEFIS . ' ' . $lang_global['admin_page'] . ' ' . NV_TITLEBAR_DEFIS . ' ' . $module_info['custom_title']);
    $xtpl->assign('SITE_DESCRIPTION', $global_config['site_description']);
    $xtpl->assign('NV_CHECK_PASS_MSTIME', (intval($global_config['admin_check_pass_time']) - 62) * 1000);
    $xtpl->assign('NV_BASE_SITEURL', NV_BASE_SITEURL);
    $xtpl->assign('NV_ADMINDIR', NV_ADMINDIR);
    $xtpl->assign('NV_BASE_ADMINURL', NV_BASE_ADMINURL);
    $xtpl->assign('NV_ASSETS_DIR', NV_ASSETS_DIR);
    $xtpl->assign('MODULE_NAME', $module_name);
    $xtpl->assign('MODULE_FILE', $module_file);
    $xtpl->assign('NV_ADMIN_THEME', $global_config['admin_theme']);
    $xtpl->assign('LANG', $lang_global);
    if (file_exists(NV_ROOTDIR . '/themes/' . $global_config['admin_theme'] . '/css/' . $module_file . '.css')) {
        $xtpl->assign('NV_CSS_MODULE_THEME', NV_BASE_SITEURL . 'themes/' . $global_config['admin_theme'] . '/css/' . $module_file . '.css');
        $xtpl->parse('main.css_module');
    } elseif (file_exists(NV_ROOTDIR . '/themes/admin_default/css/' . $module_file . '.css')) {
        $xtpl->assign('NV_CSS_MODULE_THEME', NV_BASE_SITEURL . 'themes/admin_default/css/' . $module_file . '.css');
        $xtpl->parse('main.css_module');
    }
    $xtpl->assign('NV_LANG_VARIABLE', NV_LANG_VARIABLE);
    $xtpl->assign('NV_LANG_INTERFACE', NV_LANG_INTERFACE);
    $xtpl->assign('NV_NAME_VARIABLE', NV_NAME_VARIABLE);
    $xtpl->assign('NV_OP_VARIABLE', NV_OP_VARIABLE);
    $xtpl->assign('NV_SITE_TIMEZONE_OFFSET', round(NV_SITE_TIMEZONE_OFFSET / 3600));
    $xtpl->assign('NV_CURRENTTIME', nv_date('T', NV_CURRENTTIME));
    $xtpl->assign('NV_COOKIE_PREFIX', $global_config['cookie_prefix']);
    if (file_exists(NV_ROOTDIR . '/themes/' . $global_config['admin_theme'] . '/js/' . $module_file . '.js')) {
        $xtpl->assign('NV_JS_MODULE', NV_BASE_SITEURL . 'themes/' . $global_config['admin_theme'] . '/js/' . $module_file . '.js');
        $xtpl->parse('main.module_js');
    }
    if (defined('NV_EDITOR') and nv_function_exists('nv_add_editor_js')) {
        $xtpl->assign('NV_ADD_EDITOR_JS', nv_add_editor_js());
        $xtpl->parse('main.nv_add_editor_js');
    }
    if ($head_site == 1) {
        $xtpl->assign('NV_GO_CLIENTSECTOR', $lang_global['go_clientsector']);
        $lang_site = !empty($site_mods) ? NV_LANG_DATA : $global_config['site_lang'];
        $xtpl->assign('NV_GO_CLIENTSECTOR_URL', NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . $lang_site);
        $xtpl->assign('NV_LOGOUT', $lang_global['admin_logout_title']);
        if (!empty($array_lang_admin)) {
            $xtpl->assign('NV_LANGDATA', $lang_global['langdata']);
            $xtpl->assign('NV_LANGDATA_CURRENT', $array_lang_admin[NV_LANG_DATA]);
            foreach ($array_lang_admin as $lang_i => $lang_name) {
                $xtpl->assign('DISABLED', $lang_i == NV_LANG_DATA ? " class=\"disabled\"" : "");
                $xtpl->assign('LANGVALUE', $lang_name);
                $xtpl->assign('LANGOP', NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . $lang_i);
                $xtpl->parse('main.langdata.option');
            }
            $xtpl->parse('main.langdata');
        }
        // Top_menu
        $top_menu = $admin_mods;
        if (sizeof($top_menu) > 8) {
            if ($module_name != 'authors') {
                unset($top_menu['authors']);
            }
            if ($module_name != 'language') {
                unset($top_menu['language']);
            }
        }
        foreach ($top_menu as $m => $v) {
            if (!empty($v['custom_title'])) {
                $array_submenu = nv_get_submenu($m);
                $xtpl->assign('TOP_MENU_CLASS', $array_submenu ? ' class="dropdown"' : '');
                $xtpl->assign('TOP_MENU_HREF', $m);
                $xtpl->assign('TOP_MENU_NAME', $v['custom_title']);
                if (!empty($array_submenu)) {
                    $xtpl->parse('main.top_menu_loop.has_sub');
                    foreach ($array_submenu as $mop => $submenu_i) {
                        $xtpl->assign('SUBMENULINK', NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $m . '&amp;' . NV_OP_VARIABLE . '=' . $mop);
                        $xtpl->assign('SUBMENUTITLE', $submenu_i);
                        $xtpl->parse('main.top_menu_loop.submenu.submenu_loop');
                    }
                    $xtpl->parse('main.top_menu_loop.submenu');
                }
                $xtpl->parse('main.top_menu_loop');
//.........这里部分代码省略.........
开发者ID:anhtunguyen,项目名称:vietnamguide,代码行数:101,代码来源:theme.php


示例4: nv_editor_br2nl

        }
    }
    if ($nv_Request->isset_request('edit', 'get')) {
        $post = $groupsList[$post['id']];
        $post['content'] = nv_editor_br2nl($post['content']);
        $post['exp_time'] = !empty($post['exp_time']) ? date("d.m.Y", $post['exp_time']) : "";
        $post['public'] = $post['public'] ? " checked=\"checked\"" : "";
    } else {
        $post['title'] = $post['content'] = $post['exp_time'] = "";
        $post['public'] = "";
    }
    if (!empty($post['content'])) {
        $post['content'] = nv_htmlspecialchars($post['content']);
    }
    $xtpl->assign('DATA', $post);
    if (defined('NV_EDITOR') and nv_function_exists('nv_aleditor')) {
        $xtpl->parse('add.is_editor');
        $_cont = nv_aleditor('content', '100%', '300px', $post['content']);
    } else {
        $_cont = "<textarea style=\"width:100%;height:300px\" name=\"content\" id=\"content\">" . $post['content'] . "</textarea>";
    }
    $xtpl->assign('CONTENT', $_cont);
    $xtpl->parse('add');
    $contents = $xtpl->text('add');
    $my_head .= "<script type=\"text/javascript\" src=\"" . NV_BASE_SITEURL . "js/popcalendar/popcalendar.js\"></script>\n";
    include NV_ROOTDIR . "/includes/header.php";
    echo nv_admin_theme($contents);
    include NV_ROOTDIR . "/includes/footer.php";
    die;
}
//Danh sach nhom
开发者ID:atarubi,项目名称:nuke-viet,代码行数:31,代码来源:groups.php


示例5: nv_html_site_js

/**
 * nv_html_site_js()
 *
 * @param bool $html
 * @return
 */
function nv_html_site_js($html = true)
{
    global $global_config, $module_info, $module_name, $module_file, $lang_global, $op, $client_info;
    $jsDef = "var nv_siteroot=\"" . NV_BASE_SITEURL . "\",nv_sitelang=\"" . NV_LANG_INTERFACE . "\",nv_name_variable=\"" . NV_NAME_VARIABLE . "\",nv_fc_variable=\"" . NV_OP_VARIABLE . "\",nv_lang_variable=\"" . NV_LANG_VARIABLE . "\",nv_module_name=\"" . $module_name . "\",nv_func_name=\"" . $op . "\",nv_is_user=" . (int) defined("NV_IS_USER") . ", nv_my_ofs=" . round(NV_SITE_TIMEZONE_OFFSET / 3600) . ",nv_my_abbr=\"" . nv_date("T", NV_CURRENTTIME) . "\",nv_cookie_prefix=\"" . $global_config['cookie_prefix'] . "\",nv_check_pass_mstime=" . (intval($global_config['user_check_pass_time']) - 62) * 1000 . ",nv_area_admin=0,theme_responsive=" . (int) ($global_config['current_theme_type'] == 'r');
    if (defined('NV_IS_DRAG_BLOCK')) {
        $jsDef .= ',drag_block=1,blockredirect="' . nv_base64_encode($client_info['selfurl']) . '",selfurl="' . $client_info['selfurl'] . '",block_delete_confirm="' . $lang_global['block_delete_confirm'] . '",block_outgroup_confirm="' . $lang_global['block_outgroup_confirm'] . '",blocks_saved="' . $lang_global['blocks_saved'] . '",blocks_saved_error="' . $lang_global['blocks_saved_error'] . '",post_url="' . NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=themes&' . NV_OP_VARIABLE . '=",func_id=' . $module_info['funcs'][$op]['func_id'] . ',module_theme="' . $global_config['module_theme'] . '"';
    }
    $jsDef .= ";";
    $return = array();
    $return[] = array('ext' => 0, 'content' => $jsDef);
    $return[] = array('ext' => 1, 'content' => NV_BASE_SITEURL . NV_ASSETS_DIR . "/js/jquery/jquery.min.js");
    $return[] = array('ext' => 1, 'content' => NV_BASE_SITEURL . NV_ASSETS_DIR . "/js/language/" . NV_LANG_INTERFACE . ".js");
    $return[] = array('ext' => 1, 'content' => NV_BASE_SITEURL . NV_ASSETS_DIR . "/js/global.js");
    if (defined('NV_IS_ADMIN')) {
        $return[] = array('ext' => 1, 'content' => NV_BASE_SITEURL . NV_ASSETS_DIR . "/js/admin.js");
    }
    // module js
    if (file_exists(NV_ROOTDIR . '/themes/' . $module_info['template'] . '/js/' . $module_file . '.js')) {
        $return[] = array('ext' => 1, 'content' => NV_BASE_SITEURL . 'themes/' . $module_info['template'] . '/js/' . $module_file . '.js');
    }
    if (defined('NV_EDITOR') and nv_function_exists('nv_add_editor_js')) {
        $editor_js = nv_add_editor_js();
        preg_match("/src\\s*=\\s*[\"']([^\"']+)[\"']/i", $editor_js, $matches);
        $return[] = array('ext' => 1, 'content' => $matches[1]);
    }
    if (defined('NV_IS_DRAG_BLOCK')) {
        $return[] = array('ext' => 1, 'content' => NV_BASE_SITEURL . NV_ASSETS_DIR . "/js/ui/jquery.ui.core.min.js");
        $return[] = array('ext' => 1, 'content' => NV_BASE_SITEURL . NV_ASSETS_DIR . "/js/ui/jquery.ui.sortable.min.js");
    }
    if (!$html) {
        return $return;
    }
    $res = "";
    foreach ($return as $js) {
        if ($js['ext'] == 1) {
            $res .= "<script src=\"" . $js['content'] . "\"></script>" . PHP_EOL;
        } else {
            $res .= "<script>" . PHP_EOL;
            $res .= $js['content'] . PHP_EOL;
            $res .= "</script>" . PHP_EOL;
        }
    }
    return $res;
}
开发者ID:anhtunguyen,项目名称:vietnamguide,代码行数:50,代码来源:user_functions.php


示例6: nv_edit_plan_theme

/**
 * nv_edit_plan_theme()
 *
 * @param mixed $contents
 * @return
 */
function nv_edit_plan_theme($contents)
{
    global $global_config, $module_file;
    $xtpl = new XTemplate('edit_plan.tpl', NV_ROOTDIR . '/themes/' . $global_config['module_theme'] . '/modules/' . $module_file);
    $xtpl->assign('CONTENTS', $contents);
    $xtpl->assign('CLASS', $contents['is_error'] ? ' class="error"' : '');
    foreach ($contents['blang'][3] as $key => $blang) {
        $xtpl->assign('BLANG', array('key' => $key, 'title' => $blang['name'], 'selected' => $key == $contents['blang'][4] ? ' selected="selected"' : ''));
        $xtpl->parse('main.blang');
    }
    foreach ($contents['form'][2] as $form) {
        $xtpl->assign('FORM', array('key' => $form, 'title' => $form, 'selected' => $form == $contents['form'][3] ? ' selected="selected"' : ''));
        $xtpl->parse('main.form');
    }
    if ($contents['description'][5] and nv_function_exists('nv_aleditor')) {
        $description = nv_aleditor($contents['description'][1], $contents['description'][3], $contents['description'][4], $contents['description'][2]);
    } else {
        $description = '<textarea name="' . $contents['description'][1] . '" id="' . $contents['description'][1] . '" style="width:' . $contents['description'][3] . ';height:' . $contents['description'][4] . '">' . $contents['description'][2] . '</textarea>\\n';
    }
    $xtpl->assign('DESCRIPTION', $description);
    $xtpl->parse('main');
    return $xtpl->text('main');
}
开发者ID:lzhao18,项目名称:nukeviet,代码行数:29,代码来源:admin.functions.php


示例7: elseif

        $start_time = NV_CURRENTTIME;
    }
    if (empty($cron_name)) {
        $error = $lang_module['cron_name_empty'];
    } elseif (!empty($run_file) and !file_exists(NV_ROOTDIR . '/includes/cronjobs/' . $run_file)) {
        $error = $lang_module['file_not_exist'];
    } elseif (empty($run_func) or !preg_match($global_config['check_cron'], $run_func)) {
        $error = $lang_module['func_name_invalid'];
    } else {
        if (!empty($run_file) and preg_match('/^([a-zA-Z0-9\\-\\_\\.]+)\\.php$/', $run_file) and file_exists(NV_ROOTDIR . '/includes/cronjobs/' . $run_file)) {
            if (!defined('NV_IS_CRON')) {
                define('NV_IS_CRON', true);
            }
            require_once NV_ROOTDIR . '/includes/cronjobs/' . $run_file;
        }
        if (!nv_function_exists($run_func)) {
            $error = $lang_module['func_name_not_exist'];
        } else {
            if (!empty($params)) {
                $params = explode(',', $params);
                $params = array_map('trim', $params);
                $params = implode(',', $params);
            }
            $_sql = 'INSERT INTO ' . NV_CRONJOBS_GLOBALTABLE . '
				(start_time, inter_val, run_file, run_func, params, del, is_sys, act, last_time, last_result, ' . NV_LANG_INTERFACE . '_cron_name) VALUES
				(' . $start_time . ', ' . $interval . ', :run_file, :run_func, :params, ' . $del . ', 0, 1, 0, 0, :cron_name)';
            $data = array();
            $data['run_file'] = $run_file;
            $data['run_func'] = $run_func;
            $data['params'] = $params;
            $data['cron_name'] = $cron_name;
开发者ID:lzhao18,项目名称:nukeviet,代码行数:31,代码来源:cronjobs_add.php


示例8: die

<?php

/**
 * @Project NUKEVIET BLOG 4.x
 * @Author PHAN TAN DUNG ([email protected])
 * @Copyright (C) 2014 PHAN TAN DUNG. All rights reserved
 * @License GNU/GPL version 2 or any later version
 * @Createdate Dec 11, 2013, 09:50:11 PM
 */
if (!defined('NV_MAINFILE')) {
    die('Stop!!!');
}
if (!nv_function_exists('nv_blog_newsletters')) {
    function nv_blog_newsletters($block_config)
    {
        global $module_info, $global_config, $site_mods, $client_info, $module_name;
        $module = $block_config['module'];
        $module_file = $site_mods[$module]['module_file'];
        if (file_exists(NV_ROOTDIR . "/themes/" . $module_info['template'] . "/modules/" . $module_file . "/block.newsletters.tpl")) {
            $block_theme = $module_info['template'];
        } elseif (file_exists(NV_ROOTDIR . "/themes/" . $global_config['site_theme'] . "/modules/" . $module_file . "/block.newsletters.tpl")) {
            $block_theme = $global_config['site_theme'];
        } else {
            $block_theme = "default";
        }
        // Goi css
        if ($module_name != $module and !defined('NV_IS_BLOG_CSS')) {
            global $my_head;
            $css_file = 'themes/' . $block_theme . '/css/' . $module_file . '.css';
            if (file_exists(NV_ROOTDIR . '/' . $css_file)) {
                define('NV_IS_BLOG_CSS', true);
开发者ID:hoangvtien,项目名称:blog,代码行数:31,代码来源:global.newsletters.php


示例9: nv_siteinfo_getmodules

function nv_siteinfo_getmodules()
{
    global $db_config;
    $sql = "SELECT DISTINCT `module_name` FROM `" . $db_config['prefix'] . "_logs`";
    $result = nv_db_cache($sql, 'module_name');
    $array_modules = array();
    if (!empty($result)) {
        foreach ($result as $row) {
            $array_modules[] = $row['module_name'];
        }
    }
    return $array_modules;
}
if (defined('NV_IS_GODADMIN')) {
    $submenu['system_info'] = $lang_module['site_configs_info'];
    if (nv_function_exists('phpinfo')) {
        $submenu['php_info_configuration'] = $lang_module['configuration_php'];
        $submenu['php_info_modules'] = $lang_module['extensions'];
        $submenu['php_info_environment'] = $lang_module['environment_php'];
        $submenu['php_info_variables'] = $lang_module['variables_php'];
        $allow_func[] = 'php_info_configuration';
        $allow_func[] = 'php_info_modules';
        $allow_func[] = 'php_info_environment';
        $allow_func[] = 'php_info_variables';
    }
    $allow_func[] = 'system_info';
    $allow_func[] = 'checkchmod';
    $allow_func[] = 'logs';
    $allow_func[] = 'logs_del';
    $submenu['logs'] = $lang_module['logs_title'];
}
开发者ID:atarubi,项目名称:nuke-viet,代码行数:31,代码来源:functions.php


示例10: array

                $lunarMonth = $diff + 10;
                if ($diff == $leapMonthDiff) {
                    $lunarLeap = 1;
                }
            }
        }
        if ($lunarMonth > 12) {
            $lunarMonth = $lunarMonth - 12;
        }
        if ($lunarMonth >= 11 && $diff < 4) {
            $lunarYear -= 1;
        }
        return array($lunarDay, $lunarMonth, $lunarYear, $lunarLeap);
    }
}
if (!nv_function_exists('convertLunar2Solar')) {
    /* Convert a lunar date to the corresponding solar date */
    function convertLunar2Solar($lunarDay, $lunarMonth, $lunarYear, $lunarLeap, $timeZone)
    {
        if ($lunarMonth < 11) {
            $a11 = getLunarMonth11($lunarYear - 1, $timeZone);
            $b11 = getLunarMonth11($lunarYear, $timeZone);
        } else {
            $a11 = getLunarMonth11($lunarYear, $timeZone);
            $b11 = getLunarMonth11($lunarYear + 1, $timeZone);
        }
        $k = INT(0.5 + ($a11 - 2415021.076998695) / 29.530588853);
        $off = $lunarMonth - 11;
        if ($off < 0) {
            $off += 12;
        }
开发者ID:hoangvtien,项目名称:nv4_module_genealogy,代码行数:31,代码来源:global.anniversary.php


示例11: nv_block_form_content

 function nv_block_form_content($block_config)
 {
     global $db, $site_mods, $module_info, $module_name, $lang_module, $my_head, $user_info;
     $module = $block_config['module'];
     $filled = false;
     $answer_info = $old_answer_info = $form_info = array();
     $form_info = $db->query('SELECT * FROM ' . NV_PREFIXLANG . '_' . $site_mods[$module]['module_data'] . ' WHERE status = 1 AND id = ' . $block_config['formid'])->fetch();
     if (!empty($form_info)) {
         if ($form_info['start_time'] > NV_CURRENTTIME or $form_info['end_time'] > 0 and $form_info['end_time'] < NV_CURRENTTIME or !nv_user_in_groups($form_info['groups_view'])) {
             return '';
         } else {
             // Lấy thông tin câu hỏi
             $question_info = $db->query("SELECT * FROM " . NV_PREFIXLANG . '_' . $site_mods[$module]['module_data'] . "_question WHERE fid = " . $block_config['formid'] . " AND status = 1 ORDER BY weight")->fetchAll();
             // Trạng thái trả lời
             if (defined('NV_IS_USER')) {
                 $sql = "SELECT * FROM " . NV_PREFIXLANG . '_' . $site_mods[$module]['module_data'] . "_answer WHERE fid = " . $block_config['formid'] . " AND who_answer = " . $user_info['userid'];
                 $_rows = $db->query($sql)->fetch();
                 if ($_rows) {
                     $filled = true;
                     $form_info['filled'] = true;
                     $answer_info = unserialize($_rows['answer']);
                 }
                 if (!empty($answer_info) and !$block_config['dis_form_answered']) {
                     return '';
                 }
             }
             if (file_exists(NV_ROOTDIR . '/themes/' . $module_info['template'] . '/modules/' . $site_mods[$module]['module_file'] . '/block_form_content.tpl')) {
                 $block_theme = $module_info['template'];
             } else {
                 $block_theme = 'default';
             }
             if ($module != $module_name) {
                 $my_head .= "<script type=\"text/javascript\" src=\"" . NV_BASE_SITEURL . "js/jquery/jquery.validate.min.js\"></script>\n";
                 $my_head .= "<script type=\"text/javascript\" src=\"" . NV_BASE_SITEURL . "js/language/jquery.validator-" . NV_LANG_INTERFACE . ".js\"></script>\n";
                 $my_head .= "<script type=\"text/javascript\">\n";
                 $my_head .= "\$(document).ready(function(){\n\t\t\t\t\t\t\t\t\$('#question_form').validate({\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t });";
                 $my_head .= " </script>\n";
                 if (file_exists(NV_ROOTDIR . '/modules/' . $site_mods[$module]['module_file'] . '/language/' . NV_LANG_DATA . '.php')) {
                     require_once NV_ROOTDIR . '/modules/' . $site_mods[$module]['module_file'] . '/language/' . NV_LANG_DATA . '.php';
                 }
             } else {
                 return '';
             }
             $xtpl = new XTemplate('block_form_content.tpl', NV_ROOTDIR . '/themes/' . $block_theme . '/modules/' . $site_mods[$module]['module_file']);
             $xtpl->assign('LANG', $lang_module);
             $xtpl->assign('FORM', $form_info);
             $xtpl->assign('NV_BASE_SITEURL', NV_BASE_SITEURL);
             $xtpl->assign('FORM_ACTION', NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $module . '/' . $form_info['id'] . '-' . $form_info['alias']);
             if ($block_config['dis_form_info']) {
                 $xtpl->parse('main.form_info');
             }
             if ($form_info['question_display'] == 'question_display_left') {
                 $xtpl->assign('FORM_LEFT', 'class="form-horizontal"');
             }
             foreach ($question_info as $row) {
                 $row['value'] = isset($answer_info[$row['qid']]) ? $answer_info[$row['qid']] : '';
                 $row['required'] = $row['required'] ? 'required' : '';
                 $xtpl->assign('QUESTION', $row);
                 if ($row['required']) {
                     $xtpl->parse('main.loop.required');
                 }
                 if ($row['question_type'] == 'textbox' or $row['question_type'] == 'number') {
                     if ($answer_info and !$row['user_editable'] and isset($form_info['filled'])) {
                         $row['readonly'] = 'readonly="readonly"';
                     }
                     $xtpl->assign('QUESTION', $row);
                     $xtpl->parse('main.loop.textbox');
                 } elseif ($row['question_type'] == 'date') {
                     $row['value'] = empty($row['value']) ? '' : date('d/m/Y', $row['value']);
                     $row['datepicker'] = ($answer_info and !$row['user_editable'] and isset($form_info['filled'])) ? '' : 'datepicker';
                     $xtpl->assign('QUESTION', $row);
                     $xtpl->parse('main.loop.date');
                 } elseif ($row['question_type'] == 'textarea') {
                     if ($answer_info and !$row['user_editable'] and isset($form_info['filled'])) {
                         $row['readonly'] = 'readonly';
                     }
                     $row['value'] = nv_htmlspecialchars(nv_br2nl($row['value']));
                     $xtpl->assign('QUESTION', $row);
                     $xtpl->parse('main.loop.textarea');
                 } elseif ($row['question_type'] == 'editor') {
                     if (defined('NV_EDITOR')) {
                         require_once NV_ROOTDIR . '/' . NV_EDITORSDIR . '/' . NV_EDITOR . '/nv.php';
                     } elseif (!nv_function_exists('nv_aleditor') and file_exists(NV_ROOTDIR . '/' . NV_EDITORSDIR . '/ckeditor/ckeditor_php5.php')) {
                         define('NV_EDITOR', true);
                         define('NV_IS_CKEDITOR', true);
                         require_once NV_ROOTDIR . '/' . NV_EDITORSDIR . '/ckeditor/ckeditor_php5.php';
                         function nv_aleditor($textareaname, $width = '100%', $height = '450px', $val = '')
                         {
                             // Create class instance.
                             $editortoolbar = array(array('Link', 'Unlink', 'Image', 'Table', 'Font', 'FontSize', 'RemoveFormat'), array('Bold', 'Italic', 'Underline', 'StrikeThrough', '-', 'Subscript', 'Superscript', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', 'OrderedList', 'UnorderedList', '-', 'Outdent', 'Indent', 'TextColor', 'BGColor', 'Source'));
                             $CKEditor = new CKEditor();
                             // Do not print the code directly to the browser, return it instead
                             $CKEditor->returnOutput = true;
                             $CKEditor->config['skin'] = 'kama';
                             $CKEditor->config['entities'] = false;
                             // $CKEditor->config['enterMode'] = 2;
                             $CKEditor->config['language'] = NV_LANG_INTERFACE;
                             $CKEditor->config['toolbar'] = $editortoolbar;
                             // Path to CKEditor directory, ideally instead of relative dir, use an
                             // absolute path:
//.........这里部分代码省略.........
开发者ID:hoangvtien,项目名称:module-nvform,代码行数:101,代码来源:global.block_form_content.php


示例12: array

     exit;
 }
 if (!$array['errorStepMoveFile']) {
     // Tien trinh bat dau chay
     if ($nv_Request->isset_request('load', 'get')) {
         $func = $nv_Request->get_title('load', 'get', '');
         $nv_update_baseurl = NV_BASE_SITEURL . 'install/update.php?step=2&substep=3&load=' . $func;
         $old_module_version = $nv_update_config['updatelog']['old_version'];
         /*
          * Chuan hoa tra ve cho Ajax status|funcname|functitle|url|lang|message|stop|allcomplete status: - 0: That bai - 1: Thanh cong funcname: Ten ham tiep theo thuc hien functitle: Ten cong viec tiep theo se thuc hien url: Duong dan tiep theo duoc load lang: Cac ngon ngu bi loi message: Thong tin (duoc add vao functitle sau dau -) stop: Dung tien trinh allcomplete: Hoan tat tat ca tien trinh
          */
         $return = array('status' => '0', 'funcname' => 'NO', 'functitle' => 'NO', 'url' => 'NO', 'lang' => 'NO', 'message' => 'NO', 'stop' => '1', 'allcomplete' => '0');
         if (!isset($nv_update_config['updatelog']['data_list'][$func])) {
             $return['stop'] = '1';
         }
         if (!nv_function_exists($func)) {
             $return['stop'] = '1';
         }
         $check_return = call_user_func($func);
         // Goi ham thuc hien nang cap
         // Trang thai thuc hien
         $return['status'] = $check_return['status'] ? '1' : '0';
         $return['stop'] = ($check_return['status'] == 0 and $nv_update_config['updatelog']['data_list'][$func]['require'] == 2) ? '1' : '0';
         $return['message'] = $check_return['message'];
         $last_task = end($nv_update_config['updatelog']['data_list']);
         $last_task_key = key($nv_update_config['updatelog']['data_list']);
         // Kiem tra ket thuc tien trinh
         if ($last_task_key == $func and $return['stop'] == '0') {
             $return['allcomplete'] = '1';
             // Ghi lai de chuyen sang buoc tiep theo
             if ($nv_update_config['update_auto_type'] == 2) {
开发者ID:nukeplus,项目名称:nuke,代码行数:31,代码来源:update.php


示例13: elseif

                }
                $_image->cropFromCenter($width, $height);
                $_image->save(NV_ROOTDIR . '/' . NV_UPLOADS_DIR . '/' . $module_upload . '/thumbs/', $basename, $quality);
                if (file_exists(NV_ROOTDIR . '/' . NV_UPLOADS_DIR . '/' . $module_upload . '/thumbs/' . $basename)) {
                    $imgsource = NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_upload . '/thumbs/' . $basename;
                }
            }
        } elseif (nv_is_url($file)) {
            $imgsource = $file;
        } else {
            $imgsource = '';
        }
        return $imgsource;
    }
}
if (!nv_function_exists('nv_block_videos_groups_tabs')) {
    function nv_block_config_videos_groups_tabs($module, $data_block, $lang_block)
    {
        global $site_mods, $nv_Cache;
        $html_input = '';
        $html = '';
        $html .= '<tr>';
        $html .= '<td>' . $lang_block['blockid'] . '</td>';
        $html .= '<td><select name="config_blockid" class="form-control w200">';
        $html .= '<option value="0"> -- </option>';
        $sql = 'SELECT * FROM ' . NV_PREFIXLANG . '_' . $site_mods[$module]['module_data'] . '_block_cat ORDER BY weight ASC';
        $list = $nv_Cache->db($sql, '', $module);
        foreach ($list as $l) {
            $html .= '<option value="' . $l['bid'] . '" ' . ($data_block['blockid'] == $l['bid'] ? ' selected="selected"' : '') . '>' . $l['title'] . '</option>';
        }
        $html .= '</select>';
开发者ID:webvangvn,项目名称:nv4_module_videos,代码行数:31,代码来源:global.block_groups_tabs.php


示例14: 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 3/9/2010 23:25
 */
if (!defined('NV_MAINFILE')) {
    die('Stop!!!');
}
if (!nv_function_exists('nv_comment_new')) {
    function nv_block_comment_new($module, $data_block, $lang_block)
    {
        global $module_config, $db;
        $html = '<tr>';
        $html .= '	<td>' . $lang_block['titlelength'] . '</td>';
        $html .= '	<td><input type="text" name="config_titlelength" class="form-control w200" size="5" value="' . $data_block['titlelength'] . '"/><span class="help-block">' . $lang_block['titlenote'] . '</span></td>';
        $html .= '</tr>';
        $html .= '<tr>';
        $html .= '	<td>' . $lang_block['numrow'] . '</td>';
        $html .= '	<td><input type="text" name="config_numrow" class="form-control w200" size="5" value="' . $data_block['numrow'] . '"/></td>';
        $html .= '</tr>';
        return $html;
    }
    function nv_block_comment_new_submit($module, $lang_block)
    {
        global $nv_Request;
        $return = array();
        $return['error'] = array();
开发者ID:lzhao18,项目名称:nukeviet,代码行数:31,代码来源:global.block_new_comment.php


示例15: elseif

                }
                $_image->cropFromCenter($width, $height);
                $_image->save(NV_ROOTDIR . '/' . NV_UPLOADS_DIR . '/' . $module_upload . '/thumbs/', $basename, $quality);
                if (file_exists(NV_ROOTDIR . '/' . NV_UPLOADS_DIR . '/' . $module_upload . '/thumbs/' . $basename)) {
                    $imgsource = NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_upload . '/thumbs/' . $basename;
                }
            }
        } elseif (nv_is_url($file)) {
            $imgsource = $file;
        } else {
            $imgsource = '';
        }
        return $imgsource;
    }
}
if (!nv_function_exists('nv_block_category_tab_new')) {
    function nv_block_config_category_tab_new($module, $data_block, $lang_block)
    {
        global $site_mods;
        $html = '<tr>';
        $html .= '<td>' . $lang_block['numrow'] . '</td>';
        $html .= '<td><input type="text" class="form-control w200" name="config_numrow" size="5" value="' . $data_block['numrow'] . '"/></td>';
        $html .= '</tr>';
        $html .= '<tr>';
        $html .= '<td>' . $lang_block['title_length'] . '</td>';
        $html .= '<td><input type="text" class="form-control w200" name="config_title_length" size="5" value="' . $data_block['title_length'] . '"/></td>';
        $html .= '</tr>';
        $html .= '<tr>';
        $html .= '<td>' . $lang_block['width'] . ' (px)</td>';
        $html .= '<td><input type="number" class="form-control w200" name="config_width" size="5" value="' . $data_block['width'] . '"/></td>';
        $html .= '</tr>';
开发者ID:nukeplus,项目名称:photos,代码行数:31,代码来源:global.block_category_tab_new.php


示例16: die

<?php

/**
 * @Author Kenny Nguyen ([email protected])
 * @License GNU/GPL version 2 or any later version
 * @Createdate Jan 28, 2015, 04:00:00 PM
 */
if (!defined('NV_MAINFILE')) {
    die('Stop!!!');
}
if (!nv_function_exists('nv_blog_news_tags')) {
    function nv_check_theme($mod_file)
    {
        global $global_config;
        if (file_exists(NV_ROOTDIR . '/themes/' . $global_config['site_theme'] . '/modules/' . $mod_file . '/news_tags.tpl')) {
            $block_theme = $global_config['site_theme'];
        } else {
            $block_theme = 'default';
        }
        return $block_theme;
    }
    function nv_block_config_news_tags($module, $data_block, $lang_block)
    {
        global $site_mods;
        $html .= '<tr>';
        $html .= '<td>' . $lang_block['numrow'] . '</td>';
        $html .= '<td><input type="text" class="form-control w200" name="config_numrow" size="5" value="' . $data_block['numrow'] . '"/></td>';
        $html .= '</tr>';
        $html .= "<tr>";
        $html .= "<td>" . $lang_block['tagsort'] . "</td>";
        $html .= "<td>";
开发者ID:nukeplus,项目名称:videos,代码行数:31,代码来源:global.news_tags.php


示例17: while

        }
        $db->query('DELETE FROM ' . NV_MOD_TABLE . '_files WHERE download_id=' . $id);
        $db->query('DELETE FROM ' . NV_MOD_TABLE . '_detail WHERE id=' . $id);
        $sql = 'SELECT * FROM ' . NV_MOD_TABLE . '_tags_id WHERE id=' . $id;
        $result = $db->query($sql);
        while ($tag = $result->fetch()) {
            $sql = 'UPDATE ' . NV_MOD_TABLE . '_tags SET numdownload=numdownload-1 WHERE did=' . $tag['did'];
            $db->query($sql);
        }
        $sql = 'DELETE FROM ' . NV_MOD_TABLE . '_tags_id WHERE id=' . $id;
        $db->query($sql);
        // Xoa thong bao loi
        nv_delete_notification(NV_LANG_DATA, $module_name, 'report', $id);
    }
    // Resets the contents of the opcode cache
    if ($delfile and nv_function_exists('opcache_reset')) {
        opcache_reset();
    }
    $nv_Cache->delMod($module_name);
    nv_insert_logs(NV_LANG_DATA, $module_data, $lang_module['download_filequeue_del'], $row['title'], $admin_info['userid']);
    die('OK');
}
// List file
$page_title = $lang_module['download_filemanager'];
$where = array();
$base_url = NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name;
$array_search = array('q' => $nv_Request->get_title('q', 'get', ''), 'catid' => $nv_Request->get_int('catid', 'get', 0), 'active' => $nv_Request->get_int('active', 'get', '-1'), 'per_page' => $nv_Request->get_int('per_page', 'get', '30'));
if (empty($list_cats)) {
    Header('Location: ' . NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=cat-content');
    exit;
}
开发者ID:htuyen1994,项目名称:module-download,代码行数:31,代码来源:main.php


示例18: die


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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