本文整理汇总了PHP中nv_info_die函数的典型用法代码示例。如果您正苦于以下问题:PHP nv_info_die函数的具体用法?PHP nv_info_die怎么用?PHP nv_info_die使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了nv_info_die函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: nv_site_theme
function nv_site_theme($contents, $full = true)
{
global $home, $array_mod_title, $lang_global, $language_array, $global_config, $site_mods, $module_name, $module_info, $op_file, $mod_title, $my_head, $my_footer, $client_info, $module_config, $op, $drag_block;
// Determine tpl file, check exists tpl file
$layout_file = $full ? 'layout.' . $module_info['layout_funcs'][$op_file] . '.tpl' : 'simple.tpl';
if (!file_exists(NV_ROOTDIR . '/themes/' . $global_config['module_theme'] . '/layout/' . $layout_file)) {
nv_info_die($lang_global['error_layout_title'], $lang_global['error_layout_title'], $lang_global['error_layout_content']);
}
if (isset($global_config['sitetimestamp'])) {
$global_config['timestamp'] += $global_config['sitetimestamp'];
}
$css = nv_html_css();
// Css for admin
if (defined('NV_IS_ADMIN') and $full) {
$css .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"" . NV_BASE_SITEURL . "themes/" . $global_config['module_theme'] . "/css/admin.css\" />\n";
}
// Style config
if (isset($module_config['themes'][$global_config['module_theme']])) {
if (!file_exists(NV_ROOTDIR . '/' . SYSTEM_FILES_DIR . '/css/theme_' . $global_config['module_theme'] . '_' . $global_config['idsite'] . '.css')) {
$config_theme = unserialize($module_config['themes'][$global_config['module_theme']]);
$css_content = nv_css_setproperties('body', $config_theme['body']);
$css_content .= nv_css_setproperties('a, a:link, a:active, a:visited', $config_theme['a_link']);
$css_content .= nv_css_setproperties('a:hover', $config_theme['a_link_hover']);
$css_content .= nv_css_setproperties('#wraper', $config_theme['content']);
$css_content .= nv_css_setproperties('#header, #banner', $config_theme['header']);
$css_content .= nv_css_setproperties('#footer', $config_theme['footer']);
$css_content .= nv_css_setproperties('.panel, .well, .nv-block-banners', $config_theme['block']);
$css_content .= nv_css_setproperties('.panel-default>.panel-heading', $config_theme['block_heading']);
$css_content .= nv_css_setproperties('generalcss', $config_theme['generalcss']);
// Không nên thay đổi "generalcss"
file_put_contents(NV_ROOTDIR . '/' . SYSTEM_FILES_DIR . '/css/theme_' . $global_config['module_theme'] . '_' . $global_config['idsite'] . '.css', $css_content);
unset($config_theme, $css_content);
}
$my_footer .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"" . NV_BASE_SITEURL . SYSTEM_FILES_DIR . "/css/theme_" . $global_config['module_theme'] . "_" . $global_config['idsite'] . ".css?t=" . $global_config['timestamp'] . "\" />\n";
}
$xtpl = new XTemplate($layout_file, NV_ROOTDIR . '/themes/' . $global_config['module_theme'] . '/layout');
$xtpl->assign('LANG', $lang_global);
$xtpl->assign('TEMPLATE', $global_config['module_theme']);
$xtpl->assign('NV_BASE_SITEURL', NV_BASE_SITEURL);
// System variables
$xtpl->assign('THEME_PAGE_TITLE', nv_html_page_title());
$xtpl->assign('THEME_META_TAGS', nv_html_meta_tags());
$xtpl->assign('THEME_SITE_RSS', nv_html_site_rss());
$xtpl->assign('THEME_CSS', $css);
$xtpl->assign('THEME_SITE_JS', nv_html_site_js());
// Module contents
$xtpl->assign('MODULE_CONTENT', $contents);
// Header variables
$xtpl->assign('SITE_NAME', $global_config['site_name']);
$xtpl->assign('THEME_SITE_HREF', NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA);
$xtpl->assign('LOGO_SRC', NV_BASE_SITEURL . $global_config['site_logo']);
$size = @getimagesize(NV_ROOTDIR . '/' . $global_config['site_logo']);
$xtpl->assign('LOGO_WIDTH', $size[0]);
$xtpl->assign('LOGO_HEIGHT', $size[1]);
if (isset($size['mime']) and $size['mime'] == 'application/x-shockwave-flash') {
$xtpl->parse('main.swf');
} else {
$xtpl->parse('main.image');
}
if ($op == 'main') {
$xtpl->parse('main.main_h1');
} else {
$xtpl->parse('main.main_none_h1');
}
// Only full theme
if ($full) {
// Search form variables
$xtpl->assign('THEME_SEARCH_QUERY_MAX_LENGTH', NV_MAX_SEARCH_LENGTH);
$xtpl->assign('THEME_SEARCH_SUBMIT_ONCLICK', "nv_search_submit('topmenu_search_query', 'topmenu_search_submit', " . NV_MIN_SEARCH_LENGTH . ", " . NV_MAX_SEARCH_LENGTH . ");");
// Breadcrumbs
if ($home != 1) {
if ($global_config['rewrite_op_mod'] != $module_name) {
$arr_cat_title_i = array('catid' => 0, 'title' => $module_info['custom_title'], 'link' => NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name);
array_unshift($array_mod_title, $arr_cat_title_i);
}
if (!empty($array_mod_title)) {
foreach ($array_mod_title as $arr_cat_title_i) {
$xtpl->assign('BREADCRUMBS', $arr_cat_title_i);
$xtpl->parse('main.breadcrumbs.loop');
}
$xtpl->parse('main.breadcrumbs');
}
}
// Statistics image
$theme_stat_img = '';
if ($global_config['statistic'] and isset($site_mods['statistics'])) {
$theme_stat_img .= "<a title=\"" . $lang_global['viewstats'] . "\" href=\"" . NV_BASE_SITEURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&" . NV_NAME_VARIABLE . "=statistics\"><img alt=\"" . $lang_global['viewstats'] . "\" src=\"" . NV_BASE_SITEURL . "index.php?second=statimg&p=" . nv_genpass() . "\" width=\"88\" height=\"31\" /></a>\n";
}
$xtpl->assign('THEME_STAT_IMG', $theme_stat_img);
// Change theme types
if (!empty($global_config['switch_mobi_des'])) {
$mobile_theme = empty($module_info['mobile']) ? $global_config['mobile_theme'] : $module_info['mobile'];
if (!empty($mobile_theme)) {
$num_theme_type = sizeof($global_config['array_theme_type']) - 1;
foreach ($global_config['array_theme_type'] as $i => $theme_type) {
$xtpl->assign('STHEME_TYPE', NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&nv' . NV_LANG_DATA . 'themever=' . $theme_type . '&nv_redirect=' . nv_base64_encode($client_info['selfurl']));
$xtpl->assign('STHEME_TITLE', $lang_global['theme_type_' . $theme_type]);
$xtpl->assign('STHEME_INFO', sprintf($lang_global['theme_type_chose'], $lang_global['theme_type_' . $theme_type]));
if ($theme_type == $global_config['current_theme_type']) {
$xtpl->parse('main.theme_type.loop.current');
//.........这里部分代码省略.........
示例2: die
* @Project NUKEVIET 4.x
* @Author VINADES.,JSC (contact@vinades.vn)
* @Copyright (C) 2015 VINADES.,JSC. All rights reserved
* @License GNU/GPL version 2 or any later version
* @Createdate Sun, 10 May 2015 01:36:45 GMT
*/
if (!defined('NV_IS_MOD_BLOOD_BANK')) {
die('Stop!!!');
}
$page_title = $module_info['custom_title'];
$key_words = $module_info['keywords'];
$array_data = array();
$array_history = array();
if (!nv_user_in_groups($array_config['groups_view_member'])) {
$redirect = '<meta http-equiv="Refresh" content="4;URL=' . nv_url_rewrite(NV_BASE_SITEURL . 'index.php', true) . '" />';
nv_info_die($lang_module['error_not_permission_title'], $lang_module['error_not_permission_title'], $lang_module['error_not_permission_content'] . $redirect);
exit;
}
$result = $db->query('SELECT * FROM ' . NV_PREFIXLANG . '_' . $module_data . ' WHERE id=' . $id);
if ($result->rowCount() > 0) {
$array_data = $result->fetch();
} else {
Header('Location: ' . nv_url_rewrite(NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name, true));
die;
}
$row['photo'] = '';
$result = $db->query('SELECT photo FROM ' . NV_USERS_GLOBALTABLE . ' WHERE userid=' . $array_data['userid']);
if ($result->rowCount() > 0) {
$array_data['photo'] = $result->fetchColumn();
}
$result = $db->query('SELECT * FROM ' . NV_PREFIXLANG . '_' . $module_data . '_donation_person WHERE identity_card=' . $db->quote($array_data['identity_card']));
示例3: elseif
} elseif (!empty($row['bid'])) {
$db->query('DELETE FROM ' . NV_BLOCKS_TABLE . '_groups WHERE bid=' . $row['bid']);
$db->query('DELETE FROM ' . NV_BLOCKS_TABLE . '_weight WHERE bid=' . $row['bid']);
nv_del_moduleCache('themes');
}
}
}
$groups_view = explode(',', $row['groups_view']);
$sql = 'SELECT func_id, func_custom_name, in_module FROM ' . NV_MODFUNCS_TABLE . ' WHERE show_func=1 ORDER BY in_module ASC, subweight ASC';
$func_result = $db->query($sql);
$aray_mod_func = array();
while (list($id_i, $func_custom_name_i, $in_module_i) = $func_result->fetch(3)) {
$aray_mod_func[$in_module_i][] = array('id' => $id_i, 'func_custom_name' => $func_custom_name_i);
}
// Load position file
$xml = @simplexml_load_file(NV_ROOTDIR . '/themes/' . $selectthemes . '/config.ini') or nv_info_die($lang_global['error_404_title'], $lang_module['block_error_fileconfig_title'], $lang_module['block_error_fileconfig_content']);
$xmlpositions = $xml->xpath('positions');
$positions = $xmlpositions[0]->position;
if ($row['bid'] != 0) {
$xtpl->parse('main.block_group_notice');
}
$xtpl->assign('SELECTTHEMES', $selectthemes);
$xtpl->assign('BLOCKREDIRECT', $blockredirect);
$xtpl->assign('THEME_SELECTED', $row['module'] == 'theme' ? ' selected="selected"' : '');
$sql = 'SELECT title, custom_title FROM ' . NV_MODULES_TABLE . ' ORDER BY weight ASC';
$result = $db->query($sql);
while ($row_i = $result->fetch()) {
$xtpl->assign('MODULE', array('key' => $row_i['title'], 'selected' => $row_i['title'] == $row['module'] ? ' selected="selected"' : '', 'title' => $row_i['custom_title']));
$xtpl->parse('main.module');
}
$xtpl->assign('ROW', array('title' => $row['title'], 'exp_time' => $row['exp_time'] > 0 ? date('d/m/Y', $row['exp_time']) : '', 'block_active' => intval($row['active']) == 1 ? ' checked="checked"' : '', 'link' => $row['link'], 'bid' => $row['bid'], 'module' => $row['module'], 'file_name' => $row['file_name']));
示例4: array
$xtpl->assign('SITE_EMAIL', $global_config['site_email']);
$xtpl->assign('SITE_FONE', $global_config['site_phone']);
$xtpl->assign('SITE_URL', $global_config['site_url']);
$xtpl->assign('TITLE', $title);
$xtpl->assign('CONTENT', $mess);
$xtpl->assign('AUTHOR_SIG', $my_sig);
$xtpl->assign('AUTHOR_NAME', $admin_info['username']);
$xtpl->assign('AUTHOR_POS', $admin_info['position']);
$xtpl->assign('AUTHOR_EMAIL', $my_mail);
$xtpl->parse('main');
$content = $xtpl->text('main');
$from = array($admin_info['username'], $my_mail);
$to = $row_user['email'];
$send = nv_sendmail($from, $to, nv_EncString($title), $content);
if (!$send) {
nv_info_die($lang_global['error_info_caption'], $lang_global['site_info'], $lang_global['error_sendmail_admin'], 1);
}
}
}
Header("Location: " . NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=suspend&id=" . $id);
}
} else {
$adminpass = $new_reason = "";
$clean_history = $sendmail = 0;
}
$contents['change_suspend']['new_suspend_caption'] = !empty($error) ? $error : $lang_module['chg_is_suspend' . $new_suspend];
$contents['change_suspend']['new_suspend_is_error'] = !empty($error) ? 1 : 0;
$contents['change_suspend']['new_suspend_action'] = NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=suspend&admin_id=" . $admin_id;
$contents['change_suspend']['sendmail'] = array($lang_module['suspend_sendmail'], $sendmail);
if (!empty($new_suspend)) {
$contents['change_suspend']['new_reason'] = array($lang_module['suspend_reason'], $new_reason, 255);
示例5: elseif
if (defined("NV_IS_ADMIN")) {
//Buoc admin khai bao lai pass neu khong online trong khoang thoi gian nhat dinh
if (empty($admin_info['checkpass'])) {
if ($nv_Request->isset_request(NV_ADMINRELOGIN_VARIABLE, 'get') and $nv_Request->get_int(NV_ADMINRELOGIN_VARIABLE, 'get') == 1) {
require_once NV_ROOTDIR . "/includes/core/admin_relogin.php";
exit;
}
}
} elseif (!in_array(NV_LANG_DATA, $global_config['allow_sitelangs'])) {
$global_config['disable_site'] = 1;
}
//Dinh chi hoat dong cua site
if (!defined('NV_ADMIN') and !defined("NV_IS_ADMIN")) {
if ($global_config['disable_site']) {
$disable_site_content = (isset($global_config['disable_site_content']) and !empty($global_config['disable_site_content'])) ? $global_config['disable_site_content'] : $lang_global['disable_site_content'];
nv_info_die($global_config['site_description'], $global_config['disable_site_title'], $disable_site_content);
} elseif (!in_array(NV_LANG_DATA, $global_config['allow_sitelangs'])) {
Header("Location: " . NV_BASE_SITEURL);
exit;
} elseif (empty($global_config['lang_multi']) and NV_LANG_DATA != $global_config['site_lang']) {
Header("Location: " . NV_BASE_SITEURL);
exit;
}
}
$month_upload_dir = nv_mkdir(NV_UPLOADS_REAL_DIR, date("Y_m"));
//Thu muc uploads theo thang
if (!empty($month_upload_dir[0])) {
define("NV_MONTH_UPLOADS_DIR", date("Y_m"));
define("NV_MONTH_UPLOADS_REAL_DIR", NV_UPLOADS_REAL_DIR . '/' . NV_MONTH_UPLOADS_DIR);
}
define('PCLZIP_TEMPORARY_DIR', NV_ROOTDIR . '/' . NV_TEMP_DIR . '/');
示例6: nv_site_theme
function nv_site_theme($contents)
{
global $home, $array_mod_title, $lang_global, $language_array, $global_config, $module_name, $module_info, $op, $mod_title, $my_head, $my_footer, $client_info;
if (!file_exists(NV_ROOTDIR . "/themes/" . $global_config['module_theme'] . "/layout/layout." . $module_info['layout_funcs'][$op] . ".tpl")) {
nv_info_die($lang_global['error_layout_title'], $lang_global['error_layout_title'], $lang_global['error_layout_content']);
}
if (defined('NV_IS_ADMIN')) {
$my_head .= "<link rel=\"stylesheet\" href=\"" . NV_BASE_SITEURL . "themes/" . $global_config['module_theme'] . "/css/admin.css\" type=\"text/css\" />";
}
$xtpl = new XTemplate("layout." . $module_info['layout_funcs'][$op] . ".tpl", NV_ROOTDIR . "/themes/" . $global_config['module_theme'] . "/layout/");
$xtpl->assign('LANG', $lang_global);
$xtpl->assign('TEMPLATE', $global_config['module_theme']);
$xtpl->assign('NV_BASE_SITEURL', NV_BASE_SITEURL);
$xtpl->assign('THEME_META_TAGS', nv_html_meta_tags());
$xtpl->assign('THEME_SITE_JS', nv_html_site_js());
$xtpl->assign('THEME_CSS', nv_html_css());
$xtpl->assign('THEME_PAGE_TITLE', nv_html_page_title());
$xtpl->assign('MODULE_CONTENT', $contents . " ");
$xtpl->assign('THEME_SITE_HREF', NV_BASE_SITEURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA);
$xtpl->assign('NV_NAME_VARIABLE', NV_NAME_VARIABLE);
$xtpl->assign('NV_LANG_VARIABLE', NV_LANG_VARIABLE);
$xtpl->assign('NV_LANG_DATA', NV_LANG_DATA);
if ($global_config['lang_multi'] and sizeof($global_config['allow_sitelangs']) > 1) {
$xtpl->assign('SELECTLANGSITE', $lang_global['langsite']);
foreach ($global_config['allow_sitelangs'] as $lang_i) {
$langname = $language_array[$lang_i]['name'];
$xtpl->assign('LANGSITENAME', $langname);
$xtpl->assign('LANGSITEURL', NV_BASE_SITEURL . "index.php?" . NV_LANG_VARIABLE . "=" . $lang_i);
if (NV_LANG_DATA != $lang_i) {
$xtpl->parse('main.language.langitem');
} else {
$xtpl->parse('main.language.langcuritem');
}
}
$xtpl->parse('main.language');
}
//Breakcolumn
if ($home != 1) {
$arr_cat_title_i = array('catid' => 0, 'title' => $module_info['custom_title'], 'link' => NV_BASE_SITEURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&" . NV_NAME_VARIABLE . "=" . $module_name);
$xtpl->assign('BREAKCOLUMN', $arr_cat_title_i);
$xtpl->parse('main.mod_title.breakcolumn');
foreach ($array_mod_title as $arr_cat_title_i) {
$xtpl->assign('BREAKCOLUMN', $arr_cat_title_i);
$xtpl->parse('main.mod_title.breakcolumn');
}
$xtpl->parse('main.mod_title');
}
$xtpl->assign('THEME_IMG_CRONJOBS', NV_BASE_SITEURL . "index.php?second=cronjobs&p=" . nv_genpass());
// Chuyen doi giao dien
if (!empty($global_config['switch_mobi_des']) and !empty($module_info['mobile'])) {
$num_theme_type = sizeof($global_config['array_theme_type']) - 1;
foreach ($global_config['array_theme_type'] as $i => $theme_type) {
$xtpl->assign('STHEME_TYPE', NV_BASE_SITEURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&" . NV_NAME_VARIABLE . "=" . $module_name . "&nv" . NV_LANG_DATA . "themever=" . $theme_type . "&nv_redirect=" . nv_base64_encode($client_info['selfurl']));
$xtpl->assign('STHEME_TITLE', $lang_global['theme_type_' . $i]);
$xtpl->assign('STHEME_INFO', sprintf($lang_global['theme_type_chose'], $lang_global['theme_type_' . $i]));
if ($theme_type == $global_config['current_theme_type']) {
$xtpl->parse('main.theme_type.loop.current');
} else {
$xtpl->parse('main.theme_type.loop.other');
}
if ($i < $num_theme_type) {
$xtpl->parse('main.theme_type.loop.space');
}
$xtpl->parse('main.theme_type.loop');
}
$xtpl->parse('main.theme_type');
}
unset($theme_type, $i, $num_theme_type);
$xtpl->parse('main');
$sitecontent = $xtpl->text('main');
$sitecontent = nv_blocks_content($sitecontent);
if (defined('NV_IS_ADMIN')) {
$my_footer = nv_admin_menu() . $my_footer;
}
if (!empty($my_head)) {
$sitecontent = preg_replace('/(<\\/head>)/i', $my_head . "\\1", $sitecontent, 1);
}
if (!empty($my_footer)) {
$sitecontent = preg_replace('/(<\\/body>)/i', $my_footer . "\\1", $sitecontent, 1);
}
return $sitecontent;
}
示例7: explode
}
$alias_cat_url = $array_op[1];
$array_page = explode('-', $array_op[2]);
$id = intval(end($array_page));
$catid = 0;
foreach ($global_array_cat as $catid_i => $array_cat_i) {
if ($alias_cat_url == $array_cat_i['alias']) {
$catid = $catid_i;
break;
}
}
if ($id > 0 and $catid > 0) {
$sql = 'SELECT * FROM ' . NV_PREFIXLANG . '_' . $module_data . '_' . $catid . ' WHERE id =' . $id;
$result = $db_slave->query($sql);
if ($result->rowCount() !== 1) {
nv_info_die($lang_global['error_404_title'], $lang_global['error_404_title'], $lang_global['error_404_content']);
}
$content = $result->fetch();
$body_contents = $db_slave->query('SELECT bodyhtml as bodytext, sourcetext, imgposition, copyright, allowed_print FROM ' . NV_PREFIXLANG . '_' . $module_data . '_bodyhtml_' . ceil($content['id'] / 2000) . ' where id=' . $content['id'])->fetch();
$content = array_merge($content, $body_contents);
unset($sql, $result, $body_contents);
if ($content['allowed_print'] == 1 and (defined('NV_IS_MODADMIN') or $content['status'] == 1 and $content['publtime'] < NV_CURRENTTIME and ($content['exptime'] == 0 or $content['exptime'] > NV_CURRENTTIME))) {
$base_url_rewrite = nv_url_rewrite(NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=print/' . $global_array_cat[$catid]['alias'] . '/' . $content['alias'] . '-' . $id . $global_config['rewrite_exturl'], true);
if ($_SERVER['REQUEST_URI'] != $base_url_rewrite and NV_MAIN_DOMAIN . $_SERVER['REQUEST_URI'] != $base_url_rewrite) {
Header('Location: ' . $base_url_rewrite);
die;
}
$sql = 'SELECT title FROM ' . NV_PREFIXLANG . '_' . $module_data . '_sources WHERE sourceid = ' . $content['sourceid'];
$result = $db_slave->query($sql);
$sourcetext = $result->fetchColumn();
unset($sql, $result);
示例8: nv_info_die
$site_lang = $nv_Request->get_string(NV_LANG_VARIABLE, 'get,post', NV_LANG_DATA);
if (!in_array($site_lang, $global_config['allow_sitelangs'])) {
$global_config['closed_site'] = 1;
}
}
// Dinh chi hoat dong cua site
if ($nv_check_update and !defined('NV_IS_UPDATE')) {
// Dinh chi neu khong la admin toi cao
if (!defined('NV_ADMIN') and !defined('NV_IS_GODADMIN')) {
$disable_site_content = (isset($global_config['disable_site_content']) and !empty($global_config['disable_site_content'])) ? $global_config['disable_site_content'] : $lang_global['disable_site_content'];
nv_info_die($global_config['site_description'], $lang_global['disable_site_title'], $disable_site_content, '', '', '', '');
}
} elseif (!defined('NV_ADMIN') and !defined('NV_IS_ADMIN')) {
if (!empty($global_config['closed_site'])) {
$disable_site_content = (isset($global_config['disable_site_content']) and !empty($global_config['disable_site_content'])) ? $global_config['disable_site_content'] : $lang_global['disable_site_content'];
nv_info_die($global_config['site_description'], $lang_global['disable_site_title'], $disable_site_content, '', '', '', '');
} elseif (!in_array(NV_LANG_DATA, $global_config['allow_sitelangs'])) {
Header('Location: ' . NV_BASE_SITEURL);
exit;
}
}
unset($nv_check_update);
$cache_file = NV_LANG_DATA . '_sitemods_' . NV_CACHE_PREFIX . '.cache';
if (($cache = $nv_Cache->getItem('modules', $cache_file)) != false) {
$sys_mods = unserialize($cache);
} else {
$sys_mods = array();
try {
$result = $db->query('SELECT * FROM ' . NV_MODULES_TABLE . ' m LEFT JOIN ' . NV_MODFUNCS_TABLE . ' f ON m.title=f.in_module WHERE m.act = 1 ORDER BY m.weight, f.subweight');
while ($row = $result->fetch()) {
$m_title = $row['title'];
示例9: define
$nv_Request->set_Session('online', '1|' . NV_CURRENTTIME . '|' . NV_CURRENTTIME . '|0');
if ($global_config['lang_multi']) {
$sql = 'SELECT setup FROM ' . $db_config['prefix'] . '_setup_language WHERE lang=' . $db->quote(NV_LANG_INTERFACE);
$setup = $db->query($sql)->fetchColumn();
if ($setup) {
$nv_Request->set_Cookie('data_lang', NV_LANG_INTERFACE, NV_LIVE_COOKIE_TIME);
}
}
define('NV_IS_ADMIN', true);
$redirect = NV_BASE_SITEURL . NV_ADMINDIR;
if (!empty($admin_login_redirect) and strpos($admin_login_redirect, NV_NAME_VARIABLE . '=siteinfo&' . NV_OP_VARIABLE . '=notification_load') == 0) {
$redirect = $admin_login_redirect;
$nv_Request->unset_request('admin_login_redirect', 'session');
}
$error = '';
nv_info_die($global_config['site_description'], $lang_global['site_info'], $lang_global['admin_loginsuccessfully'] . " \n <meta http-equiv=\"refresh\" content=\"3;URL=" . $redirect . "\" />");
die;
}
} else {
nv_insert_logs(NV_LANG_DATA, 'login', '[ ' . $nv_username . ' ] ' . $lang_global['loginsubmit'] . ' ' . $lang_global['fail'], ' Client IP:' . NV_CLIENT_IP, 0);
}
}
}
} else {
if (empty($admin_login_redirect)) {
$nv_Request->set_Session('admin_login_redirect', $nv_Request->request_uri);
}
$nv_username = '';
}
if (file_exists(NV_ROOTDIR . '/includes/language/' . NV_LANG_INTERFACE . '/admin_global.php')) {
require_once NV_ROOTDIR . '/includes/language/' . NV_LANG_INTERFACE . '/admin_global.php';
示例10: nv_site_theme
function nv_site_theme($contents, $full = true)
{
global $home, $array_mod_title, $lang_global, $language_array, $global_config, $site_mods, $module_name, $module_info, $op_file, $mod_title, $my_head, $my_footer, $client_info, $module_config, $op, $drag_block;
// Determine tpl file, check exists tpl file
$layout_file = $full ? 'layout.' . $module_info['layout_funcs'][$op_file] . '.tpl' : 'simple.tpl';
if (!file_exists(NV_ROOTDIR . '/themes/' . $global_config['module_theme'] . '/layout/' . $layout_file)) {
nv_info_die($lang_global['error_layout_title'], $lang_global['error_layout_title'], $lang_global['error_layout_content']);
}
if (isset($global_config['sitetimestamp'])) {
$global_config['timestamp'] += $global_config['sitetimestamp'];
}
$xtpl = new XTemplate($layout_file, NV_ROOTDIR . '/themes/' . $global_config['module_theme'] . '/layout');
$xtpl->assign('LANG', $lang_global);
$xtpl->assign('TEMPLATE', $global_config['module_theme']);
$xtpl->assign('NV_BASE_SITEURL', NV_BASE_SITEURL);
// System variables
$xtpl->assign('THEME_PAGE_TITLE', nv_html_page_title(false));
// Meta-tags
$metatags = nv_html_meta_tags(false);
$metatags[] = array('name' => 'name', 'value' => 'viewport', 'content' => 'width=device-width, initial-scale=1');
foreach ($metatags as $meta) {
$xtpl->assign('THEME_META_TAGS', $meta);
$xtpl->parse('main.metatags');
}
//Links
$html_links = array();
$html_links[] = array('rel' => 'StyleSheet', 'href' => NV_BASE_SITEURL . 'themes/default/css/font-awesome.min.css');
$html_links[] = array('rel' => 'StyleSheet', 'href' => NV_BASE_SITEURL . 'themes/' . $global_config['module_theme'] . '/css/bootstrap.min.css');
$html_links[] = array('rel' => 'StyleSheet', 'href' => NV_BASE_SITEURL . 'themes/' . $global_config['module_theme'] . '/css/style.css');
if (defined('NV_IS_ADMIN') and $full) {
$html_links[] = array('rel' => 'StyleSheet', 'href' => NV_BASE_SITEURL . 'themes/' . $global_config['module_theme'] . '/css/admin.css');
}
$html_links += nv_html_links(false);
// Customs Style
if (isset($module_config['themes'][$global_config['module_theme']]) and !empty($module_config['themes'][$global_config['module_theme']])) {
$config_theme = unserialize($module_config['themes'][$global_config['module_theme']]);
if (isset($config_theme['css_content']) && !empty($config_theme['css_content'])) {
$customFileName = $global_config['module_theme'] . '.' . NV_LANG_DATA . '.' . $global_config['idsite'];
if (!file_exists(NV_ROOTDIR . '/' . NV_ASSETS_DIR . '/css/' . $customFileName . '.css')) {
$replace = array('[body]' => 'body', '[a_link]' => 'a, a:link, a:active, a:visited', '[a_link_hover]' => 'a:hover', '[content]' => '.wraper', '[header]' => '#header', '[footer]' => '#footer', '[block]' => '.panel, .well, .nv-block-banners', '[block_heading]' => '.panel-default > .panel-heading');
$css_content = str_replace(array_keys($replace), array_values($replace), $config_theme['css_content']);
file_put_contents(NV_ROOTDIR . '/' . NV_ASSETS_DIR . '/css/' . $customFileName . '.css', $css_content);
}
$html_links[] = array('rel' => 'StyleSheet', 'href' => NV_BASE_SITEURL . NV_ASSETS_DIR . '/css/' . $customFileName . '.css?t=' . $global_config['timestamp']);
}
if (isset($config_theme['gfont']) && !empty($config_theme['gfont']) && isset($config_theme['gfont']['family']) && !empty($config_theme['gfont']['family'])) {
$subset = isset($config_theme['gfont']['subset']) ? $config_theme['gfont']['subset'] : '';
$gf = new Gfonts(array('fonts' => array($config_theme['gfont']), 'subset' => $subset), $client_info);
$webFontFile = $gf->getUrlCss();
array_unshift($html_links, array('rel' => 'StyleSheet', 'href' => $webFontFile));
}
unset($config_theme, $css_content, $webFontFile, $font, $subset, $gf);
}
foreach ($html_links as $links) {
foreach ($links as $key => $value) {
$xtpl->assign('LINKS', array('key' => $key, 'value' => $value));
$xtpl->parse('main.links.attr');
}
$xtpl->parse('main.links');
}
$html_js = nv_html_site_js(false);
$html_js[] = array('ext' => 1, 'content' => NV_BASE_SITEURL . 'themes/' . $global_config['module_theme'] . '/js/main.js');
foreach ($html_js as $js) {
if ($js['ext']) {
$xtpl->assign('JS_SRC', $js['content']);
$xtpl->parse('main.js.ext');
} else {
$xtpl->assign('JS_CONTENT', PHP_EOL . $js['content'] . PHP_EOL);
$xtpl->parse('main.js.int');
}
$xtpl->parse('main.js');
}
if ($client_info['browser']['key'] == 'explorer' and $client_info['browser']['version'] < 9) {
$xtpl->parse('main.lt_ie9');
}
// Module contents
$xtpl->assign('MODULE_CONTENT', $contents);
// Header variables
$xtpl->assign('SITE_NAME', $global_config['site_name']);
$xtpl->assign('SITE_DESCRIPTION', $global_config['site_description']);
$xtpl->assign('THEME_SITE_HREF', NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA);
$logo_small = preg_replace('/(\\.[a-z]+)$/i', '_small\\1', $global_config['site_logo']);
$logo = file_exists(NV_ROOTDIR . '/' . $logo_small) ? $logo_small : $global_config['site_logo'];
$size = @getimagesize(NV_ROOTDIR . '/' . $logo);
$logo_svg = preg_replace('/\\.[a-z]+$/i', '.svg', $logo);
file_exists(NV_ROOTDIR . '/' . $logo_svg) && ($logo = $logo_svg);
$xtpl->assign('LOGO_SRC', NV_BASE_SITEURL . $logo);
$xtpl->assign('LOGO_WIDTH', $size[0]);
$xtpl->assign('LOGO_HEIGHT', $size[1]);
if (isset($size['mime']) and $size['mime'] == 'application/x-shockwave-flash') {
$xtpl->parse('main.swf');
} else {
$xtpl->parse('main.image');
}
// Only full theme
if ($full) {
// Search form variables
$xtpl->assign('NV_MAX_SEARCH_LENGTH', NV_MAX_SEARCH_LENGTH);
$xtpl->assign('NV_MIN_SEARCH_LENGTH', NV_MIN_SEARCH_LENGTH);
$xtpl->assign('THEME_SEARCH_URL', NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=seek&q=');
//.........这里部分代码省略.........
示例11: die
$session_files = $nv_Request->get_string('session_files', 'session', '');
if (empty($session_files)) {
die('Wrong URL');
}
$session_files = unserialize($session_files);
if ($nv_Request->isset_request('code', 'get')) {
$code = $nv_Request->get_string('code', 'get', '');
if (empty($code) or !preg_match("/^([a-z0-9]{32})\$/i", $code) or !isset($session_files['linkdirect'][$code])) {
die('Wrong URL');
}
$sql = 'UPDATE ' . NV_PREFIXLANG . '_' . $module_data . ' SET download_hits=download_hits+1 WHERE id=' . intval($session_files['linkdirect'][$code]['id']);
$db->query($sql);
$content = "<br /><img border=\"0\" src=\"" . NV_BASE_SITEURL . NV_ASSETS_DIR . "/images/load_bar.gif\"><br /><br />\n";
$content .= sprintf($lang_module['download_wait2'], $session_files['linkdirect'][$code]['link']);
$content .= "<meta http-equiv=\"refresh\" content=\"5;url=" . $session_files['linkdirect'][$code]['link'] . "\" />";
nv_info_die($lang_module['download_detail'], $lang_module['download_wait'], $content);
die;
}
$filename = $nv_Request->get_string('filename', 'get', '');
if (empty($filename) or !isset($session_files['fileupload'][$filename])) {
die('Wrong URL');
}
if (!file_exists($session_files['fileupload'][$filename]['src'])) {
die('Wrong URL');
}
if (!isset($session_files['fileupload'][$filename]['id'])) {
die('Wrong URL');
}
$upload_dir = 'files';
$is_zip = false;
$is_resume = false;
示例12: 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 Sat, 19 Mar 2011 16:50:45 GMT
*/
if (!defined('NV_SYSTEM')) {
die('Stop!!!');
}
define('NV_IS_MOD_NVTOOLS', true);
if (!((NV_CLIENT_IP == '127.0.0.1' or NV_CLIENT_IP == '::1') and defined('NV_IS_GODADMIN'))) {
$redirect = '<meta http-equiv="Refresh" content="3;URL=' . nv_url_rewrite(NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA, true) . '" />';
nv_info_die($lang_module['error_title'], $lang_module['error_title'], $lang_module['error_content'] . $redirect);
}
function nv_mkdir_nvtools($path, $dir_name, $index_file = 0, $htaccess = 0)
{
global $lang_global, $global_config, $sys_info;
$dir_name = nv_string_to_filename(trim(basename($dir_name)));
if (!preg_match("/^[a-zA-Z0-9-_.]+\$/", $dir_name)) {
return array(0, sprintf($lang_global['error_create_directories_name_invalid'], $dir_name));
}
$path = @realpath($path);
if (!preg_match('/\\/$/', $path)) {
$path = $path . "/";
}
if (file_exists($path . $dir_name)) {
return array(2, sprintf($lang_global['error_create_directories_name_used'], $dir_name), $path . $dir_name);
}
示例13: 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 12/30/2009 0:51
*/
if (!defined('NV_MAINFILE')) {
die('Stop!!!');
}
$js = $nv_Request->get_int('js', 'get', 0);
if ($js) {
nv_insert_logs(NV_LANG_DATA, 'login', '[' . $admin_info['username'] . '] ' . $lang_global['admin_logout_title'], ' Client IP:' . NV_CLIENT_IP, 0);
$nv_Request->unset_request('admin,online', 'session');
include NV_ROOTDIR . '/includes/header.php';
die('1');
}
$ok = $nv_Request->get_int('ok', 'get', 0);
if ($ok) {
nv_insert_logs(NV_LANG_DATA, 'login', '[' . $admin_info['username'] . '] ' . $lang_global['admin_logout_title'], ' Client IP:' . NV_CLIENT_IP, 0);
$nv_Request->unset_request('admin,online', 'session');
$info = $lang_global['admin_logout_ok'];
$info .= '<meta http-equiv="Refresh" content="5;URL=' . $global_config['site_url'] . '" />';
} else {
$url = $client_info['referer'] != '' ? $client_info['referer'] : (isset($_SERVER['SCRIPT_URI']) ? $_SERVER['SCRIPT_URI'] : '');
$info = $lang_global['admin_logout_question'] . " ?<br /><br />\n";
$info .= "<a href=\"" . NV_BASE_SITEURL . "index.php?second=admin_logout&ok=1\">" . $lang_global['ok'] . "</a> | \n";
$info .= "<a href=\"" . $url . "\">" . $lang_global['cancel'] . "</a>\n";
}
nv_info_die($global_config['site_description'], $lang_global['admin_logout_title'], $info);
示例14: nv_admin_read_lang
/**
* nv_admin_read_lang()
*
* @param mixed $dirlang
* @param mixed $idfile
* @return error read file
*/
function nv_admin_read_lang($dirlang, $module, $admin_file = 1)
{
global $db, $global_config, $include_lang, $lang_module;
$include_lang = "";
$modules_exit = nv_scandir(NV_ROOTDIR . "/modules", $global_config['check_module']);
if ($module == "global" and preg_match("/^block\\.global\\.([a-zA-Z0-9\\-\\_]+)\\.php\$/", $admin_file, $m)) {
$include_lang = NV_ROOTDIR . "/language/" . $dirlang . "/" . $admin_file;
$admin_file = 'block.global.' . $m[1];
} elseif (preg_match("/^block\\.(global|module)\\.([a-zA-Z0-9\\-\\_]+)\\_" . $dirlang . "\\.php\$/", $admin_file, $m)) {
$include_lang = NV_ROOTDIR . "/modules/" . $module . "/language/" . $admin_file;
$admin_file = 'block.' . $m[1] . '.' . $m[2];
} elseif ($module == "global" and $admin_file == 1) {
$include_lang = NV_ROOTDIR . "/language/" . $dirlang . "/admin_" . $module . ".php";
} elseif ($module == "global" and $admin_file == 0) {
$include_lang = NV_ROOTDIR . "/language/" . $dirlang . "/" . $module . ".php";
} elseif ($module == "install" and $admin_file == 0) {
$include_lang = NV_ROOTDIR . "/language/" . $dirlang . "/" . $module . ".php";
} elseif (in_array($module, $modules_exit) and $admin_file == 1) {
$include_lang = NV_ROOTDIR . "/modules/" . $module . "/language/admin_" . $dirlang . ".php";
} elseif (in_array($module, $modules_exit) and $admin_file == 0) {
$include_lang = NV_ROOTDIR . "/modules/" . $module . "/language/" . $dirlang . ".php";
} elseif (file_exists(NV_ROOTDIR . "/language/" . $dirlang . "/admin_" . $module . ".php")) {
$admin_file = 1;
$include_lang = NV_ROOTDIR . "/language/" . $dirlang . "/admin_" . $module . ".php";
}
if ($include_lang != "" and file_exists($include_lang)) {
$lang_module_temp = $lang_module;
$lang_module = array();
$lang_global = array();
$lang_block = array();
$lang_translator = array();
include $include_lang;
list($idfile, $langtype) = $db->sql_fetchrow($db->sql_query("SELECT idfile, langtype FROM `" . NV_LANGUAGE_GLOBALTABLE . "_file` WHERE `module` =" . $db->dbescape($module) . " AND `admin_file`=" . $db->dbescape($admin_file)));
if (intval($idfile) == 0) {
$langtype = isset($lang_translator['langtype']) ? strip_tags($lang_translator['langtype']) : "lang_module";
$lang_translator_save = array();
$lang_translator_save['author'] = isset($lang_translator['author']) ? strip_tags($lang_translator['author']) : "VINADES.,JSC (contact@vinades.vn)";
$lang_translator_save['createdate'] = isset($lang_translator['createdate']) ? strip_tags($lang_translator['createdate']) : date("d/m/Y, H:i");
$lang_translator_save['copyright'] = isset($lang_translator['copyright']) ? strip_tags($lang_translator['copyright']) : "Copyright (C) 2010 VINADES.,JSC. All rights reserved";
$lang_translator_save['info'] = isset($lang_translator['info']) ? strip_tags($lang_translator['info']) : "";
$lang_translator_save['langtype'] = $langtype;
//$author = base64_encode( serialize( $lang_translator_save ) );
$author = var_export($lang_translator_save, true);
$idfile = $db->sql_query_insert_id("INSERT INTO `" . NV_LANGUAGE_GLOBALTABLE . "_file` (`idfile`, `module`, `admin_file`, `langtype`, `author_" . $dirlang . "`) VALUES (NULL, " . $db->dbescape($module) . ", " . $db->dbescape($admin_file) . ", " . $db->dbescape($langtype) . ", '" . mysql_real_escape_string($author) . "')");
if (!$idfile) {
nv_info_die($lang_global['error_404_title'], $lang_global['error_404_title'], "Error insert file: " . $filelang);
}
} else {
$lang_translator_save = array();
$langtype = isset($lang_translator['langtype']) ? strip_tags($lang_translator['langtype']) : "lang_module";
$lang_translator_save['author'] = isset($lang_translator['author']) ? strip_tags($lang_translator['author']) : "VINADES.,JSC (contact@vinades.vn)";
$lang_translator_save['createdate'] = isset($lang_translator['createdate']) ? strip_tags($lang_translator['createdate']) : date("d/m/Y, H:i");
$lang_translator_save['copyright'] = isset($lang_translator['copyright']) ? strip_tags($lang_translator['copyright']) : "Copyright (C) 2010 VINADES.,JSC. All rights reserved";
$lang_translator_save['info'] = isset($lang_translator['info']) ? strip_tags($lang_translator['info']) : "";
$lang_translator_save['langtype'] = $langtype;
//$author = base64_encode( serialize( $lang_translator_save ) );
$author = var_export($lang_translator_save, true);
$sql = "UPDATE `" . NV_LANGUAGE_GLOBALTABLE . "_file` SET `author_" . $dirlang . "` = '" . mysql_real_escape_string($author) . "' WHERE `idfile` = '" . $idfile . "'";
$db->sql_query($sql);
}
$temp_lang = array();
switch ($langtype) {
case 'lang_global':
$temp_lang = $lang_global;
break;
case 'lang_module':
$temp_lang = $lang_module;
break;
case 'lang_block':
$temp_lang = $lang_block;
break;
}
$result = $db->sql_query("SHOW COLUMNS FROM `" . NV_LANGUAGE_GLOBALTABLE . "_file`");
$add_field = true;
$array_lang_key = array();
$array_lang_value = array();
while ($row = $db->sql_fetch_assoc($result)) {
if (substr($row['Field'], 0, 7) == "author_" and $row['Field'] != "author_" . $dirlang) {
$array_lang_key[] = str_replace("author_", "lang_", $row['Field']);
$array_lang_value[] = "";
}
}
$string_lang_key = implode("`, `", $array_lang_key);
$string_lang_value = "";
if ($string_lang_key != "") {
$string_lang_key = ", `" . $string_lang_key . "`";
$string_lang_value = implode("', '", $array_lang_value);
$string_lang_value = ", '" . $string_lang_value . "'";
}
$read_type = intval($global_config['read_type']);
while (list($lang_key, $lang_value) = each($temp_lang)) {
$check_type_update = false;
$lang_key = trim($lang_key);
//.........这里部分代码省略.........
示例15: 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-9-2010 14:43
*/
if (!defined('NV_IS_FILE_ADMIN')) {
die('Stop!!!');
}
$id = $nv_Request->get_int('id', 'get,post', 0);
$row = $db->query('SELECT * FROM ' . NV_PREFIXLANG . '_' . $module_data . ' where id=' . $id)->fetch();
if (!empty($row['id'])) {
$_url_rewrite = nv_url_rewrite(NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=' . $list_cats[$row['catid']]['alias'] . '/' . $row['alias'] . $global_config['rewrite_exturl'], true);
Header('Location: ' . $_url_rewrite);
die;
}
nv_info_die($lang_global['error_404_title'], $lang_global['error_404_title'], $lang_global['admin_no_allow_func']);