Example #1
0
                     $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;
                     }
                 }
                 $array_field_config[] = $row_field;
             }
             $sql = 'SELECT * FROM ' . NV_USERS_GLOBALTABLE . '_info WHERE userid=' . $item['userid'];
             $result = $db->query($sql);
             $custom_fields = $result->fetch();
             $contents = nv_memberslist_detail_theme($item, $array_field_config, $custom_fields);
         } else {
             Header('Location: ' . nv_url_rewrite(NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name, true));
             exit;
         }
     }
     include NV_ROOTDIR . '/includes/header.php';
     echo nv_site_theme($contents);
     include NV_ROOTDIR . '/includes/footer.php';
 } else {
     //danh sach thanh vien
     $orderby = $nv_Request->get_string('orderby', 'get', 'username');
     $sortby = $nv_Request->get_string('sortby', 'get', 'DESC');
     $page = $nv_Request->get_int('page', 'get', 1);
     // Kiem tra du lieu hop chuan
     if (!empty($orderby) and !in_array($orderby, array('username', 'gender', 'regdate')) or !empty($sortby) and !in_array($sortby, array('DESC', 'ASC'))) {
Example #2
0
     unset($matches);
     if (preg_match("/^(.*)\\-([a-z0-9]{32})\$/", $array_op[1], $matches)) {
         $md5 = $matches[2];
     }
     if (!empty($md5)) {
         $result = $db->sql_query("SELECT * FROM `" . NV_USERS_GLOBALTABLE . "` WHERE `md5username` = " . $db->dbescape($md5));
         if ($db->sql_numrows($result) > 0) {
             $item = $db->sql_fetch_assoc($result);
             if (change_alias($item['username']) != $matches[1]) {
                 // Chuyen ve trang module ngay khong can thong bao
                 Header("Location: " . nv_url_rewrite(NV_BASE_SITEURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&" . NV_NAME_VARIABLE . "=" . $module_name, true));
                 exit;
             }
             // Them vao tieu de
             $array_mod_title[] = array('catid' => 0, 'title' => $item['username'], 'link' => NV_BASE_SITEURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=" . $op . "/" . change_alias($item['username']) . "-" . $item['md5username']);
             $contents = nv_memberslist_detail_theme($item);
         } else {
             // Chuyen ve trang module ngay khong can thong bao
             Header("Location: " . nv_url_rewrite(NV_BASE_SITEURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&" . NV_NAME_VARIABLE . "=" . $module_name, true));
             exit;
         }
     }
     include NV_ROOTDIR . "/includes/header.php";
     echo nv_site_theme($contents);
     include NV_ROOTDIR . "/includes/footer.php";
     exit;
 } else {
     $orderby = $nv_Request->get_string('orderby', 'get', 'username');
     $sortby = $nv_Request->get_string('sortby', 'get', 'DESC');
     $page = $nv_Request->get_int('page', 'get', 0);
     // Kiem tra du lieu hop chuan