fb:porticula NoPaste
[fbCGI] ixvviy-index
Uploader: | csde_rats |
Datum/Zeit: | 07.12.2007 18:36:31 |
/'
ixvviy Cluster System
(c) 2007/2008 Marian Beermann aka csde_rats
'/
#Include "mysql/mysql.bi"
#Define MYSQL_HOST "localhost"
#Define MYSQL_USER "ixvviy"
#Define MYSQL_PASS "laptop"
#Define MYSQL_DATB "ixvviy"
#Define Boolean Byte
#Define FALSE 0
#Define TRUE 1
#Define echo(x) Print !x
#Macro hline(w)
echo("<img src='line-begin.png' width='10' height='10' alt='Anfang'>")
echo("<img src='line-mid.png' width='" & w & "' height='10' alt='Mitte'>")
echo("<img src='line-end.png' width='10' height='10' alt='Ende'")
#EndMacro
Dim Shared sql As MYSQL
Function connect() As Boolean
mysql_init(@sql)
sql=*mysql_real_connect(@sql, StrPtr(MYSQL_HOST), _
StrPtr(MYSQL_USER), _
StrPtr(MYSQL_PASS), _
StrPtr(MYSQL_DATB), _
MYSQL_PORT, _
StrPtr(MYSQL_UNIX_ADDR), _
0)
If mysql_select_db(@sql, StrPtr(MYSQL_DATB)) = Not 0 Then Return FALSE
End Function
Dim As String method, request
Dim As Integer length
method = Environ("REQUEST_METHOD")
Select Case Ucase(method)
Case "HEAD"
echo("Content-type: text/html")
Print
End
Case "GET"
request = Environ("QUERY_STRING")
Case "POST"
length = Val(Environ("CONTENT_LENGTH"))
Open cons For Input As #1
request = Space(length)
Get #1,,request
Close #1
Case Else
echo("Content-type: text/html")
Print
echo("<html><body>Invalid Request</body></html>")
End
End Select
If request = "" Then echo("Content-type: text/html"): Print Chr(10, 13)
Dim As String tags_title
echo("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">")
echo("<html>")
echo(" <head>")
echo(" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">")
echo(" <title>" & tags_title & "</title>")
echo(" <style type=\"text/css\">")
echo(" #banner {")
echo(" height: 80px;")
echo(" }")
echo(" #menu {")
echo(" width: 100px;")
echo(" float: left;")
echo(" }")
echo(" #content {")
echo(" width: 69%;")
echo(" float: left;")
echo(" }")
echo(" #login {")
echo(" width: 70px;")
echo(" float: left;")
echo(" }")
echo(" </style>")
echo(" </head>")
echo(" <body>")
echo(" <div id=\"root\">")
echo(" <div id=\"banner\">")
echo(" Der Banner")
echo(" </div>")
echo(" <div id=\"menu\">")
echo(" Hier kommt ein Menu hin")
echo(" </div>")
echo(" <div id=\"content\">")
echo(" Hier werden dann die Daten geladen, wie News")
echo(" oder Memberliste.")
echo(" </div>")
echo(" <div id=\"login\">")
hline(60)
echo(" </div>")
echo(" <br style=\"clear:both;\">")
echo(" </div>")
echo("Hello World!")
echo(" </body>")
echo("</html>")
End