PHP Code:
CREATE TABLE [Character_back] (
[AccountID] [varchar] (10) NOT NULL ,
[Name] [varchar] (10) NOT NULL ,
[LevelUpPoint] [int] NULL DEFAULT (0),
[Class] [tinyint] NULL ,
[Leadership] [smallint] NULL DEFAULT (0),
[Resets] [int] NOT NULL DEFAULT (0),
[Relifes] [int] NOT NULL DEFAULT (0),
[NoResetInDay] [int] NOT NULL DEFAULT (0),
[NoResetInMonth] [int] NOT NULL DEFAULT (0),
[PointUyThac] [int] NOT NULL DEFAULT (0),
[point_event] [int] NOT NULL DEFAULT (0)
) ON [PRIMARY]
GO
CREATE TABLE [CardPhone] (
[stt] [int] IDENTITY (1, 1) NOT NULL ,
[acc] [varchar] (20) NULL ,
[Name] [varchar] (10) NULL ,
[menhgia] [int] NULL ,
[card_type] [varchar] (20) NULL ,
[card_num] [varchar] (20) NULL ,
[card_num_md5] [varchar] (32) NULL ,
[card_serial] [varchar] (20) NULL ,
[ngay] [smalldatetime] NULL ,
[status] [tinyint] NOT NULL DEFAULT (0) ,
[addvpoint] [varchar] (20) NULL ,
[timenap] [int] NULL ,
[timeduyet] [int] NULL ,
[teknet_check_wait] [tinyint] NOT NULL DEFAULT (0), -- So lan thuc hien check
[teknet_check_last] [int] NULL -- Thoi gian check lan cuoi
) ON [PRIMARY]
GO
CREATE TABLE [DoanhThu] (
[id] [int] IDENTITY (1, 1) NOT NULL ,
[year] [int] NOT NULL DEFAULT (2008),
[month] [int] NOT NULL DEFAULT (1),
[money] [int] NOT NULL DEFAULT (0),
[card_type] [varchar] (20) NULL
) ON [PRIMARY]
GO
CREATE TABLE [Check_Action] (
[id] [int] IDENTITY (1, 1) NOT NULL ,
[action] [varchar] (20) NULL ,
[time] [int] NOT NULL DEFAULT (0),
[status] [tinyint] NOT NULL DEFAULT (0)
) ON [PRIMARY]
GO
INSERT INTO Check_Action (action) VALUES ('ResetInDay')
INSERT INTO Check_Action (action) VALUES ('ResetInMonth')
INSERT INTO Check_Action (action) VALUES ('Top50')
CREATE TABLE [Event_TOP_RS] (
[id] [int] IDENTITY (1, 1) NOT NULL ,
[acc] [varchar] (20) NULL ,
[name] [varchar] (20) NULL ,
[resets] [int] NOT NULL DEFAULT (0)
) ON [PRIMARY]
GO
CREATE TABLE [Event_TOP_Point] (
[id] [int] IDENTITY (1, 1) NOT NULL ,
[acc] [varchar] (20) NULL ,
[name] [varchar] (20) NULL ,
[points] [int] NOT NULL DEFAULT (0)
) ON [PRIMARY]
GO
CREATE TABLE [Event_TOP_Card] (
[id] [int] IDENTITY (1, 1) NOT NULL ,
[acc] [varchar] (20) NULL ,
[gcoin] [bigint] NOT NULL DEFAULT (0)
) ON [PRIMARY]
GO
CREATE TABLE [SMS] (
[acc] [varchar] (20) NOT NULL ,
[KeyXuLy] [varchar] (20) NOT NULL ,
[time] [int] NOT NULL DEFAULT (0) ,
[status] [tinyint] NOT NULL DEFAULT (0),
[Code] [int] NOT NULL DEFAULT (0),
[dulieu1] [varchar] (50) NULL ,
) ON [PRIMARY]
GO
CREATE TABLE [PassRan] (
[acc] [varchar] (10) NULL ,
[pass] [varchar] (10) NULL,
[pass_md5] [varchar] (50) NULL
) ON [PRIMARY]
GO
CREATE TABLE [Invite] (
[acc_invite] [varchar] (10) NOT NULL ,
[acc_accept] [varchar] (10) NOT NULL ,
[time_invite] [int] NOT NULL DEFAULT (0) ,
[vpoint_invite] [int] NOT NULL DEFAULT (0)
) ON [PRIMARY]
GO
CREATE TABLE [Log_TienTe] (
[acc] [varchar] (10) NOT NULL,
[gcoin] [int] DEFAULT (0),
[gcoin_km] [int] DEFAULT (0),
[vpoint] [int] DEFAULT (0),
[price] [nvarchar] (250),
[Des] [ntext],
[time] [int] DEFAULT (0)
) ON [PRIMARY]
GO
CREATE TABLE [bongda_giaidau] (
[giai_id] [int] identity Primary Key NOT NULL , /* Ma giai dau */
[giai_name] [nvarchar] (200) NOT NULL , /* Ten giai dau */
[status] [tinyint] DEFAULT (0), /* 0: Chua ket thuc, 1: Da ket thuc */
) ON [PRIMARY]
GO
CREATE TABLE [bongda_tran] (
[tran_id] [int] identity Primary Key NOT NULL , /* Ma tran dau */
[tran_doi1] [nvarchar] (200) NOT NULL , /* Ten doi 1 */
[tran_doi2] [nvarchar] (200) NOT NULL , /* Ten doi 2 */
[giai_id] [int] DEFAULT(0) , /* Ma giai dau */
[tran_kq1] [smallint] DEFAULT (0), /* So ban thang doi 1 ghi */
[tran_kq2] [smallint] DEFAULT (0), /* So ban thang doi 2 ghi */
[time] [int] NOT NULL, /* Thoi gian bat dau tran dau */
[status] [tinyint] DEFAULT (0), /* 0: Chua da xong, 1: Da da */
) ON [PRIMARY]
GO
CREATE TABLE [bongda_dudoankq] (
[dudoan_id] [int] identity Primary Key NOT NULL , /* Ma du doan */
[acc] [varchar] (10) NOT NULL , /* Tai khoan du doan */
[tran_id] [int] DEFAULT(0) , /* Ma tran dau */
[dudoan_kq] [smallint] NOT NULL , /* Du doan, 1: Doi 1 thang, 2: Hoa, 3: Doi 1 thua */
[dudoan_slg] [int] NOT NULL DEFAULT (0), /* Du doan so nguoi doan cung ket qua */
[time] [int] NOT NULL,
[status] [tinyint] DEFAULT (0), /* 0: Chua da', 1: Du doan sai, 2: Du doan dung + Nhan thuong */
) ON [PRIMARY]
GO
CREATE TABLE [IPBonus] (
[ipbonus_id] [int] identity Primary Key NOT NULL ,
[acc] [varchar] (10) NOT NULL ,
[ip] [varchar] (50) NOT NULL ,
[InternetName] [nvarchar] (200) NOT NULL ,
[Address] [nvarchar] (250) NOT NULL,
[QuanHuyen] [nvarchar] (100) NOT NULL,
[ThanhPho] [nvarchar] (100) NOT NULL,
[totalacc] [int] NOT NULL DEFAULT(0)
) ON [PRIMARY]
GO
CREATE TABLE [IPBonus_acc] (
[ipbonus_id] [int] NOT NULL ,
[acc] [varchar] (10) NOT NULL ,
CONSTRAINT pk_IPBonus_acc PRIMARY KEY (ipbonus_id,acc)
) ON [PRIMARY]
GO
Alter TABLE MEMB_INFO ADD bank bigint NOT NULL DEFAULT 0
Alter TABLE MEMB_INFO ADD vpoint bigint NOT NULL DEFAULT 0
Alter TABLE MEMB_INFO ADD gcoin bigint NOT NULL DEFAULT 0
Alter TABLE MEMB_INFO ADD gcoin_km bigint NOT NULL DEFAULT 0
Alter TABLE MEMB_INFO ADD memb__pwd2 char(10)
Alter TABLE MEMB_INFO ADD memb__pwdmd5 char(50)
Alter TABLE MEMB_INFO ADD pass2 char(10)
Alter TABLE MEMB_INFO ADD jewel_chao int NOT NULL DEFAULT 0
Alter TABLE MEMB_INFO ADD jewel_cre int NOT NULL DEFAULT 0
Alter TABLE MEMB_INFO ADD jewel_blue int NOT NULL DEFAULT 0
Alter TABLE MEMB_INFO ADD passran tinyint NOT NULL DEFAULT 0
Alter TABLE MEMB_INFO ADD checklogin varchar(50) null
Alter TABLE MEMB_INFO ADD time_checksms int NOT NULL DEFAULT 0
Alter TABLE MEMB_INFO ADD checksms_status tinyint NOT NULL DEFAULT 0
Alter TABLE MEMB_INFO ADD admin_block tinyint NOT NULL DEFAULT 0
Alter TABLE MEMB_INFO ADD time_reg datetime NOT NULL DEFAULT GetDate()
Alter TABLE MEMB_INFO ADD ip varchar(20) NULL
Alter TABLE MEMB_INFO ADD thehe tinyint NOT NULL DEFAULT 1
Alter TABLE MEMB_INFO ADD BlockTime int NOT NULL DEFAULT 0
Alter TABLE MEMB_INFO ADD BlockSlg int NOT NULL DEFAULT 0
Alter TABLE MEMB_INFO ADD IPBonusPoint int NOT NULL DEFAULT 0
Alter TABLE Character ADD Resets int NOT NULL DEFAULT 0
Alter TABLE Character ADD ResetNBB int NOT NULL DEFAULT 0
Alter TABLE Character ADD ResetVIP int NOT NULL DEFAULT 0
Alter TABLE Character ADD Resets_Time int NOT NULL DEFAULT 0
Alter TABLE Character ADD NoResetInDay int NOT NULL DEFAULT 0
Alter TABLE Character ADD SCFMasterSkills varbinary(180) null
Alter TABLE Character ADD SoLanNhanThuong int NOT NULL DEFAULT 0
Alter TABLE Character ADD TopMonth01 int NOT NULL DEFAULT 0
Alter TABLE Character ADD TopMonth02 int NOT NULL DEFAULT 0
Alter TABLE Character ADD TopMonth03 int NOT NULL DEFAULT 0
Alter TABLE Character ADD TopMonth04 int NOT NULL DEFAULT 0
Alter TABLE Character ADD TopMonth05 int NOT NULL DEFAULT 0
Alter TABLE Character ADD TopMonth06 int NOT NULL DEFAULT 0
Alter TABLE Character ADD TopMonth07 int NOT NULL DEFAULT 0
Alter TABLE Character ADD TopMonth08 int NOT NULL DEFAULT 0
Alter TABLE Character ADD TopMonth09 int NOT NULL DEFAULT 0
Alter TABLE Character ADD TopMonth10 int NOT NULL DEFAULT 0
Alter TABLE Character ADD TopMonth11 int NOT NULL DEFAULT 0
Alter TABLE Character ADD TopMonth12 int NOT NULL DEFAULT 0
Alter TABLE Character ADD Top50 int NOT NULL DEFAULT 0
alter TABLE Character ADD Relifes int NOT NULL DEFAULT 0
alter TABLE Character ADD khoado tinyint NOT NULL DEFAULT 0
alter TABLE Character ADD makhoado varchar(50)
alter TABLE Character ADD IsThuePoint tinyint NOT NULL DEFAULT 0
alter TABLE Character ADD TimeThuePoint int NOT NULL DEFAULT 0
alter TABLE Character ADD PointThue int NOT NULL DEFAULT 0
alter TABLE Character ADD ErrorSubBlock tinyint NOT NULL DEFAULT 0 -- 1: Loi Error, 99: Admin block
alter TABLE Character ADD pointdutru int NOT NULL DEFAULT 0
alter TABLE Character ADD UyThac tinyint NOT NULL DEFAULT 0
alter TABLE Character ADD uythacoffline_stat int NOT NULL DEFAULT 0
alter TABLE Character ADD uythacoffline_time int NOT NULL DEFAULT 0
alter TABLE Character ADD UyThacOffline_Daily int NOT NULL DEFAULT 0 -- Thoi gian da Uy Thac Offline trong ngay
alter TABLE Character ADD PointUyThac int NOT NULL DEFAULT 0
alter TABLE Character ADD Onlinetime int NOT NULL DEFAULT 0
Alter TABLE Character ADD point_event int NOT NULL DEFAULT 0
Alter TABLE Character ADD event1_type1 int NOT NULL DEFAULT 0
Alter TABLE Character ADD event1_type2 int NOT NULL DEFAULT 0
Alter TABLE Character ADD event1_type3 int NOT NULL DEFAULT 0