yeah i'll look for one hold
Code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/cncoebenin.asp" -->
<%
Dim rstFormNumber__MMColParam
rstFormNumber__MMColParam = "1"
If (Request.Form("Pin") <> "") Then
rstFormNumber__MMColParam = Request.Form("Pin")
End If
%>
<%
if request.Form("submit")="submit" then
session("pin")=Request.form("Pin")
'generate a form application number first
Dim rstFormNumber, appno, frmno
Dim rstFormNumber_numRows
Set rstFormNumber = Server.CreateObject("ADODB.Recordset")
rstFormNumber.ActiveConnection = MM_cncoebenin_STRING
rstFormNumber.Source = "SELECT AccessID FROM dbo.AccessCodes WHERE accesscode = '" & request.form("Pin") & "' AND matricorregno IS NULL"
rstFormNumber.CursorType = 0
rstFormNumber.CursorLocation = 2
rstFormNumber.LockType = 1
rstFormNumber.Open()
rstFormNumber_numRows = 0
if rstFormNumber.eof=true and rstFormNumber.bof=true then'movesn to the last record in the table to get the tnum
'do nothing
else
appno=rstFormNumber("AccessID")
end if
'now increament appno by one to get the new appno
appno=cint(appno)+1
session("frmno")="COLBEN-YRONE100"& appno 'send this to the dbase
rstFormNumber.close()
'do main validation now this is where the sp is called
set cmdPin1 = Server.CreateObject("ADODB.Command")
cmdPin1.ActiveConnection = MM_cncoebenin_STRING
cmdPin1.CommandText = "dbo.STP_STUDENTSPAYMENTSCHECK"
cmdPin1.CommandType = 4
cmdPin1.CommandTimeout = 0
cmdPin1.Prepared = true
cmdPin1.Parameters.Append cmdPin1.CreateParameter("@RETURN_VALUE", 3, 4)
cmdPin1.Parameters.Append cmdPin1.CreateParameter("@Accesscode", 200, 1,50,Request.form("Pin"))
cmdPin1.Parameters.Append cmdPin1.CreateParameter("@frmno", 200, 1,50,session("frmno"))
cmdPin1.Execute()
'RESPONSE.Write cmdPin.parameters("@RETURN_VALUE").value
select case cmdPin1.parameters("@RETURN_VALUE").value
case 1
'response.Write("VALID PIN CODE")
session("yr1")="true"
server.Transfer("yearoneapplication.asp")
'response.redirect("yearone/yearoneapplication.asp")
case 2
response.Write("INVALID PIN CODE")
end select
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
<title>WELCOME TO ADMISSION FORM PURCHASE</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.style51 {FONT-SIZE: 10px; COLOR: #0000ff
}
.style52 {COLOR: #333333; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
-->
</style>
<link href="coe.css" rel="stylesheet" type="text/css">
<script language="javascript">
function validate()
{
if (document.form1.Pin.value=="")
{
window.alert("Please Enter A Pin Number");
return false;
}
if (document.form1.surname.value=="" || document.form1.firstname.value=="")
{
window.alert("Please Your First Or Last Names");
return false;
}
return true;
}
</script>
</head>
<body background="Images/bg.gif">
<TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD width="100%" background="Images/bg.gif">
<DIV align=center>
<p><br>
</p>
<TABLE cellSpacing=0 cellPadding=0 width=828 border=0 style="border:1px solid black" height="117">
<TBODY>
<TR>
<TD width=20 bgColor=#CCCCCC height="41" background="images\top_bg.gif"> </TD>
<TD width=783 bgColor=#CCCCCC height="24" background="images\top_bg.gif">
<table border="0" width="100%" id="table2" height="46">
<tr>
<td colspan="4"> </td>
</tr>
<tr>
<td width="2%" height="22">
<p align="center"> <img border="0" src="images\bullet_corner_red.gif" width="13" height="10"></td>
<td width="52%" height="22">
<p align="left"><b><font color="#FFFFFF">
<span class="text">
Year 1 Admission Request Form Purchase </span></font></b></td>
<td width="7%" height="22"></td>
<td width="38%" height="22"> </td>
</tr>
</table></TD>
<TD width=23 bgColor=#CCCCCC height="41" background="images\top_bg.gif"> </TD>
</TR>
<TR>
<TD width=20 height="30" bgColor=#CCCCCC> </TD>
<TD width=783 bgColor=#CCCCCC>
<form action="index1.asp" method="POST" enctype="application/x-www-form-urlencoded" name="form1" onsubmit="return validate()">
<table width="93%" border="0" align="center" cellpadding="0" cellspacing="0" id="tblEligibity">
<tr>
<td><table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2">
<p align="right"><SPAN
class=style51><FONT face=Verdana size=2><A
href="/index.htm">Exit</A></FONT></SPAN></td>
</tr>
<tr>
<td colspan="2"><p> </p></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</table>
<TABLE borderColor=#cccccc width="55%" align=center bgColor=#cccccc border=1 style="border:2px solid silver">
<TBODY>
<TR>
<TD bgcolor="#CCCCCC">
<DIV align=center>
<TABLE width="64%" bgColor=#cccccc border=0>
<TBODY>
<TR>
<TD bgColor=#CCCCCC>
<P style="MARGIN-TOP: 1px; MARGIN-BOTTOM: 1px" align=center>
<span class="textSml">
<u>
<b>
Application
Forms </b></font><B>Payment</FONT></B>: - <B>
Step 1</B></u></span></span></P></TD>
</TR>
</TBODY>
</TABLE>
</DIV>
<P style="MARGIN-TOP: 1px; MARGIN-BOTTOM: 1px" align=center> </P>
<P style="MARGIN-TOP: 1px; MARGIN-BOTTOM: 1px" align=center> </P>
<TABLE cellSpacing=2 cellPadding=2 width=460 align=center>
<TBODY>
<TR vAlign=baseline bgColor=#ffffff>
<TD noWrap align=right colSpan=3> <DIV align=center></DIV></TD>
</TR>
<TR vAlign=baseline bgColor=#ffffff>
<TD noWrap align=right bgColor=#CCCCCC width="10"> </TD>
<TD noWrap align=right bgColor=#CCCCCC width="113"><span class="textSml"> Pin Code </span></FONT></TD>
<TD bgColor=#CCCCCC width="317"> <INPUT name=Pin id="Pin22"
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; TEXT-TRANSFORM: capitalize; BORDER-LEFT: #808080 1px solid; COLOR: #808000; BORDER-BOTTOM: #808080 1px solid; FONT-FAMILY: Verdana"
size=25></TD>
</TR>
<TR vAlign=baseline>
<TD noWrap align=right width="10"> </TD>
<TD noWrap align=right width="113"> </TD>
<TD width="317">
<INPUT style="border:1px solid #666666; COLOR: #000000; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #808080; font-size:8pt" type=submit value="submit" name=submit onsubmit="return doit(this)">
<input style="border:1px solid #666666; COLOR: #000000; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #808080; font-size:8pt" name="Cancel" type="reset" id="Cancel2" value="Cancel">
</TD>
</TR>
</TBODY>
</TABLE>
<P align=right> </P>
<P align=right></P></TD>
</TR>
</TBODY>
</TABLE></td>
</tr>
</table>
<div align="center"></div>
</form> </TD>
<TD width=23 bgColor=#CCCCCC> </TD>
</TR>
<TR>
<TD width=20 bgColor=#CCCCCC height="36" background="images\top_bg_1.gif"> </TD>
<TD width=806 bgColor=#CCCCCC colspan="2" height="36" background="images\top_bg_1.gif"> </TD>
</TR>
</TBODY>
</TABLE>
<p align="center"> <img border="0" src="images\nu_edlink.gif" width="104" height="46"><br>
All Rights Reserved (c) Global Portal Services
</DIV></TD>
</TR>
</TBODY>
</TABLE>
</body>
</html>
Bookmarks