Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/bash
- echo "Content-type: text/html"
- echo ""
- echo "<html>"
- echo "<head><title>XMas Mode and Speed Control</title></head>"
- echo "<body>"
- echo "<table width=100% cellpadding=0 cellspacing=10 border=0>"
- echo "<tr>"
- echo "<td width=50% valign=top>"
- echo "<form method=get>"
- echo "<input type=radio name=mode value=1> Chaser<br>"
- echo "<input type=radio name=mode value=2> In & Out<br>"
- echo "<input type=radio name=mode value=3> Knight Rider<br>"
- echo "<input type=radio name=mode value=4> Police Flasher<br>"
- echo "<input type=radio name=mode value=5> Bargraph<br>"
- echo "<input type=radio name=mode value=6> Double Chaser<br>"
- echo "<input type=radio name=mode value=7> Diving In<br>"
- echo "<input type=radio name=mode value=8> Binary Counter<br>"
- echo "<input type=submit value='Select Pattern'>"
- echo "</form>"
- echo "</td>"
- echo "<td width=50% valign=top>"
- echo "<form method=get>"
- echo "<input type=radio name=speed value=8> Very Very Slow<br>"
- echo "<input type=radio name=speed value=7> Very Slow<br>"
- echo "<input type=radio name=speed value=6> Slow<br>"
- echo "<input type=radio name=speed value=5> Moderate<br>"
- echo "<input type=radio name=speed value=4> Moderately Fast<br>"
- echo "<input type=radio name=speed value=3> Fast<br>"
- echo "<input type=radio name=speed value=2> Crazy Fast<br>"
- echo "<input type=radio name=speed value=1> Ludicrous Speed<br>"
- echo "<input type=submit value='Select Speed'>"
- echo "</form>"
- echo "</td>"
- echo "</body>"
- echo "</html>"
- SPEED=`echo "$QUERY_STRING" | sed -n 's/^.*speed=\([^&]*\).*$/\1/p' | sed "s/%20/ /g"`
- MODE=`echo "$QUERY_STRING" | sed -n 's/^.*mode=\([^&]*\).*$/\1/p' | sed "s/%20/ /g"`
- if [ $MODE ]
- then
- /usr/bin/wget -t 1 http://192.168.1.1:6058/m$MODE
- fi
- if [ $SPEED ]
- then
- /usr/bin/wget -t 1 http://192.168.1.1:6058/s$SPEED
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement