Større skrift og <hr> mellem indlæggene
Hejsa..Jeg har en tagwall, hvor jeg gerne vil have skriftstørrelsen til at være 2 over hele sitet, og imellem indlæggene skal der være <hr>, så man kan finde rundt i indlæggene..
Her er koden:
<% Function WriteToDB(nickname, message, fontcolor, fontface, ip)
Const adOpenKeyset = 1
Const adLockOptimistic = 3
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "PROVIDER=MSDASQL;DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("access.mdb") & ";UID=;PWD=;"
Set rs = Server.CreateObject("ADODB.RecordSet")
strSQL = "Select * From messages"
rs.Open strSQL, Conn, adOpenKeyset, adLockOptimistic
rs.AddNew
rs("nickname") = nickname
rs("message") = message
rs("fontcolor") = fontcolor
rs("fontface") = fontface
rs("ip") = ip
rs.Update
rs.Close
Set rs = Nothing
Conn.Close
Set Conn = Nothing
End Function
Response.Buffer = True
mode = Request("mode") %>
<head>
<title>Clan [CTD]</title>
<style>
<!--
a:link {color:#000000; text-decoration:none}
a:visited {color:#000000; text-decoration:none}
a:hover {color:#000000; text-decoration:underline}
-->
</style>
<script language="JavaScript">
<!--
var adminloaded = 0;
function AdminWindow(nick)
{
if (adminloaded == 0)
{
if (nick == "webmaster")
{
window.open("admin.asp", "_blank", "width=600, height=100, status=no, locationbar=no, menubar=no");
adminloaded = 1;
}
}
}
//-->
</script>
</head>
<% If mode = "write" Then
nickname = Trim(Request.Form("nickname"))
message = Trim(Request.Form("message"))
If nickname = "" Then
error1 = "[ Du skal skrive et navn ]"
Else
If left(LCase(nickname), 3) = "adm" Then
error1 = "[ Du kan ikke hedde " & nickname & " ]"
ElseIf left(LCase(nickname), 9) = "webmaster" Then
error1 = "[ Du kan ikke hedde " & nickname & " ]"
End if
End If
If message = "" Then
error2 = "[ Du SKAL skrive en besked ]"
End If
If error1 = "" And error2 = "" Then
Call WriteToDB(nickname, message, Request.Form("fontcolor"), Request.Form("fontface"), Request.ServerVariables("REMOTE_ADDR"))
Response.Redirect("default.asp")
End If
End If
%>
<body bgcolor="#9CA8B4" onLoad="guestbook.nickname.focus()">
<div align="center">
<center>
<table border="0" width="700" cellspacing="0" bgcolor="#919191" cellpadding="0">
<tr>
<td width="100%" style="border-style: solid; border-width: 1" bordercolor="#000000" bgcolor="#808080">
<p align="center"><b><font size="2" color="#EEEEEE" face="Verdana">Clan
[CTD] tagwall </font></b></p>
</td>
</tr>
<form action="default.asp?mode=write" method="post" name="guestbook">
<tr>
<td width="100%" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000"><table border="0"
cellspacing="0" width="100%" height="1" cellpadding="0">
<tr>
<td width="100%" height="1" bordercolor="#000000">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="73" bgcolor="#919191">
<tr>
<td width="400" height="13" colspan="2">
<p align="left"></p>
</td>
</tr>
<tr>
<td width="80" height="18">
<p align="center"><font face="Verdana" size="2" color="#000000">Nickname:</font></td>
<td width="300" height="18"><font face="Verdana" size="2"><font color="#000000"><INPUT TYPE="text" NAME="nickname" value="<%=nickname%>" class="css" size="16" style="background-color: #9CA8B4; color: #000000; font-family: Verdana; font-size: 8 pt; border: 1 solid #000000" maxlength="30" OnKeyUp="AdminWindow(this.value)"></font> <font face="Verdana" size="1" color="#FFFFFF"><%=error1%></font></font></td>
</tr>
<tr>
<td width="80" height="25">
<p align="center"><font face="Verdana" size="2" color="#000000">Besked:</font></td>
<td width="200" height="25"><font face="Verdana" size="2"><font color="#000000">
<INPUT TYPE="text" NAME="message" value="<%=message%>" class="css" size="59" style="background-color: #9CA8B4; color: #000000; font-family: Verdana; font-size: 8 pt; border: 1 solid #000000" maxlength="250"></font> <font face="Verdana" size="1" color="#FFFFFF"><%=error2%></font></font></td>
</tr>
</table>
<table border="0" width="696" cellspacing="0" cellpadding="0">
<tr>
<td width="123" bgcolor="#919191">
<p align="center"></td>
<td width="563" bgcolor="#919191">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" align="left">
<b>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td>
<font face="Verdana" size="2">
<b>
<font font color="#EEEEEE"><input type="submit" name="submit" value="Skriv..." class="css" style="background-color: #9CA8B4; color: #000000; font-family: Verdana; font-size: 8 pt; border: 1 solid #000000"><input type="button" name="Opdater" class="css" style="background-color: #9CA8B4; color: #000000; font-family: Verdana; font-size: 8 pt; border: 1 solid #000000" onClick="self.location.href='default.asp'" value="Opdater..."></font></b><font face="Verdana" font size="2" color="#EEEEEE"></form></font></font></td>
</tr>
</table>
</b></td>
</tr>
</table>
</td>
<td width="4" bgcolor="#919191">
<p align="center"></td>
</tr>
</table>
</td>
</tr>
</table>
<%
strDSN = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ="&Server.MapPath("access.mdb")
Set myConn = Server.CreateObject("ADODB.Connection")
myConn.Open strDSN
strSQL = "SELECT COUNT(id) AS Antal FROM messages"
Set CountRs = myConn.execute(strSQL)
SQL = "SELECT * FROM messages order by id desc"
Set Rs = myConn.Execute(SQL)
%>
<div align="center">
<table width="100%" cellspacing="0" cellpadding="0" height="1">
<tr><td style="border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1" bordercolor="#000000" bgcolor="#808080" height="1"><p align="center"><font face="Verdana" size="2" color="#EEEEEE">Der er
<% response.write CountRs("Antal") %> beskeder i tagwallen..</font></td></tr></table>
</div>
<%
do while not Rs.eof
%>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" bordercolor="#000000">
<div align="center">
<table border="0" width="100%" cellspacing="0">
<tr>
<td width="100%" bordercolor="#000000" bgcolor="#EEEEEE"><font face="Verdana" size="2"><b><font color="#000000"><%=server.HTMLencode(rs("nickname"))%>:</font></b><font face="Verdana" size="1" color="<%=rs("fontcolor")%>"> <%=server.HTMLencode(rs("message"))%></font></font></td>
</tr>
<%
rs.MoveNext
Loop
myConn.Close
Set myConn = Nothing
%>
<tr>
<td width="100%" bordercolor="#000000" bgcolor="#808080" style="border-top-style: solid; border-top-width: 1">
<p align="center"><font face="Verdana" size="2"><font color="#EEEEEE">Du kan højest skrive</font><font color="FFFFFF" size="1"> 600 tegn
</font></font></td> </tr>
</table>
</div>
</td>
</tr>
</table>
</table>
</center>
</div>
<p align="center"><font size="2" face="Verdana">Tagwallen er på sin egen side,
da jeg ikke kunne få den ind i det andet design!<br>
<br>
For at komme tilbage til forsiden, <a href="http://ClanCTD.yum.dk">klik her</a></font></p>