|
<% if (withError) { %>
Log-in Name: <%= strUserLogName %>
Company: <%= strCompanyName %>
<% if (strFirstTimer.equals("true")) { %>
For additional contact persons of your company, please fill up the form below.
<% } else { %>
INVALID ENTRY/ENTRIES were found in your registration form.
<% if (invalidDialUpChar) { %>
You had entered a non-numeric character on your PHONE number.
<% } %>
<% if (invalidEMailAdd) { %>
You had entered an invalid or INCOMPLETE e-mail address entry. ( Valid samples of e-mail address: juan@skyinet.net and john_smith@hotmail.com )
<% } %>
<% if (areaCodeOK==false) { %>
An area code entry (or entries) is not a valid Philippine telephone area code.
<% } %>
<% if (cp1Inc) { %>
Your entries on Contact Person 1 is incomplete. ( You have left a field/fields with an asterisk (*) in Contact Person 1 empty )
<% } %>
<% if (cp2Inc) { %>
Your entries on Contact Person 2 is incomplete. ( You have left a field/fields with an asterisk (*) in Contact Person 2 empty )
<% } %>
<% if (cp3Inc) { %>
Your entries on Contact Person 3 is incomplete. ( You have left a field/fields with an asterisk (*) in Contact Person 3 empty )
<% } %>
<% if (cp4Inc) { %>
Your entries on Contact Person 4 is incomplete. ( You have left a field/fields with an asterisk (*) in Contact Person 4 empty )
<% } %>
<% if (cp5Inc) { %>
Your entries on Contact Person 5 is incomplete. ( You have left a field/fields with an asterisk (*) in Contact Person 5 empty )
<% } %>
Please check.
<% } %>
<% } else { %>
<%
if (strRepeat.equals("Cancel")) {
} else {
int ctr = 0;
int intID = 0;
SQLstmt = "SELECT MAX(CPx_ID) AS CPx_ID FROM tblOtherCPs WHERE Co_ID=" + intCompanyID + ";";
users.connect(strTempDB);
rs = users.listQuery(SQLstmt);
while (rs.next()) {
intID = rs.getInt("CPx_ID");
}
intID++;
if (cp1NotEmpty) {
SQLstmt = "INSERT INTO tblOtherCPs VALUES (" + intCompanyID + ", " + intID + ", '" + strCP1Dept + "', '" + strCP1FName + "', '" + strCP1LName + "', '" + strCP1Position + "', '" + strCP1TelArea + "', '" + strCP1TelNum + "', '" + strCP1TelLocal + "', '" + strCP1EMail + "');";
users.updateData(SQLstmt);
ctr++;
intID++;
}
if (cp2NotEmpty) {
SQLstmt = "INSERT INTO tblOtherCPs VALUES (" + intCompanyID + ", " + intID + ", '" + strCP2Dept + "', '" + strCP2FName + "', '" + strCP2LName + "', '" + strCP2Position + "', '" + strCP2TelArea + "', '" + strCP2TelNum + "', '" + strCP2TelLocal + "', '" + strCP2EMail + "');";
users.updateData(SQLstmt);
ctr++;
intID++;
}
if (cp3NotEmpty) {
SQLstmt = "INSERT INTO tblOtherCPs VALUES (" + intCompanyID + ", " + intID + ", '" + strCP3Dept + "', '" + strCP3FName + "', '" + strCP3LName + "', '" + strCP3Position + "', '" + strCP3TelArea + "', '" + strCP3TelNum + "', '" + strCP3TelLocal + "', '" + strCP3EMail + "');";
users.updateData(SQLstmt);
ctr++;
intID++;
}
if (cp4NotEmpty) {
SQLstmt = "INSERT INTO tblOtherCPs VALUES (" + intCompanyID + ", " + intID + ", '" + strCP4Dept + "', '" + strCP4FName + "', '" + strCP4LName + "', '" + strCP4Position + "', '" + strCP4TelArea + "', '" + strCP4TelNum + "', '" + strCP4TelLocal + "', '" + strCP4EMail + "');";
users.updateData(SQLstmt);
ctr++;
intID++;
}
if (cp5NotEmpty) {
SQLstmt = "INSERT INTO tblOtherCPs VALUES (" + intCompanyID + ", " + intID + ", '" + strCP5Dept + "', '" + strCP5FName + "', '" + strCP5LName + "', '" + strCP5Position + "', '" + strCP5TelArea + "', '" + strCP5TelNum + "', '" + strCP5TelLocal + "', '" + strCP5EMail + "');";
users.updateData(SQLstmt);
ctr++;
}
if (ctr != 0 ) {
SQLstmt = "UPDATE tblCoInfoIndicator SET " + strFieldName + " = 1 WHERE Co_ID = " + intCompanyID + ";";
users.updateData(SQLstmt);
}
}
if (strRepeat.equals("Yes")) {
users.disconnect();
%>
<%
} else {
if (strRepeat.equals("No")) {
SQLstmt = "UPDATE tblCoInfoIndicator SET " + strFieldName + " = 2 WHERE Co_ID = " + intCompanyID + ";";
users.updateData(SQLstmt);
}
users.disconnect();
%>
<% } %>
<% } %>
|