diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2008-11-10 08:49:51 +1100 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-11-10 08:49:51 +1100 |
commit | 963fa5ca9303d146d635e2fba04814f4f791c559 (patch) | |
tree | d43fe3ff32ef4db75b6222fff13c53c00e3a9767 | |
parent | ad8da11f6d0664e0fb3c8707a869425088daea7e (diff) |
Upload now works, with a bit of hackery.
Also, fixed "Archieve" typo in header (Thanks Tim Connors)
-rw-r--r-- | Makefile | 8 | ||||
-rw-r--r-- | web/logo.html | 3 | ||||
-rw-r--r-- | web/menulist.html | 1 | ||||
-rw-r--r-- | web/static-configuration | 2 | ||||
-rw-r--r-- | web/uploader.php.cpp (renamed from web/uploader.php) | 12 |
5 files changed, 15 insertions, 11 deletions
@@ -2,7 +2,7 @@ # V=--verbose for verbose tests. # This can be overridden on cmdline to generate pages elsewhere. -WEBDIR=webpages/ +WEBDIR=~/www/html/ccan/ CFLAGS=-g -Wall -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Werror -Iccan -I. @@ -22,7 +22,7 @@ distclean: clean rm -f $(ALL_DEPENDS) rm -rf $(WEBDIR) -webpages: $(WEB_SUBDIRS) $(WEBDIR)/junkcode $(ALL_PAGES) $(WEBDIR)/list.html $(WEBDIR)/index.html $(WEBDIR)/upload.html $(WEBDIR)/example-config.h $(WEBDIR)/ccan.jpg $(DIRECT_TARBALLS) $(DEPEND_TARBALLS) $(WEBDIR)/ccan.tar.bz2 $(WEBDIR)/Makefile-ccan +webpages: $(WEB_SUBDIRS) $(WEBDIR)/junkcode $(ALL_PAGES) $(WEBDIR)/list.html $(WEBDIR)/index.html $(WEBDIR)/upload.html $(WEBDIR)/uploader.php $(WEBDIR)/example-config.h $(WEBDIR)/ccan.jpg $(DIRECT_TARBALLS) $(DEPEND_TARBALLS) $(WEBDIR)/ccan.tar.bz2 $(WEBDIR)/Makefile-ccan $(WEB_SUBDIRS): mkdir -p $@ @@ -45,6 +45,10 @@ $(WEBDIR)/list.html: web/staticall.php tools/doc_extract $(DIRECT_TARBALLS) $(DE $(WEBDIR)/upload.html: web/staticupload.php php5 web/staticupload.php > $@ +# cpp inserts gratuitous linebreaks at start of file, makes for php problems. +$(WEBDIR)/uploader.php: web/uploader.php.cpp + cpp -w -C -P $< | grep . > $@ + $(WEBDIR)/index.html: web/staticindex.php php5 web/staticindex.php > $@ diff --git a/web/logo.html b/web/logo.html index 61c8f7e7..9a15f28a 100644 --- a/web/logo.html +++ b/web/logo.html @@ -1,5 +1,4 @@ <?php -session_start(); // Pages created in subdirs need ../ appended. $url_prefix = getenv("URLPREFIX"); ?> @@ -14,7 +13,7 @@ $url_prefix = getenv("URLPREFIX"); <img src="<?=$url_prefix?>ccan.jpg" width="250" height="80"> </th> <th> - <h1>Comprehensive C Archieve Network <h1> + <h1>Comprehensive C Archive Network <h1> </th> </tr> </table> diff --git a/web/menulist.html b/web/menulist.html index aa5993f5..bd15a08e 100644 --- a/web/menulist.html +++ b/web/menulist.html @@ -1,5 +1,4 @@ <?php -session_start(); // Pages created in subdirs need ../ appended. $url_prefix = getenv("URLPREFIX"); ?> diff --git a/web/static-configuration b/web/static-configuration index 3ff84923..f0fcb89e 100644 --- a/web/static-configuration +++ b/web/static-configuration @@ -25,7 +25,7 @@ function extract_field($field,$module) return htmlspecialchars(shell_exec('tools/doc_extract '.$field.' '.$module.'/_info.c')); } -# Convert double line breaks into paragraphs, and blank spaces into preformat. +// Convert double line breaks into paragraphs, and blank spaces into preformat. function htmlize_field($field,$module) { $state="inpara"; diff --git a/web/uploader.php b/web/uploader.php.cpp index 40e29445..ed7f76a6 100644 --- a/web/uploader.php +++ b/web/uploader.php.cpp @@ -1,8 +1,10 @@ <?php session_start(); -include('logo.html'); -include('menulist.html'); -include('static-configuration'); +?> +#include "logo.html" +#include "menulist.html" +#include "static-configuration" +<?php // We just email notification for now. Auto-analysis RSN. if ($_FILES["uploadedfile"]["error"] > 0) { @@ -20,6 +22,6 @@ $message = "File type: ".$_FILES["uploadedfile"]["type"]."\n". "File destination: ".$dest."\n"; mail($ccanadmin, $subject, $message, "From: $frommail"); -echo "<div align=\"center\"> Thanks!<br>Stored to temporary location. - Mail will be send to admin to get verification of the code.<//div>"; +echo "<div align=\"center\"> Thanks!<br> + Mail will be send to admin to publish the code.<//div>"; ?> |