$site_banner = $nv_Request->get_title('site_banner', 'post'); if (empty($site_banner)) { $array_config['site_banner'] = ''; } elseif (!nv_is_url($site_banner)) { if (nv_is_file($site_banner) === true) { $lu = strlen(NV_BASE_SITEURL); $array_config['site_banner'] = substr($site_banner, $lu); } else { $array_config['site_banner'] = ''; } } $site_favicon = $nv_Request->get_title('site_favicon', 'post'); if (empty($site_favicon) or $site_favicon == NV_ASSETS_DIR . '/favicon.ico') { $array_config['site_favicon'] = ''; } elseif (!nv_is_url($site_favicon)) { if (nv_is_file($site_favicon) === true) { $lu = strlen(NV_BASE_SITEURL); $array_config['site_favicon'] = substr($site_favicon, $lu); } else { $array_config['site_favicon'] = ''; } } $array_config['site_home_module'] = nv_substr($nv_Request->get_title('site_home_module', 'post', '', 1), 0, 255); if (!isset($site_mods[$array_config['site_home_module']])) { $array_config['site_home_module'] = $global_config['site_home_module']; } $array_config['site_description'] = nv_substr($nv_Request->get_title('site_description', 'post', '', 1), 0, 255); $array_config['disable_site_content'] = $nv_Request->get_editor('disable_site_content', '', NV_ALLOWED_HTML_TAGS); if (empty($array_config['disable_site_content'])) { $array_config['disable_site_content'] = $lang_global['disable_site_content']; }
} if ($pro_config['active_gift']) { $xtpl->parse('main.gift'); } if ($rowcontent['id'] > 0 and !$is_copy) { $op = 'items'; } if (empty($rowcontent['alias'])) { $xtpl->parse('main.getalias'); } if (!$pro_config['active_warehouse']) { if ($rowcontent['id'] > 0) { $xtpl->parse('main.warehouse.edit'); } else { $xtpl->parse('main.warehouse.add'); } $xtpl->parse('main.warehouse'); } // Custom fiels if ($pro_config['template_active'] and $rowcontent['listcatid'] and !empty($global_array_shops_cat[$rowcontent['listcatid']]['form'])) { $form = $global_array_shops_cat[$rowcontent['listcatid']]['form']; if (nv_is_file(NV_BASE_SITEURL . NV_ASSETS_DIR . '/' . $module_name . '/files_tpl/cat_form_' . $form . '.tpl', NV_ASSETS_DIR . '/' . $module_name)) { $datacustom_form = nv_show_custom_form($rowcontent['id'], $form, $custom); $xtpl->assign('DATACUSTOM_FORM', $datacustom_form); } } $xtpl->parse('main'); $contents = $xtpl->text('main'); include NV_ROOTDIR . '/includes/header.php'; echo nv_admin_theme($contents); include NV_ROOTDIR . '/includes/footer.php';
* @Author VINADES.,JSC (contact@vinades.vn) * @Copyright (C) 2014 VINADES.,JSC. All rights reserved * @License GNU/GPL version 2 or any later version * @Createdate 2-2-2010 12:55 */ if (!defined('NV_IS_FILE_ADMIN')) { die('Stop!!!'); } $path = nv_check_path_upload($nv_Request->get_string('path', 'post')); $check_allow_upload_dir = nv_check_allow_upload_dir($path); if (!isset($check_allow_upload_dir['rename_file'])) { die('ERROR_' . $lang_module['notlevel']); } $file = htmlspecialchars(trim($nv_Request->get_string('file', 'post')), ENT_QUOTES); $file = basename($file); if (empty($file) or !nv_is_file(NV_BASE_SITEURL . $path . '/' . $file, $path)) { die('ERROR_' . $lang_module['errorNotSelectFile']); } $newname = htmlspecialchars(trim($nv_Request->get_string('newname', 'post')), ENT_QUOTES); $newname = nv_string_to_filename(basename($newname)); if (empty($newname)) { die('ERROR_' . $lang_module['rename_noname']); } $newalt = $nv_Request->get_title('newalt', 'post', $newname, 1); $ext = nv_getextension($file); $newname = $newname . '.' . $ext; if ($file != $newname) { $newname2 = $newname; $i = 1; while (file_exists(NV_ROOTDIR . '/' . $path . '/' . $newname2)) { $newname2 = preg_replace('/(.*)(\\.[a-zA-Z0-9]+)$/', '\\1_' . $i . '\\2', $newname);
$data_insert['last_name'] = $_user['last_name']; $data_insert['gender'] = $_user['gender']; $data_insert['sig'] = $_user['sig']; $data_insert['question'] = $_user['question']; $data_insert['answer'] = $_user['answer']; $userid = $db->insert_id($sql, 'userid', $data_insert); if (!$userid) { die(json_encode(array('status' => 'error', 'input' => '', 'mess' => $lang_module['edit_add_error']))); } $query_field['userid'] = $userid; $db->query('INSERT INTO ' . NV_MOD_TABLE . '_info (' . implode(', ', array_keys($query_field)) . ') VALUES (' . implode(', ', array_values($query_field)) . ')'); nv_insert_logs(NV_LANG_DATA, $module_name, 'log_add_user', 'userid ' . $userid, $admin_info['userid']); // Check photo if (!empty($_user['photo'])) { $tmp_photo = NV_BASE_SITEURL . NV_TEMP_DIR . '/' . $_user['photo']; if (!nv_is_file($tmp_photo, NV_TEMP_DIR)) { $_user['photo'] = ''; } else { $new_photo_name = $_user['photo']; $new_photo_path = NV_ROOTDIR . '/' . SYSTEM_UPLOADS_DIR . '/' . $module_upload . '/'; $new_photo_name2 = $new_photo_name; $i = 1; while (file_exists($new_photo_path . $new_photo_name2)) { $new_photo_name2 = preg_replace('/(.*)(\\.[a-zA-Z0-9]+)$/', '\\1_' . $i . '\\2', $new_photo_name); ++$i; } $new_photo = $new_photo_path . $new_photo_name2; if (nv_copyfile(NV_DOCUMENT_ROOT . $tmp_photo, $new_photo)) { $_user['photo'] = substr($new_photo, strlen(NV_ROOTDIR . '/')); } else { $_user['photo'] = '';
$page_title = $lang_module['sources']; list($sourceid, $title, $link, $logo, $error) = array(0, '', 'http://', '', ''); $savecat = $nv_Request->get_int('savecat', 'post', 0); if (!empty($savecat)) { $sourceid = $nv_Request->get_int('sourceid', 'post', 0); $title = $nv_Request->get_title('title', 'post', '', 1); $link = strtolower($nv_Request->get_title('link', 'post', '')); $url_info = @parse_url($link); if (isset($url_info['scheme']) and isset($url_info['host'])) { $link = $url_info['scheme'] . '://' . $url_info['host']; } else { $link = ''; } $logo_old = $db->query('SELECT logo FROM ' . NV_PREFIXLANG . '_' . $module_data . '_sources WHERE sourceid =' . $sourceid)->fetchColumn(); $logo = $nv_Request->get_title('logo', 'post', ''); if (!nv_is_url($logo) and nv_is_file($logo, NV_UPLOADS_DIR . '/' . $module_upload . '/source')) { $lu = strlen(NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_upload . '/source/'); $logo = substr($logo, $lu); } elseif (!nv_is_url($logo) and file_exists(NV_UPLOADS_REAL_DIR . '/' . $module_upload . '/source/' . $logo_old)) { $logo = $logo_old; } else { $logo = ''; } if ($logo != $logo_old and !empty($logo_old)) { $_count = $db->query('SELECT COUNT(*) FROM ' . NV_PREFIXLANG . '_' . $module_data . '_sources WHERE sourceid != ' . $sourceid . ' AND logo =' . $db->quote(basename($logo_old)))->fetchColumn(); if (empty($_count)) { @unlink(NV_ROOTDIR . '/' . NV_UPLOADS_DIR . '/' . $module_upload . '/source/' . $logo_old); @unlink(NV_ROOTDIR . '/' . NV_FILES_DIR . '/' . $module_upload . '/source/' . $logo_old); $_did = $db->query('SELECT did FROM ' . NV_UPLOAD_GLOBALTABLE . '_dir WHERE dirname=' . $db->quote(dirname(NV_UPLOADS_DIR . '/' . $module_upload . '/source/' . $logo_old)))->fetchColumn(); $db->query('DELETE FROM ' . NV_UPLOAD_GLOBALTABLE . '_file WHERE did = ' . $_did . ' AND title=' . $db->quote(basename($logo_old))); }
* @Author VINADES.,JSC (contact@vinades.vn) * @Copyright (C) 2014 VINADES.,JSC. All rights reserved * @License GNU/GPL version 2 or any later version * @Createdate 2-2-2010 12:55 */ if (!defined('NV_IS_FILE_DATABASE')) { die('Stop!!!'); } $filename = $nv_Request->get_title('filename', 'get', ''); $checkss = $nv_Request->get_title('checkss', 'get', ''); $log_dir = NV_LOGS_DIR . '/dump_backup'; if ($global_config['idsite']) { $log_dir .= '/' . $global_config['site_dir']; } $path_filename = NV_BASE_SITEURL . '/' . $log_dir . '/' . $filename; if (nv_is_file($path_filename, $log_dir) === true and $checkss == md5($filename . NV_CHECK_SESSION)) { nv_insert_logs(NV_LANG_DATA, $module_name, $lang_module['download'], 'File name: ' . basename($filename), $admin_info['userid']); //Download file $name = basename($path_filename); $name_arr = explode('_', $name); if (sizeof($name_arr) > 1 and strlen($name_arr[0]) == 32) { $name = substr($name, 33); } $download = new NukeViet\Files\Download(NV_DOCUMENT_ROOT . $path_filename, NV_ROOTDIR . '/' . NV_LOGS_DIR . '/dump_backup', $name); $download->download_file(); exit; } else { $contents = 'File not exist !'; include NV_ROOTDIR . '/includes/header.php'; echo nv_admin_theme($contents); include NV_ROOTDIR . '/includes/footer.php';
$array['alias'] = ''; $array['image'] = ''; $array['description'] = ''; $array['keywords'] = ''; $savecat = $nv_Request->get_int('savecat', 'post', 0); if (!empty($savecat)) { $array['topicid'] = $nv_Request->get_int('topicid', 'post', 0); $array['title'] = $nv_Request->get_title('title', 'post', '', 1); $array['keywords'] = $nv_Request->get_title('keywords', 'post', '', 1); $array['alias'] = $nv_Request->get_title('alias', 'post', ''); $array['description'] = $nv_Request->get_string('description', 'post', ''); $array['description'] = strip_tags($array['description']); $array['description'] = nv_nl2br(nv_htmlspecialchars($array['description']), '<br />'); // Xu ly anh minh hoa $array['image'] = $nv_Request->get_title('homeimg', 'post', ''); if (!nv_is_url($array['image']) and nv_is_file($array['image'], NV_UPLOADS_DIR . '/' . $module_upload . '/topics')) { $lu = strlen(NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_upload . '/topics/'); $array['image'] = substr($array['image'], $lu); } else { $array['image'] = ''; } $array['alias'] = $array['alias'] == '' ? change_alias($array['title']) : change_alias($array['alias']); if (empty($array['title'])) { $error = $lang_module['topics_error_title']; } elseif ($array['topicid'] == 0) { $weight = $db->query("SELECT max(weight) FROM " . NV_PREFIXLANG . "_" . $module_data . "_topics")->fetchColumn(); $weight = intval($weight) + 1; $_sql = "INSERT INTO " . NV_PREFIXLANG . "_" . $module_data . "_topics (title, alias, description, image, weight, keywords, add_time, edit_time) VALUES ( :title, :alias, :description, :image, :weight, :keywords, " . NV_CURRENTTIME . ", " . NV_CURRENTTIME . ")"; $data_insert = array(); $data_insert['title'] = $array['title']; $data_insert['alias'] = $array['alias'];
<?php /** * @Project NUKEVIET 4.x * @Author VINADES.,JSC (contact@vinades.vn) * @Copyright (C) 2014 VINADES.,JSC. All rights reserved * @License GNU/GPL version 2 or any later version * @Createdate 2-2-2010 12:55 */ if (!defined('NV_IS_FILE_ADMIN')) { die('Stop!!!'); } $path = nv_check_path_upload($nv_Request->get_string('path', 'post,get')); $image = htmlspecialchars(trim($nv_Request->get_string('img', 'post,get')), ENT_QUOTES); $image = basename($image); $path_filename = NV_BASE_SITEURL . $path . '/' . $image; if (!empty($image) and nv_is_file($path_filename, $path) and nv_check_allow_upload_dir($path)) { //Download file $download = new NukeViet\Files\Download(NV_DOCUMENT_ROOT . $path_filename, NV_ROOTDIR . '/' . $path, $image); $download->download_file(); exit; } else { echo 'file not exist !'; }
/** * @Project NUKEVIET 4.x * @Author VINADES.,JSC (contact@vinades.vn) * @Copyright (C) 2014 VINADES.,JSC. All rights reserved * @License GNU/GPL version 2 or any later version * @Createdate 28/10/2012, 14:51 */ if (!defined('NV_IS_FILE_SETTINGS')) { die('Stop!!!'); } $errormess = $lang_module['plugin_info']; $pattern_plugin = '/^([a-zA-Z0-9\\_]+)\\.php$/'; if ($nv_Request->isset_request('plugin_file', 'post')) { $config_plugin = array(); $plugin_file = $nv_Request->get_title('plugin_file', 'post'); if (preg_match($pattern_plugin, $plugin_file) and nv_is_file(NV_BASE_SITEURL . 'includes/plugin/' . $plugin_file, 'includes/plugin')) { $plugin_area = $nv_Request->get_int('plugin_area', 'post'); if ($nv_Request->isset_request('delete', 'post')) { $sth = $db->prepare('SELECT COUNT(*) FROM ' . $db_config['prefix'] . '_plugin WHERE plugin_file=:plugin_file'); $sth->bindParam(':plugin_file', $plugin_file, PDO::PARAM_STR, strlen($title)); $sth->execute(); $count = $sth->fetchColumn(); if (empty($count)) { nv_deletefile(NV_ROOTDIR . '/includes/plugin/' . $plugin_file); } } elseif (!empty($plugin_area)) { $_sql = 'SELECT max(weight) FROM ' . $db_config['prefix'] . '_plugin WHERE plugin_area=' . $plugin_area; $weight = $db->query($_sql)->fetchColumn(); $weight = intval($weight) + 1; try { $sth = $db->prepare('INSERT INTO ' . $db_config['prefix'] . '_plugin (plugin_file, plugin_area, weight) VALUES (:plugin_file, :plugin_area, :weight)');
$post['config']['access_groups_add'] = $nv_Request->get_int('access_groups_add', 'post', 0); $post['config']['access_groups_del'] = $nv_Request->get_int('access_groups_del', 'post', 0); $post['config']['access_addus'] = $nv_Request->get_int('access_addus', 'post', 0); $post['config']['access_waiting'] = $nv_Request->get_int('access_waiting', 'post', 0); $post['config']['access_editus'] = $nv_Request->get_int('access_editus', 'post', 0); $post['config']['access_delus'] = $nv_Request->get_int('access_delus', 'post', 0); $post['config']['access_passus'] = $nv_Request->get_int('access_passus', 'post', 0); $post['config'] = serialize($post['config']); } // Thông tin của tất cả các nhóm kể cả các nhóm hệ thống $post['group_color'] = nv_substr($nv_Request->get_title('group_color', 'post', '', 1), 0, 10); if (preg_match("/^([0-9a-fA-F]{6})\$/i", $post['group_color']) or preg_match("/^([0-9a-fA-F]{3})\$/i", $post['group_color'])) { $post['group_color'] = '#' . $post['group_color']; } $post['group_avatar'] = $nv_Request->get_title('group_avatar', 'post', ''); if (!nv_is_url($post['group_avatar']) and nv_is_file($post['group_avatar'], NV_UPLOADS_DIR . '/' . $module_upload)) { $lu = strlen(NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_upload . '/'); $post['group_avatar'] = substr($post['group_avatar'], $lu); } elseif (!nv_is_url($post['group_avatar'])) { $post['group_avatar'] = ''; } if (isset($post['id'])) { if ($nv_Request->isset_request('add', 'get')) { $weight = $db->query("SELECT max(weight) FROM " . NV_MOD_TABLE . "_groups WHERE idsite=" . $global_config['idsite'])->fetchColumn(); $weight = intval($weight) + 1; $_sql = "INSERT INTO " . NV_MOD_TABLE . "_groups\n\t\t\t\t\t\t(title, email, description, content, group_type, group_color, group_avatar, is_default, add_time, exp_time, weight, act, idsite, numbers, siteus, config)\n\t\t\t\t\t\tVALUES ( :title, :email, :description, :content, " . $post['group_type'] . ", :group_color,\n\t\t\t\t\t\t:group_avatar, " . $post['is_default'] . ", " . NV_CURRENTTIME . ", " . $post['exp_time'] . ",\n\t\t\t\t\t\t" . $weight . ", 1, " . $global_config['idsite'] . ", 0, " . $post['siteus'] . ", :config)"; $data_insert = array(); $data_insert['title'] = $post['title']; $data_insert['email'] = $post['email']; $data_insert['description'] = $post['description']; $data_insert['content'] = $post['content'];
if (!defined('NV_IS_FILE_ADMIN')) { die('Stop!!!'); } $path = nv_check_path_upload($nv_Request->get_string('path', 'post')); $check_allow_upload_dir = nv_check_allow_upload_dir($path); if (!isset($check_allow_upload_dir['delete_file'])) { die('ERROR#' . $lang_module['notlevel']); } $files = array_map('basename', explode('|', htmlspecialchars(trim($nv_Request->get_string('file', 'post')), ENT_QUOTES))); // Check choose file if (empty($files)) { die('ERROR#' . $lang_module['errorNotSelectFile']); } // Check file exists foreach ($files as $file) { if (!nv_is_file(NV_BASE_SITEURL . $path . '/' . $file, $path)) { die('ERROR#' . $lang_module['file_no_exists'] . ': ' . $file); } } // Do action: Delete foreach ($files as $file) { @nv_deletefile(NV_ROOTDIR . '/' . $path . '/' . $file); if (preg_match('/^' . nv_preg_quote(NV_UPLOADS_DIR) . '\\/(([a-z0-9\\-\\_\\/]+\\/)*([a-z0-9\\-\\_\\.]+)(\\.(gif|jpg|jpeg|png|bmp)))$/i', $path . '/' . $file, $m)) { @nv_deletefile(NV_ROOTDIR . '/' . NV_FILES_DIR . '/' . $m[1]); } if (isset($array_dirname[$path])) { $db->query("DELETE FROM " . NV_UPLOAD_GLOBALTABLE . "_file WHERE did = " . $array_dirname[$path] . " AND title='" . $file . "'"); } nv_insert_logs(NV_LANG_DATA, $module_name, $lang_module['upload_delfile'], $path . '/' . $file, $admin_info['userid']); } echo 'OK#Success!!!';
$stmt->bindParam(':title', $rowcontent['sourcetext'], PDO::PARAM_STR); $stmt->execute(); $rowcontent['sourceid'] = $stmt->fetchColumn(); if (empty($rowcontent['sourceid'])) { $weight = $db->query('SELECT max(weight) FROM ' . NV_PREFIXLANG . '_' . $module_data . '_sources')->fetchColumn(); $weight = intval($weight) + 1; $_sql = "INSERT INTO " . NV_PREFIXLANG . "_" . $module_data . "_sources (title, link, logo, weight, add_time, edit_time) VALUES ( :title, '', '', " . $weight . " , " . NV_CURRENTTIME . ", " . NV_CURRENTTIME . ")"; $data_insert = array(); $data_insert['title'] = $rowcontent['sourcetext']; $rowcontent['sourceid'] = $db->insert_id($_sql, 'sourceid', $data_insert); } } } // Xu ly anh minh hoa $rowcontent['homeimgthumb'] = 0; if (!nv_is_url($rowcontent['homeimgfile']) and nv_is_file($rowcontent['homeimgfile'], $uploads_dir_user) === true) { $lu = strlen(NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_upload . '/'); $rowcontent['homeimgfile'] = substr($rowcontent['homeimgfile'], $lu); if (file_exists(NV_ROOTDIR . '/' . NV_FILES_DIR . '/' . $module_upload . '/' . $rowcontent['homeimgfile'])) { $rowcontent['homeimgthumb'] = 1; } else { $rowcontent['homeimgthumb'] = 2; } } elseif (nv_is_url($rowcontent['homeimgfile'])) { $rowcontent['homeimgthumb'] = 3; } else { $rowcontent['homeimgfile'] = ''; } if ($rowcontent['id'] == 0) { if (!defined('NV_IS_SPADMIN') and intval($rowcontent['publtime']) < NV_CURRENTTIME) { $rowcontent['publtime'] = NV_CURRENTTIME;
* @Author VINADES.,JSC (contact@vinades.vn) * @Copyright (C) 2014 VINADES.,JSC. All rights reserved * @License GNU/GPL version 2 or any later version * @Createdate 2-2-2010 12:55 */ if (!defined('NV_IS_FILE_DATABASE')) { die('Stop!!!'); } $filename = $nv_Request->get_title('filename', 'get', ''); $checkss = $nv_Request->get_title('checkss', 'get', ''); $log_dir = NV_LOGS_DIR . '/dump_backup'; if ($global_config['idsite']) { $log_dir .= '/' . $global_config['site_dir']; } $path_filename = NV_BASE_SITEURL . '/' . $log_dir . '/' . $filename; if (nv_is_file($path_filename, $log_dir) === true and $checkss == md5($filename . $client_info['session_id'] . $global_config['sitekey'])) { nv_insert_logs(NV_LANG_DATA, $module_name, $lang_module['download'], 'File name: ' . basename($filename), $admin_info['userid']); //Download file $name = basename($path_filename); $name_arr = explode('_', $name); if (sizeof($name_arr) > 1 and strlen($name_arr[0]) == 32) { $name = substr($name, 33); } $download = new NukeViet\Files\Download(NV_DOCUMENT_ROOT . $path_filename, NV_ROOTDIR . '/' . NV_LOGS_DIR . '/dump_backup', $name); $download->download_file(); exit; } else { $contents = 'File not exist !'; include NV_ROOTDIR . '/includes/header.php'; echo nv_admin_theme($contents); include NV_ROOTDIR . '/includes/footer.php';
$array_config['copyright'] = $nv_Request->get_editor('copyright', '', NV_ALLOWED_HTML_TAGS); $array_config['showtooltip'] = $nv_Request->get_int('showtooltip', 'post', 0); $array_config['tooltip_position'] = $nv_Request->get_string('tooltip_position', 'post', ''); $array_config['tooltip_length'] = $nv_Request->get_int('tooltip_length', 'post', 0); $array_config['showhometext'] = $nv_Request->get_int('showhometext', 'post', 0); $array_config['facebookappid'] = $nv_Request->get_title('facebookappid', 'post', ''); $array_config['socialbutton'] = $nv_Request->get_int('socialbutton', 'post', 0); $array_config['show_no_image'] = $nv_Request->get_title('show_no_image', 'post', '', 0); $array_config['structure_upload'] = $nv_Request->get_title('structure_upload', 'post', '', 0); $array_config['config_source'] = $nv_Request->get_int('config_source', 'post', 0); $array_config['imgposition'] = $nv_Request->get_int('imgposition', 'post', 0); $array_config['alias_lower'] = $nv_Request->get_int('alias_lower', 'post', 0); $array_config['tags_alias'] = $nv_Request->get_int('tags_alias', 'post', 0); $array_config['auto_tags'] = $nv_Request->get_int('auto_tags', 'post', 0); $array_config['tags_remind'] = $nv_Request->get_int('tags_remind', 'post', 0); if (!nv_is_url($array_config['show_no_image']) and nv_is_file($array_config['show_no_image'])) { $lu = strlen(NV_BASE_SITEURL); $array_config['show_no_image'] = substr($array_config['show_no_image'], $lu); } else { $array_config['show_no_image'] = ''; } $sth = $db->prepare("UPDATE " . NV_CONFIG_GLOBALTABLE . " SET config_value = :config_value WHERE lang = '" . NV_LANG_DATA . "' AND module = :module_name AND config_name = :config_name"); $sth->bindParam(':module_name', $module_name, PDO::PARAM_STR); foreach ($array_config as $config_name => $config_value) { $sth->bindParam(':config_name', $config_name, PDO::PARAM_STR); $sth->bindParam(':config_value', $config_value, PDO::PARAM_STR); $sth->execute(); } $nv_Cache->delMod('settings'); $nv_Cache->delMod($module_name); Header('Location: ' . NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=' . $op . '&rand=' . nv_genpass());
if (empty($rowcontent['sourceid'])) { $weight = $db->query('SELECT max(weight) FROM ' . NV_PREFIXLANG . '_' . $module_data . '_sources')->fetchColumn(); $weight = intval($weight) + 1; $_sql = "INSERT INTO " . NV_PREFIXLANG . "_" . $module_data . "_sources (title, link, logo, weight, add_time, edit_time) VALUES ( :title, '', '', " . $weight . " , " . NV_CURRENTTIME . ", " . NV_CURRENTTIME . ")"; $data_insert = array(); $data_insert['title'] = $rowcontent['sourcetext']; $rowcontent['sourceid'] = $db->insert_id($_sql, 'sourceid', $data_insert); } } } // Xu ly anh minh hoa $rowcontent['homeimgthumb'] = 0; if (empty($rowcontent['homeimgfile']) and ($rowcontent['imgposition'] == 1 or $rowcontent['imgposition'] == 2)) { $rowcontent['homeimgfile'] = nv_get_firstimage($rowcontent['bodyhtml']); } if (!nv_is_url($rowcontent['homeimgfile']) and nv_is_file($rowcontent['homeimgfile'], NV_UPLOADS_DIR . '/' . $module_upload) === true) { $lu = strlen(NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_upload . '/'); $rowcontent['homeimgfile'] = substr($rowcontent['homeimgfile'], $lu); if (file_exists(NV_ROOTDIR . '/' . NV_FILES_DIR . '/' . $module_upload . '/' . $rowcontent['homeimgfile'])) { $rowcontent['homeimgthumb'] = 1; } else { $rowcontent['homeimgthumb'] = 2; } } elseif (nv_is_url($rowcontent['homeimgfile'])) { $rowcontent['homeimgthumb'] = 3; } else { $rowcontent['homeimgfile'] = ''; } if ($rowcontent['id'] == 0) { if (!defined('NV_IS_SPADMIN') and intval($rowcontent['publtime']) < NV_CURRENTTIME) { $rowcontent['publtime'] = NV_CURRENTTIME;
$post = array(); $_groups_post = $nv_Request->get_array('groups_view', 'post', array()); $post['groups_view'] = !empty($_groups_post) ? implode(',', nv_groups_post(array_intersect($_groups_post, array_keys($groups_list)))) : ''; $post['id'] = $nv_Request->get_int('id', 'post', 0); $post['parentid'] = $nv_Request->get_int('parentid', 'post', 0); $post['mid'] = $nv_Request->get_int('item_menu', 'post', 0); $post['title'] = nv_substr($nv_Request->get_title('title', 'post', '', 1), 0, 255); $post['link'] = $nv_Request->get_string('link', 'post', '', 1, 255); $post['note'] = nv_substr($nv_Request->get_title('note', 'post', '', 1), 0, 255); $post['module_name'] = nv_substr($nv_Request->get_title('module_name', 'post', '', 1), 0, 255); $post['op'] = nv_substr($nv_Request->get_title('op', 'post', '', 1), 0, 255); $post['target'] = $nv_Request->get_int('target', 'post', 0); $post['active_type'] = $nv_Request->get_int('active_type', 'post', 0); $post['css'] = nv_substr($nv_Request->get_title('css', 'post', '', 1), 0, 255); $post['icon'] = $nv_Request->get_string('icon', 'post', ''); if (nv_is_file($post['icon'], NV_UPLOADS_DIR . '/' . $module_upload)) { $lu = strlen(NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_upload . '/'); $post['icon'] = substr($post['icon'], $lu); } else { $post['icon'] = ''; } if (empty($post['module_name']) and !empty($post['link'])) { // Kiểm tra để tách link module nếu nhập trực tiếp link đúng cấu trúc của module foreach ($rewrite_keys as $pattern_i) { if (preg_match($pattern_i, '"' . $post['link'] . '"', $m)) { if (isset($site_mods[$m[3]])) { $post['module_name'] = $m[3]; if (empty($post['op']) and isset($m[4]) and isset($site_mods[$m[3]]['funcs'][$m[4]])) { $post['op'] = $m[4]; } break;
$keywords = $nv_Request->get_title('keywords', 'post', ''); $alias = $nv_Request->get_title('alias', 'post', ''); $description = $nv_Request->get_string('description', 'post', ''); $description = nv_nl2br(nv_htmlspecialchars(strip_tags($description)), '<br />'); $alias = str_replace('&', ' ', $alias); $alias = str_replace('-', ' ', nv_unhtmlspecialchars($alias)); $keywords = explode(',', $keywords); $keywords[] = $alias; $keywords = array_map('strip_punctuation', $keywords); $keywords = array_map('trim', $keywords); $keywords = array_diff($keywords, array('')); $keywords = array_unique($keywords); $keywords = implode(',', $keywords); $alias = str_replace(' ', '-', strip_punctuation($alias)); $image = $nv_Request->get_string('image', 'post', ''); if (nv_is_file($image, NV_UPLOADS_DIR . '/' . $module_upload)) { $lu = strlen(NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_upload . '/'); $image = substr($image, $lu); } else { $image = ''; } if (empty($alias)) { $error = $lang_module['error_name']; } else { if ($tid == 0) { $sth = $db->prepare('INSERT INTO ' . NV_PREFIXLANG . '_' . $module_data . '_tags (numnews, alias, description, image, keywords) VALUES (0, :alias, :description, :image, :keywords)'); $msg_lg = 'add_tags'; } else { $sth = $db->prepare('UPDATE ' . NV_PREFIXLANG . '_' . $module_data . '_tags SET alias = :alias, description = :description, image = :image, keywords = :keywords WHERE tid =' . $tid); $msg_lg = 'edit_tags'; }
$cron_name = $nv_Request->get_title('cron_name', 'post', '', 1); $run_file = $nv_Request->get_title('run_file', 'post', ''); $run_func = $nv_Request->get_title('run_func_iavim', 'post', ''); $params = $nv_Request->get_title('params_iavim', 'post', ''); $interval = $nv_Request->get_int('interval_iavim', 'post', 0); $del = $nv_Request->get_int('del', 'post', 0); $min = $nv_Request->get_int('min', 'post', 0); $hour = $nv_Request->get_int('hour', 'post', 0); if (preg_match('/^([0-9]{1,2})\\/([0-9]{1,2})\\/([0-9]{4})$/', $nv_Request->get_string('start_date', 'post'), $m)) { $start_time = mktime($hour, $min, 0, $m[2], $m[1], $m[3]); } else { $start_time = NV_CURRENTTIME; } if (empty($cron_name)) { $error = $lang_module['cron_name_empty']; } elseif (!empty($run_file) and !nv_is_file(NV_BASE_SITEURL . 'includes/cronjobs/' . $run_file, 'includes/cronjobs')) { $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);
<?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!!!'); } $array_logo_position = array('bottomRight' => $lang_module['logoposbottomright'], 'bottomLeft' => $lang_module['logoposbottomleft'], 'bottomCenter' => $lang_module['logoposbottomcenter'], 'centerRight' => $lang_module['logoposcenterright'], 'centerLeft' => $lang_module['logoposcenterleft'], 'centerCenter' => $lang_module['logoposcentercenter'], 'topRight' => $lang_module['logopostopright'], 'topLeft' => $lang_module['logopostopleft'], 'topCenter' => $lang_module['logopostopcenter']); if ($nv_Request->isset_request('submit', 'post')) { $upload_logo = $nv_Request->get_title('upload_logo', 'post', ''); if (!empty($upload_logo) and !nv_is_url($upload_logo) and nv_is_file($upload_logo)) { $lu = strlen(NV_BASE_SITEURL); $upload_logo = substr($upload_logo, $lu); } else { $upload_logo = ''; } $upload_logo_pos = $nv_Request->get_title('upload_logo_pos', 'post', ''); if (!isset($array_logo_position[$upload_logo_pos])) { $upload_logo_pos = 'bottomRight'; } $autologosize1 = $nv_Request->get_int('autologosize1', 'post', 50); $autologosize2 = $nv_Request->get_int('autologosize2', 'post', 40); $autologosize3 = $nv_Request->get_int('autologosize3', 'post', 30); $autologomod = $nv_Request->get_array('autologomod', 'post'); if (in_array('all', $autologomod)) { $autologomod = 'all';
<?php /** * @Project NUKEVIET 4.x * @Author VINADES.,JSC (contact@vinades.vn) * @Copyright (C) 2014 VINADES.,JSC. All rights reserved * @License GNU/GPL version 2 or any later version * @Createdate 2-2-2010 12:55 */ if (!defined('NV_IS_FILE_THEMES')) { die('Stop!!!'); } $filename = $nv_Request->get_title('filename', 'get', ''); $checkss = $nv_Request->get_title('checkss', 'get', ''); $mod = $nv_Request->get_title('mod', 'get', ''); $path_filename = NV_BASE_SITEURL . NV_TEMP_DIR . '/' . $filename; if (!empty($mod) and nv_is_file($path_filename, NV_TEMP_DIR) and $checkss == md5($filename . $client_info['session_id'] . $global_config['sitekey'])) { //Download file $download = new NukeViet\Files\Download(NV_DOCUMENT_ROOT . $path_filename, NV_ROOTDIR . '/' . NV_TEMP_DIR, $mod); $download->download_file(); exit; } $contents = 'file not exist !'; include NV_ROOTDIR . '/includes/header.php'; echo nv_admin_theme($contents); include NV_ROOTDIR . '/includes/footer.php';