Advertisement
Guest User

Untitled

a guest
Mar 29th, 2016
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.32 KB | None | 0 0
  1.  
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3.  
  4.  
  5. <html>
  6.  
  7. <head>
  8.  
  9. <TITLE>SNU Authentication</TITLE>
  10.  
  11.  
  12. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  13.  
  14.  
  15. <meta http-equiv="cache-control" content="max-age=0, must-revalidate, no-cache, no-store, private">
  16. <meta http-equiv="pragma" content="no-cache">
  17. <meta http-equiv="expires" content="-1">
  18.  
  19. <STYLE>.mystyle1 { FONT-FAMILY:Arial;FONT-SIZE:10;}.text1 { font-family: Arial; font-size: 11px}
  20. </STYLE>
  21. <style type="text/css">
  22. <!--
  23. body {
  24. height: 100%;
  25. margin: 0;
  26. padding: 0;
  27. }
  28. //-->
  29. </style>
  30.  
  31. <link rel="stylesheet" href="/css/cyberoam.css">
  32. <link rel="stylesheet" href="/css/fck_editorarea.css">
  33.  
  34.  
  35. <link rel="shortcut icon" type="image/x-icon" href="/images/favicon.ico">
  36. <script language="JavaScript" src="/javascript/cyberoam.js"></script>
  37. </head>
  38.  
  39. <script language="JavaScript" src="/javascript/utilities.js"></script>
  40. <!-- script language="JavaScript" src="/javascript/usagecounter.js"></script-->
  41. <SCRIPT LANGUAGE="JavaScript" SRC="/javascript/ajax.js"></SCRIPT>
  42. <script language="JavaScript">
  43. re = /\w{1,}/;
  44. rew=/\W{1,}/;
  45. usernamere=/^[a-zA-Z0-9_\.]{1,30}$/;
  46.  
  47. var hotelUserWin = null;
  48. var dt=new Date();
  49. dt.setHours("22");
  50. dt.setMinutes("53");
  51. dt.setSeconds("29");
  52. dt.setDate("6");
  53. dt.setMonth("11");
  54. dt.setYear("2015");
  55. var d=new Date();
  56.  
  57. function openMyAccountWindow(){
  58. window.open("/myaccount.html",'_person')
  59. }
  60.  
  61. function changeBandwidth(){
  62. var scrw = window.screen.availWidth;
  63. var scrh = window.screen.availHeight;
  64. var w =scrw-120;
  65. var h =scrh-150;
  66. var left = (scrw-w)/2;
  67. var top = 5;
  68. window.open("/24online/webpages/redirectclientgui.jsp?key=ChangeBWOnDemandURL&username=hb895@snu.in",'_blank','screenX=0,screenY=0,left='+left+',top='+top+',width=' + w + ',height=' + h + ',titlebar=0,scrollbars=1');
  69. }
  70.  
  71. function doNothing(){
  72.  
  73. }
  74.  
  75.  
  76. /* call to ajax */
  77. function showAlert(){
  78.  
  79. }
  80.  
  81. /* this function get the message from XML document */
  82. function popup(){
  83.  
  84. var xmlDoc = req.responseXML.documentElement;
  85. var message = xmlDoc.getElementsByTagName("message");
  86. message = message[0].firstChild.data;
  87. var dtold = new Date();
  88. alert(message);
  89. var dtnew = new Date();
  90. var timeGap=dtnew.getTime()-dtold.getTime();
  91. timeGap=parseInt(timeGap/1000);
  92. document.forms[0].popupalert.value="0";
  93. document.forms[0].sessionTimeout.value=document.forms[0].sessionTimeout.value-timeGap;
  94. }
  95.  
  96. /* this get the Data related to usage from XML */
  97. function getData(){
  98.  
  99. //alert("get Data");
  100. var xmlDoc = req.responseXML.documentElement;
  101.  
  102. var input = xmlDoc.getElementsByTagName("input");
  103. input = input[0].firstChild.data;
  104.  
  105. var output = xmlDoc.getElementsByTagName("output");
  106. output = output[0].firstChild.data;
  107.  
  108. var total = xmlDoc.getElementsByTagName("total");
  109. total = total[0].firstChild.data;
  110.  
  111. var timeout = xmlDoc.getElementsByTagName("timeout");
  112. timeout = timeout[0].firstChild.data;
  113.  
  114. var logout=xmlDoc.getElementsByTagName("logout");
  115. logout = logout[0].firstChild.data;
  116.  
  117. var useddatatransfer = xmlDoc.getElementsByTagName("useddatatransfer");
  118. useddatatransfer = useddatatransfer[0].firstChild.data;
  119. document.getElementById('useddatatransfer').innerHTML =ByteConversion( useddatatransfer);
  120.  
  121. var expiredate = xmlDoc.getElementsByTagName("expiredate");
  122. expiredate = expiredate[0].firstChild.data;
  123. document.getElementById('expiredate').innerHTML = expiredate;
  124.  
  125. var packageamount = xmlDoc.getElementsByTagName("packageamount");
  126. packageamount = packageamount[0].firstChild.data;
  127. document.getElementById('packageamount').innerHTML = packageamount;
  128.  
  129. if(logout==1){
  130. logoutUser();
  131. return;
  132. }
  133.  
  134.  
  135. /* unlimited usage for unlimited time */
  136. if(input==-1 && output==-1 && total==-1 && timeout==-1){
  137.  
  138. document.getElementById("inOctets").innerHTML="Not Applicable";
  139. document.getElementById("outOctets").innerHTML="Not Applicable";
  140. document.getElementById("totalOctets").innerHTML="Not Applicable";
  141. document.getElementById("outOctets").innerHTML="Not Applicable";
  142. }
  143.  
  144. /* only total is availabe*/
  145. if(total > 0){
  146. var str=ByteConversion(total);
  147. document.getElementById("totalOctets").innerHTML=str;
  148. document.getElementById("inOctets").innerHTML="Not Applicable";
  149. document.getElementById("outOctets").innerHTML="Not Applicable";
  150.  
  151. }else{
  152.  
  153. document.getElementById("totalOctets").innerHTML="Not Applicable";
  154.  
  155. if(input > 0){
  156. var str=ByteConversion(input);
  157. document.getElementById("inOctets").innerHTML=str;
  158. }else{
  159. document.getElementById("inOctets").innerHTML="Unlimited";
  160. }
  161.  
  162. if(output > 0){
  163. var str=ByteConversion(output);
  164. document.getElementById("outOctets").innerHTML=str;
  165.  
  166. }else{
  167. document.getElementById("outOctets").innerHTML="Unlimited";
  168. }
  169. }
  170.  
  171. if(timeout > 0 ){
  172. getTime(timeout);
  173. }else if(timeout==-1){
  174.  
  175. document.getElementById("sessionTime").innerHTML="Not Applicable";
  176. document.forms[0].sessionTimeout.value="Not Applicable";
  177.  
  178. }
  179. }
  180.  
  181.  
  182. /* this function get the time from XML document */
  183. function getTime(timeout){
  184. var newSessiontime=timeout;
  185. var orgSessiontime = parseInt(document.forms[0].orgSessionTimeout.value);
  186. var Sessiontime=parseInt(document.forms[0].sessionTimeout.value);
  187. var diffSessiontime = orgSessiontime - Sessiontime;
  188. newSessiontime=newSessiontime-diffSessiontime;
  189. document.forms[0].sessionTimeout.value = newSessiontime;
  190. document.forms[0].orgSessionTimeout.value = timeout;
  191. }
  192.  
  193. function err(){
  194.  
  195. }
  196.  
  197. /* detect touch in iPad and other touch sensitive device */
  198. try{
  199. document.addEventListener('touchstart', function(event) {
  200. //� � alert(event.touches.length);
  201.  
  202. if(document.forms[0].chrome.value==0 && true){
  203. byteReducer();
  204. document.forms[0].chrome.value=1;
  205. }
  206. }, false);
  207. }catch(err){
  208.  
  209. }
  210.  
  211. /* This function call when body has focus and set the value */
  212. function gotFocus(){
  213. if(document.forms[0].chrome.value==0 && true){
  214. byteReducer();
  215. document.forms[0].chrome.value=1;
  216. }
  217. }
  218.  
  219. /* This function call when body has focus */
  220. function lostFocus(){
  221.  
  222. /*if(isChrome()){
  223. document.forms[0].chrome.value=0;
  224. }*/
  225. }
  226.  
  227.  
  228. /* this function call the ajax for byte reducer */
  229. function startByteReducer(){
  230. document.forms[0].chrome.value=0;
  231. setTimeout("startByteReducer()",600000);
  232. }
  233.  
  234.  
  235. /* call to ajax */
  236. function byteReducer(){
  237. //alert("byte reducer start");
  238.  
  239. }
  240.  
  241. function setCurrentTimeDate(){
  242. dt.setMinutes(dt.getMinutes()+1);
  243. var date= getDayOfWeek(dt.getDay())+" , "+dt.getDate()+" "+getMonth(dt.getMonth())+" , "+dt.getFullYear();
  244. var time=dt.getHours()+" : "+dt.getMinutes()+" hours";
  245. var lblTime=document.getElementById('time');
  246. var lblDate=document.getElementById('date');
  247. if(lblTime!=null){
  248. lblTime.innerHTML = time;
  249. }
  250. if(lblDate!=null){
  251. lblDate.innerHTML = date;
  252. }
  253. setTimeout("setCurrentTimeDate()",60000);
  254. }
  255. function refreshLiveRequest(liveRequestTime,isfirsttime){
  256.  
  257. setTimeout("refreshLiveRequest("+liveRequestTime+",false)",liveRequestTime);
  258. window.open('/24online/webpages/liverequest.jsp?isfirsttime='+isfirsttime,'livebar');
  259. }
  260. // SEND LIVE UPDATE REQ TO A PORT WHERE NO PROCESSING OCCURS SO THAT LOAD ON APACHE IS REDUCED
  261. // AND THIS ALSO KEEPS THE USER LIVE TO AVOID IDLE-TIMEOUT.
  262. function sendLiveUpdate(isfirsttime){
  263. if(isfirsttime == '1'){
  264. isfirsttime = '0';
  265. }else{
  266. iframeliveupd.location.href='http://192.168.50.1:9090/';
  267. }
  268. setTimeout("sendLiveUpdate("+isfirsttime+")",180000);
  269. }
  270.  
  271. function validateLogout(){
  272. document.forms[0].mode.value='193';
  273. document.forms[0].checkClose.value='1';
  274. }
  275.  
  276. function validateLogin(){
  277.  
  278.  
  279. if (!(re.test(document.forms[0].username.value))){
  280. alert('Please enter the User Name');
  281. document.forms[0].username.focus();
  282. return false;
  283. }
  284.  
  285.  
  286. if(document.forms[0].password.value==''){
  287. alert('please enter password');
  288. document.forms[0].password.focus();
  289. return false;
  290. }
  291.  
  292.  
  293. targ=document.getElementsByName('chkcond')[0];
  294. if(targ != null && !document.forms[0].chkcond.checked){
  295. alert('Please Read and Agree Terms and Conditions.');
  296. document.forms[0].chkcond.focus();
  297. return false;
  298. }
  299.  
  300.  
  301.  
  302. document.forms[0].mode.value='191';
  303.  
  304. document.forms[0].checkClose.value='1';
  305. }
  306. function validateLoginAndSubmit(){
  307. if (!(re.test(document.forms[0].username.value))){
  308. alert('Please enter the Coupon Id');
  309. document.forms[0].username.focus();
  310. return false;
  311. }
  312.  
  313. if(document.forms[0].password.value==''){
  314. alert('please enter password');
  315. document.forms[0].password.focus();
  316. return false;
  317. }
  318.  
  319. document.forms[0].mode.value='191';
  320. document.forms[0].checkClose.value='1';
  321. document.forms[0].method='post';
  322. validateSubmit();
  323. return true;
  324. }
  325. function buycouponnow(){
  326. location.href="/24online/webpages/paymentgateway/onlinepinpurchase.jsp"
  327. }
  328.  
  329. function logoutUser(){
  330. document.forms[0].mode.value='193';
  331. document.forms[0].checkClose.value='1';
  332. document.forms[0].method='post';
  333. document.forms[0].submit();
  334. }
  335.  
  336. var message="� Cyberoam-Client";
  337. function click(e){
  338. if (document.all) {
  339. if (event.button == 1 || event.button == 2) {
  340. alert(message);
  341. return false;
  342. }
  343. }
  344. if (document.layers) {
  345. if (e.which == 3) {
  346. alert(message);
  347. return false;
  348. }
  349. }
  350. }
  351. if (document.layers) {
  352. document.enableExternalCapture();
  353. document.captureEvents(Event.MOUSEDOWN);
  354. }
  355. //document.onmousedown=click;
  356. function blurobj(obj){
  357. obj.style.backgroundColor="lightgrey";
  358. obj.disabled = true ;
  359. }
  360. function callAdministrator(){
  361. window.open("/24online/webpages/calladmin.jsp","CallAdmin","dialogHeight=5;dialogWidth=35;center=1;status=0;resizable=0;help=0");
  362.  
  363. }
  364.  
  365. function openBuyNewPackage(){
  366.  
  367.  
  368. var scrw = window.screen.availWidth;
  369. var scrh = window.screen.availHeight;
  370.  
  371. var w = scrw-120;
  372. var h = scrh-150;
  373. var left = (scrw-w)/2;
  374. var top = 5;
  375.  
  376. window.open('/24online/buypkgusing_pgway.html','_blank','screenX=0,screenY=0,left='+left+',top='+top+',width=' + w + ',height=' + h + ',resizable=1,status=1,titlebar=0,menubar=1,toolbar=1,location=1,scrollbars=1');
  377.  
  378.  
  379. }
  380.  
  381. function openMyAccountLogin(){
  382.  
  383. var scrw = window.screen.availWidth;
  384. var scrh = window.screen.availHeight;
  385.  
  386. var w = scrw-120;
  387. var h = scrh-150;
  388. var left = (scrw-w)/2;
  389. var top = 5;
  390. window.open('/24online/myaccount.html','_blank','screenX=0,screenY=0,left='+left+',top='+top+',width=' + w + ',height=' + h + ',resizable=1,status=1,titlebar=0,menubar=1,toolbar=1,location=1,scrollbars=1');
  391.  
  392. }
  393.  
  394. function openRenewPackageByPaymentGateway(){
  395.  
  396. var scrw = window.screen.availWidth;
  397. var scrh = window.screen.availHeight;
  398.  
  399. var w =scrw-120;
  400. var h =scrh-150;
  401.  
  402. var left = (scrw-w)/2;
  403. var top = 5;
  404.  
  405. window.open('/24online/renewusing_pgway.html','_blank','screenX=0,screenY=0,left='+left+',top='+top+',width=' + w + ',height=' + h + ',resizable=1,status=1,titlebar=0,menubar=1,toolbar=1,location=1,scrollbars=1');
  406. }
  407.  
  408. function openHotelUserRegistration(){
  409.  
  410. var scrw = window.screen.availWidth;
  411. var scrh = window.screen.availHeight;
  412.  
  413. var w =scrw-120;
  414. var h =scrh-150;
  415.  
  416. var left = (scrw-w)/2;
  417. var top = 5;
  418.  
  419. if(hotelUserWin == null || hotelUserWin.closed){
  420. hotelUserWin = window.open('/24online/webpages/hoteluserregistration.jsp','_blank','screenX=0,screenY=0,left='+left+',top='+top+',width=' + w + ',height=' + h + ',resizable=1,status=1,titlebar=0,menubar=1,toolbar=1,location=1,scrollbars=1');
  421. }else{
  422. hotelUserWin.focus();
  423. }
  424.  
  425. }
  426.  
  427. function accessHotelUserWindowParam(){
  428.  
  429.  
  430. }
  431. function sendGuestMsgRequest(){
  432. alert("Your request for Guest Messages has been sent.\nMessage(s) will be displayed in a short while.");
  433. var scrw = window.screen.availWidth;
  434. var w =scrw-180;
  435. window.open("/24online/webpages/myaccount/guestmessages.jsp?username=hb895@snu.in",'guestmsg','resizable=1,status=1,width='+w);
  436. /*document.clientloginform.mode.value="";
  437. document.clientloginform.guestmsgreq.value="true";
  438. document.clientloginform.method="post";
  439. document.clientloginform.submit();*/
  440. }
  441. function sendGuestBillReq(){
  442. var scrw = window.screen.availWidth;
  443. var scrh = window.screen.availHeight;
  444. var w =scrw-120;
  445. var h =scrh-150;
  446. var left = (scrw-w)/2;
  447. var top = 5;
  448. window.open('/24online/webpages/hoteluserregistration.jsp?pwdmode=514','_blank','screenX=0,screenY=0,left='+left+',top='+top+',width=' + w + ',height=' + h + ',titlebar=yes,scrollbars=yes');
  449. }
  450.  
  451. // functions for loading Package Details
  452.  
  453. function loadPackageDetails() {
  454. // Sending AJAX Request with user name and respective mode
  455.  
  456. } //Return from AJAX
  457.  
  458. function parsePackageDetails(){
  459. var xmlDoc = req.responseXML.documentElement;
  460.  
  461. var allottedtime = xmlDoc.getElementsByTagName("allottedtime");
  462. allottedtime = allottedtime[0].firstChild.data;
  463. document.getElementById('allottedtime').innerHTML = allottedtime;
  464.  
  465. var packageamount = xmlDoc.getElementsByTagName("packageamount");
  466. packageamount = packageamount[0].firstChild.data;
  467. document.getElementById('packageamount').innerHTML = packageamount;
  468.  
  469. var expiredays = xmlDoc.getElementsByTagName("expiredays");
  470. expiredays = expiredays[0].firstChild.data;
  471. document.getElementById('expiredays').innerHTML = expiredays;
  472.  
  473. var expiredate = xmlDoc.getElementsByTagName("expiredate");
  474. expiredate = expiredate[0].firstChild.data;
  475. document.getElementById('expiredate').innerHTML = expiredate;
  476.  
  477. }
  478.  
  479. function getPackagesForDynamicUsers(){
  480.  
  481. }
  482.  
  483. function StringtoXML(text){
  484. if (window.ActiveXObject){
  485. var doc=new ActiveXObject('Microsoft.XMLDOM');
  486. doc.async='false';
  487. doc.loadXML(text);
  488. } else {
  489. var parser=new DOMParser();
  490. var doc=parser.parseFromString(text,'text/xml');
  491. }
  492. return doc;
  493. }
  494.  
  495. function parsePackagesForDynamicUsers(value){
  496.  
  497. var groupId = StringtoXML(value);
  498. var groupIdBox = document.getElementById('groupid');
  499.  
  500. if (groupIdBox == null ) {
  501. //alert("Group id Object not found...");
  502. var newdiv = document.createElement('select');
  503. newdiv.setAttribute("name", "groupid");
  504. newdiv.setAttribute("id", "groupid");
  505. document.clientloginform.appendChild(newdiv);
  506.  
  507. document.getElementById('groupid').style.display = "none";
  508. }
  509.  
  510. var targ = document.getElementsByName('groupid')[0];
  511. if(targ != null){
  512.  
  513.  
  514. }
  515. }
  516.  
  517.  
  518. function fillComboWithIndex(comboname,tagname,index,xmlDoc){
  519. //alert(xmlDoc);
  520. var targ=document.getElementsByName(comboname)[index];
  521. //targ.options.length=0;
  522. alert("Tag name : " + tagname);
  523. alert(targ);
  524. var options = xmlDoc.getElementsByTagName(tagname);
  525.  
  526. var key;
  527. var val;
  528.  
  529. for( var i=0; i < options.length; i++ ) {
  530. key = options[i].getElementsByTagName("key");
  531. val = options[i].getElementsByTagName("value");
  532.  
  533. targ.options[ i ] = new Option( val[0].firstChild.data, key[0].firstChild.data );
  534. }
  535. }
  536.  
  537. function getGroupInfoByAjax(){
  538.  
  539. }
  540.  
  541. function showSelectedPlanDetails(){
  542. var xmlDoc = req.responseXML.documentElement;
  543. var groupname;
  544. var groupid;
  545. var allottedtime;
  546. var duration;
  547. var uplimit;
  548. var dnlimit;
  549. var price;
  550.  
  551. groupname = xmlDoc.getElementsByTagName('groupname')[0].firstChild.data;
  552. groupid = xmlDoc.getElementsByTagName('groupid')[0].firstChild.data;
  553. allottedtime = xmlDoc.getElementsByTagName('allottedtime')[0].firstChild.data;
  554. duration = xmlDoc.getElementsByTagName('duration')[0].firstChild.data;
  555. uplimit = xmlDoc.getElementsByTagName('uplimit')[0].firstChild.data;
  556. dnlimit = xmlDoc.getElementsByTagName('dnlimit')[0].firstChild.data;
  557. price = xmlDoc.getElementsByTagName('price')[0].firstChild.data;
  558.  
  559. targ=document.getElementById('packagename');
  560. if(targ != null){
  561. document.getElementById('packagename').innerHTML = groupname;
  562. }
  563. targ=document.getElementById('allottedtime');
  564. if(targ != null){
  565. document.getElementById('allottedtime').innerHTML = allottedtime;
  566. }
  567. targ=document.getElementById('packageamount');
  568. if(targ != null){
  569. document.getElementById('packageamount').innerHTML = price;
  570. }
  571. targ=document.getElementById('uploaddatatransfer');
  572. if(targ != null){
  573. document.getElementById('uploaddatatransfer').innerHTML = uplimit;
  574. }
  575. targ=document.getElementById('downloaddatatransfer');
  576. if(targ != null){
  577. document.getElementById('downloaddatatransfer').innerHTML = dnlimit;
  578. }
  579.  
  580. }
  581.  
  582. function validateLoginForMACBasedUsers(){
  583. form = document.forms[0];
  584.  
  585. var url = "/24online/servlet/AjaxManager?mode=647&macaddress=1c:e6:c7:52:6d:00&nasip=127.0.0.1&groupid="+form.groupid.value;
  586. var funToCall = parseLoginForMACBasedUsers;
  587.  
  588. AJAXRequest_async(url,funToCall,errorfunction);
  589.  
  590. }
  591.  
  592. function parseLoginForMACBasedUsers(){
  593. var xmlDoc = req.responseXML.documentElement;
  594. var username = "0";
  595. var password = "0";
  596. var returnValue = xmlDoc.getElementsByTagName('returnstatus');
  597. returnValue = returnValue[0].firstChild.data;
  598.  
  599. if(returnValue == "1"){
  600. if(document.getElementById('errormessage')){
  601. document.getElementById('errormessage').innerHTML = '';
  602. }
  603. username = xmlDoc.getElementsByTagName('username')[0].firstChild.data;
  604. password = xmlDoc.getElementsByTagName('password')[0].firstChild.data;
  605.  
  606. if(username != "0" && password != "0"){
  607. document.forms[0].username.value = username;
  608. document.forms[0].password.value = password;
  609.  
  610. document.forms[0].mode.value='191';
  611. document.forms[0].checkClose.value='1';
  612. document.forms[0].submit();
  613. }
  614. }else{
  615. if(document.getElementById('errormessage')){
  616. document.getElementById('errormessage').innerHTML = "<font class='errorfont'>Problem in renewing MAC Based Dynamic User</font>";
  617. }
  618. }
  619.  
  620. }
  621.  
  622. function checkForResetPassword(){
  623. form = document.forms[0];
  624.  
  625. var url = "/24online/servlet/AjaxManager?mode=655&username="+form.username.value+"&password="+form.password.value;
  626. var funToCall = parseCheckForResetPassword;
  627.  
  628. AJAXRequest_async(url,funToCall,errorfunction);
  629.  
  630. }
  631.  
  632. function parseCheckForResetPassword(){
  633. var xmlDoc = req.responseXML.documentElement;
  634. if(xmlDoc != null){
  635. var userid = "0";
  636. var returnValue = xmlDoc.getElementsByTagName('returnstatus');
  637. returnValue = returnValue[0].firstChild.data;
  638.  
  639. if(returnValue == "1"){
  640. userid = xmlDoc.getElementsByTagName('userid')[0].firstChild.data;
  641.  
  642. if(userid != "0"){
  643. document.forms[0].username.value = "";
  644. document.forms[0].password.value = "";
  645.  
  646. var resetPasswordURL = "/24onlinehttps://netidportal.snu.edu.in/pwdReset.php?userId="+userid;
  647. //alert("resetPasswordURL : "+resetPasswordURL);
  648. window.open(resetPasswordURL,'_resetpassword','width=600,height=500,screenX=10,screenY=10,titlebar=yes,scrollbars=yes,resizable=yes');
  649. }
  650. }else{
  651. document.forms[0].mode.value='191';
  652. document.forms[0].checkClose.value='1';
  653. document.forms[0].submit();
  654. }
  655. }else{
  656. document.forms[0].mode.value='191';
  657. document.forms[0].checkClose.value='1';
  658. document.forms[0].submit();
  659. }
  660.  
  661. }
  662.  
  663. function errorfunction(){
  664. //alert("errorfunction() called");
  665. }
  666.  
  667.  
  668. function focusUsername(){
  669. try{
  670. // if prelogin page and if it is not a MAC Based Dynamic User, then focus on username
  671.  
  672. }catch(err){
  673. try{
  674. console.debug("Can not get focus on username field becuase that field does not exist");
  675. }catch(err){/*This exception will be thrown by IE, because it does not have functionality of loggin in the console*/}
  676. }
  677. }
  678.  
  679. function autologin(){
  680. //alert('autologin called');
  681.  
  682. document.forms[0].username.value="hb895@snu.in";
  683.  
  684. document.forms[0].password.value='';
  685. document.forms[0].mode.value='191';
  686. document.forms[0].checkClose.value='1';
  687. document.forms[0].submit();
  688. }
  689. function validateSubmit(){
  690.  
  691. return true;
  692. }
  693.  
  694.  
  695.  
  696.  
  697.  
  698. </script>
  699.  
  700.  
  701. <body bgcolor="#ffffff" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="byteReducer();setCurrentTimeDate();loadPackageDetails();focusUsername();startByteReducer();refreshTimeout();" onbeforeunload="reloadthis();accessHotelUserWindowParam();" onFocus="gotFocus();" onBlur="lostFocus();">
  702.  
  703.  
  704.  
  705. <FORM ACTION="/24online/servlet/E24onlineHTTPClient" METHOD=POST target="_parent" name="clientloginform">
  706. <INPUT TYPE=hidden NAME=mode VALUE="191" >
  707. <INPUT TYPE=hidden NAME=isAccessDenied VALUE="null" >
  708. <INPUT TYPE=hidden NAME=url VALUE="null" >
  709. <INPUT TYPE=hidden NAME=message VALUE="" >
  710. <INPUT TYPE=hidden NAME=checkClose VALUE="0" >
  711. <INPUT TYPE=hidden NAME=sessionTimeout VALUE="86400" >
  712. <INPUT TYPE=hidden NAME=guestmsgreq VALUE="false" >
  713. <INPUT TYPE=hidden NAME=logintype VALUE="2" >
  714. <INPUT TYPE=hidden NAME=ipaddress id=ipaddress VALUE="10.6.10.137" >
  715. <INPUT TYPE=hidden NAME=orgSessionTimeout VALUE="86400">
  716. <INPUT TYPE=hidden NAME=chrome value="-1">
  717. <INPUT TYPE=hidden NAME=alerttime value="-11">
  718. <INPUT TYPE=hidden NAME=timeout VALUE="86400">
  719. <INPUT TYPE=hidden NAME=popupalert VALUE="0">
  720. <INPUT TYPE=hidden NAME=dtold VALUE="0">
  721. <INPUT TYPE=hidden NAME=mac VALUE='1c:e6:c7:52:6d:00'>
  722. <INPUT TYPE=hidden NAME=servername id=servername VALUE='192.168.50.1'>
  723.  
  724.  
  725. <INPUT TYPE="hidden" NAME="loggedinuser" VALUE="hb895@snu.in" >
  726.  
  727. <script language="javascript">
  728.  
  729. function reloadthis() {
  730. if(document.clientloginform.guestmsgreq.value == "false"){
  731.  
  732. }
  733. }
  734. </script>
  735. <!--
  736. <div id="jsdis" style="display:''">
  737. <br><br>
  738. <center><B>You do not have Javascript enabled browser.</B></center>
  739. </div>
  740. -->
  741.  
  742. <div id="jsena" style="display:'none'">
  743. <TABLE width=100% border="0" cellpadding="0" cellspacing="0" height=100% >
  744.  
  745. <TR>
  746. <TD width=100% >
  747. <input type=hidden name=username value='hb895@snu.in'> <div style=display:none><iframe name=iframeliveupd id=iframeliveupd ></iframe></div><link rel="stylesheet" type="text/css" href="/css/customizecss/style.css" /><div class="wrapper"><div class="header"><img class="m10" alt="Shiv Nadar University" src="/images/customizeimages/logo.png" width="262" longdesc="http://snu.edu.in" height="46" /> </div><div class="titlebar">INFORMATION TECHNOLOGY</div><div class="main"><h1 class="centralized"><font color="#ff0000">You have successfully logged in</font></h1><p class="centralized">&nbsp;</p><br /><br /><p class="centralized">&nbsp;</p></div><div class="footer"><span class="footercaption clr">&copy; Copyright Shiv Nadar University 2012. All Rights Reserved. Disclaimer</span> <span class="footersubcaption">The Shiv Nadar University has been established under U.P. Act No 12 of 2011. Shiv Nadar University is UGC Approved</span> </div></div><input type=hidden name=saveinfo><div style=display:none><font class="note" ><b><label id="sessionTime">Not Applicable</label></b></font></div><div style=display:none><font class="note" ><b><label id="inOctets">Not Applicable</label></b></font></div><div style=display:none><font class="note" ><b><label id="outOctets" >Not Applicable</label></b></font></div><div style=display:none><font class="note" ><b><label id="totalOctets">Not Application</label></b></font></div><div style=display:none><font class="note" ><b><label id="packageamount"></label></b></font></div><div style=display:none><font class="note" ><b><label id="expiredate"></label></b></font></div><div style=display:none><font class="note" ><b><label id="date"></label></b></font></div><div style=display:none><font class="note" ><b><label id="time"></label></b></font></div><div style=display:none><font class="note" ><b><label id="useddatatransfer"></label></b></font></div><div style=display:none><font class="note" ><b><label id="status"></label></b></font></div>
  748. <script language=javascript>
  749.  
  750. refreshLiveRequest('180000',"true");
  751.  
  752. sendLiveUpdate('1');
  753. </script>
  754. </TD>
  755. </TR>
  756.  
  757. </table>
  758.  
  759. </div>
  760. </form>
  761. <script language="Javascript">
  762.  
  763. // location.href = document.URL+"&isreloaded=true";
  764.  
  765. jsena.style.display='' ;
  766. </script>
  767.  
  768.  
  769.  
  770. <SCRIPT>
  771.  
  772.  
  773. </SCRIPT>
  774.  
  775. <script LANGUAGE="JavaScript" >
  776. function refreshTimeout(){
  777.  
  778. sessiontime = parseInt(document.forms[0].sessionTimeout.value);
  779.  
  780. if(parseInt(sessiontime) >= 0){
  781. second = parseInt(sessiontime % 60.0);
  782. totmins = parseInt(sessiontime / 60.0);
  783. mins = parseInt(totmins % 60);
  784. tothrs = parseInt( totmins / 60);
  785. var str=((tothrs > 9) ? (""+tothrs) : ("0"+tothrs)) + ":" + (mins > 9 ? (""+mins) : ("0"+mins)) + ":" + (second > 9 ? (""+second) : ("0"+second)) ;
  786. document.getElementById("sessionTime").innerHTML=str;
  787.  
  788. var timeGap=0;
  789. if(document.forms[0].dtold.value > 0){
  790. var dtnew = new Date();
  791. timeGap=parseInt(dtnew.getTime())-parseInt(document.forms[0].dtold.value);
  792. timeGap=parseInt(timeGap/1000);
  793. }
  794.  
  795. if(timeGap > 1){
  796. document.forms[0].sessionTimeout.value = sessiontime -timeGap;//- timeGap;
  797. }else{
  798. document.forms[0].sessionTimeout.value = sessiontime - 1;//- timeGap;
  799. }
  800.  
  801. sessiontime=parseInt(document.forms[0].sessionTimeout.value);
  802.  
  803.  
  804. alerttime=parseInt(document.forms[0].alerttime.value);
  805.  
  806. if(sessiontime < alerttime && "1"==document.forms[0].popupalert.value){
  807. showAlert();
  808. }
  809.  
  810. //document.forms[0].sessionTimeout.value=document.forms[0].sessionTimeout.value-timeGap;
  811. var dt=new Date();
  812. document.forms[0].dtold.value=dt.getTime();
  813. setTimeout("refreshTimeout()",1000);
  814.  
  815. }
  816. }
  817. </script>
  818.  
  819. <script LANGUAGE="JavaScript">
  820. document.forms[0].popupalert.value="1";
  821. </script>
  822.  
  823. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement