Example #1
0
 * @Project NUKEVIET 4.x
 * @Author VINADES (contact@vinades.vn)
 * @Copyright (C) 2014 VINADES. All rights reserved
 * @License GNU/GPL version 2 or any later version
 * @Createdate 04/05/2010
 */
if (!defined('NV_IS_FILE_ADMIN')) {
    die('Stop!!!');
}
if ($nv_Request->isset_request('nv_genpass', 'post')) {
    $_len = round((NV_UPASSMIN + NV_UPASSMAX) / 2);
    echo nv_genpass($_len, $global_config['nv_upass_type']);
    exit;
}
$page_title = $lang_module['user_add'];
$groups_list = nv_groups_list($module_data);
$array_field_config = array();
$result_field = $db->query('SELECT * FROM ' . NV_MOD_TABLE . '_field ORDER BY weight ASC');
while ($row_field = $result_field->fetch()) {
    $language = unserialize($row_field['language']);
    $row_field['title'] = isset($language[NV_LANG_DATA]) ? $language[NV_LANG_DATA][0] : $row['field'];
    $row_field['description'] = isset($language[NV_LANG_DATA]) ? nv_htmlspecialchars($language[NV_LANG_DATA][1]) : '';
    if (!empty($row_field['field_choices'])) {
        $row_field['field_choices'] = unserialize($row_field['field_choices']);
    } elseif (!empty($row_field['sql_choices'])) {
        $row_field['sql_choices'] = explode('|', $row_field['sql_choices']);
        $query = 'SELECT ' . $row_field['sql_choices'][2] . ', ' . $row_field['sql_choices'][3] . ' FROM ' . $row_field['sql_choices'][1];
        $result = $db->query($query);
        $weight = 0;
        while (list($key, $val) = $result->fetch(3)) {
            $row_field['field_choices'][$key] = $val;
Example #2
0
    Header("Location: " . NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name);
    die;
}
$row = $db->sql_fetchrow($result);
$theme_list = array();
$theme_array_file = nv_scandir(NV_ROOTDIR . "/themes", $global_config['check_theme']);
$theme_array_file = array_flip($theme_array_file);
$theme_array_file = array_keys($theme_array_file);
$sql = "SELECT DISTINCT `theme` FROM `" . NV_PREFIXLANG . "_modthemes`  WHERE `func_id`=0";
$result = $db->sql_query($sql);
while (list($theme) = $db->sql_fetchrow($result)) {
    if (in_array($theme, $theme_array_file)) {
        $theme_list[] = $theme;
    }
}
$groups_list = nv_groups_list();
if ($nv_Request->get_int('save', 'post') == '1') {
    nv_insert_logs(NV_LANG_DATA, $module_name, 'log_edit_modul', "module  " . $mod, $admin_info['userid']);
    $custom_title = filter_text_input('custom_title', 'post', 1);
    $theme = filter_text_input('theme', 'post', '', 1);
    $keywords = filter_text_input('keywords', 'post', '', 1);
    $act = $nv_Request->get_int('act', 'post', 0);
    $rss = $nv_Request->get_int('rss', 'post', 0);
    if (!empty($theme) and !in_array($theme, $theme_list)) {
        $theme = "";
    }
    if (!empty($keywords)) {
        $keywords = explode(",", $keywords);
        $keywords = array_map("trim", $keywords);
        $keywords = implode(", ", $keywords);
    }
Example #3
0
    $data['homeheight'] = $temp[1];
}
$page_title = $lang_module['setting'];
$savesetting = $nv_Request->get_int('savesetting', 'post', 0);
$error = "";
// Group custom
$groups_list = array();
$result = $db->query('SELECT group_id, title, idsite FROM ' . NV_GROUPS_GLOBALTABLE . ' WHERE group_id NOT IN ( 4, 5, 6 ) AND (idsite = ' . $global_config['idsite'] . ' OR (idsite =0 AND siteus = 1)) ORDER BY idsite, weight');
while ($row = $result->fetch()) {
    if ($row['group_id'] < 9) {
        $row['title'] = $lang_global['level' . $row['group_id']];
    }
    $groups_list[$row['group_id']] = ($global_config['idsite'] > 0 and empty($row['idsite'])) ? '<strong>' . $row['title'] . '</strong>' : $row['title'];
}
// Group default
$groups_list_default = nv_groups_list();
if ($savesetting == 1) {
    $data['homewidth'] = $nv_Request->get_int('homewidth', 'post', 0);
    $data['homeheight'] = $nv_Request->get_int('homeheight', 'post', 0);
    $data['image_size'] = $data['homewidth'] . "x" . $data['homeheight'];
    $data['per_page'] = $nv_Request->get_int('per_page', 'post', 0);
    $data['per_row'] = $nv_Request->get_int('per_row', 'post', 0);
    $data['auto_check_order'] = $nv_Request->get_string('auto_check_order', 'post', 0);
    $data['post_auto_member'] = $nv_Request->get_string('post_auto_member', 'post', 0);
    $data['money_unit'] = $nv_Request->get_string('money_unit', 'post', "");
    $data['weight_unit'] = $nv_Request->get_string('weight_unit', 'post', "");
    $data['home_view'] = $nv_Request->get_string('home_view', 'post', '');
    $data['format_order_id'] = $nv_Request->get_string('format_order_id', 'post', '');
    $data['format_code_id'] = $nv_Request->get_string('format_code_id', 'post', '');
    $data['facebookappid'] = $nv_Request->get_string('facebookappid', 'post', '');
    $data['active_order'] = $nv_Request->get_int('active_order', 'post', 0);