<?php
ob_start();
session_start();
//if(!isset($_SESSION['login_user'])){
//header("Location: admin.php");}

if (($_SESSION['sap_u_741']==""))
{
	header("Location: index.php");
	exit();
}

require_once("lib/saptrainingDetails.php");
$ob = new saptrainingDetails();
$uid = $_SESSION['sap_u_741'];

if(isset($_POST) && !empty($_POST)){
	//echo "<pre>";
	//print_r($_POST);
	//exit;
	$result = $ob->addDetails($_POST);
	header("Location:sap_training.php");
} else {
	$details = $ob->getDetails($uid);
	$certdetails = $ob->getCertDetails($uid);
	//echo "<pre>";
	//print_r($details);
	//exit;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--[if IE 6 ]> <html  xml:lang="en" lang="en" class="ie6" xmlns="http://www.w3.org/1999/xhtml"> <![endif]-->
<!--[if !(IE 6)]><!-->
<!--[if IE 7 ]> <html  xml:lang="en" lang="en" class="ie7" xmlns="http://www.w3.org/1999/xhtml"> <![endif]-->
<!--[if !(IE 7)]><!-->
<!--[if IE 8 ]> <html  xml:lang="en" lang="en" class="ie8" xmlns="http://www.w3.org/1999/xhtml"> <![endif]-->
<!--[if !(IE 8)]><!-->
<html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:fb="http://www.facebook.com/2008/fbml">
<![endif]-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta http-equiv="Content-Language" content="en-US" />
<meta name="skin" content="experience" />
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="stylesheet" type="text/css" media="all" href="global/ui/css/sapcom.css" />
<link rel="stylesheet" type="text/css" media="print" href="global/ui/css/print.css" />
<title>SAP</title>
<meta name="description" content="" />
<meta name="keywords" content="" />
<script type="text/javascript" src="global/ui/js/jquery.js"></script>
<script type="text/javascript" src="jquery.validate.min.js"></script>
<script type="text/javascript" src="validation.js"></script>
<script src="country.js" type="text/javascript"></script>
<script type="text/javascript" charset="utf-8">
    $(function(){
		$('input[name=saptraining]:radio').click(function(){
			if($(this).val() == "No"){
				$("#reg-form :input").attr("disabled", true);
				$("#addmore-cource").hide();				
				$('input[name=saptraining]:radio').attr("disabled", false);
			} else {
				$("#reg-form :input").attr("disabled", false);
				$("#addmore-cource").show();
			}
		});
		$("#addmore-cource").click(function(){
			//$("<div class='myClass'>Another paragraph!</div>").insertBefore(this);
			var cource_count = $('#cource_count').val();
			cource_count = parseInt(cource_count) + 1;
			
			if(cource_count <= 5){
				var nexttable = '<br /><div style="border:1px solid #cccccc;width:880px;"></div><br /><table id="table_'+cource_count+'" border="0" cellspacing="1" cellpadding="3" width="880" align="center"><tr><td align="right" height="35"><font color="#ff0000">*</font>Certification of Attendance ID:</td>	<td width="200"><input type="text" name="attendance_'+cource_count+'" value="" class="txt1bg" style="width:170px;"></td>	<td></td><td align="right"><font color="#ff0000">*</font>Name of course:</td><td><input type="text" name="courcename_'+cource_count+'" class="txt1bg" style="width:170px;"></td></tr><tr><td colspan="5"></td></tr><tr><td align="right" height="35"><font color="#ff0000">*</font>Name of Training Center:</td>	<td><input type="text" name="center_'+cource_count+'" value="" class="txt1bg" style="width:170px;"></td>	<td></td><td align="right"><font color="#ff0000">*</font>Course type</td><td><input type="text" name="type_'+cource_count+'" class="txt1bg" style="width:170px;"></td></tr><tr><td colspan="5"></td></tr><tr><td align="right" height="35"><font color="#ff0000">*</font>Organization:</td><td><input type="text" name="organization_'+cource_count+'" value="" class="txt1bg" style="width:170px;"></td><td></td><td align="right"><font color="#ff0000">*</font>Certification<br />Test Code:</td><td><input type="text" name="code_'+cource_count+'"  class="txt1bg" style="width:170px;"></td></tr><tr><td colspan="5"></td></tr><tr><td align="right" height="35" colspan="2"></td>	<td></td><td align="right"><font color="#ff0000">*</font>Location of Training Center:</td><td><select name="country_'+cource_count+'">	<option value="0" selected>Select Country</option>';
			for(i=0;i<countryarray.length;i++)
			{
				nexttable +=  '<option value="'+countryarray[i][1]+'">'+countryarray[i][1];
			}
				nexttable += '</select>	</td></td></tr><tr><td colspan="5"></td></tr><tr><td align="right" height="35" colspan="2"></td>	<td></td><td align="right"><font color="#ff0000">*</font>City:</td>	<td><input type="text" name="city_'+cource_count+'" value="" class="txt1bg" style="width:170px;"></td></tr></table>';
				$('#cource_count').val(cource_count);
				$(nexttable).insertBefore(this);
				
				form_validation();
			}
			
		});
	});
</script>
</head>
<body id="secondary">
<div id="page">
  <!--begin header content-->
  <!--googleoff: index-->
  <div id="headercontent">
    <div id="header">
      <q><a href="/" title="SAP"><img src="global/ui/images/logos/sap-logo.png" alt="SAP" /><span>The Best-Run Businesses Run SAP</span></a></q>
      <ul id="nav-utilitytop">
        <li><a href="#" id="utilitynav-locationselect" title="Change Country/Language">Newsletter<span>(change Country/Language)</span></a></li>
        <li><a href="#" id="utilitynav-buy" title="Buy SAP Products Online">Contact Us</a></li>
        <li><a href="#" id="utilitynav-flash" title="Subsribe to SAP Flash">Your SAP.com</a></li>
        <!-- <li class="login"><a href="#" title="Log In To SAP.com">My SAP Profile</a></li> -->
      </ul>
      <!-- END UTILITY NAV TOP -->
      <ul id="nav-utilitybtm">
        <!--begin-ajax-update-region targetid="nav-utilitybtm"-->
        <li id="utilitynav-phone"><a href="" class="clearfix">+91-80-6655771/1-800-255-2208(India)</a></li>
      <!--   <li><a href="#" title="Have Us Call You">Call Me Now</a></li>
        <li><a href="#" title="Chat Online With Us">Chat Now</a></li>
        <li><a href="#" title="E-Mail SAP">Contact Us</a></li> -->
        <!--end-ajax-update-region-->
      </ul>
      <!-- END UTILITY NAV BOTTOM -->
     <!--  <form action="#" method="post"  class="search" id="searchsite" title="Search SAP.com">
        <fieldset>
          <label for="searchsite-input">Search</label>
          <input type="text" class="search-input focusClear" id="searchsite-input" name="searchsite-input" />
          <input type="submit" class="search-submit" id="searchsite-submit" value="" />
        </fieldset>
      </form> -->
      <!-- END SEARCH FORM -->
    </div>
    <!-- END HEADER-->
  </div>
  <!--end header content-->
  <!--googleon: index-->
  <div id="page-content">
    <div>
      <div id="nav-main">
	  <p><strong><a href="#">SAP<br />
          Site Section</a></strong></p>
        <ul>
          <li><a href="#"><span>SAP India</span></a></li>
          <li><a href="#"><span>SAP India Education Services</span></a></li>
          <li><a href="#"><span>SAP Education Partners</span></a></li>
          <li><a href="#"><span>SAP Training & Certification</span></a></li>
          <li><a href="#"><span>Course Schedule</span></a></li>
          <li><a href="#"><span>SAP Training Search</span></a></li>
        </ul>
      </div>
      <!-- END MAIN NAV -->
    </div>
    <div id="breadcrumb">
      <ul>
        <li><a href="index.php"><span>SAP Microsite</span></a></li>
        <li><a href="certification_main.php"><span>SAP Certification</span></a></li>
        <li><a href="direct_certification.php"><span>Direct Certification</span></a></li>
		<li><a href="guidelines.php"><span>Guidelines</span></a></li>
        <li><span>Profiling</span></li>
      </ul>
    </div>
    
	<!-- prash content -->
	
	<div id="sub">
      <div id="subtop" class="clearfix diag-bkg">
        <ul id="nav-sub" class="clearfix">
         <li><a href="personal_details.php"><span>Personal Details</span></a></li>
          <li><a href="education_details.php"><span>Educational Details</span></a></li>
          <li><a href="sap_experience.php"><span>SAP Experience</span></a></li>
		  <li><a href="functional_experience.php"><span>Functional Experience</span></a></li>
		  <li><a href="employment_details.php"><span>Employment Details</span></a></li>
		  <li><a href="sap_training.php" class="on"><span>SAP Training</span></a></li>
        </ul>
         <div align="right" style="background-color:#ffffff;font-size:11px;height:20px">An <font color="#ff0000">*</font> indicates required field.</div>
        <div id="subtop-left-content"><br />
<form name="reg-form" id="reg-form" method="post" action="sap_training.php" enctype="multipart/form-data">
<table border="0" cellspacing="1" cellpadding="3" width="880" align="center">
<tr><td colspan="2"><font color="#ff0000">*</font>Have you under gone SAP Training previously?<br />
<input type="radio" name="saptraining" value="Yes" checked>Yes&nbsp;&nbsp;
<input type="radio" name="saptraining" value="No">No&nbsp;&nbsp; <font size=1>(If Yes, please fill in the rest of the form mandatorily)</font></td>
<td><img src="images/b.gif" width="30" height="1" alt="" /></td>
<td align="right" width="120"></td><td></td>
</tr>
<tr><td colspan="5"></td></tr>
</table>
<?php 
if(!empty($details)) {
	include("tpl.sap_training.php");
	$cource_count = count($details);
} else {
	$cource_count = 1;
?>
<table id="table_1" border="0" cellspacing="1" cellpadding="3" width="880" align="center">
<tr><td align="right" height="35"><font color="#ff0000">*</font>Certification of
Attendance ID:</td>
	<td width="200"><input type="text" name="attendance_1" value="" class="txt1bg" style="width:170px;"></td>
	<td></td><td align="right"><font color="#ff0000">*</font>Name of course:</td><td><input type="text" name="courcename_1" class="txt1bg" style="width:170px;"></td>
</tr>
<tr><td colspan="5"></td></tr>

<tr><td align="right" height="35"><font color="#ff0000">*</font>Name of
Training Center:</td>
	<td><input type="text" name="center_1" value="" class="txt1bg" style="width:170px;"></td>
	<td></td><td align="right"><font color="#ff0000">*</font>Course type</td><td><input type="text" name="type_1"   class="txt1bg" style="width:170px;"></td>
</tr>
<tr><td colspan="5"></td></tr>

<tr><td align="right" height="35"><font color="#ff0000">*</font>Organization:</td>
	<td><input type="text" name="organization_1" value="" class="txt1bg" style="width:170px;"></td>
	<td></td><td align="right"><font color="#ff0000">*</font>Certification<br />
Test Code:</td><td><input type="text" name="code_1" class="txt1bg" style="width:170px;"></td>
</tr>
<tr><td colspan="5"></td></tr>

<tr><td align="right" height="35" colspan="2"></td>
	<td></td><td align="right"><font color="#ff0000">*</font>Location of
Training Center:</td>
	<td>
	<select name="location_1">
	<option value="0" selected>Select Country</option>
	<script language="javascript">
		for(i=0;i<countryarray.length;i++)
		{
			document.write("<option value="+countryarray[i][1]+">"+countryarray[i][1])
		}
	</script></td>
</tr>
<tr><td colspan="5"></td></tr>

<tr><td align="right" height="35" colspan="2"></td>
	<td></td><td align="right"><font color="#ff0000">*</font>City:</td>
	<td><input type="text" name="city_1" value="" class="txt1bg" style="width:170px;"></td>
</tr>
</table>
<?php } ?>
<table border="0" cellspacing="1" cellpadding="3" width="880" align="center">
<?php 
if(empty($details)) {
?>
<tr><td colspan="5"><a href="#" class="alinks2" id="addmore-cource">Add more Courses <span>&#8250;</span></a><br /><br /><br /></td></tr>
<?php } ?>
<tr><td colspan="5"></td></tr>
<tr><td colspan="5">Please upload your previous SAP Training Certificate/s<br />
<input type="file" name="certificate_file"><?php if(isset($certdetails['certificates'])) { ?>&nbsp;&nbsp;<a href="certificates/<?php echo $details['certificates'];?>" class="alinks">view</a><?php } ?></td></tr>
<tr><td colspan="5" align="right"><br />
<div align="left">Kindly download the <span style="color:#FAB509"><u>HR consent</u></span> form here. Once You submit the form your session will be saved. Please return and upload the duly filled attested copy and submit for completing the profiling process.
<br /><input type="file" name="hrconcent_file"><?php if(isset($details['hrconcent'])) { ?>&nbsp;&nbsp;<a href="certificates/<?php echo $certdetails['hrconcent'];?>" class="alinks">view</a><?php } ?>
</div><br />

<div style="margin-left:780px;"><a class="btn-cta" href="page16.html" onclick="$('#reg-form').submit(); return false;"><span>Submit</span></a></div>


<!-- <input type="button" name="s1" value="Submit" class="button1" onclick="document.location.href='page16.html'"> --></td></tr>
</table><br /><br />
<input type="hidden" value="<?php echo $cource_count;?>" name="cource_count" id="cource_count" />
</form>
		


        </div>
      </div>
      <table width="870" border="0" cellspacing="0" cellpadding="0" align="center">
<tr><td height="40"><a href="personal_details.php" class="alinks"><span>&#8249;</span> Back</a></td><td align="right"><!-- <a href="sap_experience.php" class="alinks">Proceed&nbsp;<span>&#8250;</span></a> --></td></tr>
</table><br />

    </div>
	
	<!-- prash content ends -->
	
	
	
    <!-- SPACE RESERVED FOR ANALYTICS -->
    <div id="sap-news">
      <p class="news-heading rm_newsExpand"><a href="">Profiling</a></p>
      <div id="sap-news-wrapper">
        <ul>
          <li> <a href="#"> <span>We want to know you more</span>Make yourself completely SAP Certification ready.
Kindly fill in all the required forms.</a> </li>
          <li> <a href="#"> <span>July 28, 2011</span> Lorem ipsum dolor sit amet adipiscing elit pellentesque sed &#8250; </a> </li>
          <li> <a href="#"> <span>July 25, 2011</span> Lorem ipsum dolor sit amet adipiscing elit pellentesque sed &#8250; </a> </li>
          <li> <a href="#"> <span>July 22, 2011</span> Lorem ipsum dolor sit amet adipiscing elit pellentesque sed &#8250; </a> </li>
          <li> <a href="#"> <span>July 19, 2011</span> Lorem ipsum dolor sit amet adipiscing elit pellentesque sed &#8250; </a> </li>
          <li> <a href="#"> <span>July 18, 2011</span> Lorem ipsum dolor sit amet adipiscing elit pellentesque sed &#8250; </a> </li>
          <li> <a href="#"> <span>July 16, 2011</span> Lorem ipsum dolor sit amet adipiscing elit pellentesque sed &#8250; </a> </li>
          <li> <a href="#"> <span>July 11, 2011</span> Lorem ipsum dolor sit amet adipiscing elit pellentesque sed &#8250; </a> </li>
          <li> <a href="#"> <span>July 11, 2011</span> Lorem ipsum dolor sit amet adipiscing elit pellentesque sed &#8250; </a> </li>
          <li> <a href="#"> <span>July 10, 2011</span> Lorem ipsum dolor sit amet adipiscing elit pellentesque sed &#8250; </a> </li>
        </ul>
      </div>
    </div>
    <!-- END SAP NEWS -->
  </div>
  <!-- END PAGE CONTENT -->
  <div id="footer">
    <!--googleoff: index-->
    <ul id="footer-lefttop">
      <li class="short"><a href="#">Site Map</a></li>
      <li id="quick-links"> <a href="">Quick Links</a>
        <ul>
          <li><a href="#">Quick Link 1</a></li>
          <li><a href="#">Quick Link 2</a></li>
          <li><a href="#">Quick Link 3</a></li>
          <li><a href="#">Quick Link 4</a></li>
          <li><a href="#">Quick Link 5</a></li>
          <li><a href="#">Quick Link 6</a></li>
          <li><a href="#">Quick Link 7</a></li>
          <li><a href="#">Quick Link 8</a></li>
          <li><a href="#">Quick Link 9</a></li>
          <li><a href="#">Quick Link 10</a></li>
        </ul>
      </li>
      <li><a href="#" target="_blank">Using SAP</a></li>
      <li><a href="#" target="_blank">SAP Offices</a></li>
      <li><a href="#" target="_blank">Investors</a></li>
      <li class="short"><a href="#" target="_blank">Careers</a></li>
      <li><a href="#" id="footerlink-communities">Communities</a></li>
    </ul>
    <ul id="footer-leftbtm">
      <li class="short"><a href="#" target="_blank">Privacy</a></li>
      <li><a href="#" target="_blank">Terms of Use</a></li>
      <li><a href="#" target="_blank">Legal Disclosure</a></li>
      <li><a href="#" target="_blank">Copyright</a></li>
      <li><a href="" id="footer-textview">Text View</a></li>
      <li class="short"><a href="" id="footer-printview">Print View</a></li>
    </ul>
    <div id="footer-right"> <a href="#" id="social-network">Follow SAP</a> </div>
    <!--googleon: index-->
  </div>
  <!-- END FOOTER -->
</div>
	<script type="text/javascript" src="global/ui/js/functionsandplugins.js"></script>
    <script type="text/javascript" src="global/ui/js/pageload.js"></script>
    <script type="text/javascript" src="global/ui/js/common.js"></script>
    <script type="text/javascript" src="global/ui/js/trackinghelper.js"></script>
    <script type="text/javascript" src="global/ui/js/securelayers.js"></script>
    <script type="text/javascript" src="global/ui/js/securedforms.js"></script>
    <script type="text/javascript" src="global/js/remote.js"></script>
    <script type="text/javascript" src="global/ui/js/jquery-ui.js"></script>
</body>
</html>