rendered paste body<?php require_once('Connections/stdVarify.php'); ?><?phpif (!function_exists("GetSQLValueString")) {function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue;}}$editFormAction = $_SERVER['PHP_SELF'];if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);}if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "webform")) { $insertSQL = sprintf("INSERT INTO stdfeed (name, `add`, cty, stat, zip, ph1, ph2, email, edu, course, how, timing) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)", GetSQLValueString($_POST['infoFirstName'], "text"), GetSQLValueString($_POST['infoAddress'], "text"), GetSQLValueString($_POST['infoCity'], "text"), GetSQLValueString($_POST['infoState'], "text"), GetSQLValueString($_POST['infoZipcode'], "text"), GetSQLValueString($_POST['infoPhone1'], "text"), GetSQLValueString($_POST['infoPhone2'], "text"), GetSQLValueString($_POST['infoEmail'], "text"), GetSQLValueString($_POST['infoSchooling'], "text"), GetSQLValueString($_POST['infoProgram'], "text"), GetSQLValueString($_POST['infoReference'], "text"), GetSQLValueString($_POST['infoCallTime'], "text")); mysql_select_db($database_stdVarify, $stdVarify); $Result1 = mysql_query($insertSQL, $stdVarify) or die(mysql_error()); $insertGoTo = "request-thanks.php"; if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $insertGoTo));}mysql_select_db($database_stdVarify, $stdVarify);$query_RsIns = "SELECT * FROM std";$RsIns = mysql_query($query_RsIns, $stdVarify) or die(mysql_error());$row_RsIns = mysql_fetch_assoc($RsIns);$totalRows_RsIns = mysql_num_rows($RsIns);mysql_select_db($database_stdVarify, $stdVarify);$query_rsFeedback = "SELECT * FROM stdfeed";$rsFeedback = mysql_query($query_rsFeedback, $stdVarify) or die(mysql_error());$row_rsFeedback = mysql_fetch_assoc($rsFeedback);$totalRows_rsFeedback = mysql_num_rows($rsFeedback);?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head> <title>Comdex Systems - Request Information</title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" type="text/css" media="screen" href="css/chubb.css" /> <link rel="stylesheet" type="text/css" media="print" href="css/chubb.css" /> <script src="../www.google-analytics.com/urchin.js" type="text/javascript"> </script> <script type="text/javascript"> _uacct = "UA-817352-2"; urchinTracker(); </script> <script type="text/javascript" src="inc/swfobject.js"></script> <script type="text/javascript"> <!-- function externalLinks() { if (!document.getElementsByTagName) return; var anchors = document.getElementsByTagName("a"); for (var i=0; i<anchors.length; i++) { var anchor = anchors[i]; if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") anchor.target = "_blank"; } } window.onload = externalLinks; --> </script> <script language="javascript" >function checkForm(f) { if(f.infoFirstName.value == "") { alert("Please Enter Your Name !"); f.infoFirstName.focus(); return false; } if(f.infoAddress.value=="") { alert("Please Enter Your Address"); f.infoAddress.focus(); return false; } if(f.infoCity.value == "") { alert("Please Enter Your City"); f.infoCity.focus(); return false; } if(f.infoState.value == "") { alert("Please Select Your Province"); f.infoState.focus(); return false; } if(f.infoZipcode.value == "") { alert("Please Enter Your Zip Code"); f.infoZipcode.focus(); return false; } if(f.infoPhone1.value == "") { alert("Please Enter Your Home Phone Number, Type 0 if no Number"); f.infoPhone1.focus(); return false; } if(f.infoPhone2.value == "") { alert("Please Enter Your Mobile Nnumber, Type 0 if no Number"); f.infoPhone2.focus(); return false; } if(f.infoEmail.value.length ==0) { alert("Please Enter Email"); f.infoEmail.focus(); return false; } if(!isEmail(f.infoEmail.value)) { alert("Please Enter Valid E-Mail Address e.g (email@yourhost.com)."); f.infoEmail.focus(); return false; } if (f.infoSchooling.value=="") { alert("Please Select Education"); f.infoSchooling.focus(); return false; } if (f.infoProgram.value=="") { alert("Please Select Your Programe of Intrests"); f.infoProgram.focus(); return false; } if (f.infoReference.value=="") { alert("Please Select How Did You Heard About Us !"); f.infoReference.focus(); return false; } if (f.infoCallTime.value=="") { alert("Please Select The Time Suite You !"); f.infoCallTime.focus(); return false; } return true; alert('hi'); alert(isEmail(f.infoEmail.value)); alert(f.infoEmail.value); } </script> </head><body><div id="wrapper"> <div id="headerWrapper"> <div id="header"> <ul class="nav"> <li id="edgeL" class="navEdge"><img src="../img/spacer.gif" width="1" height="1" class="noborder" alt="" /></li> <li id="nav1" ><a href="index.htm" title="Home">Home</a></li> <li class="navSpacer"><img src="../img/spacer.gif" width="1" height="1" class="noborder" alt="" /></li> <li id="nav2" ><a href="about/default.php" title="About Us">About Us</a></li> <li class="navSpacer"><img src="../img/spacer.gif" width="1" height="1" class="noborder" alt="" /></li> <li id="nav3" ><a href="programs/default.htm" title="Programs">Programs</a></li> <li class="navSpacer"><img src="../img/spacer.gif" width="1" height="1" class="noborder" alt="" /></li> <li id="nav4" ><a href="admissions/default.php" title="Location">Admission</a></li> <li class="navSpacer"><img src="../img/spacer.gif" width="1" height="1" class="noborder" alt="" /></li> <li id="nav5" class="current"><a href="request.php" title="Admissions">Feed Back</a></li> <li class="navSpacer"><img src="../img/spacer.gif" width="1" height="1" class="noborder" alt="" /></li> <li id="nav6" ><a href="locations/map/comdex-systems/default.htm" title="Financial Aid">Contact us</a></li> <li class="navSpacer"><img src="../img/spacer.gif" width="1" height="1" class="noborder" alt="" /></li> <li id="nav7" ><a href="about/verification.php" title="Request Information">Online Verification</a></li> <li id="edgeR" class="navEdge"><img src="../img/spacer.gif" width="1" height="1" class="noborder" alt="" /></li> </ul> </div> </div> <div id="contentWrapper"><table id="masthead" cellspacing="0"> <tr> <td id="mSub" class="mSubchubb"><p> </p> <p><br /> <br /> <br /> </p> <div id="adStart"><div class="basic"> <h1 class="part1"><a href="request.php" title="Classes Start Soon - Reserve Your Seat Today!">New Classes Starting</a></h1> <h1 class="part2"><a href="request.php" title="Classes Start Soon - Reserve Your Seat Today!">Soon</a></h1> <h2><a href="request.php" title="Classes Start Soon - Reserve Your Seat Today!">Call +92 (0) 91 5851123 Now!</a></h2> <h3><a href="request.php" title="Classes Start Soon - Reserve Your Seat Today!">or</a><br /> </h3> <h4><a href="request.php" title="Classes Start Soon - Reserve Your Seat Today!">Reserve Your Seat Today!</a></h4> </div> </div></td> <td id="mImage"><img src="img/comdex/request/head_index.jpg" width="472" height="270" alt="Request Information" title="Request Information" class="noborder" /> <div id="navHead" class="subNavHead"><a href="request.php" title="Request Information">Request Information</a></div></td> </tr></table><div id="contentHeader"> </div> <table id="main" cellspacing="0"> <tr> <td id="mainContent"> <div id="content"> <h1>Request Information / Reserve Your Seat Online !</h1> <p>Classes start soon! Submit the information below and take the first step toward getting the career training you need.</p> <p id="privacyNote"><span class="altcolorSmall">We protect your privacy. We will never sell or distribute your contact information.</span></p> <script language='javascript'> <!-- Original Programmed by Ira Sterbakov - irasterb@erols.com 1/8/03 --> <!-- May be freely used and modified - email notification would be nice --> aDr = new Array(); sP = new Array(); sPcampus = new Array(); /* CHI */ sP[0] = 0; sPcampus[13] = 0+1; aDr[0] = new Set2val('','Select a Program'); aDr[1] = new Set2val('it','Computer Networking & Security'); aDr[2] = new Set2val('mass','Massage Therapy'); aDr[3] = new Set2val('meda','Medical Assistant'); aDr[4] = new Set2val('mbc','Medical Billing & Coding'); aDr[5] = new Set2val('surg','Surgical Technologist'); /* CHE */ sP[1] = 6; sPcampus[7] = 1+1; aDr[6] = new Set2val('','Select a Program'); aDr[7] = new Set2val('it','Computer Networking & Security'); aDr[8] = new Set2val('dda','Graphic Design & Animation'); aDr[9] = new Set2val('mass','Massage Therapy'); aDr[10] = new Set2val('meda','Medical Assistant'); aDr[11] = new Set2val('mbc','Medical Billing & Coding'); /* JER */ sP[2] = 12; sPcampus[2] = 2+1; aDr[12] = new Set2val('','Select a Program'); aDr[13] = new Set2val('it','Computer Networking & Security'); aDr[14] = new Set2val('dda','Graphic Design & Animation'); aDr[15] = new Set2val('mass','Massage Therapy'); aDr[16] = new Set2val('meda','Medical Assistant'); aDr[17] = new Set2val('mbc','Medical Billing & Coding'); /* NYC */ sP[3] = 18; sPcampus[14] = 3+1; aDr[18] = new Set2val('','Select a Program'); aDr[19] = new Set2val('it','Computer Networking & Security'); aDr[20] = new Set2val('dda','Graphic Design & Animation'); aDr[21] = new Set2val('meda','Medical Assistant'); aDr[22] = new Set2val('mbc','Medical Billing & Coding'); aDr[23] = new Set2val('madm','Medical Administration'); /* NBR */ sP[4] = 24; sPcampus[5] = 4+1; aDr[24] = new Set2val('','Select a Program'); aDr[25] = new Set2val('cad','CAD / Drafting Technology'); aDr[26] = new Set2val('it','Computer Networking & Security'); aDr[27] = new Set2val('dda','Graphic Design & Animation'); aDr[28] = new Set2val('mass','Massage Therapy'); aDr[29] = new Set2val('meda','Medical Assistant'); aDr[30] = new Set2val('mbc','Medical Billing & Coding'); aDr[31] = new Set2val('surg','Surgical Technologist'); /* PAR */ sP[5] = 32; sPcampus[1] = 5+1; aDr[32] = new Set2val('','Select a Program'); aDr[33] = new Set2val('cad','CAD / Drafting Technology'); aDr[34] = new Set2val('it','Computer Networking & Security'); aDr[35] = new Set2val('dda','Graphic Design & Animation'); aDr[36] = new Set2val('mass','Massage Therapy'); aDr[37] = new Set2val('meda','Medical Assistant'); aDr[38] = new Set2val('mbc','Medical Billing & Coding'); /* SPR */ sP[6] = 39; sPcampus[3] = 6+1; aDr[39] = new Set2val('','Select a Program'); aDr[40] = new Set2val('it','Computer Networking & Security'); aDr[41] = new Set2val('dda','Graphic Design & Animation'); aDr[42] = new Set2val('mass','Massage Therapy'); aDr[43] = new Set2val('meda','Medical Assistant'); aDr[44] = new Set2val('mbc','Medical Billing & Coding'); //lIST OF START POINTS FOR THE VARIOUS SELECTIONS //NOTE: last entry is fictious start point point of future additional selects //If you understand the system you can even use various selections for more than one form //with a little playing around with the sP array. Every use uses two sP values. The way it is //written I double use each and go in order. You can have pairs of start stop sP values though. function Set2val(V1,V2) { this.Id = V1; this.Description = V2; } function SelDrop(Sels,fn,sname,snum) <!-- Another small but powerful function by Ira --> <!-- Original Programmed by Ira Sterbakov - irasterb@erols.com 1/8/03 --> <!-- May be freely used and modified - email notification would be nice --> { NewListad = eval("document." + fn + "." + sname); if (NewListad.options) { if (Sels.selectedIndex > 0) { NewListad.options.length = 0; //nP = Sels.selectedIndex + snum; //alert(Sels.value + " " + sPcampus[Sels.value]); nP = sPcampus[Sels.value]; nsn = sP[nP-1]; nen = sP[nP]; if (!nen) { nen = aDr.length; } //alert(aDr.length + " | " + Sels.value + " | " + nP + " | " + nsn + " | " + nen + " | " + sP[nP]); for ( i1 = nsn; i1 < nen; i1++ ) { NewListad.options[i1 - nsn] = new Option(aDr[i1].Description,aDr[i1].Id); } } } }</script><div class="form"> <form action="<?php echo $editFormAction; ?>" method="POST" name="webform" target="_self" onSubmit="return checkForm(webform);" ><div id="formHidden"></div> <table> <tr> <th><span class="required">*</span> Name:</th> <td><input name="infoFirstName" type="text" value="" size="24" maxlength="24" /></td> </tr> <tr> <th>Address:</th> <td><input type="text" name="infoAddress" value="" /></td> </tr> <tr> <th><span class="required">*</span> City:</th> <td><input type="text" name="infoCity" value="" /></td> </tr> <tr> <th><span class="required">*</span> State:</th> <td><div class="formSelect"> <select name="infoState" id="infoState"> <option value="">Select Your Province</option> <option value="1">N-W.F.P</option> <option value="2">Punjab</option> <option value="3">Balochistan</option> <option value="4">Sindh</option> <option value="5">Azad Jamu & Kashmir</option> <option>Other</option> </select> </div> </td> </tr> <tr> <th><span class="required">*</span> Zip code:</th> <td><input type="text" name="infoZipcode" size="10" maxlength="5" value="" id="fZipcode" /></td> </tr> <tr> <th><span class="required">*</span> Home Phone:</th> <td><input type="text" name="infoPhone1" size="15" maxlength="20" value="" class="fPhone" /> </td> </tr> <tr> <th>Other Phone:</th> <td><input type="text" name="infoPhone2" size="15" maxlength="20" value="" class="fPhone" /> </td> </tr> <tr> <th>Email Address:</th> <td><input name="infoEmail" type="text" id="infoEmail" value="" maxlength="50" /></td> </tr> <tr> <th><span class="required">*</span> I am a...</th> <td> <select name="infoSchooling"> <option value="" selected="selected">Select an Education Level</option> <option value="1">Current High School Student</option> <option value="2">Graduate</option> <option value="3">Post Graduate</option> </select> </td> </tr> <tr> <th><span class="required">*</span> Program of Interest</th> <td> <select name="infoProgram"> <option value="" selected="selected">Select a Program</option> <option value="1">WEB Engineering</option> <option value="2">CCNA 3.0</option> <option value="3">MCSE 2000/2003</option> <option value="4">LINUX</option> <option value="5">Software Development</option> <option value="6">Hardware</option> </select> </td> </tr> <tr> <th>How did you hear about us?:</th> <td> <select name="infoReference"> <option>Select One</option> <option value="1">Television</option> <option value="2">webtech.risingasia.com</option> <option value="3">Newspaper</option> <option value="4">Radio</option> <option value="5">Friends</option> <option value="6">Internet Ad</option> <option value="7">E-Mail</option> <option value="8">Direct Mail</option> <option value="9">Other</option> <option value="10">www.risingasia.com</option> </select> </td> </tr> <tr> <th>Best time to reach you:</th> <td> <select name="infoCallTime"> <option value="" selected="selected">Select a Contact Time</option> <option value="Morning">Morning</option> <option value="Afternoon">Afternoon</option> <option value="Evening">Evening</option> <option value="Anytime">Anytime</option> </select> </td> </tr> <tr> <th id="requiredNotice"><span class="required">*</span> = Required Fields</th> <td class="submit"> <!--<div class="butBorder">--> <span class="butBorder"><input type="submit" name="cmdSubmit" value="Request Information" /></span> <!--</div>--> </td> </tr> </table> <input type="hidden" name="MM_insert" value="webform" /> </form> <p> </p></div> </div> </td> <td id="subnav"> </td> </tr> </table> </div> <div id="footerWrapper"> <div id="footer"> <div class="nav"> <a href="index.htm" title="Home">Home</a> | <a href="about/default.php" title="About Us">About Us</a> | <a href="programs/default.htm" title="Programs">Programs</a> | <a href="locations/default.htm" title="Location">Location</a> | <a href="admissions/default.php" title="Admissions">Admissions</a> | <a href="request.php" title="Feed Back">Feed Back</a> | <a href="about/verification.php" title="Online Verification">Online Verification</a> | <a href="sitemap.php" title="Site Map">Site Map</a> </div> </div> </div></div> <div id="pageFooter"> <p><span class="copyright">Copyright © Comdex Systems Inc.</span><a href="http://esolution.risingasia.com">Developed By E-Solutions</a></p></div></body></html><?php mysql_free_result($RsIns);mysql_free_result($rsFeedback);?>