From edd100fb0de9fe41e737465ad2cbfc74e78454b8 Mon Sep 17 00:00:00 2001 From: inga-lovinde <52715130+inga-lovinde@users.noreply.github.com> Date: Wed, 9 Jun 2010 18:48:49 +0000 Subject: [PATCH] Static data implemented --- Builder/IISMainHandler/build.txt | 2 +- Builder/IISMainHandler/postbuild.bat | 1 + Builder/IISMainHandler/prebuild.bat | 1 + Builder/IISMainHandler/product.wxs | 10 ++ IISMainHandler/handlers/StaticHandler.cs | 53 ++++++ build-all.bat | 1 + static/css/coffeehaus.css | 215 +++++++++++++++++++++++ static/css/decoration.css | 165 +++++++++++++++++ static/css/global.css | 52 ++++++ static/images/newposts.gif | Bin 0 -> 229 bytes static/images/nonewposts.gif | Bin 0 -> 159 bytes 11 files changed, 499 insertions(+), 1 deletion(-) create mode 100644 IISMainHandler/handlers/StaticHandler.cs create mode 100644 static/css/coffeehaus.css create mode 100644 static/css/decoration.css create mode 100644 static/css/global.css create mode 100644 static/images/newposts.gif create mode 100644 static/images/nonewposts.gif diff --git a/Builder/IISMainHandler/build.txt b/Builder/IISMainHandler/build.txt index d1cbcfa..9cd72aa 100644 --- a/Builder/IISMainHandler/build.txt +++ b/Builder/IISMainHandler/build.txt @@ -1 +1 @@ -66 \ No newline at end of file +72 \ No newline at end of file diff --git a/Builder/IISMainHandler/postbuild.bat b/Builder/IISMainHandler/postbuild.bat index 99ea92c..52575db 100644 --- a/Builder/IISMainHandler/postbuild.bat +++ b/Builder/IISMainHandler/postbuild.bat @@ -1,4 +1,5 @@ @echo off del Templates.7z +del Static.7z ping localhost -n 2 >nul del 7z.exe \ No newline at end of file diff --git a/Builder/IISMainHandler/prebuild.bat b/Builder/IISMainHandler/prebuild.bat index e502560..03320e2 100644 --- a/Builder/IISMainHandler/prebuild.bat +++ b/Builder/IISMainHandler/prebuild.bat @@ -1,3 +1,4 @@ @echo off "C:\Program Files\7-Zip\7z.exe" a Templates.7z ..\..\templates\* -xr!.svn +"C:\Program Files\7-Zip\7z.exe" a Static.7z ..\..\static\* -xr!.svn copy "C:\Program Files\7-Zip\7z.exe" 7z.exe \ No newline at end of file diff --git a/Builder/IISMainHandler/product.wxs b/Builder/IISMainHandler/product.wxs index 79a5b3d..c51f2ad 100644 --- a/Builder/IISMainHandler/product.wxs +++ b/Builder/IISMainHandler/product.wxs @@ -60,6 +60,9 @@ + + + @@ -91,13 +94,20 @@ + + + + + + + diff --git a/IISMainHandler/handlers/StaticHandler.cs b/IISMainHandler/handlers/StaticHandler.cs new file mode 100644 index 0000000..0146ddc --- /dev/null +++ b/IISMainHandler/handlers/StaticHandler.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Web; +using System.Text.RegularExpressions; +using System.IO; +using Microsoft.Win32; + +namespace FLocal.IISHandler.handlers { + class StaticHandler : ISpecificHandler { + + private string[] requestParts; + + public StaticHandler(string[] requestParts) { + this.requestParts = requestParts; + } + + public void Handle(WebContext context) { + if(this.requestParts.Length < 2) { + throw new HttpException(403, "listing not allowed"); + } + + Regex checker = new Regex("^[a-z][0-9a-z]*(\\.[a-zA-Z]+)?$", RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.IgnoreCase | RegexOptions.Singleline); + string path = ""; + for(int i=1; ijGD9G`Heu3STj;;DK4gc?X5<#>V@Z z+z%|YJtMR~rr~3j`czdGW>y{pw{j(KH4dKc4iS|e8(T$FX;}{wMLsqLQ7*ozB76(@ a<}4DLGmmY-3e!~!W=&;Vwp>z>!5RP#`Bi%W literal 0 HcmV?d00001 diff --git a/static/images/nonewposts.gif b/static/images/nonewposts.gif new file mode 100644 index 0000000000000000000000000000000000000000..601a9c308ae6df38c137e4c13e57a3ed7560ea88 GIT binary patch literal 159 zcmZ?wbhEHb6l4%(Sj52a9|-P!JA3x*91t)}GGu@N#h)yk91M&MIv_4cEdz6k#I8$w zC-geK6bR(J