Công cụ thành viên

Công cụ trang web


programming4:variables

Đây là một phiên bản cũ của tài liệu!


Các biến dùng chung trong hệ thống NukeViet 4

Trong lập trình NukeViet cần tránh khai báo các biến cùng tên với tên các biến dùng chung của hệ thống.

$db_config

Biến cấu hình CSDL.

Array
(
    [dbhost] => 127.0.0.1
    [dbport] => 
    [dbname] => vinades_domain
    [dbsystem] => vinades_domain
    [dbuname] => root
    [dbtype] => mysql
    [collation] => utf8mb4_unicode_ci
    [charset] => utf8mb4
    [persistent] => 
    [prefix] => nv4
)

$global_config

Biến lưu cấu hình chung của hệ thống

array (
  'site_charset' => 'utf-8',
  'check_module' => '/^[a-z0-9\\-]+$/',
  'check_op' => '/^[a-zA-Z0-9\\-]+$/',
  'check_op_file' => '/^([a-zA-Z0-9\\-\\_]+)\\.php$/',
  'check_block_global' => '/^global\\.([a-zA-Z0-9\\-\\_]+)\\.php$/',
  'check_block_module' => '/^(global|module)\\.([a-zA-Z0-9\\-\\_]+)\\.php$/',
  'check_theme' => '/^(?!admin\\_)([a-zA-Z0-9\\-\\_]+)$/',
  'check_theme_admin' => '/^(admin)\\_[a-zA-Z0-9\\-\\_]+$/',

$module_config

Biến lưu cấu hình module.

array (
  'news' =>
  array (
    'activecomm' => '1',
    'auto_postcomm' => '1',
    'blockheight' => '60',
    'blockwidth' => '52',
    'copyright' => 'Bản quyền bởi NukeViet.vn',
    'emailcomm' => '1',
    'homeheight' => '80',
    'homewidth' => '100',
    'imagefull' => '460',
    'indexfile' => 'viewcat_main_right',
    'per_page' => '20',
    'setcomm' => '2',
    'showhometext' => '1',
    'st_links' => '10',
  ),
  'shops' =>
  array (
    'active_order' => '1',
    'active_order_number' => '0',
    'active_payment' => '1',
    'active_price' => '1',
    'active_showhomtext' => '1',
    'auto_check_order' => '1',
    'comment' => '1',
    'comment_auto' => '1',
    'format_order_id' => 'S%06s',
    'homeheight' => '100',
    'homewidth' => '100',
    'home_view' => 'view_home_all',
    'image_size' => '100x100',
    'money_unit' => 'VND',
    'per_page' => '20',
    'per_row' => '4',
    'post_auto_member' => '0',
    'who_comment' => 'all',
  ),
)

$client_info

Biến lưu thông tin client

array (
  'ip' => '127.0.0.1',
  'session_id' => 'cc7d080040e00dd29c9b2edf50c01b072130706433',
  'referer' => 'http://localhost/nukeviet/admin/index.php?nv=users&op=config',
  'is_myreferer' => 1,
  'selfurl' => 'http://localhost/nukeviet/',
  'agent' => 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0',
  'bot_info' =>
  array (
  ),
  'is_bot' => 0,
  'is_mobile' => 0,
  'browser' =>
  array (
    'key' => 'firefox',
    'name' => 'Firefox v5.0',
  ),
  'client_os' =>
  array (
    'key' => 'windows7',
    'name' => 'Windows 7',
  ),
)

$user_info

Biến lưu thông tin thành viên, biến này chỉ có giá trị khi thành viên đã đăng nhập bên ngoài site hoặc admin hoạt động bên ngoài site.

array (
  'admin_id' => 1,
  'level' => 1,
  'position' => 'Administrator',
  'current_login' => 1314503960,
  'last_login' => 1314469534,
  'current_agent' => 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0',
  'last_agent' => 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0',
  'current_ip' => '127.0.0.1',
  'last_ip' => '127.0.0.1',
  'editor' => 'ckeditor',
  'allow_files_type' =>

$admin_info

Lưu thông tin của admin, chỉ có giá trị khi admin đăng nhập.

$sys_info

Lưu thông tin máy chủ.

array (
  'disable_functions' =>
  array (
  ),
  'ini_set_support' => true,
  'safe_mode' => 0,
  'php_support' => 1,
  'mysql_support' => 1,
  'gd_support' => 1,
  'zlib_support' => 1,
  'session_support' => 1,
  'mb_support' => 1,
  'iconv_support' => 1,
  'allowed_set_time_limit' => 1,
  'os' => 'WINDOWS NT',
  'fileuploads_support' => 1,
  'curl_support' => 1,
  'opendir_support' => 1,
  'ftp_support' => 1,
  'string_handler' => 'mb',
  'supports_rewrite' => 'rewrite_mode_apache',
  'str_compress' =>
  array (
    0 => 'gzcompress',
    1 => 'gzuncompress',
  ),
  'supports_tidy' => false,
  'register_globals' => false,
  'magic_quotes_gpc' => false,
  'sessionpath' => 'D:/Web/www/nukeviet/sess/',
)

$lang_global

Ngôn ngữ trên toàn site

array (
  'Content_Language' => 'vi',
  'LanguageName' => 'vietnamese',
  'site_info' => 'Thông báo từ hệ thống',
  'welcome' => 'Thân ái chào mừng bạn trên website của %s',
  'disable_site_title' => 'Website tạm ngưng hoạt động',
  'disable_site_content' => 'Vì lý do kỹ thuật website tạm ngưng hoạt động. Thành thật xin lỗi các bạn vì sự bất tiện này!',
  'Home' => 'Trang nhất',

$rss

Lưu đường dẫn rss của module

$nv_vertical_menu

Lưu menu ngang của module.

$array_mod_title

Lưu thông tin Mod title của mỗi module.

$contents

Nội dung của một module.

$content

Nội dung của một block.

$module_name

Tên của một module.

$module_file

Tên thư mục chứa module.

$module_data

Tên table của module.

$page_title

tiêu đề trang.

$keywords

Từ khóa của trang.

$description

Mô tả trang.

$op

funcs của một module.

$language_array

Thông tin ngôn ngữ.

$lang_module

Ngôn ngữ của module.

$my_head

Nội dung thêm trong thẻ <head></head>.

Nội dung thêm ở cuối trang.

$module_info

Thông tin một module.

programming4/variables.1465981896.txt.gz · Sửa đổi lần cuối: 2016/06/15 16:11 bởi hoaquynhtim99