diff options
author | Katze Miau <miaukatzemiau@priveasy.de> | 2011-10-16 07:34:24 (GMT) |
---|---|---|
committer | Katze Miau <miaukatzemiau@priveasy.de> | 2011-10-16 07:34:24 (GMT) |
commit | 9ae01954ef11947693894cf188d75603ab161aac (patch) | |
tree | 84a28cd644955e52bd6b91f2c474e9f338841119 /files/common/www | |
parent | 425e20c0b13cb117e4d2fff04f523478a0618e24 (diff) |
add makefile to generate images
Diffstat (limited to 'files/common/www')
-rwxr-xr-x | files/common/www/cgi-bin/debug | 26 | ||||
-rwxr-xr-x | files/common/www/cgi-bin/redirect | 8 | ||||
-rwxr-xr-x | files/common/www/cgi-bin/splash | 8 | ||||
-rwxr-xr-x | files/common/www/cgi-bin/splash_click | 38 | ||||
-rwxr-xr-x | files/common/www/cgi-bin/status.xml | 3 | ||||
-rw-r--r-- | files/common/www/cgi-bin/template.status.xml | 31 | ||||
-rw-r--r-- | files/common/www/ff-jena_signet.png | bin | 0 -> 12744 bytes | |||
-rw-r--r-- | files/common/www/ffj.css | 61 | ||||
-rw-r--r-- | files/common/www/iframe.html | 20 | ||||
-rw-r--r-- | files/common/www/splash.html | 88 |
10 files changed, 283 insertions, 0 deletions
diff --git a/files/common/www/cgi-bin/debug b/files/common/www/cgi-bin/debug new file mode 100755 index 0000000..14d8447 --- /dev/null +++ b/files/common/www/cgi-bin/debug @@ -0,0 +1,26 @@ +#!/bin/sh +echo -en "Status: 200 OK\r\n" +echo -en "Content-Type: text/html\r\n" +echo -en "\r\n" + +echo "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head></head><body>" +echo "<h1>Router Status</h1>" +echo "<h2>Batman-ADV</h2>" +echo "<pre>" +batctl tg | cat +batctl tl |cat +echo "</pre>" +echo "<h2>Netzwerk</h2>" +echo "<pre>" +ifconfig | cat +echo "</pre>" +echo "<h2>Prozesse</h2>" +echo "<pre>" +ps aux | cat +echo "</pre>" +echo "<h2>UCI</h2>" +echo "<pre>" +uci show | cat +echo "</pre>" +echo "</body></html>" + diff --git a/files/common/www/cgi-bin/redirect b/files/common/www/cgi-bin/redirect new file mode 100755 index 0000000..9b417db --- /dev/null +++ b/files/common/www/cgi-bin/redirect @@ -0,0 +1,8 @@ +#!/bin/sh +echo -en "Cache-Control: no-cache, max-age=0, no-store, must-revalidate\r\n" +echo -en "Pragma: no-cache\r\n" +echo -en "Expires: -1\r\n" +echo -en "Status: 302 Temporary Redirect\r\n" +echo -en "Location: http://"`uci get network.mesh.ipaddr`"/cgi-bin/splash?"`/bin/urlencode "$HTTP_HOST$REQUEST_URI"`"\r\n" +echo -en "\r\n" +exit 0 diff --git a/files/common/www/cgi-bin/splash b/files/common/www/cgi-bin/splash new file mode 100755 index 0000000..ee907d6 --- /dev/null +++ b/files/common/www/cgi-bin/splash @@ -0,0 +1,8 @@ +#!/bin/sh +echo -en "Status: 200 OK\r\n" +echo -en "Content-Type: text/html\r\n" +echo -en "\r\n" +#targeturl=$(echo $QUERY_STRING) +#targeturl=$(echo $QUERY_STRING | sed -f /etc/urlencode.sed) +targeturl=`echo $QUERY_STRING` +sed "s/targeturl/"$targeturl"/g" /www/splash.html diff --git a/files/common/www/cgi-bin/splash_click b/files/common/www/cgi-bin/splash_click new file mode 100755 index 0000000..d08af6a --- /dev/null +++ b/files/common/www/cgi-bin/splash_click @@ -0,0 +1,38 @@ +#!/bin/sh +echo -en "Status: 200 OK\r\n" +echo -en "Content-Type: text/html\r\n" +echo -en "\r\n" +TEST=`cat ` +TEST=`echo $TEST | sed 's/'target_url='/''/g'` +TEST=`/bin/urldecode "$TEST"` +TEST=`echo $TEST | sed 's/%2F/\//g'` +USER_MAC=`cat /proc/net/arp | grep $REMOTE_HOST | awk 'BEGIN { FS = " " } ; { print $4 }'` + +. $IPKG_INSTROOT/etc/functions.sh +ISSPLASHED=0 +config_load splash_users +is_mac() { + config_get mac "$1" mac + if [ "$mac" == "$USER_MAC" ]; then + ISSPLASHED=1 + fi +} +#check if user is alredy splashed +config_foreach is_mac user +sed 's/targeturl/'"$(echo $TEST| sed 's#/#\\/#g')"'/g' /www/iframe.html + +if [ $ISSPLASHED -eq 1 ]; then + exit +fi +#User is now free to go +iptables -t nat -I ffj_splash 1 -m --mac-source $USER_MAC -j ACCEPT + +uci -q add splash_users user +uci -q set splash_users.@user[-1].mac=$USER_MAC +uci -q set splash_users.@user[-1].time=`date +%s` + +exit 0 + + + + diff --git a/files/common/www/cgi-bin/status.xml b/files/common/www/cgi-bin/status.xml new file mode 100755 index 0000000..8d45a90 --- /dev/null +++ b/files/common/www/cgi-bin/status.xml @@ -0,0 +1,3 @@ +#/bin/bash! +hostname=`hostname` +eval "echo \"$(cat template.status.xml)\"" diff --git a/files/common/www/cgi-bin/template.status.xml b/files/common/www/cgi-bin/template.status.xml new file mode 100644 index 0000000..7df4e9f --- /dev/null +++ b/files/common/www/cgi-bin/template.status.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<node> + <hostname>$hostname</hostname> + <is_hna>0</is_hna> + <network> + <ip_4></ip_4> + <ip_6></ip_6> + </network> + <owner>Max Mustermann</owner> + <godfather>Susi Mustermann</godfather> + <position> + <lat></lat> + <long></long> + <text></text> + </position> + <statistics> + <uptime></uptime> + <dhcp_leases></dhcp_leases> + <load></load> + + </statistics> + + <batman-adv> + <route> + <hostname></hostname> + <mac></mac> + </route> + </batman-adv> +</node> + + diff --git a/files/common/www/ff-jena_signet.png b/files/common/www/ff-jena_signet.png Binary files differnew file mode 100644 index 0000000..15d216c --- /dev/null +++ b/files/common/www/ff-jena_signet.png diff --git a/files/common/www/ffj.css b/files/common/www/ffj.css new file mode 100644 index 0000000..3542611 --- /dev/null +++ b/files/common/www/ffj.css @@ -0,0 +1,61 @@ +div#body { +width: 100%; +text-align: center; +} +div#maincontent{ +margin-left: auto; +margin-right: auto; +max-width: 600px; +font-family: Arial, Verdana, sans-serif; +font-size: 12pt; +text-align: left; +} +div#maincontent a, a:link, a:visited { +color: #464646; +text-decoration: none; +} + +div#button_area{ +padding-left:150px; +padding-right:150px; +text-align:center; +} + +div#button_left{ +float:left; +width: 50%; +text-align:center; +} + +div#button_right{ +float:right; +width: 50%; +text-align:center; +} + +input.button{ +border-color:white black black white; +border-style:solid; +border-width:1px; +background-color: #E5E5E5; +padding: 5px; +color: black; +font-weight: bold; +border-radius: 5px; +-moz-border-radius: 5px; +-webkit-border-radius: 5px; +} +input.button:hover { +background-color: grey; +border-color:white black black white; +border-style:solid; +border-width:1px; +} +div#logo { +height: 125px; +font-size: 24px; +} +img.logo { +float: left; +padding: 5px; +} diff --git a/files/common/www/iframe.html b/files/common/www/iframe.html new file mode 100644 index 0000000..cdee514 --- /dev/null +++ b/files/common/www/iframe.html @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml" + xml:lang="en" lang="en"> + +<head> + <title>Freifunk Jena</title> + + <link rel="stylesheet" type="text/css" href="/ffj.css" /> + + +</head> +<body style="margin:0px;"> +<!-- <div style="width:100%;padding:0px;background-color: #E5E5E5;text-align: center"><a href="targeturl">Weiter zur gesuchten Seite...</a></div>/--> +<iframe src="http://www.freifunk-jena.de/" width="100%" height="1000px"></iframe> +</body> +</html> diff --git a/files/common/www/splash.html b/files/common/www/splash.html new file mode 100644 index 0000000..7b85b5e --- /dev/null +++ b/files/common/www/splash.html @@ -0,0 +1,88 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + +<head> +<script type="text/javascript" src="https://static.jappix.com/php/get.php?l=de&t=js&g=mini.xml&f=jquery.js"></script> + +<script type="text/javascript"> + jQuery(document).ready(function() { + MINI_GROUPCHATS = ["chat@chat.freifunk-jena.de"]; + launchMini(false, true, "anonymous.jappix.com"); + }); +</script> + + <title>Freifunk Jena</title> + + <link rel="stylesheet" type="text/css" href="/ffj.css" /> + +</head> +<body> + <div id="body"> + <div id="maincontent"> + + <div id="logo"> + <img src="/ff-jena_signet.png" class="logo" alt="Freifunk-Logo"/><br /><strong>Freifunk Jena</strong><br />Das freie Bürgernetz für Jena + </div> + + <h2><a id="content" name="content">Willkommen!</a></h2> + <p> + Du bist jetzt mit dem freien Funknetz <a href="http://www.freifunk-jena.de">Freifunk Jena</a> verbunden.<br /> + + Wir sind ein experimentelles Gemeinschaftsnetzwerk, aber kein Internetanbieter. + </p> + + <p> + Ein Zugang <strong>ins Internet</strong> ist trotzdem möglich, + da einige Freifunker ihre privaten Internetzugänge zur Verfügung stellen. + Diese Zugänge müssen sich hier alle teilen. + Bitte sei Dir dessen bewusst und verhalte Dich dementsprechend: + </p> + + <ul> + <li>bitte <strong>keine Filesharing-Programme</strong> betreiben!</li> + <li>bitte <strong>keine unnötigen Downloads oder Streams</strong> starten!</li> + <li>bitte <strong>keine illegalen Aktivitäten</strong>!</li> + </ul> + + <p> + Wenn Du unsere Idee gut findest und das Netz regelmässig benutzt, dann bitten wir Dich um Unterstützung: + </p> + + <ul> + <li><a href="http://www.freifunk-jena.de">Werde selbst Freifunker oder teile deinen Internetzugang!</a></li> + <li>Spende ein paar Euro, damit wir unser Netz weiter betreiben und ausbauen können.</li> + <li>Wenn Du selbst privat genutzte WLAN-Geräte betreibst nutze dafür bitte andere Kanäle als wir.</li> + </ul> + + <p> + Mit einem Klick auf <em>Akzeptieren</em> kannst du für + 1 Stunde(n) unser Netz verwenden. Dann wirst du + erneut aufgefordet, diese Bedingungen zu akzeptieren. + </p> + + + <div id="button_area"> + <div id="button_left"> + <div class="buttons"> + <form action="/cgi-bin/splash_click" method="post"> + <input type="hidden" name="target_url" value="targeturl"/> + <input class="button" type="submit" value="Akzeptieren"/> + </form> + </div> + </div> + <div id="button_right"> + <div class="buttons"> + <form action="http://www.freifunk-jena.de/Decline" method="get"> + <input class="button" type="submit" value="Ablehnen"/> + </form> + </div> + </div> + </div> + </div> + </div> +</body> +</html> |