本文整理汇总了PHP中nv_redirect_encrypt函数的典型用法代码示例。如果您正苦于以下问题:PHP nv_redirect_encrypt函数的具体用法?PHP nv_redirect_encrypt怎么用?PHP nv_redirect_encrypt使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了nv_redirect_encrypt函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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 3-6-2010 0:14
*/
if (!defined('NV_IS_MOD_SHOPS')) {
die('Stop!!!');
}
if (!defined('NV_IS_USER')) {
$redirect = NV_BASE_SITEURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=cart";
Header("Location: " . NV_BASE_SITEURL . "index.php?" . NV_NAME_VARIABLE . "=users&" . NV_OP_VARIABLE . "=login&nv_redirect=" . nv_redirect_encrypt($redirect));
die;
}
$data_content = array();
$sql = "SELECT order_id, order_code, order_note, user_id, unit_total, order_total, order_time, transaction_status, transaction_id, transaction_count FROM " . $db_config['prefix'] . "_" . $module_data . "_orders WHERE user_id = " . $user_info["userid"] . " ORDER BY order_id DESC";
$result = $db->query($sql);
$link_module = NV_BASE_SITEURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&" . NV_NAME_VARIABLE . "=" . $module_name;
while (list($order_id, $order_code, $order_note, $user_id, $unit_total, $order_total, $order_time, $transaction_status, $transaction_id, $transaction_count) = $result->fetch(3)) {
$checkss = md5($order_id . $global_config['sitekey'] . session_id());
$data_content[] = array("order_id" => $order_id, "order_code" => $order_code, "transaction_status" => $transaction_status, "transaction_id" => $transaction_id, "transaction_count" => $transaction_count, "order_note" => $order_note, "user_id" => $user_id, "unit_total" => $unit_total, "order_total" => $order_total, "order_time" => $order_time, "link" => $link_module . "&" . NV_OP_VARIABLE . "=payment&order_id=" . $order_id . "&checkss=" . $checkss, "link_remove" => $link_module . "&" . NV_OP_VARIABLE . "=delhis&order_id=" . $order_id . "&checkss=" . $checkss);
}
$link_check_order = NV_BASE_SITEURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=checkorder&checkss=" . md5($user_info["userid"] . $global_config['sitekey'] . session_id());
$contents = call_user_func("history_order", $data_content, $link_check_order);
$page_title = $lang_module['history_title'];
include NV_ROOTDIR . '/includes/header.php';
echo nv_site_theme($contents);
include NV_ROOTDIR . '/includes/footer.php';
示例2: is_serialized_string
$cookies = $array['cookies'];
$array = !empty($array['body']) ? is_serialized_string($array['body']) ? unserialize($array['body']) : array() : array();
$error = '';
if (!empty(NukeViet\Http\Http::$error)) {
$error = nv_http_get_lang(NukeViet\Http\Http::$error);
} elseif (empty($array['status']) or !isset($array['error']) or !isset($array['data']) or !isset($array['pagination']) or !is_array($array['error']) or !is_array($array['data']) or !is_array($array['pagination']) or !empty($array['error']) and (!isset($array['error']['level']) or empty($array['error']['message']))) {
$error = $lang_global['error_valid_response'];
} elseif (!empty($array['error']['message'])) {
$error = $array['error']['message'];
}
// Show error
if (!empty($error)) {
$xtpl->assign('ERROR', $error);
$xtpl->parse('main.error');
} elseif ($array['status'] == 'notlogin') {
$xtpl->assign('LOGIN_NOTE', sprintf($lang_module['login_require'], NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=login&redirect=' . nv_redirect_encrypt($client_info['selfurl'])));
$xtpl->parse('main.login');
} elseif (empty($array['data'])) {
$xtpl->parse('main.empty');
} else {
// Save cookies
nv_store_cookies(nv_object2array($cookies), $stored_cookies);
foreach ($array['data'] as $row) {
$row['rating_avg'] = ceil($row['rating_avg']);
$row['type'] = $lang_module['types_' . intval($row['tid'])];
$row['compatible_class'] = empty($row['compatible']) ? 'text-danger' : 'text-success';
$row['compatible_title'] = empty($row['compatible']) ? $lang_module['incompatible'] : $lang_module['compatible'];
if (empty($row['image_small'])) {
$row['image_small'] = NV_BASE_SITEURL . 'themes/default/images/no_image.gif';
}
$row['install_link'] = NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=install&id=' . $row['id'];
示例3: nv_redirect_encrypt
if ($array_post_config[$group_id_i]['delcontent']) {
$array_post_user['delcontent'] = 1;
}
}
}
}
if ($array_post_user['postcontent']) {
$array_post_user['addcontent'] = 1;
}
// check user post content
$base_url = NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=' . $op;
if (!$array_post_user['addcontent']) {
if (defined('NV_IS_USER')) {
$array_temp['urlrefresh'] = NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA;
} else {
$array_temp['urlrefresh'] = NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=users&' . NV_OP_VARIABLE . '=login&nv_redirect=' . nv_redirect_encrypt($client_info['selfurl']);
}
$array_temp['content'] = $lang_module['error_addcontent'];
$template = $module_info['template'];
if (!file_exists(NV_ROOTDIR . '/themes/' . $module_info['template'] . '/modules/' . $module_file . '/content.tpl')) {
$template = 'default';
}
$array_temp['urlrefresh'] = nv_url_rewrite($array_temp['urlrefresh'], true);
$xtpl = new XTemplate('content.tpl', NV_ROOTDIR . '/themes/' . $template . '/modules/' . $module_file);
$xtpl->assign('DATA', $array_temp);
$xtpl->parse('mainrefresh');
$contents = $xtpl->text('mainrefresh');
include NV_ROOTDIR . '/includes/header.php';
echo nv_site_theme($contents);
include NV_ROOTDIR . '/includes/footer.php';
}
示例4: XTemplate
if (file_exists(NV_ROOTDIR . '/themes/' . $selectthemes . '/config.ini')) {
$page_title = $lang_module['blocks'] . ':' . $selectthemes;
$xtpl = new XTemplate('blocks.tpl', NV_ROOTDIR . '/themes/' . $global_config['module_theme'] . '/modules/' . $module_file);
$xtpl->assign('LANG', $lang_module);
$xtpl->assign('GLANG', $lang_global);
$xtpl->assign('MODULE_NAME', $module_name);
$xtpl->assign('NV_BASE_SITEURL', NV_BASE_SITEURL);
$xtpl->assign('NV_BASE_ADMINURL', NV_BASE_ADMINURL);
$xtpl->assign('NV_NAME_VARIABLE', NV_NAME_VARIABLE);
$xtpl->assign('NV_OP_VARIABLE', NV_OP_VARIABLE);
$xtpl->assign('SELECTTHEMES', $selectthemes);
$new_drag_block = $nv_Request->get_int('drag_block', 'session', 0) ? 0 : 1;
$lang_drag_block = $new_drag_block ? $lang_global['drag_block'] : $lang_global['no_drag_block'];
$url_dblock = NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&drag_block=' . $new_drag_block;
if (empty($new_drag_block)) {
$url_dblock .= '&nv_redirect=' . nv_redirect_encrypt(NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=blocks&selectthemes=' . $selectthemes);
}
$xtpl->assign('URL_DBLOCK', $url_dblock);
$xtpl->assign('LANG_DBLOCK', $lang_drag_block);
$result = $db->query('SELECT title, custom_title FROM ' . NV_MODULES_TABLE . ' ORDER BY weight ASC');
while (list($m_title, $m_custom_title) = $result->fetch(3)) {
$xtpl->assign('MODULE', array('key' => $m_title, 'title' => $m_custom_title));
$xtpl->parse('main.module');
}
$a = 0;
//load position file
$xml = simplexml_load_file(NV_ROOTDIR . '/themes/' . $selectthemes . '/config.ini');
$content = $xml->xpath('positions');
$positions = $content[0]->position;
$blocks_positions = array();
$sth = $db->prepare('SELECT position, COUNT(*) FROM ' . NV_BLOCKS_TABLE . '_groups WHERE theme = :theme GROUP BY position');
示例5: die
* @Copyright (C) 2014 VINADES., JSC. All rights reserved
* @License GNU/GPL version 2 or any later version
* @Createdate 3-6-2010 0:14
*/
if (!defined('NV_IS_MOD_SHOPS')) {
die('Stop!!!');
}
$page_title = $module_info['custom_title'];
$key_words = $module_info['keywords'];
if (!$pro_config['point_active']) {
Header('Location: ' . nv_url_rewrite(NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name, true));
die;
}
if (!defined('NV_IS_USER')) {
$redirect = NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=point';
Header('Location: ' . NV_BASE_SITEURL . 'index.php?' . NV_NAME_VARIABLE . '=users&' . NV_OP_VARIABLE . '=login&nv_redirect=' . nv_redirect_encrypt($redirect));
die;
}
$data_content = array();
$point = 0;
$per_page = 20;
$page = $nv_Request->get_int('page', 'get', 1);
$base_url = NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=' . $op;
// Lay so diem hien tai cua khach hang
$result = $db->query('SELECT point_total FROM ' . $db_config['prefix'] . '_' . $module_data . '_point WHERE userid = ' . $user_info['userid']);
if ($result->rowCount() > 0) {
$point = $result->fetchColumn();
$money = $point * $pro_config['point_conversion'];
}
if ($nv_Request->isset_request('paypoint', 'get')) {
$order_id = $nv_Request->get_int('order_id', 'get', 0);
示例6: nv_block_login
/**
* nv_block_login()
*
* @param mixed $block_config
* @return void
*/
function nv_block_login($block_config)
{
global $client_info, $global_config, $module_name, $user_info, $lang_global, $my_head, $admin_info, $blockID, $db, $module_info, $site_mods, $db_config;
$content = '';
if ($global_config['allowuserlogin']) {
if (file_exists(NV_ROOTDIR . '/themes/' . $global_config['module_theme'] . '/modules/users/block.login.tpl')) {
$block_theme = $global_config['module_theme'];
} elseif (file_exists(NV_ROOTDIR . '/themes/' . $global_config['site_theme'] . '/modules/users/block.login.tpl')) {
$block_theme = $global_config['site_theme'];
} else {
$block_theme = 'default';
}
$xtpl = new XTemplate('block.login.tpl', NV_ROOTDIR . '/themes/' . $block_theme . '/modules/users');
if (file_exists(NV_ROOTDIR . '/modules/users/language/' . NV_LANG_DATA . '.php')) {
include NV_ROOTDIR . '/modules/users/language/' . NV_LANG_DATA . '.php';
} else {
include NV_ROOTDIR . '/modules/users/language/vi.php';
}
$xtpl->assign('LANG', $lang_module);
$xtpl->assign('GLANG', $lang_global);
$xtpl->assign('BLOCKID', $blockID);
if (defined('NV_IS_USER')) {
if (file_exists(NV_ROOTDIR . '/' . $user_info['photo']) and !empty($user_info['photo'])) {
$avata = NV_BASE_SITEURL . $user_info['photo'];
} else {
$avata = NV_BASE_SITEURL . 'themes/' . $block_theme . '/images/users/no_avatar.png';
}
$user_info['current_login_txt'] = nv_date('d/m, H:i', $user_info['current_login']);
$xtpl->assign('NV_BASE_SITEURL', NV_BASE_SITEURL);
$xtpl->assign('NV_LANG_VARIABLE', NV_LANG_VARIABLE);
$xtpl->assign('NV_LANG_DATA', NV_LANG_DATA);
$xtpl->assign('URL_LOGOUT', defined('NV_IS_ADMIN') ? 'nv_admin_logout' : 'bt_logout');
$xtpl->assign('MODULENAME', $module_info['custom_title']);
$xtpl->assign('AVATA', $avata);
$xtpl->assign('USER', $user_info);
$xtpl->assign('WELCOME', defined('NV_IS_ADMIN') ? $lang_global['admin_account'] : $lang_global['your_account']);
$xtpl->assign('LEVEL', defined('NV_IS_ADMIN') ? $admin_info['level'] : 'user');
$xtpl->assign('URL_MODULE', NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=users');
$xtpl->assign('URL_AVATAR', nv_url_rewrite(NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=users&' . NV_OP_VARIABLE . '=avatar/upd', true));
$xtpl->assign('URL_HREF', NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=users&' . NV_OP_VARIABLE . '=');
if (defined('NV_OPENID_ALLOWED')) {
$xtpl->parse('signed.allowopenid');
}
if (defined('NV_IS_ADMIN')) {
$new_drag_block = defined('NV_IS_DRAG_BLOCK') ? 0 : 1;
$lang_drag_block = $new_drag_block ? $lang_global['drag_block'] : $lang_global['no_drag_block'];
$xtpl->assign('NV_ADMINDIR', NV_ADMINDIR);
$xtpl->assign('URL_DBLOCK', NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&drag_block=' . $new_drag_block);
$xtpl->assign('LANG_DBLOCK', $lang_drag_block);
$xtpl->assign('URL_ADMINMODULE', NV_BASE_SITEURL . NV_ADMINDIR . '/index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name);
$xtpl->assign('URL_AUTHOR', NV_BASE_SITEURL . NV_ADMINDIR . '/index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=authors&id=' . $admin_info['admin_id']);
if (defined('NV_IS_SPADMIN')) {
$xtpl->parse('signed.admintoolbar.is_spadadmin');
}
if (defined('NV_IS_MODADMIN') and !empty($module_info['admin_file'])) {
$xtpl->parse('signed.admintoolbar.is_modadmin');
}
$xtpl->parse('signed.admintoolbar');
}
$xtpl->parse('signed');
$content = $xtpl->text('signed');
} else {
$xtpl->assign('USER_LOGIN', NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=users&' . NV_OP_VARIABLE . '=login');
$xtpl->assign('USER_REGISTER', NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=users&' . NV_OP_VARIABLE . '=register');
$xtpl->assign('USER_LOSTPASS', NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=users&' . NV_OP_VARIABLE . '=lostpass');
$xtpl->assign('NICK_MAXLENGTH', NV_UNICKMAX);
$xtpl->assign('NICK_MINLENGTH', NV_UNICKMIN);
$xtpl->assign('PASS_MAXLENGTH', NV_UPASSMAX);
$xtpl->assign('PASS_MINLENGTH', NV_UPASSMIN);
$xtpl->assign('GFX_WIDTH', NV_GFX_WIDTH);
$xtpl->assign('GFX_HEIGHT', NV_GFX_HEIGHT);
$xtpl->assign('GFX_MAXLENGTH', NV_GFX_NUM);
$xtpl->assign('N_CAPTCHA', $lang_global['securitycode']);
$xtpl->assign('CAPTCHA_REFRESH', $lang_global['captcharefresh']);
$xtpl->assign('SRC_CAPTCHA', NV_BASE_SITEURL . 'index.php?scaptcha=captcha&t=' . NV_CURRENTTIME);
$xtpl->assign('NV_HEADER', '');
$xtpl->assign('NV_REDIRECT', '');
$username_rule = empty($global_config['nv_unick_type']) ? sprintf($lang_global['username_rule_nolimit'], NV_UNICKMIN, NV_UNICKMAX) : sprintf($lang_global['username_rule_limit'], $lang_global['unick_type_' . $global_config['nv_unick_type']], NV_UNICKMIN, NV_UNICKMAX);
$password_rule = empty($global_config['nv_upass_type']) ? sprintf($lang_global['password_rule_nolimit'], NV_UPASSMIN, NV_UPASSMAX) : sprintf($lang_global['password_rule_limit'], $lang_global['upass_type_' . $global_config['nv_upass_type']], NV_UPASSMIN, NV_UPASSMAX);
$display_layout = empty($block_config['display_mode']) ? 'display_form' : 'display_button';
$xtpl->assign('USERNAME_RULE', $username_rule);
$xtpl->assign('PASSWORD_RULE', $password_rule);
if (in_array($global_config['gfx_chk'], array(2, 4, 5, 7))) {
$xtpl->parse('main.' . $display_layout . '.captcha');
}
if (in_array($global_config['gfx_chk'], array(3, 4, 6, 7))) {
$xtpl->parse('main.allowuserreg.reg_captcha');
}
if (defined('NV_OPENID_ALLOWED')) {
foreach ($global_config['openid_servers'] as $server) {
$assigns = array();
$assigns['href'] = NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=users&' . NV_OP_VARIABLE . '=oauth&server=' . $server . '&nv_redirect=' . nv_redirect_encrypt($client_info['selfurl']);
$assigns['title'] = $lang_global['openid_login'] . ' ' . ucfirst($server);
$assigns['img_src'] = NV_BASE_SITEURL . 'themes/' . $block_theme . '/images/users/' . $server . '.png';
//.........这里部分代码省略.........
示例7: nv_download_content
/**
* nv_download_content
*
* @param mixed $data_content
* @param mixed $linktab
* @return
*/
function nv_download_content($data_content)
{
global $module_info, $lang_module, $lang_global, $module_name, $module_data, $module_file, $pro_config, $op;
$xtpl = new XTemplate('download_content.tpl', NV_ROOTDIR . '/themes/' . $module_info['template'] . '/modules/' . $module_file);
$xtpl->assign('LANG', $lang_module);
$xtpl->assign('proid', $data_content['id']);
if (!empty($data_content['files'])) {
$login = 0;
foreach ($data_content['files'] as $files) {
if (file_exists(NV_ROOTDIR . '/themes/' . $module_info['template'] . '/images/' . $module_file . '/icon_files/' . $files['extension'] . '.png')) {
$files['extension_icon'] = NV_BASE_SITEURL . 'themes/' . $module_info['template'] . '/images/' . $module_file . '/icon_files/' . $files['extension'] . '.png';
} else {
$files['extension_icon'] = NV_BASE_SITEURL . 'themes/' . $module_info['template'] . '/images/' . $module_file . '/icon_files/document.png';
}
$xtpl->assign('FILES', $files);
if ($files['download_groups'] == '-1') {
$files['download_groups'] = $pro_config['download_groups'];
}
if (!nv_user_in_groups($files['download_groups'])) {
$xtpl->assign('NOTE', $lang_module['download_file_no']);
$xtpl->parse('main.files_content.loop.disabled');
} else {
$xtpl->assign('NOTE', $lang_module['download_file']);
}
$xtpl->parse('main.files_content.loop');
}
if ($login > 0) {
$link_login = NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=users&' . NV_OP_VARIABLE . '=login&nv_redirect=' . nv_redirect_encrypt($client_info['selfurl'] . '#' . $linktab);
$xtpl->assign('DOWNLOAD_LOGIN', '<a title="' . $lang_global['loginsubmit'] . '" href="' . $link_login . '">' . $lang_module['download_login'] . '</a>');
$xtpl->parse('main.form_login');
}
$xtpl->parse('main.files_content');
$xtpl->parse('main');
return $xtpl->text('main');
}
}
示例8: nv_admin_menu
/**
* nv_admin_menu()
*
* @return
*/
function nv_admin_menu()
{
global $lang_global, $admin_info, $module_info, $module_name, $global_config, $client_info;
if ($module_info['theme'] == $module_info['template'] and file_exists(NV_ROOTDIR . '/themes/' . $module_info['template'] . '/system/admin_toolbar.tpl')) {
$block_theme = $module_info['template'];
} elseif (file_exists(NV_ROOTDIR . '/themes/' . $global_config['site_theme'] . '/system/admin_toolbar.tpl')) {
$block_theme = $global_config['site_theme'];
} else {
$block_theme = 'default';
}
$xtpl = new XTemplate('admin_toolbar.tpl', NV_ROOTDIR . '/themes/' . $block_theme . '/system');
$xtpl->assign('GLANG', $lang_global);
$xtpl->assign('NV_ADMINDIR', NV_BASE_SITEURL . NV_ADMINDIR . '/index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA);
$xtpl->assign('URL_AUTHOR', NV_BASE_SITEURL . NV_ADMINDIR . '/index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=authors&id=' . $admin_info['admin_id']);
if (defined('NV_IS_SPADMIN')) {
$new_drag_block = defined('NV_IS_DRAG_BLOCK') ? 0 : 1;
$lang_drag_block = $new_drag_block ? $lang_global['drag_block'] : $lang_global['no_drag_block'];
$xtpl->assign('URL_DBLOCK', NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&drag_block=' . $new_drag_block . '&nv_redirect=' . nv_redirect_encrypt($client_info['selfurl']));
$xtpl->assign('LANG_DBLOCK', $lang_drag_block);
$xtpl->parse('main.is_spadmin');
}
if (defined('NV_IS_MODADMIN') and !empty($module_info['admin_file'])) {
$xtpl->assign('URL_MODULE', NV_BASE_SITEURL . NV_ADMINDIR . '/index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name);
$xtpl->assign('MODULENAME', $module_info['custom_title']);
$xtpl->parse('main.is_modadmin');
}
$xtpl->parse('main');
return $xtpl->text('main');
}
示例9: md5
$xtpl->assign('CHECKSS', md5($client_info['session_id'] . $global_config['sitekey']));
$xtpl->assign('N_CAPTCHA', $lang_global['securitycode']);
$xtpl->assign('CAPTCHA_REFRESH', $lang_global['captcharefresh']);
$xtpl->assign('SRC_CAPTCHA', NV_BASE_SITEURL . 'index.php?scaptcha=captcha&t=' . NV_CURRENTTIME);
$xtpl->assign('NV_HEADER', '');
$xtpl->assign('NV_REDIRECT', '');
if (in_array($global_config['gfx_chk'], array(2, 4, 5, 7))) {
$xtpl->parse('main.captcha');
}
if (in_array($global_config['gfx_chk'], array(3, 4, 6, 7))) {
$xtpl->parse('main.allowuserreg.reg_captcha');
}
if (defined('NV_OPENID_ALLOWED')) {
foreach ($global_config['openid_servers'] as $server) {
$assigns = array();
$assigns['href'] = NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=users&' . NV_OP_VARIABLE . '=oauth&server=' . $server . '&nv_redirect=' . nv_redirect_encrypt($client_info['selfurl']);
$assigns['title'] = $lang_global['openid_login'] . " " . ucfirst($server);
$assigns['img_src'] = NV_BASE_SITEURL . 'themes/' . $block_theme . '/images/users/' . $server . '.png';
$assigns['img_width'] = $assigns['img_height'] = 24;
$xtpl->assign('OPENID', $assigns);
$xtpl->parse('main.openid.server');
}
$xtpl->parse('main.openid');
}
if ($global_config['allowuserreg']) {
$data_questions = array();
$sql = "SELECT qid, title FROM " . NV_USERS_GLOBALTABLE . "_question WHERE lang='" . NV_LANG_DATA . "' ORDER BY weight ASC";
$result = $db->query($sql);
while ($row = $result->fetch()) {
$data_questions[$row['qid']] = array('qid' => $row['qid'], 'title' => $row['title']);
}
示例10: nv_create_submenu
if (!defined('NV_IS_AJAX')) {
nv_create_submenu();
}
// Ket noi voi cac op cua module de thuc hien
if ($is_mobile and file_exists(NV_ROOTDIR . '/modules/' . $module_file . '/mobile/' . $op_file . '.php')) {
require NV_ROOTDIR . '/modules/' . $module_file . '/mobile/' . $op_file . '.php';
} else {
require NV_ROOTDIR . '/modules/' . $module_file . '/funcs/' . $op_file . '.php';
}
exit;
} elseif (isset($module_info['funcs']['main'])) {
$sth = $db->prepare('UPDATE ' . NV_MODULES_TABLE . ' SET act=2 WHERE title= :title');
$sth->bindParam(':title', $module_name, PDO::PARAM_STR);
$sth->execute();
nv_insert_notification('modules', 'auto_deactive_module', array('custom_title' => $site_mods[$module_name]['custom_title']));
$nv_Cache->delMod('modules');
}
} elseif (isset($sys_mods[$module_name])) {
$groups_view = (string) $sys_mods[$module_name]['groups_view'];
if (!defined('NV_IS_USER') and $groups_view == '4') {
Header('Location: ' . nv_url_rewrite(NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=users&' . NV_OP_VARIABLE . '=login&nv_redirect=' . nv_redirect_encrypt($client_info['selfurl']), true));
die;
} elseif (!defined('NV_IS_ADMIN') and ($groups_view == '2' or $groups_view == '1')) {
// Exit
nv_info_die($lang_global['error_404_title'], $lang_global['site_info'], $lang_global['module_for_admin'], 404);
} elseif (defined('NV_IS_USER') and !nv_user_in_groups($groups_view)) {
nv_info_die($lang_global['error_404_title'], $lang_global['error_404_title'], $lang_global['error_404_content'], 404);
}
}
}
nv_info_die($lang_global['error_404_title'], $lang_global['error_404_title'], $lang_global['error_404_content'], 404);
示例11: md5
echo $xtpl->text('error');
}
$array = $array['data'];
// Ok co the download
if ($array['fileInfo'] === 'ready') {
$array['icon'] = 'fa-check';
$array['message'] = $lang_module['extUpdCheckSuccess'];
$array['class'] = 'success';
$xtpl->assign('LINK', NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=update&eid=' . $eid . '&fid=' . $fid . '&checksess=' . md5('download' . $eid . $fid . $global_config['sitekey'] . session_id()));
$xtpl->parse('check.ready');
} elseif ($array['fileInfo'] == 'notlogin') {
$array['icon'] = 'fa-frown-o';
$array['message'] = $lang_module['extUpdNotLogin'];
$array['class'] = 'warning';
$redirect = NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=update&eid=' . $eid . '&fid=' . $fid . '&checksess=' . md5($eid . $fid . $global_config['sitekey'] . session_id());
$xtpl->assign('MESSAGE', sprintf($lang_module['extUpdLoginRequire'], NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=login&redirect=' . nv_redirect_encrypt($redirect)));
$xtpl->parse('check.message');
} elseif ($array['fileInfo'] == 'unpaid') {
$array['icon'] = 'fa-frown-o';
$array['message'] = $lang_module['extUpdUnpaid'];
$array['class'] = 'warning';
$xtpl->assign('MESSAGE', sprintf($lang_module['extUpdPaidRequire'], $array['link'] . '#tabs-1'));
$xtpl->parse('check.message');
} else {
$array['icon'] = 'fa-frown-o';
$array['message'] = $lang_module['extUpdInvalid'];
$array['class'] = 'danger';
$xtpl->assign('MESSAGE', $lang_module['extUpdInvalidNote']);
$xtpl->parse('check.message');
}
$xtpl->assign('DATA', $array);
示例12: nv_site_theme
//.........这里部分代码省略.........
$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=');
// 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 ($global_config['switch_mobi_des']) {
foreach ($global_config['array_theme_type'] as $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_redirect_encrypt($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.other');
}
$xtpl->parse('main.theme_type.loop');
}
$xtpl->parse('main.theme_type');
}
}
if (!$drag_block) {
$xtpl->parse('main.no_drag_block');
}
$xtpl->parse('main');
$sitecontent = $xtpl->text('main');
// Only full theme
if ($full) {
$sitecontent = nv_blocks_content($sitecontent);
$sitecontent = str_replace('[THEME_ERROR_INFO]', nv_error_info(), $sitecontent);
if (defined('NV_IS_ADMIN')) {
$my_footer .= $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);
}
if (defined('NV_IS_ADMIN') && $full) {
$sitecontent = preg_replace('/(<\\/body>)/i', PHP_EOL . nv_admin_menu() . PHP_EOL . '\\1', $sitecontent, 1);
}
return $sitecontent;
}
示例13: elseif
$catid_i = $listcatid;
}
// Xac dinh anh nho
if ($homeimgthumb == 1) {
$thumb = NV_BASE_SITEURL . NV_FILES_DIR . '/' . $module_upload . '/' . $homeimgfile;
$imghome = NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_upload . '/' . $homeimgfile;
} elseif ($homeimgthumb == 2) {
$imghome = $thumb = NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_upload . '/' . $homeimgfile;
} elseif ($homeimgthumb == 3) {
$imghome = $thumb = $homeimgfile;
} elseif (file_exists(NV_ROOTDIR . '/themes/' . $theme . '/images/' . $module_file . '/no-image.jpg')) {
$imghome = $thumb = NV_BASE_SITEURL . 'themes/' . $theme . '/images/' . $module_file . '/no-image.jpg';
} else {
$imghome = $thumb = NV_BASE_SITEURL . 'themes/default/images/' . $module_file . '/no-image.jpg';
}
$xtpl->assign('ROW', array('id' => $id, 'link' => NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=' . $global_array_shops_cat[$catid_i]['alias'] . '/' . $alias . $global_config['rewrite_exturl'], 'link_seller' => NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=seller&pro_id=' . $id . '&nv_redirect=' . nv_redirect_encrypt($base_url), 'link_copy' => NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=content&copy&id=' . $id, 'link_warehouse' => NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=warehouse&listid=' . $id . '&checkss=' . md5($global_config['sitekey'] . session_id()), 'title' => $title, 'publtime' => $publtime, 'edittime' => $edittime, 'hitstotal' => $hitstotal, 'num_sell' => $num_sell, 'product_unit' => isset($array_unit[$product_unit]) ? $array_unit[$product_unit][NV_LANG_DATA . '_title'] : '', 'status' => $lang_module['status_' . $status], 'admin_id' => !empty($username) ? $username : '', 'product_number' => $product_number, 'product_price' => nv_number_format($product_price, nv_get_decimals($money_unit)), 'money_unit' => $money_unit, 'thumb' => $thumb, 'imghome' => $imghome, 'imghome_info' => nv_is_image(NV_ROOTDIR . '/' . $imghome), 'link_edit' => nv_link_edit_page($id), 'link_delete' => nv_link_delete_page($id)));
if ($num_sell > 0) {
$xtpl->parse('main.loop.seller');
} else {
$xtpl->parse('main.loop.seller_empty');
}
// Hien thi nhap kho
if ($pro_config['active_warehouse']) {
$xtpl->parse('main.loop.warehouse_icon');
}
$xtpl->parse('main.loop');
++$a;
}
$array_list_action = array('delete' => $lang_global['delete'], 'publtime' => $lang_module['publtime'], 'exptime' => $lang_module['exptime'], 'addtoblock' => $lang_module['addtoblock']);
if ($pro_config['active_warehouse']) {
$array_list_action['warehouse'] = $lang_module['warehouse'];
示例14: sprintf
$page_title = sprintf($lang_module['seller_list'], $pro_info['title']);
$db->sqlreset()->select('COUNT(*)')->from($db_config['prefix'] . '_' . $module_data . '_orders_id t1')->join(' INNER JOIN ' . $db_config['prefix'] . '_' . $module_data . '_orders t2 ON t1.order_id = t2.order_id')->where('t1.proid = ' . $pro_id);
$num_items = $db->query($db->sql())->fetchColumn();
if (!$num_items) {
Header('Location: ' . NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=items');
exit;
}
$xtpl = new XTemplate('seller.tpl', NV_ROOTDIR . '/themes/' . $global_config['module_theme'] . '/modules/' . $module_file);
$xtpl->assign('LANG', $lang_module);
$xtpl->assign('GLANG', $lang_global);
$xtpl->assign('NV_BASE_ADMINURL', NV_BASE_ADMINURL);
$xtpl->assign('NV_NAME_VARIABLE', NV_NAME_VARIABLE);
$xtpl->assign('NV_OP_VARIABLE', NV_OP_VARIABLE);
$xtpl->assign('MODULE_NAME', $module_name);
$xtpl->assign('OP', $op);
$xtpl->assign('C_LIST', nv_redirect_encrypt($nv_redirect));
$db->select('t2.order_name, t2.order_email, t2.order_phone, t2.order_address, t2.unit_total, t2.order_time, t1.num, t1.price')->order('t1.order_id DESC')->limit($per_page)->offset(($page - 1) * $per_page);
$sth = $db->prepare($db->sql());
$sth->execute();
$i = $page == 1 ? 0 : $page;
$array_total = array('price' => 0, 'num' => 0, 'pro_unit' => $pro_config['money_unit'], 'product_unit' => $pro_info['product_unit']);
while (list($order_name, $order_email, $order_phone, $order_address, $unit_total, $order_time, $num, $price) = $sth->fetch(3)) {
$i++;
$price = $price * $num;
$array_total['price'] += $price;
$array_total['num'] += $num;
$xtpl->assign('ROW', array('no' => $i, 'order_name' => $order_name, 'order_email' => $order_email, 'order_phone' => $order_phone, 'order_address' => $order_address, 'num' => $num, 'price' => nv_number_format($price, nv_get_decimals($unit_total)), 'price_unit' => $unit_total, 'order_time' => nv_date('H:i d/m/Y', $order_time)));
$xtpl->parse('main.loop');
}
$generate_page = nv_generate_page($base_url, $num_items, $per_page, $page);
if (!empty($generate_page)) {
示例15: nv_info_theme
$parameters = $response->getParameters();
$httpheaders = $response->getHttpHeaders();
// Báo lỗi ở đây, không trả về trình duyệt, chưa thấy trường nào nào cần thiết phải trả về trình duyệt ở đây
//if( ! isset( $httpheaders['Location'] ) and ! isset( $httpheaders['location'] ) )
//{
$contents = nv_info_theme(oauth2_getlang($parameters['error_description'], $parameters['error_description']), 'javascript:void(0);', $type = 'error');
include NV_ROOTDIR . '/includes/header.php';
echo nv_site_theme($contents, false);
include NV_ROOTDIR . '/includes/footer.php';
//}
$response->send();
die;
}
// Thành viên đăng nhập
if (!defined('NV_IS_USER')) {
header('Location:' . NV_BASE_SITEURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&" . NV_NAME_VARIABLE . "=users&" . NV_OP_VARIABLE . "=login/simple&nv_redirect=" . nv_redirect_encrypt($client_info['selfurl']) . '&nv_header=' . md5($client_info['session_id'] . $global_config['sitekey']));
die;
}
// Chỗ này cần xác định SCOPES nữa, sẽ phát triển ở phiên bản kế tiếp
// Lấy client data
$client_id = $request->query('client_id', $request->request('client_id'));
$client_data = $storage->getClientDetails($client_id);
// Truy vấn vào CSDL xem đã có authorization code còn hạn không, nếu có trả về nếu không có phải hỏi thành viên có đồng ý không
$sql = 'SELECT * FROM ' . $dbtable_config['code_table'] . ' WHERE client_id = :client_id AND user_id = :user_id';
$sth = $db->prepare($sql);
$sth->bindParam(':client_id', $client_id, PDO::PARAM_STR);
$sth->bindParam(':user_id', $user_info['userid'], PDO::PARAM_STR);
$sth->execute();
$authorization = $sth->fetch();
if (!empty($authorization)) {
$authorization['expires'] = strtotime($authorization['expires']);