mirror of
https://github.com/openNDS/openNDS.git
synced 2026-05-04 03:01:32 -04:00
Add Theme Click to Continue with Custom Placeholders
Signed-off-by: rob <rob@blue-wave.net>
This commit is contained in:
@@ -15,6 +15,10 @@ download_image_files() {
|
||||
logo="$customimageroot""logo.png"
|
||||
get_image_file "banner_jpg" "$banner_jpg"
|
||||
banner="$customimageroot""banner.jpg"
|
||||
get_image_file "favicon_ico" "$favicon_ico"
|
||||
favicon="$customimageroot""favicon_ico"
|
||||
get_image_file "travel_router_jpg" "$travel_router_jpg"
|
||||
travelrouter="$customimageroot""travel_router.jpg"
|
||||
}
|
||||
|
||||
generate_splash_sequence() {
|
||||
@@ -41,12 +45,13 @@ header() {
|
||||
$gatewayname <br>
|
||||
</med-blue>
|
||||
<div class=\"insert\" style=\"max-width:100%;\">
|
||||
<img src=\"$logo\" alt=\"Splash Page: Logo.\"><br>
|
||||
<img src=\"$logo\" alt=\"Placeholder: Logo.\"><br>
|
||||
<b>$logo_message</b><br>
|
||||
"
|
||||
}
|
||||
|
||||
footer() {
|
||||
# Define a common footer html for every page served (with openNDS version on the thankyou page)
|
||||
# Define a common footer html for every page served
|
||||
year=$(date +'%Y')
|
||||
echo "
|
||||
<hr>
|
||||
@@ -82,9 +87,11 @@ click_to_continue() {
|
||||
|
||||
continue_form() {
|
||||
# Define a click to Continue form
|
||||
|
||||
echo "
|
||||
<big-red>Welcome!</big-red><br>
|
||||
<img style=\"width:100%; max-width: 100%;\" src=\"$banner\" alt=\"Splash Page: Banner Placeholder.\"><br>
|
||||
<img style=\"width:100%; max-width: 100%;\" src=\"$banner\" alt=\"Placeholder: Banner.\"><br>
|
||||
<b>$banner_message</b><br>
|
||||
<med-blue>You are connected to $client_zone</med-blue><br>
|
||||
<italic-black>
|
||||
To access the Internet you must Accept the Terms of Service.
|
||||
@@ -93,6 +100,7 @@ continue_form() {
|
||||
<form action=\"/opennds_preauth/\" method=\"get\">
|
||||
<input type=\"hidden\" name=\"fas\" value=\"$fas\">
|
||||
<input type=\"hidden\" name=\"continue\" value=\"clicked\">
|
||||
$custom_inputs
|
||||
<input type=\"submit\" value=\"Accept Terms of Service\" >
|
||||
</form>
|
||||
<br>
|
||||
@@ -151,6 +159,7 @@ thankyou_page () {
|
||||
<form action=\"/opennds_preauth/\" method=\"get\">
|
||||
<input type=\"hidden\" name=\"fas\" value=\"$fas\">
|
||||
$customhtml
|
||||
$custom_passthrough
|
||||
<input type=\"hidden\" name=\"landing\" value=\"yes\">
|
||||
<input type=\"submit\" value=\"Continue\" >
|
||||
</form>
|
||||
@@ -202,6 +211,7 @@ read_terms() {
|
||||
echo "
|
||||
<form action=\"/opennds_preauth/\" method=\"get\">
|
||||
<input type=\"hidden\" name=\"fas\" value=\"$fas\">
|
||||
$custom_passthrough
|
||||
<input type=\"hidden\" name=\"terms\" value=\"yes\">
|
||||
<input type=\"submit\" value=\"Read Terms of Service \" >
|
||||
</form>
|
||||
@@ -417,15 +427,25 @@ session_length=$((24*60+45))
|
||||
|
||||
quotas="$session_length $upload_rate $download_rate $upload_quota $download_quota"
|
||||
|
||||
# Define the list of Parameters we expect to be sent sent from openNDS:
|
||||
#########################################
|
||||
# Define the list of Parameters we expect to be sent sent from openNDS ($ndsparamlist):
|
||||
# Note you can add custom parameters to the config file and to read them you must also add them here.
|
||||
# Custom parameters are "Portal" information and are the same for all clients eg "admin_email" and "location"
|
||||
ndsparamlist="clientip clientmac gatewayname version hid gatewayaddress gatewaymac authdir originurl clientif admin_email location logo_png banner_jpg"
|
||||
ndsbasicparams="clientip clientmac gatewayname version hid gatewayaddress gatewaymac authdir originurl clientif"
|
||||
ndscustomparams="input logo_png banner_jpg logo_message banner_message"
|
||||
|
||||
# The list of FAS Variables used in the Login Dialogue generated by this script.
|
||||
# These FAS variables received from the login form presented to the client.
|
||||
fasvarlist="terms landing status continue binauth_custom"
|
||||
|
||||
ndsparamlist="$ndsbasicparams $ndscustomparams"
|
||||
|
||||
# The list of FAS Variables used in the Login Dialogue generated by this script is $fasvarlist and defined in login.sh
|
||||
#
|
||||
# Additional custom FAS variables defined in this theme should be added to $fasvarlist here.
|
||||
additionalthemevars=""
|
||||
|
||||
|
||||
fasvarlist="$fasvarlist $additionalthemevars"
|
||||
|
||||
# Title of this theme:
|
||||
title="theme_click-to-continue-custom-placeholders"
|
||||
|
||||
# You can choose to send a custom data string to BinAuth. Set the variable $binauth_custom to the desired value.
|
||||
# Note1: As this script runs on the openNDS router and creates its own log file, there is little point also enabling Binauth.
|
||||
@@ -433,10 +453,10 @@ fasvarlist="terms landing status continue binauth_custom"
|
||||
# Nevertheless it can be enabled at the same time as this script if so desired.
|
||||
# Note2: Spaces will be translated to underscore characters.
|
||||
# Note3: You must escape any quotes.
|
||||
binauth_custom="This is sample text sent from \"theme_click-to-continue\" to \"BinAuth\" for post authentication processing."
|
||||
#binauth_custom="This is sample text sent from \"$title\" to \"BinAuth\" for post authentication processing."
|
||||
|
||||
# Set the user info string for logs (this can contain any useful information including user entered data)
|
||||
userinfo="theme_click-to-continue"
|
||||
userinfo="$title"
|
||||
|
||||
# Customise the Logfile location. Note: the default uses the tmpfs "temporary" directory to prevent flash wear.
|
||||
# Override the defaults to a custom location eg a mounted USB stick.
|
||||
|
||||
Reference in New Issue
Block a user