title image


Smiley Re: schickst du code


<%

Function BuildConnectionString()

set clsDEFISS = Server.CreateObject("DEFISSDLL.DEFISSClass")

s = ""

if not (clsDEFISS is Nothing)then

txtUser = clsDEFISS.UserID

txtPassword = clsDEFISS.Password

s = "Persist Security Info=False;"

s = s & "User ID="&txtUser&";"

s = s & "Password="&txtPassword&";"

s = s & "Initial Catalog=AdminDEFISS;"

set oNet = CreateObject("WScript.Network")

s = s & "Data Source=" +oNet.ComputerName

set oNet = nothing

end if

BuildConnectionString = s

set clsDEFISS = nothing

End Function

%>













function UpdateLinks(sNode)

{

alert ('Selected item:' + sNode);

document.form1.action = "LeereSeite.asp";

document.form1.submit()

}





function ClickDB()

{

document.form1.action = "Rechts1.asp?Selected=" +document.form1.select1.value;

//document.form1.action = "Rechts1.asp?Selected=" +this.form1.select1.options[this.form1.select1.selectedIndex].value+"&sID="+ID;

//document.form1.submit()

}











<%

Dim oConn

Dim strConn

Dim sConn

Dim oSqlStmt, oSqlStmt1, oSqlStmt2

Dim oRs, oRs1, oRs2

Dim MySqlStmt, MySqlStmt2

Dim sID, sUID

Dim sLev, sLev1, sLev2

Dim cmd, cmdMit, cmdMit2

Dim fso, tmpID, strUID

Dim objFile

Dim sCatalog, sCube, sDescr

Dim sDisp, sServer, sAdminDB

Dim sDB



Set fso = CreateObject("Scripting.FileSystemObject")

Set objFile = fso.OpenTextFile(Server.MapPath("test.txt"), 8)



sID = Request.QueryString("ID")

objFile.writeline (sID)

sDB = Request.QueryString("Selected")

objFile.writeline(sDB & ": tatsache")



Set oConn = Server.CreateObject("ADODB.Connection")

oConn.Provider = "sqloledb"

strConn = BuildConnectionString()

oConn.Open strConn



set oSqlStmt = Server.CreateObject("ADODB.Command")

set oRs = Server.CreateObject("ADODB.Recordset")

oRs.CursorType = 2



set oSqlStmt1 = Server.CreateObject("ADODB.Command")

set oRs1 = Server.CreateObject("ADODB.Recordset")

oRs1.CursorType = 2



set oSqlStmt2 = Server.CreateObject("ADODB.Command")

set oRs2 = Server.CreateObject("ADODB.Recordset")

oRs2.CursorType = 2



Set oSqlStmt.ActiveConnection = oConn

theYear = Year(Date) & vbCrLf



If sID "" Then

oSqlStmt.CommandText = "SELECT Arbeitsanteil,Telefon,eMail,RestrictedAccess from DEFISSUser where UserID = " & sID

objFile.writeline (oSqlStmt.CommandText)

Set oRs = oSqlStmt.Execute



sUID = (oRs.Fields(0))

objFile.writeline (sUID)

If oRs.Fields(1) = "" Then

sLev = "0"

Else

slev = (oRs.Fields(1))

End if

If oRs.Fields(2) = "" Then

sLev1 = "0"

Else

sLev1 = (oRs.Fields(2))

End if

If oRs.Fields(2) = "" Then

sLev2 = "0"

Else

sLev2 = (oRs.Fields(3))

End if

oRs.Close

End if

%>





AA

" type="text" id="text1" name="AA" style="background-color:#FEF1E9;">



Telefon

" type="text" id="text1" name="Telefon" style="background-color:#FEF1E9;">



eMail

" type="text" id="text1" name="eMail" style="background-color:#FEF1E9;">



 

 



Zugriff

" type="text" id="text1" name="Zugriff" style="background-color:#FEF1E9;">



Eingerichtete Würfel





<%

if sID "" then

MySqlStmt = "SELECT CubeInfo.Cube AS Cube, AdminDB as DB "

MySqlStmt = MySqlStmt & "FROM CubeAccess INNER JOIN "

MySqlStmt = MySqlStmt & "CubeInfo ON CubeAccess.CubeID = CubeInfo.CubeID "

MySqlStmt = MySqlStmt & "WHERE CubeAccess.UserID = " & sID

objFile.writeline (MySqlStmt)



oSqlStmt.CommandText = MySqlStmt

oSqlStmt.CommandType = 1

set oSqlStmt.ActiveConnection = oConn

oRs.Open oSqlStmt, , 1



do while not oRs.EOF

sCube = cstr(oRs.Fields(0))

objFile.writeline (sCube)

sAdminDB = cstr(oRs.Fields(1))

objFile.writeline (sAdminDB)



'If sDB = sAdminDB Then



%>

" Selected >





<% 'end if

oRs.MoveNext

Loop

oRs.Close

end if



%>



















<%

oConn.Close

set oConn = Nothing

%>













geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: