<HTML>
<TITLE>www.HighRiseTimes.dk</TITLE>
<LINK HREF=../../hrt.css REL=STYLESHEET>
<BODY LEFTMARGIN=0 TOPMARGIN=0>
<!--#include file="../../whobanned.asp"-->
<TABLE WIDTH=451 BORDER=0 CELLPADDING=0 CELLSPACING=0>
	<TR>
		<TD>
			<IMG SRC="../images/indhold_01.gif" WIDTH=34 HEIGHT=32></TD>
		<TD WIDTH=328 HEIGHT=32 valign=middle><b>galleri:</b>
			</TD>
		<TD>
			<a href=javascript:history.back(-1)><IMG SRC="../images/indhold_03.gif" WIDTH=89 HEIGHT=32 BORDER=0></a></TD>
	</TR>
	<TR>
		<TD COLSPAN=3>
			<IMG SRC="../images/indhold_04.gif" WIDTH=451 HEIGHT=8></TD>
	</TR>
	<TR>
		<TD COLSPAN=3 WIDTH=451 BACKGROUND=../images/indhold_05.gif>
<%
Response.Write "<table border=0><tr><td valign=top>OBS: Når en billed-information tilføjes SKAL billedets kilde (f.eks. 0019.gif) angives 100% korrekt for ikke at skabe problemer. For det andet SKAL billedet være lagt ud i mappen highrisetimes.dk/galleri/images/ for at være gyldigt..</td><td><img src=../images/hisbag.gif></td></tr></table><img src=../images/indhold_04.gif>"

response.write "<table border=0 width=451><td width=33% align=center><a href=galleri.asp?side=skriv>tilføj billede</a></td><td width=33% align=center><a href=galleri.asp?side=showall>vis alle</a></td><td width=33% align=center><a href=galleri.asp?side=adminlist>start</a></td></table><IMG SRC=../images/indhold_04.gif WIDTH=451 HEIGHT=8><br><br>"
%>
<table border=0><TR><TD>
<%
MyDay = Day(Now)
MyMonth = Month(Now)
MyHour = Hour(Now)
MyMinute = Minute(Now)
MySecond = Second(Now)
If len(MyDay) < 2 then strD = "0" else strD = "" end if
If len(MyMonth) < 2 then strM = "0" else strM = "" end if
If len(MyHour) < 2 then strH = "0" else strH = "" end if
If len(MyMinute) < 2 then strMi = "0" else strMi = "" end if
If len(MySecond) < 2 then strS = "0" else strS = "" end if
strLigeNu = strD & Day(Now) & "-" & strM & Month(Now) & "-" & Year(Now) & " " & strH & Hour(Now) & ":" & strMi & Minute(Now) & ":" & strS & Second(Now)

Set Conn = Server.CreateObject("ADODB.Connection")
DSN = "DRIVER={Microsoft Access Driver (*.mdb)}; "
DSN = DSN & "DBQ=" & Server.MapPath("../../../database/falske.mdb")
Conn.Open DSN

strMode = Request.QueryString("side")
Select Case strMode
Case "adminlist"

If session ("login") <> "adminlogin" then
Response.Redirect "../nyhed/nyheder.asp?side=adminlogin"
End If

strSQL = "Select TOP 25 * from gb Order by id desc"
Set rs = Conn.Execute(strSQL)

Do

id = rs("id")
Response.Write "<br><img src=../images/indhold_04.gif><br><b>" & rs("navn") & "</b><br>" & rs("besked") & ", billede nr. <b>" & rs("pic") & "</b><br><br><TABLE Border=0 cellspacing=0 cellpadding=0><TR><TD><IMG SRC=../images/submit_01.gif WIDTH=10 HEIGHT=20></TD><TD BACKGROUND=../images/submit_02.gif>slet</TD><TD><a href=galleri.asp?side=slet&id=" & id & "><img src=../images/submit_03.gif WIDTH=25 HEIGHT=20 border=0></a></TD><TD>&nbsp;</TD><TD><IMG SRC=../images/submit_01.gif WIDTH=10 HEIGHT=20></TD><TD BACKGROUND=../images/submit_02.gif>rediger</TD><TD><a href=galleri.asp?side=rediger&id=" & id & "><img src=../images/submit_03.gif WIDTH=25 HEIGHT=20 border=0></a></TD></TR></TABLE>"

rs.MoveNext

Loop While Not rs.EOF

Conn.Close
Set Conn = Nothing
%>
<%
Case "showall"

If session ("login") <> "adminlogin" then
Response.Redirect "../nyhed/nyheder.asp?side=adminlogin"
End If

strSQL = "Select * from gb Order by id desc"
Set rs = Conn.Execute(strSQL)

Do

id = rs("id")
Response.Write "<br><img src=../images/indhold_04.gif><br><b>" & rs("navn") & "</b><br>" & rs("besked") & ", billede nr. <b>" & rs("pic") & "</b><br><br><TABLE Border=0 cellspacing=0 cellpadding=0><TR><TD><IMG SRC=../images/submit_01.gif WIDTH=10 HEIGHT=20></TD><TD BACKGROUND=../images/submit_02.gif>slet</TD><TD><a href=galleri.asp?side=slet&id=" & id & "><img src=../images/submit_03.gif WIDTH=25 HEIGHT=20 border=0></a></TD><TD>&nbsp;</TD><TD><IMG SRC=../images/submit_01.gif WIDTH=10 HEIGHT=20></TD><TD BACKGROUND=../images/submit_02.gif>rediger</TD><TD><a href=galleri.asp?side=rediger&id=" & id & "><img src=../images/submit_03.gif WIDTH=25 HEIGHT=20 border=0></a></TD></TR></TABLE>"

rs.MoveNext

Loop While Not rs.EOF

Conn.Close
Set Conn = Nothing
%>
<%
Case "skriv"

If session ("login") <> "adminlogin" then
Response.Redirect "../nyhed/nyheder.asp?side=adminlogin"
End If

%>
Hvis billedet er lagt ud på FTPen skal du udfylde ALLE nedenstående felter. Husk at teksten til billedet max må være på 2000 tegn.<br><br>
<form action="galleri.asp?side=opret" method="post">
Overskrift (f.eks. Vice smider):<br><input type="text" name="navn" class="hvidt" maxlength="30"><br>
Teksten til billedet (f.eks. her ser vi bla bla bla):<br><textarea rows="4" cols="19" name="besked" class="hvidt" onfocus="if(this.rows=='4')this.rows='8';" onblur="if(this.rows=='8')this.rows='4';"></textarea><br>
Billedets nummer (f.eks. 0127.gif): <br><input type="text" name="pic" class="hvidt" maxlength="9"><br><br>
<TABLE Border=0 cellspacing=0 cellpadding=0><TR><TD>
			<IMG SRC="../images/submit_01.gif" WIDTH=10 HEIGHT=20></TD>
		<TD BACKGROUND=../images/submit_02.gif>
			tilføj</TD>
		<TD>
			<input type="image" name="submit" src="../images/submit_03.gif" WIDTH=25 HEIGHT=20 border=0></TD>
	</TR>
</TABLE>
</form>
<%
Case "opret"

If session ("login") <> "adminlogin" then
Response.Redirect "../nyhed/nyheder.asp?side=adminlogin"
End If

If len(Request.Form("besked")) > 2000 Then
Response.Write "Din tekst må max være på 2000 tegn, <a href='javascript:history.back(1)'>tilbage</a>"
ElseIf Request.Form("besked") = "" Then
Response.Write "Du mangler at skrive teksten til billedet, <a href='javascript:history.back(1)'>tilbage</a>"
ElseIf Request.Form("pic") = "" Then
Response.Write "Du mangler at indtaste billedets nummer, <a href='javascript:history.back(1)'>tilbage</a>"
ElseIf Request.Form("navn") = "" Then
Response.Write "Du mangler at indtaste overskriften, <a href='javascript:history.back(1)'>tilbage</a>"
ElseIf InStr(1, Request.Form("pic"), ".", 1) = 0 Then
Response.Write "Billed nummeret er ugyldigt, <a href='javascript:history.back(1)'>tilbage</a>"

Else

strSQL = "Insert into gb ("

strSQL = strSQL & "navn, "
strSQL = strSQL & "besked, "
strSQL = strSQL & "pic, "
strSQL = strSQL & "dato) "

strSQL = strSQL & "values( "

strSQL = strSQL & "'" & Server.HTMLEncode(Request("navn")) & "', "
strSQL = strSQL & "'" & Request.Form("besked") & "', "
strSQL = strSQL & "'" & Server.HTMLEncode(Request("pic")) & "', "
strSQL = strSQL & "'" & strLigeNu &  "')"

Session("spam") = Now()

Conn.Execute(strSQL)


Conn.Close
Set Conn = Nothing
End If
Response.Redirect "galleri.asp?side=adminlist"
%>
<%
Case "opdater"

If session ("login") <> "adminlogin" then
Response.Redirect "../nyhed/nyheder.asp?side=adminlogin"
End If

If len(Request.Form("besked")) > 2000 Then
Response.Write "<br>Din tekst må max være på 2000 tegn, <a href='javascript:history.back(1)'>tilbage</a><br><br>"
ElseIf Request.Form("besked") = "" Then
Response.Write "<br>Du mangler at skrive teksten til billedet, <a href='javascript:history.back(1)'>tilbage</a><br><br>"
ElseIf Request.Form("pic") = "" Then
Response.Write "<br>Du mangler at indtaste billedets nummer, <a href='javascript:history.back(1)'>tilbage</a><br><br>"
ElseIf Request.Form("navn") = "" Then
Response.Write "<br>Du mangler at indtaste overskriften, <a href='javascript:history.back(1)'>tilbage</a><br><br>"
ElseIf InStr(1, Request.Form("pic"), ".", 1) = 0 Then
Response.Write "<br>Billed nummeret er ugyldigt, <a href='javascript:history.back(1)'>tilbage</a><br><br>"

Else

strSQL = "Update gb set " 
strSQL = strSQL & "navn = '" & Server.HTMLEncode(Request("navn")) & "', " 
strSQL = strSQL & "besked= '" & Request.Form("besked") & "', " 
strSQL = strSQL & "pic = '" & Server.HTMLEncode(Request("pic")) & "', " 
strSQL = strSQL & "dato = '" & strLigeNu & "' "
strSQL = strSQL & " Where Id = " & Request.Querystring("id") '" " 

Conn.Execute(strSQL)

Conn.Close
Set Conn = Nothing

Response.Redirect "galleri.asp?side=adminlist"

End if
%>
<%
Case "rediger"

If session ("login") <> "adminlogin" then
Response.Redirect "../nyhed/nyheder.asp?side=adminlogin"
End If

strSQL = "Select * from gb Where Id = " & Request.Querystring("id")
Set rs = Conn.Execute(strSQL)

pic = rs("pic")
Response.Write "<b>Redigering af " & pic & ".</b><br><form action='galleri.asp?side=opdater&id=" & rs("id") & "' method='post'> "
Response.Write "Overskrift (f.eks. Vice smider):<br><input type=""text"" class=""hvidt"" name=""navn"" value=""" & rs("navn") & """ maxlenght=30><br>Teksten til billedet (f.eks. her ser vi bla bla bla):<br><textarea rows=""6"" name=""besked"" class=""hvidt"" onfocus=""if(this.rows=='6')this.rows='9';"" onblur=""if(this.rows=='9')this.rows='6';"">" & rs("besked") & "</textarea><br>Billedets nummer (f.eks. 0127.gif):<br><input type='text' class='hvidt' name='pic' maxlenght=9 value='" & pic & "'><br><br>"
%>
<TABLE Border=0 cellspacing=0 cellpadding=0><TR><TD>
			<IMG SRC="../images/submit_01.gif" WIDTH=10 HEIGHT=20></TD>
		<TD BACKGROUND=../images/submit_02.gif>
			opdater</TD>
		<TD>
			<input type="image" name="submit" src="../images/submit_03.gif" WIDTH=25 HEIGHT=20 border=0></TD>
	</TR>
</TABLE></form>
<%
Conn.Close
Set Conn = Nothing
%>
<%
Case "slet"

If session ("login") <> "adminlogin" then
Response.Redirect "../nyhed/nyheder.asp?side=adminlogin"
End If

strSQL = "Delete * From gb Where Id = " & Request.Querystring("id")
Conn.Execute(strSQL)

Conn.Close
Set Conn = Nothing

Response.Redirect "galleri.asp?side=adminlist"
%>
<%
Case Else
Response.Redirect "index.asp"
End Select
%>
</TD></TR></TABLE>
	  </TD>
	</TR>
	<TR>
		<TD COLSPAN=3 class=end WIDTH=451 HEIGHT=43 ALIGN=CENTER><br>
			<!--#include file="../include.asp"--></TD>
	</TR>
</TABLE>
</BODY>
</HTML>