-
Notifications
You must be signed in to change notification settings - Fork 1
/
pinOffsetInterface.txt
291 lines (201 loc) · 9 KB
/
pinOffsetInterface.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
[ ER.PINCHANGE.HTML
Created by
Ethan Roberts
on 04/30/2019
This creates an HTML form for users to use when changing pins for a card.
]
WINDOWS
TARGET=ACCOUNT
DEFINE
#INCLUDE "RD.GETDATA.DEF"
HTMLFNUMBER=NUMBER
HTMLFLINE=CHARACTER
HTMLFERROR=CHARACTER
ERRORTEXT = CHARACTER
NEWPIN = CHARACTER
CARDLOC = NUMBER
CARDNUMBER = CHARACTER
LASTFOUR = CHARACTER
CARDCOUNTER = NUMBER
I = NUMBER
TRUE = NUMBER
FALSE = NUMBER
FOUND = NUMBER
VALIDUSER = NUMBER
CARDCHKID = CHARACTER
END
SETUP
FALSE = 0
TRUE = 1
CALL CHECKPRIVS
IF VALIDUSER = FALSE THEN
DO
POPUPMESSAGE(0,"You do not have sufficient privileges to run this program.")
TERMINATE
END
CARDCOUNTER = 0
FOR EACH CARD WITH (CARD:STATUS = 0 OR [ not issued ]
CARD:STATUS = 1) [ issued ]
DO
CARDCOUNTER = CARDCOUNTER + 1
END
IF CARDCOUNTER < 1 THEN
DO
POPUPMESSAGE(0,"There are no active debit cards on this account.")
TERMINATE
END
HTMLVIEWOPEN(0)
HTMLVIEWLINE("<!DOCTYPE>")
[HTMLVIEWLINE("<meta http-equiv='Access-Control-Allow-Origin' content='*'>")]
HTMLVIEWLINE("<meta charset='iso-8859-1'>")
HTMLVIEWLINE("<meta http-equiv='X-UA-Compatible' content='IE=edge' />")
HTMLVIEWLINE(" <head><script src='jquery-3.4.0.min.js'></script></head> ")
HTMLVIEWLINE(" <link rel='stylesheet' href='https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css' ")
HTMLVIEWLINE(" integrity='sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T' crossorigin='anonymous'> ")
HTMLVIEWLINE("<link href='https://unpkg.com/[email protected]/dist/aos.css' rel='stylesheet'> ")
HTMLVIEWLINE("<style>")
HTMLVIEWLINE(" body {background-color: white; font-family: 'Calibri'; } ")
HTMLVIEWLINE(" div { border-radius: 5px;} ")
HTMLVIEWLINE("input[type='submit'] { width: 400px; border: none; color: white; background-color: #3b5998; cursor: pointer; padding: 9px 9px; } ")
HTMLVIEWLINE("input[type='submit']:hover { text-decoration: none; background-color: #4e71ba; } ")
HTMLVIEWLINE(" .radio { cursor: pointer;} ")
HTMLVIEWLINE("h2 { padding-top: 15px; text-align: center; font-family: 'Calibri'; font-size: 30px; } ")
HTMLVIEWLINE(" label { font-weight: bold;} ")
HTMLVIEWLINE(" .boxhead a {margin: auto; display: block; width: 100px; height: 30px; color: white; background-color: #3CAEA3; ")
HTMLVIEWLINE(" font-size: 14px; text-decoration: none; padding: 7px; border-radius: 10px; text-align: center; } ")
HTMLVIEWLINE(".boxhead a:hover { text-decoration: underline; background-color: #79CDCD; color: white; } ")
HTMLVIEWLINE(" form { width: 400px; margin: auto; border: 3px solid gray; background-color: white; border-radius: 9px; ")
HTMLVIEWLINE(" padding-top: 40px; padding-left: 0px; padding-right: 0px; padding-bottom: 0px; margin-top: 30px; } ")
HTMLVIEWLINE(" legend { font-size: 20px; background-color: #e8e8e8; color: black; padding: 5px 9px; margin-bottom: 20px; } ")
HTMLVIEWLINE(" fieldset { border: 0; } ")
HTMLVIEWLINE(" .joint { font-size: 12px; margin-left: 20px; padding-top: 1px;} ")
HTMLVIEWLINE(" span:hover { color: green; text-align: center; } ")
HTMLVIEWLINE(" #submit { width: 394px; margin: auto; margin-top: 35px;} ")
HTMLVIEWLINE(" input:focus { border-color: black; } ")
HTMLVIEWLINE(" .center { margin: auto; } ")
HTMLVIEWLINE("</style>")
[ END CSS ]
HTMLVIEWLINE("<head></head>")
HTMLVIEWLINE("<br><br>")
HTMLVIEWLINE("<body>")
HTMLVIEWLINE("<div class='container'>")
HTMLVIEWLINE("<div class='row'>")
HTMLVIEWLINE("<div class='col text-center'> ")
HTMLVIEWLINE(" <a class='btn btn-info' href='https://cardatonce.eftsource.com/Home/Login' target='_blank'>Login to Card@Once </a> ")
HTMLVIEWLINE("</div>")
HTMLVIEWLINE("</div>")
HTMLVIEWLINE("</div>")
HTMLVIEWLINE("<div class='pinOffsetForm'>")
HTMLVIEWLINE("<form name='htmlrginputform' METHOD=POST ACTION=symitar://HTMLView~Action=Post>")
HTMLVIEWLINE("<h2>Pin-Offset Change")
HTMLVIEWLINE("<br>")
HTMLVIEWLINE("</h2><br><br>")
HTMLVIEWLINE("<fieldset><legend> Choose a card:</legend>")
HTMLVIEWLINE("<div class='cardList'>")
FOR EACH CARD WITH (CARD:STATUS = 0 OR CARD:STATUS = 1)
DO
CARDLOC=CARD:LOCATOR
HTMLVIEWLINE("<span onclick=highlight(this); >")
HTMLVIEWLINE("<input type='radio' class='radio' name='cardLoc' id="+FORMAT("999",CARDLOC)+" ")
HTMLVIEWLINE(" style='font-size: 17px; margin-left: 15px; margin-top: 15px; margin-bottom: 10px;' value="+FORMAT("999",CARDLOC)+" required> ")
HTMLVIEWLINE(" "+SEGMENT(CARD:NUMBER,1,6)+" ")
HTMLVIEWLINE(" "+" "+" ")
HTMLVIEWLINE(" "+SEGMENT(CARD:NUMBER,7,LENGTH(CARD:NUMBER))+" ")
HTMLVIEWLINE("</span><br>")
HTMLVIEWLINE("<ul class='list-group list-group-flush' style='margin-left: 10px;' >")
HTMLVIEWLINE("<li class='list-group-item py-2' style='font-size: 13px;' >")
HTMLVIEWLINE(NAME:LONGNAME) [ *** Listing primary name on every card since they are primary on account *** ]
HTMLVIEWLINE("</li></ul>")
HTMLVIEWLINE("<ul class='list-group list-group-flush' style='margin-left: 10px;'>")
[ *** Get all names linked to each card *** ]
FOR EACH CARD NAME WITH CARD NAME:LONGNAME <> NAME:LONGNAME
DO
HTMLVIEWLINE("<li class='list-group-item py-2' style='font-size: 13px;'>")
HTMLVIEWLINE(CARD NAME:LONGNAME)
HTMLVIEWLINE("</li>")
END
HTMLVIEWLINE("</ul>")
HTMLVIEWLINE("<br>")
END
HTMLVIEWLINE("<div style='margin-left: 10px; margin-top: 50px;' text-align='center' > ")
HTMLVIEWLINE("<label for='pinOffset'>Enter Card@Once Offset:    </label>")
HTMLVIEWLINE("<input type='text' name='pinOffset' id='pinOffset' value='' maxlength='4' ")
HTMLVIEWLINE(" placeholder='Enter new pin...' onkeypress='return func(event)'> ")
HTMLVIEWLINE("<div > ")
HTMLVIEWLINE("</div>")
HTMLVIEWLINE("</fieldset>")
HTMLVIEWLINE("<input type='submit' onClick='return validateInput(this)' name='submit' id='submit' value='Submit' > ")
HTMLVIEWLINE("</form>")
HTMLVIEWLINE("</div>")
HTMLVIEWLINE("<script src='https://code.jquery.com/jquery-3.3.1.slim.min.js' ")
HTMLVIEWLINE(" integrity='sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo' crossorigin='anonymous'></script> ")
HTMLVIEWLINE("<script src='https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js' ")
HTMLVIEWLINE(" integrity='sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1' crossorigin='anonymous'></script> ")
HTMLVIEWLINE("<script src='https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js' ")
HTMLVIEWLINE("integrity='sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM' crossorigin='anonymous'></script> ")
HTMLVIEWLINE("<script src='https://unpkg.com/[email protected]/dist/aos.js'></script> ")
HTMLVIEWLINE("</body>")
HTMLVIEWLINE("<script>")
HTMLVIEWLINE(" function validateInput(card){ ")
HTMLVIEWLINE(" var pin = document.getElementById('pinOffset').value; ")
HTMLVIEWLINE(" if (pin.length != 4 || isNaN(pin) ){ ")
HTMLVIEWLINE(" alert('Invalid pin entry. The PIN must be exactly 4 digits.'); ")
HTMLVIEWLINE(" return false; } ")
HTMLVIEWLINE(" else if (pin == 0000){ ")
HTMLVIEWLINE(" alert('The PIN entered is already in use with this debit card. Please have the member enter a different PIN.'); ")
HTMLVIEWLINE(" return false; ")
HTMLVIEWLINE("} else{")
HTMLVIEWLINE("return true; }")
HTMLVIEWLINE("}")
HTMLVIEWLINE(" function func(e){ ")
HTMLVIEWLINE(" var key = e.which || e.keyCode; ")
HTMLVIEWLINE(" if(key == 13){ alert('You must click the Submit button.'); return false; }")
HTMLVIEWLINE(" } ")
HTMLVIEWLINE(" function highlight(e){ ")
HTMLVIEWLINE(" var inputs = document.getElementsByTagName('span'); ")
HTMLVIEWLINE(" for (var i = 0; i < inputs.length; ++i){ ")
HTMLVIEWLINE(" inputs[i].style.color='black'; ")
HTMLVIEWLINE(" } ")
HTMLVIEWLINE(" e.style.color='green'; ")
HTMLVIEWLINE(" } ")
HTMLVIEWLINE("</script>")
HTMLVIEWLINE("</html>")
HTMLVIEWDISPLAY
CALL PROCESSSUBMIT [ get values from form ]
END
PRINT TITLE="PINCHANGE"
SUPPRESSNEWLINE
END
PROCEDURE PROCESSSUBMIT
HTMLFLINE = ""
NEWPIN = ""
WHILE HTMLFLINE<>"EOD"
DO
HTMLFLINE=ENTERLINE(0) [ get value submitted by user ]
IF CHARACTERSEARCH(HTMLFLINE,"pinOffset=") > 0 THEN
NEWPIN = HTMLFLINE
IF CHARACTERSEARCH(HTMLFLINE,"cardLoc=") > 0 THEN
CARDLOC = VALUE(HTMLFLINE)
END
FOR EACH CARD WITH CARD:LOCATOR = CARDLOC
DO
CARDNUMBER = CARD:NUMBER
LASTFOUR = SEGMENT(CARD:NUMBER,13,16)
END
FMPERFORM REVISE CARD LOC CARDLOC (0,0,ERRORTEXT)
DO
SET PINOFFSET TO VALUE(NEWPIN)
END
POPUPMESSAGE(0, "PIN Successfully Changed for Card Ending In: "+LASTFOUR )
END
PROCEDURE CHECKPRIVS
VALIDUSER = FALSE
FOR I = 1 TO 99
DO
IF (I = 1 OR I = 4 OR I = 5 OR I = 6) AND [ Security Group 1 is InfoSys, Group 4 is Head-Teller, Group 5 is FSO, Group 6 is branch mgr ]
GETDATANUMBER(GETUSERPRIVILEGEGROUP,SYSUSERNUMBER,I) = TRUE THEN
DO
VALIDUSER = TRUE [ This user can run this specfile ]
END
END
END