【文章內(nèi)容簡(jiǎn)介】
產(chǎn)品基本參數(shù)設(shè)置 產(chǎn)品參數(shù) 添加產(chǎn)品 產(chǎn)品管理 添加分類(lèi) 添加信息 信息管理 添加分類(lèi) 分類(lèi)管理 添加頻道 頻道管理 添加案例 案例管理 添加分類(lèi) 分類(lèi)管理 留言管理 招聘管理 賬號(hào)管理 友情鏈接 服裝企業(yè)時(shí)代廣陽(yáng)網(wǎng)站后臺(tái) 功能菜單 系統(tǒng)管理 信息管理 產(chǎn)品管理 案例管理 其他管理 管理首頁(yè) 退出系統(tǒng) 14 第 4 章 系統(tǒng)設(shè)計(jì) 設(shè)計(jì)目標(biāo) 本 網(wǎng)站是根據(jù)企業(yè)實(shí)際要求進(jìn)行開(kāi)發(fā) 設(shè)計(jì)的,主要實(shí)現(xiàn)如下目標(biāo): ? 網(wǎng)頁(yè)風(fēng)格符合企業(yè) 文化 的特點(diǎn),界面美觀大方。 ? 能夠?qū)镜漠a(chǎn)品進(jìn)行及時(shí)的宣傳。 ? 針對(duì)某行業(yè)或某一問(wèn)題提供相應(yīng)的解決方案。 ? 充分為用戶(hù)著想,提供細(xì)致周到的技術(shù)支持。 ? 提供為用戶(hù)快速留言的留言簿,并具有 管理員 回復(fù)功能。 ? 為網(wǎng)站管理員提供方便、快捷的網(wǎng)站維護(hù)平臺(tái)。 ? 提供用戶(hù)精確查找功能。 ? 網(wǎng)站運(yùn)行安全穩(wěn)定。 開(kāi)發(fā)及運(yùn)行環(huán)境 硬件平臺(tái): ? CPU: 酷睿 2 ; ? 內(nèi)存: 1GB 以上。 軟件平臺(tái): ? 操作系統(tǒng): Windows XP/Windows 2020; ? 數(shù)據(jù)庫(kù): ACCESS 2020; ? 開(kāi)發(fā) 軟件 : Dream wear , IIS, Photoshop , Flash ; ? 瀏覽器: ,推薦使用 ; ? 分辨率:最佳效果 1024*768 像素。 數(shù)據(jù)庫(kù)設(shè)計(jì) 本系統(tǒng)數(shù)據(jù)庫(kù)采用 ACCESS 數(shù)據(jù)庫(kù),系統(tǒng)數(shù)據(jù)庫(kù)名稱(chēng)為 database。數(shù)據(jù) 15 庫(kù) database 中包含 28 張表。 第 5 章 代碼 基本操作的 代碼 編寫(xiě) 根據(jù)系統(tǒng)的需求編寫(xiě)需要的代碼。下面將給出網(wǎng)站中所需要的部分代碼的編寫(xiě)過(guò)程。 ASP 連接 access 數(shù)據(jù) 庫(kù) : % dim db,conn,myconn db=/database/ 39。數(shù)據(jù)庫(kù)文件相對(duì)路徑 Set Conn = () 39。創(chuàng)建對(duì)象實(shí)例 myconn=Provider=。DataSource=amp。 (amp。dbamp。) MyConn % 下面是獲取數(shù)據(jù)表的方法: 直接用 ado的 OpenSchema()方法打開(kāi) adSchemaTables,建立一個(gè) schema記錄集 : % Const adSchemaTables = 20 adSchemaColumns = 4 dim Conn,db dim ConnStr db= 39。ACCESS數(shù)據(jù)庫(kù)的文件名,請(qǐng)使用相對(duì)于網(wǎng)站根目錄的的絕對(duì)路徑 16 ConnStr = Provider=。Data Source= amp。 (db) Set conn = () connstr Dim rstSchema Dim I Set rstSchema = (adSchemaTables) Do while not (Table name: amp。 rstSchema(TABLE_NAME) amp。 vbCr amp。 _ Table type: amp。 rstSchema(TABLE_TYPE) amp。 vbCr) (br/) I = I + 1 Loop % 數(shù)據(jù)庫(kù)記錄通用快速分頁(yè)類(lèi) : %@LANGUAGE = VBScript CODEPAGE=936% %Option Explicit% % Dim intDateStart intDateStart = Timer() Rem 打開(kāi)數(shù)據(jù)庫(kù)連接 Rem function f__OpenConn() Dim strDbPath 17 Dim connstr strDbPath = ../db/ connstr = Provider=。Data Source= connstr = connstr amp。 (strDbPath) Set conn = () connstr End function Rem Rem 關(guān)閉數(shù)據(jù)庫(kù)連接 Rem function f__CloseConn() If IsObject(conn) Then End If Set conn = nothing End function Rem Rem 獲得執(zhí) 行時(shí)間 Rem function getTimeOver(iflag) Dim tTimeOver If iflag = 1 Then tTimeOver = FormatNumber(Timer() intDateStart, 6, true) getTimeOver = 執(zhí)行時(shí)間 : amp。 tTimeOver amp。 秒 18 Else tTimeOver = FormatNumber((Timer() intDateStart) * 1000, 3, true) getTimeOver = 執(zhí)行時(shí)間 : amp。 tTimeOver amp。 毫秒 End If End function Rem Class Cls_PageView Private sbooInitState Private sstrCookiesName Private sstrPageUrl Private sstrPageVar Private sstrTableName Private sstrFieldsList Private sstrCondiction Private sstrOrderList Private sstrPrimaryKey Private sintRefresh Private sintRecordCount Private sintPageSize Private sintPageNow Private sintPageMax Private sobjConn Private sstrPageInf Private Sub Class_Initialize Call ClearVars() End Sub Private Sub class_terminate() 19 Set sobjConn = nothing End Sub Public Sub ClearVars() sbooInitState = False sstrCookiesName = sstrPageUrl = sstrPageVar = page sstrTableName = sstrFieldsList = sstrCondiction = sstrOrderList = sstrPrimaryKey = sintRefresh = 0 sintRecordCount = 0 sintPageSize = 0 sintPageNow = 0 sintPageMax = 0 End Sub Rem 保存記錄數(shù)的 Cookies 變量 Public Property Let strCookiesName(Value) sstrCookiesName = Value End Property Rem 轉(zhuǎn)向地址 Public Property Let strPageUrl(Value) sstrPageUrl = Value End Property Rem 表名 Public Property Let strTableName(Value) 20 sstrTableName = Value End Property Rem 字段列表 Public Property Let strFieldsList(Value) sstrFieldsList = Value End Property Rem 查詢(xún)條件 Public Property Let strCondiction(Value) If Value Then sstrCondiction = WHERE amp。 Value Else sstrCondiction = End If End Property Rem 排序字段 , 如 : [ID] ASC, [CreateDateTime] DESC Public Property Let strOrderList(Value) If Value Then sstrOrderList = ORDER BY amp。 Value Else sstrOrderList = End If End Property Rem 用于統(tǒng)計(jì)記錄數(shù)的字段 Public Property Let strPrimaryKey(Value) sstrPrimaryKey = Value End Propert Rem 每頁(yè)顯示的記錄條數(shù) Public Property Let intPageSize(Value) 21 sintPageSize = toNum(Value, 20) End Property Rem 數(shù)據(jù)庫(kù)連接對(duì)象 Public Property Let objConn(Value) Set sobjConn = Value End Property Rem 當(dāng)前頁(yè) Public Property Let intPageNow(Value) sintPageNow = toNum(Value, 1) End Property Rem 頁(yè)面參數(shù) Public Property Let strPageVar(Value) sstrPageVar = Value End Property Rem 是否刷新 . 1 為刷新 , 其他值則不刷新 Public Property Let intRefresh(Value) sintRefresh = toNum(Value, 0) End Property Rem 獲得當(dāng)前頁(yè) Public Property Get intPageNow() intPageNow = singPageNow End Property Rem 分頁(yè)信息 Public Property Get strPageInfo() strPageInfo = sstrPageInfo End Property Rem 取得記錄集 , 二維 數(shù)組或字串 , 在進(jìn)行循環(huán)輸出時(shí)必須用 IsArray() 判斷 22 Public Property Get arrRecordInfo() If Not sbooInitState Then Exit Property End If Dim rs, sql sql = SELECT amp。 sstrFieldsList amp。 _ FROM amp。 sstrTableName amp。 _ sstrCondiction amp。 _ sstrOrderList Set rs = () sql, sobjConn, 1, 1 If Not( or ) Then = sintPageSize = sintPageNow If Not( or ) Then arrRecordInfo = (sintPageSize) Else arrRecordInfo = End If Else arrRecordInfo = End If Set rs = nothing End Property Rem 初始化記錄數(shù) Private Sub InitRecordCount() sintRecordCount = 0 23 If Not(sbooInitSta