Visualizzazione dei risultati da 1 a 2 su 2

Discussione: script - helpdesk

  1. #1
    Utente di HTML.it
    Registrato dal
    Jun 2002
    Messaggi
    100

    script - helpdesk

    Ho scaricato dagli script asp di html.it un bel programma che dovrebbe gestire un help desk. Visto che l'ho scaricato da questo sito, spero che qualcuno l'abbia provato e mi dia una mano.
    L'ho installato sul mio disco c: ma mi dā il seguente errore:
    The language strings are missing. Please run setup.asp to install them. (1)
    Potete per cortesia dare un'occhiata al file setup.asp e dirmi cosa ne pensate (ne allego una parte che spero sia utile), grazie a tutti:



    'Add default language field to config table
    UpdateDB("ALTER TABLE tblConfig ADD DefaultLanguage int NULL")
    UpdateDB("UPDATE tblConfig SET DefaultLanguage=1")

    'Add default language field to user table
    UpdateDB("ALTER TABLE tblUsers ADD [Language] int NULL")
    UpdateDB("UPDATE tblUsers SET [Language]=1")

    'Add language table key
    UpdateDB("ALTER TABLE db_keys ADD Lang int NULL")
    UpdateDB("UPDATE db_keys SET Lang=2")

    'Add table for available languages
    UpdateDB("CREATE TABLE tblLanguage (" & _
    "id int NOT NULL, " & _
    "LangName varchar (50) NULL, " & _
    "Localized varchar (50) NULL)")
    UpdateDB("INSERT INTO tblLanguage (id, LangName, Localized) VALUES (1, 'English', 'English')")

    'Add table for language strings
    UpdateDB("CREATE TABLE tblLangStrings (" & _
    "id int NOT NULL, " & _
    "variable varchar (50) NOT NULL, " & _
    "LangText text NOT NULL)")


    ......


    ' Language Updates (keep last)
    Call UpdateAllLanguages

    ' Check for errors and either roll back the transaction or commit it
    If blnError Then
    cnnDB.RollbackTrans
    Else
    cnnDB.CommitTrans
    blnIsCurrent = True
    End If
    End If

    ' Update just the language strings
    If blnUpdateLang Then

    Call UpdateAllLanguages

    ' Check for errors and either roll back the transaction or commit it
    If blnError Then
    cnnDB.RollbackTrans
    Else
    cnnDB.CommitTrans
    End If
    End If

    ' ---------------------------------------------------
    ' Subroutine that calls the updates for each language
    ' ---------------------------------------------------
    Sub UpdateAllLanguages
    'English
    If Request.Form("english") <> "" Then
    Call UpdateLang("English", "English", "English_English.txt")
    End If

    'Norwegian (Norsk)
    If Request.Form("norwegian") <> "" Then
    Call UpdateLang("Norwegian", "Norsk", "Norwegian_Norsk.txt")
    End If

    'Danish (Dansk)
    If Request.Form("danish") <> "" Then
    Call UpdateLang("Danish", "Dansk", "Danish_Dansk.txt")
    End If

    'Dutch (Nederlands)
    If Request.Form("dutch") <> "" Then
    Call UpdateLang("Dutch", "Nederlands", "Dutch_Nederlands.txt")
    End If

    'German (Deutsch)
    If Request.Form("german") <> "" Then
    Call UpdateLang("German", "Deutsch", "German_Deutsch.txt")
    End If

    'French
    If Request.Form("french") <> "" Then
    Call UpdateLang("French", "Franįais", "French_Franįais.txt")
    End If

    'Spanish
    If Request.Form("spanish") <> "" Then
    Call UpdateLang("Spanish", "Espaņol", "Spanish_Espaņol.txt")
    End If

    ' Remove cached language strings
    Call ClearLangCache(cnnDB)

    End Sub

    ' Subroutine to update languages in the database
    Sub UpdateLang(strLangName, strLocalized, strFileName)
    Dim rstGetLangID, intLangID
    Set rstGetLangID = SQLQuery(cnnDB, "SELECT id FROM tblLanguage WHERE LangName = '" & strLangName & "' AND localized = '" & strLocalized & "'")
    If rstGetLangID.EOF Then
    intLangID = GetUnique(cnnDB, "lang")
    UpdateDB("INSERT INTO tblLanguage (id, LangName, localized) VALUES " & _
    "(" & intLangID & ", '" & strLangName & "', '" & strLocalized & "')")
    Else
    intLangID = rstGetLangID("id")
    End If

    Dim fsFileSys, fsFile, fsLine, strVarName, strLangText, rstCheckVar, strFullFileName, tsLangFile
    Set fsFileSys = Server.CreateObject("Scripting.FileSystemObject")
    strFullFileName = Server.MapPath(strLangDir & strFileName)
    If fsFileSys.FileExists(strFullFileName) Then
    Set fsFile = fsFileSys.GetFile(strFullFileName)
    Set tsLangFile = fsFileSys.OpenTextFile(strFullFileName, 1, 0) ' ForReading, ASCII format
    Do While Not tsLangFile.AtEndOfStream
    fsLine = tsLangFile.ReadLine()
    fsLine = Trim(fsLine)
    If Not (InStr(fsLine, ";") = 1) and Not (Left(fsLine, 1) = "[") and (len(fsline)>0) Then
    fsLine = Split(fsLine, "=", 2)
    strVarName = Trim(fsLine(0))
    strLangText = Trim(fsLine(1))
    If Len(strVarName) > 0 And Len(strLangText) > 0 Then
    strLangText = Replace(strLangText, "'", "''")
    strVarName = Replace(strVarName, "'", "''")
    Set rstCheckVar = SQLQuery(cnnDB, "SELECT * FROM tblLangStrings WHERE id=" & intLangID & " AND variable='" & strVarName & "'")
    If rstCheckVar.EOF Then
    UpdateDB("INSERT INTO tblLangStrings (id, variable, LangText) VALUES " & _
    "(" & intLangID & ", '" & strVarName & "', '" & strLangText & "')")
    Else
    If (StrComp(rstCheckVar("variable"), strVarName, 0) = 0) And blnOverWrite Then 'Doing a binary compare
    UpdateDB("UPDATE tblLangStrings SET LangText='" & strLangText & "' WHERE " & _
    "id = " & intLangID & " AND variable='" & strVarName & "'")
    Else
    UpdateDB("INSERT INTO tblLangStrings (id, variable, LangText) VALUES " & _
    "(" & intLangID & ", '" & strVarName & "', '" & strLangText & "')")
    End If
    End If
    rstCheckVar.Close
    Set rstCheckVar = Nothing
    End If
    End If
    Loop
    tsLangFile.Close
    Set tsLangFile = Nothing
    Set fsFile = Nothing
    End If
    rstGetLangID.Close
    Set rstGetLangID = Nothing
    End Sub


    ....


    ' Subroutine to print out the language form
    Sub PrintLangForm
    Response.Write("Select languages to install:
    ")
    ' Four languages per line
    Response.Write("English:<input type=""checkbox"" name=""english"" checked> | ")
    Response.Write("Danish:<input type=""checkbox"" name=""danish""> | ")
    Response.Write("Dutch:<input type=""checkbox"" name=""dutch"">")
    Response.Write("
    ")
    Response.Write("French:<input type=""checkbox"" name=""french""> | ")
    Response.Write("German:<input type=""checkbox"" name=""german""> | ")
    Response.Write("Norwegian:<input type=""checkbox"" name=""norwegian"">")
    Response.Write("Spanish:<input type=""checkbox"" name=""spanish"">")
    Response.Write("
    ")
    Response.Write("Overwrite any existing language strings:<input type=""checkbox"" name=""overwrite"" checked>")
    Response.Write("
    ")
    Response.Write("Processing may take several minutes.")

    End Sub
    %>
    frappy66

  2. #2
    Devi semplicemente installare la lingua attraverso il "setup.asp".
    Lancia il Setup.asp e quando ti appare la finestra del setup, scegli la lingua (per esempio l'inglese) e premi sul pulsante "Install/Upgrade Language Strings"
    A questo punto ti apparirā una finestra "UPDATE DATABASE" e la scritta Successfully Updated!. Clicca su "Configure your help desk" e poi inserisci come password "admin" ecc ... ecc ...

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.