Modificare il file:
\dblist\_config.asp
<% Response.Buffer = True '---------------------------------------------------------------------------------------- '- ASP dbList - Version 8.1 - 30 July 2005 '- Copyright © 2005 - Livio Siri (http://www.DaMa SOFTWARE) - All Rights Reserved. '---------------------------------------------------------------------------------------- '##### CONFIGURAZIONE ################################## '--- Il percorso dblist file di cui il percorso del file di inclusione ----------------------------------------- strIncPath ="/dblist/" '--- Le immagini dblist percorso dir riferito al percorso del file di inclusione --------------------------------- strimgDir ="/dblist/images/" '--- Il percorso del database fisico sul server se fuori HTTP file dir '--- O il percorso virtuale del database sul server se all'interno di root HTTP '--- (NOTA: necessario per il tipo di database Access solo - Decommentare una riga) '--- (NOTA: Se hanno il permesso di scrittura)------------------------------------------------------- ' remotePath = "C:\inetpub\wwwroot\yourdomain\dblist\database\" remotePath = Server.Mappath("/mdb-database") & "\" '--- Il percorso fisico del database locale (opzionale, per PWS locali solo scopo di debug) '--- (NOTA: necessario solo per Access e il tipo di database MySQL) ----------------------------- localPath = "C:\inetpub\wwwroot\mdb-database\" '--- Mostra l'icona Compact Archivio (db Tipo di accesso solo, default = True)-------------------- bShowCompact = True '--- Mostra le icone di stampa Record (default = true)--------------------------------------------------- bShowPrint = True '--- Abilita Descrizione Colonna al posto della funzione di colonna Nome (db Tipo di accesso unico, default = False) '--- (La descrizione colonne devono essere modificati nel database (spazi consentiti)) ----------- bShowColDescription = True '--- Mostra l'esportazione in Excel link (default = True)-------------------------------------------------- bExcel_export = True '--- Abilita login username e password (default=True, UN=admin, PSW=pass) ------------- '--- (Se è True aprire il file "Login.asp" e modificare il proprio nome utente e password) ------------ 'bLogin = True bLogin = False '--- Se la password protetta dopo n minuti si dovrebbe ri-effettuare il login perché '--- tutte le sessioni sono scaduta----------------------------------------- Session.Timeout = 60 '--- Abilita aggiungere/modificare/cancellare/compatta (default=True)---------------------------------- bEnableEdit = True '--- Mostra Nascondi campo con caselle di controllo funzione attivata all'inizio (default=False)----------------- bHideField = False '--- Nascondere la prima Colonna db (normalmente il campo chiave primaria, default=False) '--- Modificato damasoft in Vero (True) ------------------ 'bHideFirstColumn = True bHideFirstColumn = False '--- Mostra tipo di campi nella finestra di aggiungere/modificare alla partenza(default=False) -------------------------------- bShowFieldType = False ' --- Ordine predefinito (asc, desc) ----------------------------------------------------------------------- DefaultSort = "desc" ' --- Record predefiniti per pagina (10, 25, 50 or "ALL") --------------------------------------------- DefaultRecordsPerPage = 50 '--- The database name (NOTE: - If no dbName specified then the dropdown selection '--- between databases into the given folder is enabled - Access only) '--- Il nome del database (NOTA: - Se non dbName specificato allora la selezione a discesa '--- Tra database nella cartella data è attivata - Access solo) '--- (NOTA: dbName è necessario per MSSQL e tipi di database MySQL) ---------------------- dbName = "E-commerce.mdb" ' dbName = "northwind.mdb" ' dbName = "northwind" ' dbName = "mysql" '--- Il fornitore del database, "Access", "MSSQL" o "MySQL (decommentare una riga) - strDbType = "Access" ' strDbType = "MSSQL" ' strDbType = "MySQL" '--- ACCESS Provider string ------------------------------------------------------------------- strACCESS = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" '--- MSSQL ----------------- '--- Inserire i dettagli del tuo Server SQL di seguito --------------------------------------------- strSQLServerName = "mainserver" 'Holds the name of the SQL Server strSQLDBUserName = "sa" 'Holds the user name (for SQL Server Authentication) strSQLDBPassword = "" 'Holds the password (for SQL Server Authentication) '--- MSSQL Provider string strMSSQL = "Provider=SQLOLEDB;Data Source=" & strSQLServerName & ";User Id=" & strSQLDBUserName & ";Password=" & strSQLDBPassword & ";Initial Catalog=" '--- MySQL ------------------ '--- Inserire i dettagli del tuo Server MySQL di seguito ----------------------------------------- strMySQLServerName = "127.0.0.1" 'Holds the name of the remote MySQL Server (ex. data.domain.com;PORT=3306 or localhost) strMySQLDBUserName = "root" 'Holds the user name (for MySQL Server Authentication) strMySQLDBPassword = "1234" 'Holds the password (for MySQL Server Authentication) '--- MySQL Provider string strMySQL = "Provider=MSDASQL;DRIVER={MySQL ODBC 3.51 Driver};USER=" & strMySQLDBUserName & ";PASSWORD=" & strMySQLDBPassword & ";OPTION=3;" '####### FINE CONFIGURAZIONE ###################################### lVersion = "8.2" '--- procedure version '--- Define global variables Dim Coldescr Dim dbName, localPath, remotePath, strImgDir, strInc, strIncPath, bExcel_export, DebugSQL Dim bShowColDescription, bHideFirstColumn, bShowFieldType, DefaultSort, lVersion, mystrSQL Dim dsn, strConn, SQL2, objConn, objRS, strDbType, strACCESS, strMSSQL, strMySQL, strMySQLConn Dim strSQLServerName, strSQLDBUserName, strSQLDBPassword, DefaultRecordsPerPage, bHideField Dim strMySQLServerName, strMySQLDBUserName, strMySQLDBPassword, strProvider, autoPath Dim bShowCompact, bShowPrint Dim bLogin, bEnableEdit Dim UserName, Password Session("basereferer") = Request.ServerVariables("URL") strInc = GetFileName(Session("basereferer")) If bLogin Then %><!-- #include file="security.asp" --><% End if %> <!-- #include file="adovbs.inc" --> <!-- #include file="adolib.inc" --> <!-- #include file="_dblist_81.asp" --> <% '--- Definice la connessione db If dbName <> "" then Session("db") = dbName If Request.Querystring("db") <> "" then Session("db") = Request.Querystring("db") If request.servervariables("HTTP_HOST") = "127.0.0.1" OR request.servervariables("HTTP_HOST") = "localhost" then autoPath = localPath strConn = localPath & Session("db") strMySQLConn = strMySQL & "SERVER=127.0.0.1;DATABASE=" & Session("db") & ";" Else autoPath = remotePath strConn = remotePath & Session("db") strMySQLConn = strMySQL & "SERVER=" & strMySQLServerName & ";DATABASE=" & Session("db") & ";" End if '--- Selezionare il tipo di connessione db Select Case strDbType Case "Access" strProvider = strACCESS dsn = strACCESS & strConn Case "MSSQL" strProvider = strMSSQL dsn = strMSSQL & Session("db") & ";" Case "MySQL" strProvider = strMySQL strConn = strMySQLConn dsn = strMySQLConn End Select '---------------- flusso principale --------------------------------------------- If len(Request.querystring("action")) = 0 then Call GetTable() else Call dbEdit() end if %>
[
Íàçàä
]