Instantly share code, notes, and snippets.
Created
April 12, 2017 17:40
-
Star
(0)
0
You must be signed in to star a gist -
Fork
(0)
0
You must be signed in to fork a gist
-
Save coccoinomane/dd480435110e7eab4c44e9aa073ca322 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
prepaiderr_1 = "{PREPAIDERR_01}"; | |
prepaiderr_2 = "{PREPAIDERR_02}"; | |
prepaiderr_3 = "{PREPAIDERR_03}"; | |
</script> | |
<script type="text/javascript"> | |
var voucher_or_normal = {OPTIONAL} ; // 0 - no optional, 1 is basic, 2 is voucher code, 3 is SMS | |
var display_facebook_button = {DISPLAY_FACEBOOK_BUTTON} ; // 1 - visible, 0 hidden | |
var display_google_button = {DISPLAY_GOOGLE_BUTTON} ;// 1 - visible, 0 hidden | |
var display_twitter_button = {DISPLAY_TWITTER_BUTTON} ;// 1 - visible, 0 hidden | |
var display_linkedin_button = {DISPLAY_LINKEDIN_BUTTON} ; // 1 - visible, 0 hidden | |
var display_instagram_button = {DISPLAY_INSTAGRAM_BUTTON} ; // 1 - visible, 0 hidden | |
var fb_mode = {FB_MODE} ; // 0 - instant login, 1 like , 2 csak wallpost/checkin , 3 like + wallpost | |
</script> | |
<style type="text/css"> | |
#autologin_form1{display:none;} | |
#normal_login{display:none ;} | |
#social_login{display:block;} | |
#voucher_login{display: none; } | |
</style> | |
<div id="fb-root"></div> | |
<script type="text/javascript"> | |
// Custom settings | |
var minlength = '3'; // Set to minimum required characters as specified in your form | |
var delay = '0'; // Time of inactivity to check. Always in milliseconds! (1 sec = 1000 millisec.) | |
var ok_image = "<img src='customer_images/check.jpg' style='vertical-align:middle;margin-top:-3px;'/>"; | |
var no_image = "<img src='customer_images/cross.jpg' style='vertical-align:middle;margin-top:-3px;' />"; | |
// Declaring required variables | |
var digits = "0123456789"; | |
// non-digit characters which are allowed in phone numbers | |
var phoneNumberDelimiters = "()- "; | |
// characters which are allowed in international phone numbers | |
// (a leading + is OK) | |
var validWorldPhoneChars = phoneNumberDelimiters + "+"; | |
// Minimum no of digits in an international phone no. | |
var minDigitsInIPhoneNumber = 10; | |
var icc = []; | |
icc['AF'] = '93'; | |
icc['AL'] = '355'; | |
icc['DZ'] = '213'; | |
icc['AS'] = '1684'; | |
icc['AD'] = '376'; | |
icc['AO'] = '244'; | |
icc['AI'] = '1264'; | |
icc['AG'] = '1268'; | |
icc['AR'] = '54'; | |
icc['AM'] = '374'; | |
icc['AW'] = '297'; | |
icc['AU'] = '61'; | |
icc['AT'] = '43'; | |
icc['AZ'] = '994'; | |
icc['BS'] = '1242'; | |
icc['BH'] = '973'; | |
icc['BD'] = '880'; | |
icc['BB'] = '1246'; | |
icc['BY'] = '375'; | |
icc['BE'] = '32'; | |
icc['BZ'] = '501'; | |
icc['BJ'] = '229'; | |
icc['BM'] = '1441'; | |
icc['BT'] = '975'; | |
icc['BO'] = '591'; | |
icc['BA'] = '387'; | |
icc['BW'] = '267'; | |
icc['BR'] = '55'; | |
icc['IO'] = '246'; | |
icc['BN'] = '673'; | |
icc['BG'] = '359'; | |
icc['BF'] = '226'; | |
icc['BI'] = '257'; | |
icc['KH'] = '855'; | |
icc['CM'] = '237'; | |
icc['CA'] = '1'; | |
icc['CV'] = '238'; | |
icc['KY'] = '1345'; | |
icc['CF'] = '236'; | |
icc['TD'] = '235'; | |
icc['CL'] = '56'; | |
icc['CN'] = '86'; | |
icc['CX'] = '61'; | |
icc['CC'] = '672'; | |
icc['CO'] = '57'; | |
icc['KM'] = '269'; | |
icc['CG'] = '242'; | |
icc['CK'] = '682'; | |
icc['CR'] = '506'; | |
icc['CI'] = '225'; | |
icc['HR'] = '385'; | |
icc['CU'] = '53'; | |
icc['CY'] = '357'; | |
icc['CZ'] = '420'; | |
icc['DK'] = '45'; | |
icc['DJ'] = '253'; | |
icc['DM'] = '1767'; | |
icc['DO'] = '1'; | |
icc['TP'] = '670'; | |
icc['EC'] = '593'; | |
icc['EG'] = '20'; | |
icc['SV'] = '503'; | |
icc['GQ'] = '240'; | |
icc['ER'] = '291'; | |
icc['EE'] = '372'; | |
icc['ET'] = '251'; | |
icc['FK'] = '500'; | |
icc['FO'] = '298'; | |
icc['FJ'] = '679'; | |
icc['FI'] = '358'; | |
icc['FR'] = '33'; | |
icc['FX'] = '33'; | |
icc['GF'] = '594'; | |
icc['PF'] = '689'; | |
icc['TF'] = '262'; | |
icc['GA'] = '241'; | |
icc['GM'] = '220'; | |
icc['GE'] = '995'; | |
icc['DE'] = '49'; | |
icc['GH'] = '233'; | |
icc['GI'] = '350'; | |
icc['GR'] = '30'; | |
icc['GL'] = '299'; | |
icc['GD'] = '1473'; | |
icc['GP'] = '590'; | |
icc['GU'] = '1671'; | |
icc['GT'] = '502'; | |
icc['GN'] = '224'; | |
icc['GW'] = '245'; | |
icc['GY'] = '592'; | |
icc['HT'] = '509'; | |
icc['HN'] = '504'; | |
icc['HK'] = '852'; | |
icc['HU'] = '36'; | |
icc['IS'] = '354'; | |
icc['IN'] = '91'; | |
icc['ID'] = '62'; | |
icc['IR'] = '98'; | |
icc['IQ'] = '964'; | |
icc['IE'] = '353'; | |
icc['IL'] = '972'; | |
icc['IT'] = '39'; | |
icc['JM'] = '1876'; | |
icc['JP'] = '81'; | |
icc['JO'] = '962'; | |
icc['KZ'] = '7'; | |
icc['KE'] = '254'; | |
icc['KI'] = '686'; | |
icc['KP'] = '850'; | |
icc['KR'] = '82'; | |
icc['KW'] = '965'; | |
icc['KG'] = '996'; | |
icc['LA'] = '856'; | |
icc['LV'] = '371'; | |
icc['LB'] = '961'; | |
icc['LS'] = '266'; | |
icc['LR'] = '231'; | |
icc['LY'] = '218'; | |
icc['LI'] = '423'; | |
icc['LT'] = '370'; | |
icc['LU'] = '352'; | |
icc['MO'] = '853'; | |
icc['MK'] = '389'; | |
icc['MG'] = '261'; | |
icc['MW'] = '265'; | |
icc['MY'] = '60'; | |
icc['MV'] = '960'; | |
icc['ML'] = '223'; | |
icc['MT'] = '356'; | |
icc['MH'] = '692'; | |
icc['MQ'] = '596'; | |
icc['MR'] = '222'; | |
icc['MU'] = '230'; | |
icc['YT'] = '269'; | |
icc['MX'] = '52'; | |
icc['FM'] = '691'; | |
icc['MD'] = '373'; | |
icc['MC'] = '377'; | |
icc['MN'] = '976'; | |
icc['MS'] = '1664'; | |
icc['MA'] = '212'; | |
icc['MZ'] = '258'; | |
icc['MM'] = '95'; | |
icc['NA'] = '264'; | |
icc['NR'] = '674'; | |
icc['NP'] = '977'; | |
icc['NL'] = '31'; | |
icc['AN'] = '599'; | |
icc['NC'] = '687'; | |
icc['NZ'] = '64'; | |
icc['NI'] = '505'; | |
icc['NE'] = '227'; | |
icc['NG'] = '234'; | |
icc['NU'] = '683'; | |
icc['NF'] = '6723'; | |
icc['MP'] = '1670'; | |
icc['NO'] = '47'; | |
icc['OM'] = '968'; | |
icc['PK'] = '92'; | |
icc['PW'] = '680'; | |
icc['PA'] = '507'; | |
icc['PG'] = '675'; | |
icc['PY'] = '595'; | |
icc['PE'] = '51'; | |
icc['PH'] = '63'; | |
icc['PN'] = '64'; | |
icc['PL'] = '48'; | |
icc['PT'] = '351'; | |
icc['PR'] = '1'; | |
icc['QA'] = '974'; | |
icc['RO'] = '40'; | |
icc['RU'] = '7'; | |
icc['RW'] = '250'; | |
icc['KN'] = '1869'; | |
icc['LC'] = '1758'; | |
icc['VC'] = '1784'; | |
icc['WS'] = '685'; | |
icc['SM'] = '378'; | |
icc['ST'] = '239'; | |
icc['SA'] = '966'; | |
icc['SN'] = '221'; | |
icc['SC'] = '248'; | |
icc['SL'] = '232'; | |
icc['SG'] = '65'; | |
icc['SK'] = '421'; | |
icc['SI'] = '386'; | |
icc['SB'] = '677'; | |
icc['SO'] = '252'; | |
icc['ZA'] = '27'; | |
icc['GS'] = '27'; | |
icc['ES'] = '34'; | |
icc['LK'] = '94'; | |
icc['SH'] = '290'; | |
icc['PM'] = '508'; | |
icc['SD'] = '249'; | |
icc['SR'] = '597'; | |
icc['SZ'] = '268'; | |
icc['SE'] = '46'; | |
icc['CH'] = '41'; | |
icc['SY'] = '963'; | |
icc['TW'] = '886'; | |
icc['TJ'] = '992'; | |
icc['TZ'] = '255'; | |
icc['TH'] = '66'; | |
icc['TG'] = '228'; | |
icc['TK'] = '690'; | |
icc['TO'] = '676'; | |
icc['TT'] = '1868'; | |
icc['TN'] = '216'; | |
icc['TR'] = '90'; | |
icc['TM'] = '993'; | |
icc['TC'] = '1649'; | |
icc['TV'] = '688'; | |
icc['UG'] = '256'; | |
icc['UA'] = '380'; | |
icc['AE'] = '971'; | |
icc['GB'] = '44'; | |
icc['US'] = '1'; | |
icc['UM'] = '1'; | |
icc['UY'] = '598'; | |
icc['UZ'] = '998'; | |
icc['VU'] = '678'; | |
icc['VA'] = '379'; | |
icc['VE'] = '58'; | |
icc['VN'] = '84'; | |
icc['VG'] = '1284'; | |
icc['VI'] = '1340'; | |
icc['WF'] = '681'; | |
icc['EH'] = '212'; | |
icc['YE'] = '967'; | |
icc['YU'] = '11'; | |
icc['ZR'] = '243'; | |
icc['ZM'] = '260'; | |
icc['ZW'] = '263'; | |
function next(elem) { | |
do { | |
elem = elem.nextSibling; | |
} while (elem && elem.nodeType !== 1); | |
return elem; | |
} | |
function removeerror (field) | |
{ | |
if (document.getElementById(field).className== "responsive_noerror") | |
{ | |
var elem = document.getElementById(field); | |
var nextElem = next(elem); | |
if (nextElem) nextElem.style.display = 'none'; | |
} | |
} | |
function trim(s) | |
{ | |
return s.replace(/^\s+|\s+$/, ''); | |
} | |
function isInteger(s) | |
{ var i; | |
for (i = 0; i < s.length; i++) | |
{ | |
// Check that current character is number. | |
var c = s.charAt(i); | |
if (((c < "0") || (c > "9"))) return false; | |
} | |
// All characters are numbers. | |
return true; | |
} | |
function stripCharsInBag(s, bag) | |
{ var i; | |
var returnString = ""; | |
// Search through string's characters one by one. | |
// If character is not in bag, append to returnString. | |
for (i = 0; i < s.length; i++) | |
{ | |
// Check that current character isn't whitespace. | |
var c = s.charAt(i); | |
if (bag.indexOf(c) == -1) returnString += c; | |
} | |
return returnString; | |
} | |
function checkInternationalPhone(strPhone){ | |
var bracket=3 | |
strPhone=trim(strPhone) | |
if(strPhone.indexOf("+")>1) return false | |
if(strPhone.indexOf("-")!=-1)bracket=bracket+1 | |
if(strPhone.indexOf("(")!=-1 && strPhone.indexOf("(")>bracket)return false | |
var brchr=strPhone.indexOf("(") | |
if(strPhone.indexOf("(")!=-1 && strPhone.charAt(brchr+2)!=")")return false | |
if(strPhone.indexOf("(")==-1 && strPhone.indexOf(")")!=-1)return false | |
s=stripCharsInBag(strPhone,validWorldPhoneChars); | |
return (isInteger(s) && s.length >= minDigitsInIPhoneNumber); | |
} | |
function timeoutCheck(field, divid){ | |
if(window.mytimeout) window.clearTimeout(window.mytimeout); | |
window.mytimeout = window.setTimeout(function(){toggle_field2(field, divid)}, delay); | |
reposition(); | |
return true; | |
} | |
function toggle_field2(field) { | |
handle = document.getElementById(field); | |
if (field == "password" ) { | |
handle2 = document.getElementById("loginname"); | |
} else if (field == "repeatpassword" ) { | |
handle2 = document.getElementById("password"); | |
} | |
if ((field == "password") && (handle.value.length < minlength)) | |
{document.getElementById(field).className = "responsive_error";} | |
if ((field == "repeatpassword") && (handle.value.length < minlength)) | |
{document.getElementById(field).className = "responsive_error";} | |
if ((field == "name") && (handle.value.length < minlength)) | |
{document.getElementById(field).className = "responsive_error";} | |
if ((field == "email") && (handle.value.length < minlength)) | |
{document.getElementById(field).className = "responsive_error";} | |
if ((field == "c_custom_1") || (field == "c_custom_2") || (field == "c_custom_3") || (field == "c_custom_4") || (field == "c_custom_5")) | |
{ | |
if (handle.value.length > minlength) | |
{ | |
document.getElementById(field).className = "responsive_noerror"; | |
} | |
else | |
{ | |
document.getElementById(field).className = "responsive_error"; | |
} | |
} | |
if ((handle.value.length > minlength) && (field != "company") && (field != "zip") && (field != "address") && (field != "city")) | |
{ | |
if (field == "password") | |
{ | |
if (handle.value.indexOf(' ') == -1) | |
{ | |
if (handle.value == handle2.value) | |
{ | |
document.getElementById(field).className = "responsive_error"; | |
document.getElementById("password_rule").innerHTML = " {LANG:username_password}"; | |
} else | |
{ | |
document.getElementById(field).className = "responsive_noerror"; | |
document.getElementById("password_rule").innerHTML = ""; | |
} | |
} | |
else | |
{ | |
document.getElementById("password_rule").className = "responsive_error"; | |
document.getElementById("password_rule").innerHTML = " {LANG:nospecials}"; | |
} | |
} | |
else if (field == "repeatpassword") | |
{ | |
if (handle.value != handle2.value) | |
{ | |
document.getElementById(field).className = "responsive_error"; | |
document.getElementById("password2_rule").innerHTML = " {LANG:passwords_nomatch}"; | |
} else | |
{ | |
document.getElementById(field).className = "responsive_noerror"; | |
document.getElementById("password2_rule").innerHTML = ""; | |
} | |
} | |
else if (field == "name") | |
{ | |
if (handle.value.indexOf(' ') != -1) { | |
document.getElementById(field).className = "responsive_noerror"; | |
} else { | |
document.getElementById(field).className = "responsive_error"; | |
} | |
} | |
else if (field == "email") | |
{ | |
var tfld = trim(handle.value); | |
var emailFilter = /^[^@]+@[^@.]+\.[^@]*\w\w$/ ; | |
var illegalChars= /[\(\)\<\>\,\;\:"\[\]]/ ; | |
if (!emailFilter.test(tfld)) { | |
document.getElementById(field).className = "responsive_error"; | |
} else if (handle.value.match(illegalChars)) { | |
document.getElementById(field).className = "responsive_error"; | |
} else { | |
document.getElementById(field).className = "responsive_noerror"; | |
} | |
} | |
else if (field == "phone") | |
{ | |
var Phone=handle.value; | |
if ((Phone==null)||(Phone=="")){ | |
document.getElementById(field).className = "responsive_error"; | |
} else if (checkInternationalPhone(Phone)==false){ | |
document.getElementById(field).className = "responsive_error"; | |
} else { | |
if (Phone.charAt(0) != "+") { | |
document.getElementById(field).className = "responsive_error"; | |
document.getElementById("phone_rule").innerHTML = " {LANG:cust_phone_format}"; | |
document.getElementById("phone_rule").style.display = ''; | |
} else { | |
document.getElementById(field).className = "responsive_noerror"; | |
document.getElementById("phone_rule").innerHTML = ""; | |
document.getElementById("phone_rule").style.display = 'none'; | |
} | |
} | |
} | |
} | |
if ((field == "company") || (field == "zip") || (field == "phone") || (field == "city") || (field == "address")) | |
{ | |
if (handle.value.length > minlength) { | |
document.getElementById(field).className = "responsive_noerror"; | |
} | |
else { | |
document.getElementById(field).className = "responsive_error"; | |
} | |
} | |
removeerror(field); | |
} | |
function statechange_field(field) { | |
if (http.readyState == 4) { | |
var html = http.responseText; | |
if (html == 'true') { | |
document.getElementById(field).className = "responsive_noerror"; | |
document.getElementById("username_rule").innerHTML = ""; | |
} else if (html == 'username_exists') { | |
document.getElementById(field).className = "responsive_error"; | |
document.getElementById("username_rule").innerHTML = " {LANG:username_exists}"; | |
} else { | |
document.getElementById(field).className = "responsive_noerror"; | |
document.getElementById("username_rule").innerHTML = ""; | |
} | |
} | |
} | |
function insertICC(field) { | |
var cc = document.getElementById("country").value; | |
iccnum = icc[cc]; | |
currphone = document.getElementById("phone").value; | |
if (( currphone == '' ) || (currphone.length < 5 )) { | |
document.getElementById("phone").value = '+' + iccnum; } | |
handle = document.getElementById(field); | |
vlue= handle.options[handle.selectedIndex].value; | |
if ( vlue != "") { | |
document.getElementById(field).className = "responsive_noerror"; | |
} | |
else { | |
document.getElementById(field).className = "responsive_error"; | |
} | |
removeerror(field); | |
} | |
function checkCheckBox(f) { | |
var termsdisplayed =''; | |
if (document.getElementById('capture_12').currentStyle) { termsdisplayed = document.getElementById('capture_12').currentStyle.display;} | |
else | |
{termsdisplayed = getComputedStyle (document.getElementById('capture_12'), null).getPropertyValue('display');} | |
if ((termsdisplayed != 'none') && (f.agree.checked == false)) { | |
alert("{LANG:accept_terms}"); | |
return false; | |
} else | |
document.getElementById('freeform').submit(); | |
} | |
</script> | |
<style> | |
.buttons { | |
-webkit-border-radius: 3px; | |
-moz-border-radius: 3px; | |
border-radius: 3px; | |
height: 45px; | |
width: 110px; | |
line-height: 42px; | |
font-size: 14px; | |
padding-top: 0px; | |
margin-left: 7px; | |
margin-right: 7px; | |
color: white; | |
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; | |
font-size: 16px; | |
padding-left: 42px; | |
margin-bottom: 10px; | |
cursor: hand; | |
cursor: pointer; | |
display:inline-block; | |
} | |
.facebook { | |
background-image: url(/customer/customer_images/fb-btn_b.png); | |
background-repeat: no-repeat; | |
; | |
} | |
.google { | |
background-image: url(/customer/customer_images/gp-btn_b.png); | |
background-repeat: no-repeat; | |
; | |
} | |
.twitter { | |
background-image: url(/customer/customer_images/tw-btn_b.png); | |
background-repeat: no-repeat; | |
; | |
} | |
.instagrambutton { | |
background-color: #ffffff !important; | |
background-image:url(/images/instagram_back.jpg) !important; | |
background-position:0px 0px !important; | |
background-repeat:no-repeat !important; | |
background-size: 400px 70px !important; | |
} | |
.instagram { | |
margin-left:-40px; | |
} | |
#instagramlogo{ | |
width:56px; | |
float:left; | |
position:relative; | |
top:-20px;; | |
display:inline; | |
margin-left:-6px; | |
} | |
.linkedin { | |
background-image: url(/customer/customer_images/li-btn_b.png); | |
background-repeat: no-repeat; | |
; | |
} | |
#facebook_button{display:none;} | |
#google_button{display:none;} | |
#twitter_button{display:none;} | |
#linkedin_button{display:none;} | |
#instagram_button{display:none;} | |
</style> | |
<script type="text/javascript"> | |
function toggleview() | |
{ | |
if (voucher_or_normal== 3) | |
{ | |
openskip('voucher_login',500); | |
} | |
else if (voucher_or_normal== 2) | |
{ | |
openskip('voucher_login',500); | |
} | |
else if (voucher_or_normal== 1) | |
{ | |
openskip('normal_login',500); | |
} | |
return;} | |
</script> | |
<!-- hotspotsystem.socialWifi core --> | |
<script src="/customer/facebook3/js/hotspotsystem.js"></script> | |
<script type="text/javascript" src="/hotsyswp_inc/vouchercheck.js"></script> | |
<script type="text/javascript"> | |
function submitonenter(formid,evt,thisObj) { | |
evt = (evt) ? evt : ((window.event) ? window.event : "") | |
if (evt) { | |
// process event here | |
if ( evt.keyCode==13 || evt.which==13 ) { | |
thisObj.blur(); | |
//document.getElementById(formid).submit(); | |
vouchercheck(document.getElementById('operator').value, document.getElementById('code').value); | |
} | |
} | |
} | |
</script> | |
<!-- <top> --> | |
<div id="top" class="topmain" > | |
<div class="main_center"> | |
<!-- <strong class="logo"><a href="index.html">HotspotSystem</a></strong> --> | |
<strong class="big_header" >{LANG:welcome_header}</strong> | |
<p class="locationdata">{LOCATIONDATA}</p> | |
</div> | |
</div> | |
<!-- </top> --> | |
<center> <div id="topright" class="social_topright">{TOP_RIGHT}</div> </center> | |
<div id="voucher_login" class="over_panel" style="text-align:left;" > | |
<header> | |
<div class="main_center"> | |
<strong>{LANG:connect_free}</strong> | |
<a href="prelogin.php?nasid={NASID}" class="close_prelogin" > </a> | |
</div> | |
</header> | |
<div class="content"> | |
<div class="main_center"> | |
<center> | |
<div id="sms_login" > | |
<a class="button2" href="/customer/index.php?nasid={NASID}" ><div class="buttontext">{LANG:sms_verification}</div></a> | |
</div> | |
</center> | |
<div class="border_panel" > | |
<FORM METHOD='get' id="prepaidform" action="{LOGINPATH}" name="voucherlogin" class="dataform" onsubmit="return validateForm()"> | |
<INPUT TYPE=HIDDEN NAME=chal VALUE="{CHALLENGE}"> | |
<INPUT TYPE=HIDDEN NAME=uamip VALUE="{UAMIP}"> | |
<INPUT TYPE=HIDDEN NAME=uamport VALUE="{UAMPORT}"> | |
<INPUT TYPE=HIDDEN NAME=nasid VALUE="{NASID}"> | |
<INPUT TYPE=HIDDEN NAME=mac VALUE="{MAC}"> | |
<INPUT TYPE=HIDDEN NAME=userurl VALUE="{USERURL}"> | |
<INPUT TYPE=HIDDEN NAME=login VALUE="login"> | |
<input name="skin_id" type="hidden" id="skin_id" value="{SKIN_ID}" /> | |
<input name="operator" type="hidden" id="operator" value="{OPERATOR}" /> | |
<input name="uid" id="uid" type=HIDDEN value="{USERNAME}" size="16" maxlength="32" class="forminput" > | |
<p></p> | |
<div class="field field_code"> | |
<div class="label">{LANG:enter_pin} </div> | |
<div class="col"> | |
<input id="code" name="pwd" type="text" value="{PASSWORD}" onKeyUp="logincopy()" onBlur="logincopy()" /> | |
</div> | |
<p class="info2 voucher_error_responsive" id="prepaiderror">{ERROR} </p> | |
<div class="clear"></div> | |
</div> | |
<div class="btn_container"> | |
<a href="#" class="button1" onclick ="vouchercheck(document.getElementById('operator').value, document.getElementById('code').value)">OK</a> | |
</div> | |
<input type="submit" class="hsubmit" onclick ="vouchercheck(document.getElementById('operator').value, document.getElementById('code').value)"/> | |
</form> | |
<div class="a-center"> | |
<a href="prelogin.php?nasid={NASID}" class="back_prelogin">{LANG:backtomain}</a> | |
</div> | |
</center> | |
</div> | |
</div> | |
</div> | |
</div> | |
<script type="text/javascript"> | |
$('#prepaidform').submit(function() { | |
return false; | |
}); | |
</script> | |
<div id="normal_login" class="over_panel" style="text-align:left;" > | |
<header> | |
<div class="main_center"> | |
<strong>{LANG:connect_free}</strong> | |
<a href="prelogin.php?nasid={NASID}" class="close_prelogin" > </a> | |
</div> | |
</header> | |
<div class="content"> | |
<div class="main_center"> | |
<div class="border_panel"> | |
<!-- ORIGINALE --> | |
<!-- <form METHOD='get' action="{LOGINPATH}" class="dataform" id="freeform" onSubmit="return checkCheckBox(this);" > --> | |
<!-- IDEARIA --> | |
<!-- Chiamiamo la nostra funzione checkFields() anziché checkCheckBox() --> | |
<form METHOD='get' action="{LOGINPATH}" class="dataform" id="freeform" onSubmit="return checkFields(this);" > | |
<!-- END IDEARIA --> | |
<center> <!-- {CAPTURE_ERROR} --><div id="qtiperror" style="visibility:hidden;height:1px;">{CAPTURE_QTIPERROR}</div></center></font> | |
<!-- BEGIN IDEARIA --> | |
<!-- FIRST NAME --> | |
<div class="field field_custom" id="capture_custom_2"> | |
<div class="label">{CAPTURE_CUSTOM_2_REQ}{CAPTURE_CUSTOM_2_Q}</div> | |
<div class="col"> | |
<input name="capture_custom_2" type="text" id="c_custom_2" value="{CAPTURE_CUSTOM_2_A}" class="{RESPONSIVE_ERROR_052}" onKeyUp="toggle_field2('c_custom_2')" /> | |
<span class="msg">{RESPONSIVE_ERRORTEXT_052}</span> | |
</div> | |
<div class="clear"></div> | |
</div> | |
<!-- LAST NAME --> | |
<div class="field field_custom" id="capture_custom_3"> | |
<div class="label">{CAPTURE_CUSTOM_3_REQ}{CAPTURE_CUSTOM_3_Q}</div> | |
<div class="col"> | |
<input name="capture_custom_3" type="text" id="c_custom_3" value="{CAPTURE_CUSTOM_3_A}" class="{RESPONSIVE_ERROR_053}" onKeyUp="toggle_field2('c_custom_3')" /> | |
<span class="msg">{RESPONSIVE_ERRORTEXT_053}</span> | |
</div> | |
<div class="clear"></div> | |
</div> | |
<!-- EMAIL --> | |
<div class="field field_email" id="capture_3"> | |
<div class="label">{CAPTURE_3_REQ}{LANG:cust_email}</div> | |
<div class="col"> | |
<input name="email" type="text" id="email" value="{CUST_EMAIL}" class="{RESPONSIVE_ERROR_004}" onKeyUp="toggle_field2('email')" /> | |
<span class="msg">{RESPONSIVE_ERRORTEXT_004} {RESPONSIVE_ERRORTEXT_DETAILED_004}</span> | |
</div> | |
<div class="clear"></div> | |
</div> | |
<!-- CONFIRM EMAIL --> | |
<!-- Nota la classe disablecopypaste (http://stackoverflow.com/a/8797443) --> | |
<div class="field field_custom" id="capture_custom_1"> | |
<div class="label">{CAPTURE_CUSTOM_1_REQ}{CAPTURE_CUSTOM_1_Q}</div> | |
<div class="col"> | |
<input name="capture_custom_1" type="text" id="c_custom_1" value="{CAPTURE_CUSTOM_1_A}" class="{RESPONSIVE_ERROR_051} disablecopypaste" onKeyUp="toggle_field2('c_custom_1')" /> | |
<span class="msg">{RESPONSIVE_ERRORTEXT_051}</span> | |
</div> | |
<div class="clear"></div> | |
</div> | |
<!-- LINGUA --> | |
<!-- Campo nascosto popolato via javascript --> | |
<div class="field field_custom" id="capture_custom_5"> | |
<!-- <div class="label">{CAPTURE_CUSTOM_5_REQ}{CAPTURE_CUSTOM_5_Q}</div> --> | |
<div class="col"> | |
<input name="capture_custom_5" type=hidden id="c_custom_5" value="{CAPTURE_CUSTOM_5_A}" class="{RESPONSIVE_ERROR_055}" onKeyUp="toggle_field2('c_custom_5')" /> | |
<span class="msg">{RESPONSIVE_ERRORTEXT_055}</span> | |
</div> | |
<div class="clear"></div> | |
</div> | |
<script type="text/javascript"> | |
// ====================== | |
// = Estrai nazionalità = | |
// ====================== | |
/* Extract user language. Source: http://stackoverflow.com/a/25603630/2972183 */ | |
var user_language = navigator.languages ? navigator.languages[0] : (navigator.language || navigator.userLanguage); | |
/* Debug: show language */ | |
// alert(user_language); | |
/* Set hidden field to reflect the browser */ | |
$("input[name='capture_custom_5']").val(user_language); | |
// ====================== | |
// = Confirmation email = | |
// ====================== | |
/** | |
* Evidenzia in arancione il campo conferma email se non | |
* corrisponde a quello dell'email. | |
*/ | |
$("input[name='capture_custom_1']").change(function() { | |
var email = jQuery("input[name='email']").val(); | |
if ($(this).val().toLowerCase() != email.toLowerCase()) { | |
document.getElementById('c_custom_1').className = "responsive_error"; | |
} else { | |
document.getElementById('c_custom_1').className = "responsive_noerror"; | |
} | |
}); | |
/** | |
* Verifica che il campo di conferma email coincida con l'email, ed in | |
* caso affermativo restituisci true. | |
*/ | |
function checkConfirmEmail (form) { | |
var fieldName = 'capture_custom_1'; | |
var email = jQuery("input[name='email']").val(); | |
if ( (elementDisplayValue(fieldName) != 'none') && (form[fieldName].value.toLowerCase() != email.toLowerCase()) ) { | |
alert("Assicurarsi che 'Email' e 'Conferma Email' coincidano, grazie.\nPlease make sure the 'Email' and 'Confirm Email' fields are equal."); | |
return false; | |
} else { | |
return true; | |
} | |
} | |
/** | |
* Impedisci all'utente di incollare nel campo di conferma email. | |
*/ | |
$('input.disablecopypaste').bind('copy paste', function (e) { | |
e.preventDefault(); | |
}); | |
// ============ | |
// = onSubmit = | |
// ============ | |
/** | |
* Script chiamato dall'onSubmit della form. | |
*/ | |
function checkFields (form) { | |
if ( checkConfirmEmail(form) ) { | |
return checkCheckBox(form); | |
} | |
else { | |
return false; | |
} | |
} | |
// ============ | |
// = Funzioni = | |
// ============ | |
/** | |
* Restituisci il valore di 'display' per l'elemento 'elementId'. | |
*/ | |
function elementDisplayValue (elementId) { | |
var visible =''; | |
if (document.getElementById(elementId).currentStyle) { | |
visible = document.getElementById(elementId).currentStyle.display; | |
} | |
else { | |
visible = getComputedStyle (document.getElementById(elementId), null).getPropertyValue('display'); | |
} | |
return visible; | |
} | |
</script> | |
<!-- ========================= --> | |
<!-- = UNUSED = --> | |
<!-- ========================= --> | |
<!-- SPEAK ITALIAN? --> | |
<div class="field field_custom" id="capture_custom_4"> | |
<div class="label">{CAPTURE_CUSTOM_4_REQ}{CAPTURE_CUSTOM_4_Q}</div> | |
<div class="col"> | |
<input type="radio" name="capture_custom_4" id="c_custom_4" value="{CAPTURE_CUSTOM_4_A}" class="{RESPONSIVE_ERROR_054}" onKeyUp="toggle_field2('c_custom_4')" value="yes">Yes | |
| |
<input type="radio" name="capture_custom_4" id="c_custom_4" value="{CAPTURE_CUSTOM_4_A}" class="{RESPONSIVE_ERROR_054}" onKeyUp="toggle_field2('c_custom_4')" value="no">No | |
<!-- <input name="capture_custom_4" type=text id="c_custom_4" value="{CAPTURE_CUSTOM_4_A}" class="{RESPONSIVE_ERROR_054}" onKeyUp="toggle_field2('c_custom_4')" /> --> | |
<span class="msg">{RESPONSIVE_ERRORTEXT_054}</span> | |
</div> | |
<div class="clear"></div> | |
</div> | |
<div class="field field_username" id="capture_2"> | |
<div class="label">{CAPTURE_2_REQ}{LANG:cust_name}</div> | |
<div class="col"> | |
<input name=name type=text id="name" value="{CUST_NAME}" class="{RESPONSIVE_ERROR_003}" onkeyup="toggle_field2('name')" /> | |
<span class="msg">{RESPONSIVE_ERRORTEXT_003} {RESPONSIVE_ERRORTEXT_DETAILED_003}</span> | |
</div> | |
<div class="clear"></div> | |
</div> | |
<div class="field field_company_name" id="capture_4"> | |
<div class="label">{CAPTURE_4_REQ}{LANG:cust_company}</div> | |
<div class="col"> | |
<input name="company" type=text id="company" value="{CUST_COMPANY}" class="{RESPONSIVE_ERROR_005}" onKeyUp="toggle_field2('company')" /> | |
<span class="msg">{RESPONSIVE_ERRORTEXT_005} {RESPONSIVE_ERRORTEXT_DETAILED_005}</span> | |
</div> | |
<div class="clear"></div> | |
</div> | |
<div class="field field_billing_address" id="capture_5"> | |
<div class="label">{CAPTURE_5_REQ}{LANG:cust_billing_address}</div> | |
<div class="col"> | |
<input name=address type=text id="address" value="{CUST_ADDRESS}" class="{RESPONSIVE_ERROR_006}" onKeyUp="toggle_field2('address')" /> | |
<span class="msg">{RESPONSIVE_ERRORTEXT_006} </span> | |
</div> | |
<div class="clear"></div> | |
</div> | |
<div class="field field_city" id="capture_6"> | |
<div class="label">{CAPTURE_6_REQ}{LANG:cust_city}</div> | |
<div class="col"> | |
<input name=city type=text id="city" value="{CUST_CITY}" class="{RESPONSIVE_ERROR_007}" onKeyUp="toggle_field2('city')" /> | |
<span class="msg">{RESPONSIVE_ERRORTEXT_007}</span> | |
</div> | |
<div class="clear"></div> | |
</div> | |
<div class="field field_state" id="capture_7"> | |
<div class="label">{CAPTURE_7_REQ}{LANG:cust_state}</div> | |
<div class="col"> | |
<select name="state" id="state" class="{RESPONSIVE_ERROR_009}" > | |
<option value="">{LANG:state_outside}</option> | |
{STATES} | |
</select> | |
<span class="msg">{RESPONSIVE_ERRORTEXT_009}</span> | |
</div> | |
<div class="clear"></div> | |
</div> | |
<div class="field field_country" id="capture_8"> | |
<div class="label">{CAPTURE_8_REQ}{LANG:cust_country}</div> | |
<div class="col"> | |
<select name="country" id="country" onChange="insertICC('country')" {COUNTRYDISABLED} class="{RESPONSIVE_ERROR_010}" > | |
<option value="">{LANG:country_choose}</option> | |
{COUNTRIES} | |
</select> | |
<span class="msg">{RESPONSIVE_ERRORTEXT_010}</span> | |
</div> | |
<div class="clear"></div> | |
</div> | |
<div class="field field_zip" id="capture_9"> | |
<div class="label">{CAPTURE_9_REQ}{LANG:cust_zip}</div> | |
<div class="col"> | |
<input name=zip type=text id="zip" value="{CUST_ZIP}" class="{RESPONSIVE_ERROR_008}" onKeyUp="toggle_field2('zip')" /> | |
<span class="msg">{RESPONSIVE_ERRORTEXT_008}</span> | |
</div> | |
<div class="clear"></div> | |
</div> | |
<div class="field field_phone" id="capture_10"> | |
<div class="label">{CAPTURE_10_REQ}{LANG:cust_phone}</div> | |
<div class="col"> | |
<input name="phone" type="text" id="phone" value="{CUST_PHONE}" class="{RESPONSIVE_ERROR_011}" onKeyUp="toggle_field2('phone')" {PHONEDISABLED} /> <span class="msg">{RESPONSIVE_ERRORTEXT_011}</span> | |
<span class="info">{LANG:cust_phone_rule}</span> | |
</div> | |
<div class="clear"></div> | |
</div> | |
<!-- END IDEARIA --> | |
<INPUT TYPE=HIDDEN NAME="chal" VALUE="{CHALLENGE}"> | |
<INPUT TYPE=HIDDEN NAME="uamip" VALUE="{UAMIP}"> | |
<INPUT TYPE=HIDDEN NAME="uamport" VALUE="{UAMPORT}"> | |
<INPUT TYPE=HIDDEN NAME="nasid" VALUE="{NASID}"> | |
<INPUT TYPE=HIDDEN NAME="mac" VALUE="{MAC}"> | |
<INPUT TYPE=HIDDEN NAME="userurl" VALUE="{USERURL}"> | |
<INPUT TYPE=HIDDEN NAME="login" VALUE="login"> | |
<input name="skin_id" type="hidden" id="skin_id" value="{SKIN_ID}" /> | |
<input name="uid" type="hidden" value="{MAC}{UNIQUEID}" /> | |
<input name="pwd" type="hidden" value="{PWD}" /> | |
<input name="operator" type="hidden" id="operator" value="{OPERATOR}"> | |
<input name="location_id" type="hidden" id="location_id" value="{LOCATION_ID}"> | |
<input name="lang" type="hidden" id="location_id" value="{LANG}"> | |
<div id="capture_11" class="big" > | |
<input name="newsletter" type="checkbox" id="newsletter" value="1" style="vertical-align:middle;margin-top:-1px;" checked {NEWSLETTER_DISABLED}> | |
{LANG:newsletter} <br> | |
<br> | |
</div> | |
<div id="capture_12" class="big" > | |
<input name="agree" type="checkbox" id="agree" value="1" style="vertical-align:middle;margin-top:-3px;" {TERMS_DISABLED}> | |
{USERAGREEMENT_ACCEPT} <BR> | |
<BR> | |
</div> | |
<span id="fb_accept" class="big"> <img src='customer_images/fb_logo.png' style='margin-right:5px;vertical-align:middle;' />{LANG:fb_like} </span> | |
<div class="btn_container"> <a href="#" class="button1 submit" >{SUBMITBUTTON}</a> </div> | |
</p> | |
</form> | |
<center><a href="prelogin.php?nasid={NASID}" class="back_prelogin" >{LANG:backtomain}</a></center> | |
<br> | |
<br /> | |
</div> </div> </div> | |
</div> | |
<!-- <center> --> | |
<div id="center" style="margin-bottom:-20px ; margin-top:-20px;" > | |
<!-- <privacy> --> | |
<div class="content"> | |
<div class="main_center" > | |
<div class="container textcontent"> | |
<div class="row-fluid"> | |
<div class="span12" > | |
<center> <p id="normalerror" style="padding-bottom:20px;">{ERROR}</p></center> | |
<div> | |
<center> | |
<div id="connect"> | |
<p>{LANG:connect_free} </p> | |
</div> | |
<div id="social_login" style="position:relative; margin-top:20px;margin-bottom:20px;"> | |
<div id="loading" style="display:none; left:3px;;top:0; width:99%; height:100%;position:absolute; background:rgba(255,255,255,0.95); padding-top:35px;-webkit-border-radius: 10px;-moz-border-radius: 10px;border-radius: 10px; "> | |
<center> <img src=/images/pleasewait.gif ><br> {LANG:login_forwarding}<br> </center> | |
</div> | |
<div class="main_panels" > | |
<div class="login_panel panel_item" id="facebook_button"> | |
<a class="openbutton" href="#" onClick="document.getElementById('freeform').reset();document.getElementById('loading').style.display = 'block'; window.location='facebook/{LANG}/redirect/login?uamip={UAMIP}&uamport={UAMPORT}&mac={MAC}&pwd={PWD}&useurl={USERURL}&chal={CHALLENGE}&nasid={NASID}&operator={OPERATOR}&location={LOCATION_ID}&lang={LANG}';">Facebook</a> | |
</div> | |
<div class="login_panel panel_item" id="twitter_button"> | |
<a class="openbutton" href="#" onClick="document.getElementById('loading').style.display = 'block';window.location='twitter/{LANG}/login?uamip={UAMIP}&uamport={UAMPORT}&mac={MAC}&pwd={PWD}&useurl={USERURL}&chal={CHALLENGE}&nasid={NASID}&operator={OPERATOR}&location={LOCATION_ID}&lang={LANG}'">Twitter</a> | |
</div> | |
<div class=" login_panel panel_item" id="instagram_button"> | |
<a class="openbutton instagrambutton" href="#" onClick="document.getElementById('loading').style.display = 'block';window.location='/customer/instagram/{LANG}/ig-login?uamip={UAMIP}&uamport={UAMPORT}&mac={MAC}&pwd={PWD}&useurl={USERURL}&chal={CHALLENGE}&nasid={NASID}&operator={OPERATOR}&location={LOCATION_ID}&lang={LANG}'" /> <img src="/images/instagram_logo.png" id="instagramlogo"><span class="instagram">Instagram</span></a> | |
</div> | |
<div class="login_panel panel_item" id="skip" style="display:none;"> | |
<a class="openbutton" href="#" onClick="javascript:toggleview();" >{LANG:skip_social}</a> | |
</div> | |
</div> | |
<!-- <div class="btn_container" id="skip"> <a href="#" class="button1" onClick="" > </a> </div> | |
<!-- {SKIP_SOCIAL_DISPLAY} --> | |
</div> | |
<center> | |
<div class="pagefbook" id="like" style="display:none; "> | |
<div class="label"><b> Welcome <span id="username"></span></b></div> | |
<br><img id="userpicture" style="border-radius: 100%" /> | |
<br/> | |
<p style="line-height:40px;"> {LANG:fb_likeus}</p> | |
<!-- Standard Facebook Like Button Widget --> | |
<!-- You can generate your own here: https://developers.facebook.com/docs/plugins/like-button/ --> | |
<!-- NOTE: You don't have to include the Facebook JavaScript SDK code snippet, because the hotspotsystem.socialWifi module contains it --> | |
<div class="fb-like-box" | |
data-href="https://www.facebook.com/{PAGEID}" | |
data-colorscheme="light" | |
data-show-faces="false" | |
data-header="false" | |
data-stream="false" | |
data-show-border="false"></div> | |
<div id="fb_wallpost" > | |
<p align="center" style="margin:0px;margin-top:15px;margin-bottom:8px;"> <BR>{LANG:fb_wallpost} </p> | |
<div style=" border: 1px #ddd solid; padding:10px; background-color:white; line-height:13px; text-align:left;display:table"> | |
<div style="font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif; font-size:13px; letter-spacing:-0.5px; color:#000; margin-bottom:-5px;"> {MESSAGE}</div> | |
<div style="clear:both;width:100%"></div> | |
</div> </div> | |
</div> | |
<div class="page" id="thankyou" style="display:none;"> | |
<p>{LANG:login_forwarding}</p> | |
</div> | |
</center> | |
<style type="text/css"> | |
<!-- | |
.style1 {font-size: 11px} | |
{CAPTURE_HIDE} | |
{DIVHIDE} | |
--> | |
</style> | |
<script type="text/javascript"> | |
function logincopy() | |
{ | |
document.forms['voucherlogin'].elements['uid'].value = document.forms['voucherlogin'].elements['code'].value ; | |
} | |
function validateForm() | |
{ | |
var x=document.getElementById('uid').value; | |
if ( x.length < 5 ) | |
{ | |
alert("{VOUCHER_ERROR}"); | |
return false; | |
} | |
} | |
</script> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<br> | |
<script src="/controlcenter/jquery.qtip.js"></script> | |
<!-- page specific code --> | |
<script> | |
// event subscriptions & initialization on 'pageload' event | |
$(window).load(function () { | |
if (display_facebook_button == 1) | |
{ document.getElementById("facebook_button").style.display = 'block'; | |
} | |
if (display_google_button == 1) | |
{ document.getElementById("google_button").style.display = 'block'; | |
} | |
if (display_twitter_button == 1) | |
{ document.getElementById("twitter_button").style.display = 'block'; | |
} | |
if (display_linkedin_button == 1) | |
{ document.getElementById("linkedin_button").style.display = 'block'; | |
} | |
if (display_instagram_button == 1) | |
{ document.getElementById("instagram_button").style.display = 'block'; | |
} | |
if (fb_mode==3) | |
{document.getElementById("fb_wallpost").style.display = 'block'; } | |
else | |
{document.getElementById("fb_wallpost").style.display = 'none'; } | |
var content = $('#qtiperror').html(); | |
if (voucher_or_normal == 0) | |
{ document.getElementById("skip").style.display = 'none'; | |
} | |
else | |
{ document.getElementById("skip").style.display = 'block'; | |
} | |
if (voucher_or_normal== 3) { | |
document.getElementById('sms_login').style.display = 'block'; | |
} | |
if (content !== null ) { | |
if ((content.indexOf("error.png") ) > -1) | |
{ | |
if (voucher_or_normal == 1) | |
{ | |
// document.getElementById("social_login").style.display = 'none'; | |
// document.getElementById("normal_login").style.display = 'block'; | |
// document.getElementById("voucher_login").style.display = 'none'; | |
// document.getElementById("sms_login").style.display = 'none'; | |
$('#normal_login').css('display', 'block'); | |
$('#normal_login').css('top','0px'); | |
var errortop= ($('.responsive_error').first().offset().top-50); | |
$('html, body').animate({ | |
scrollTop: (errortop) | |
},250); | |
} | |
} | |
} | |
var content2 = $('#normalerror').html(); | |
if ((content2 !== null ) && (content2 !== '' )) | |
{ | |
if (voucher_or_normal == 2) | |
{ | |
document.getElementById("social_login").style.display = 'none'; | |
document.getElementById("normal_login").style.display = 'none'; | |
document.getElementById("voucher_login").style.display = 'block'; | |
document.getElementById("sms_login").style.display = 'none'; | |
} | |
if (voucher_or_normal == 3) | |
{ | |
document.getElementById("social_login").style.display = 'none'; | |
document.getElementById("normal_login").style.display = 'none'; | |
document.getElementById("voucher_login").style.display = 'block'; | |
document.getElementById("sms_login").style.display = 'block'; | |
} | |
} | |
// Step 1 // | |
// The process starts with a call to hotspotsystem.socialWifi.accept() | |
// In this demo it's called when user clicks on "Log In" button | |
// 'authorized' event is triggered after user authorized the application | |
// the event handler function has a {boolean} 'gotPermissions' parameter which is true if the user granted the required permissions | |
// we can do any UI actions here to prompt for the permissions again and hotspotsystem.socialWifi.accept() can be called as many as you want | |
hotsposystem.socialWifi.on("authorized", function (gotPermissions) { | |
// Get & display user's name and picture | |
hotsposystem.socialWifi.getUserInfo(function(info) { | |
$("#userpicture").attr("src", info.pictureUrl); | |
$("#username").text(info.name); | |
}); | |
// Hide 'welcome' page and show like button if we got the permissions | |
if (gotPermissions) { | |
// $(".page").removeClass("visible"); | |
// $("#like").addClass("visible"); | |
if (fb_mode==0) | |
{ | |
document.getElementById("connect").style.display = 'none'; | |
document.getElementById("social_login").style.display = 'none'; | |
document.getElementById("skip").style.display = 'none'; | |
document.getElementById("like").style.display = 'none'; | |
document.getElementById("thankyou").style.display = 'block'; | |
hotsposystem.socialWifi.verify(); | |
} | |
else if (fb_mode==2) | |
{ | |
document.getElementById("connect").style.display = 'none'; | |
document.getElementById("social_login").style.display = 'none'; | |
document.getElementById("skip").style.display = 'none'; | |
document.getElementById("like").style.display = 'none'; | |
document.getElementById("thankyou").style.display = 'block'; | |
hotsposystem.socialWifi.post("{MESSAGE}", {URL}, true); | |
} | |
else if ((fb_mode==3) || (fb_mode==1)) | |
{ | |
document.getElementById("connect").style.display = 'none'; | |
document.getElementById("social_login").style.display = 'none'; | |
document.getElementById("skip").style.display = 'none'; | |
document.getElementById("like").style.display = 'table'; | |
} | |
} | |
}); | |
// Step 2 // | |
// 'liked' event is triggered after the user liked the specified page | |
// if the user already liked the page then 'liked' evt will be triggered immediately after 'authorized' event | |
// if there isn't a page to like, you can simply skip this step | |
hotsposystem.socialWifi.on("liked", function () { | |
// $(".page").removeClass("visible"); | |
// $("#thankyou").addClass("visible"); | |
document.getElementById("connect").style.display = 'none'; | |
document.getElementById("social_login").style.display = 'none'; | |
document.getElementById("skip").style.display = 'none'; | |
document.getElementById("like").style.display = 'none'; | |
document.getElementById("thankyou").style.display = 'block'; | |
// You can initiate wall post here with hotsposystem.socialWifi.post(message, link, attachPage) function | |
if (fb_mode==3) | |
{ | |
hotsposystem.socialWifi.post("{MESSAGE}", {URL}, true); | |
} | |
else if (fb_mode==1) | |
{ | |
hotsposystem.socialWifi.verify(); | |
} | |
}); | |
// Step 3 // | |
// 'posted' event is triggered after the post is sent to user's wall | |
hotsposystem.socialWifi.on("posted", function () { | |
// When all the needed facebook activities are done, call the server-side script to verify user and perform hotspot actions | |
hotsposystem.socialWifi.verify(); | |
}); | |
// Exception handling // | |
// 'error' event is triggered only if server-side verification fails | |
// if verification passed in order then browser will be automatically redirected to the url we got from server | |
hotsposystem.socialWifi.on("error", function (msg) { | |
alert("Ooops, something unexpected happened: " + msg + ". :("); | |
}); | |
// INIT // | |
// Initialize the library & pass Facebook application ID, page ID & other configuration values | |
hotsposystem.socialWifi.init({ | |
// Facebook application ID | |
appid: "{HOTSPOT_APP_ID}", /* required - also update in verify.php */ | |
// Facebook page ID | |
pageid: "{PAGEID}", /* required - also change the like button code above */ | |
// Url of server-side REST API endpoint which will be called to trigger hotspot actions after hotspotsystem.socialWifi.verify() is called | |
apiUrl: "/customer/facebook3/verify.php", /* required */ | |
scope: "{SCOPE}", /* optional */ | |
// You can add additional parameters that should be passed to the verification script. | |
// These will be passed along with the default token and wall_post_id | |
additionalParams: { /* optional */ | |
uamip: '{UAMIP}', | |
uamport: '{UAMPORT}', | |
mac: '{MAC}', | |
pwd: '{PWD}', | |
useurl: '{USERURL}', | |
chal: '{CHALLENGE}', | |
nasid: '{NASID}', | |
operator: '{OPERATOR}', | |
location: '{LOCATION_ID}', | |
fb_mode: '{FB_MODE}', | |
lang: '{LANG}', | |
appid: '{HOTSPOT_APP_ID}' | |
} | |
}); | |
}); | |
</script> | |
<script src="/customer/responsive/js/errortop.js"></script> | |
<!-- <voucher_panel> --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment