<?php

$to      = "info@corpindia.org";

$subject = 'Website Volunteer Request';
 
$headers = "From: ".$_POST['email']."\r\n" ;
$headers .= "CC: ".$_POST['email']."\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$message = "<table  border='0'>";

$message .= "<tr>
	 				<td style='font-family:Arial, Helvetica, sans-serif;'><b>First Name :</b></td>
					<td style='font-family:Arial, Helvetica, sans-serif;'>".$_POST['firstName']."</td>
				</tr>";

$message .= "<tr>
					<td style='font-family:Arial, Helvetica, sans-serif;'><b>Last Name :</b></td>
					<td style='font-family:Arial, Helvetica, sans-serif;'>".$_POST['lastName']."</td>
				</tr>
				<tr>
					<td style='font-family:Arial, Helvetica, sans-serif;'><b>Email :</b></td>
					<td style='font-family:Arial, Helvetica, sans-serif;'>".$_POST['email']."</td>
				</tr>
				
				<tr>
					<td style='font-family:Arial, Helvetica, sans-serif;'><b>Mobile Phone :</b></td>
					<td style='font-family:Arial, Helvetica, sans-serif;'>".$_POST['mobNo']."</td>
				</tr>
				<tr>
					<td style='font-family:Arial, Helvetica, sans-serif;'><b>Country of Origin :</b></td>
					<td style='font-family:Arial, Helvetica, sans-serif;'>".$_POST['Country']."</td>
				</tr>"
				
				;

   $areaOfCorp = $_POST["areaOfCorp"];
   $N = count($areaOfCorp);
    
    for($i=0; $i < $N; $i++)
    {
	   $desc = $desc . $areaOfCorp[$i] . "<br>";
    }
	
$message .= "<tr>
					<td style='font-family:Arial, Helvetica, sans-serif;' colspan=2><b>What areas of CORP are you interested in volunteering with? :</b></td>
				</tr>
				<tr>
					<td style='font-family:Arial, Helvetica, sans-serif;'>".$desc."</td>
				</tr>";

 $desc = "";
 $timeToVolunteer = $_POST["timeToVolunteer"];
   $N = count($timeToVolunteer);
    
    for($i=0; $i < $N; $i++)
    {
	   $desc = $desc . $timeToVolunteer[$i] . "<br>";
    }
	
$message .= "<tr>
					<td style='font-family:Arial, Helvetica, sans-serif;' colspan=2><b>How much time are you able to volunteer? :</b></td>
				</tr>
				<tr>
					<td style='font-family:Arial, Helvetica, sans-serif;'>".$desc."</td>
				</tr>";


$desc = "";
 $commit = $_POST["commit"];
   $N = count($commit);
    
    for($i=0; $i < $N; $i++)
    {
	   $desc = $desc . $commit[$i] . "<br>";
    }
	
$message .= "<tr>
					<td style='font-family:Arial, Helvetica, sans-serif;' colspan=2><b>How long can you commit to volunteering? :</b></td>
				</tr>
				<tr>
					<td style='font-family:Arial, Helvetica, sans-serif;'>".$desc."</td>
				</tr>";


$message .= "<tr>
					<td style='font-family:Arial, Helvetica, sans-serif;' colspan=2><b>Please provide general information on the skills that you can bring to CORP:</b></td>
				</tr>
				<tr>
					<td style='font-family:Arial, Helvetica, sans-serif;' colspan=2>".$_POST['limitedtextarea']."</td>
				</tr>";

//echo $message ;
$mailStatus = mail($to, $subject, $message, $headers);
 
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welcome to corpindia.org</title>
<link type="text/css" rel="stylesheet" media="screen" href="css/style.css" />
<!--[if lt IE 7.]>
<script defer type="text/javascript" src="js/pngfix.js"></script>
<![endif]-->
<script type="text/javascript">
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<!--  Google Analytic Codes -->

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-12271703-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>



<!--  Google Analytic Codes  end here -->
</head>

<body onload="MM_preloadImages('images/home_btn_over.jpg','images/how_you_can_btn_over.jpg','images/aboutus_btn_over.jpg','images/gallery_btn_over.jpg')">
<table width="790" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="235" valign="top" ><a href="index.html"><img src="images/Logo.png" alt="" width="235" height="154" /></a></td>
    <td rowspan="2" valign="top" width="519"><table border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="28">&nbsp;</td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#303437">
          <tr>
            <td width="8"><img src="images/Nav_LeftImg.jpg" alt="" width="8" height="42" /></td>
            <td width="121" align="left" valign="top"><a href="index.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Home','','images/home_btn_over.jpg',1)"><img src="images/home_btn_off.jpg" name="Home" width="121" height="37" border="0" id="Home" alt="" /></a></td>
            <td width="120" valign="top"><a href="About.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('AboutUs','','images/aboutus_btn_over.jpg',1)"><img src="images/aboutus_btn_off.jpg" name="AboutUs" width="120" height="37" border="0" id="AboutUs" alt="" /></a></td>
            <td width="135" valign="top"><a href="HowYouCanHelp.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('How','','images/how_you_can_btn_over.jpg',1)"><img src="images/how_you_can_btn_off.jpg" name="How" width="135" height="37" border="0" id="How" alt="" /></a></td>
            <td width="121" valign="top"><a href="gallery.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Gallery','','images/gallery_btn_over.jpg',1)"><img src="images/gallery_btn_off.jpg" name="Gallery" width="121" height="37" border="0" id="Gallery" alt="" /></a></td>
            <td align="right" background="images/Nav_MiddleImg.jpg"><img src="images/Nav_RightImg.jpg" alt="" width="8" height="42" /></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td valign="top" class="brdLftRht"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
            <tr>
              <td valign="top" id="Maincontent"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td align="center"><img src="images/Banner_Volunteer.jpg" alt="" width="519" height="217" /></td>
                  </tr>
                  <tr>
                    <td valign="top" id="content"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                          <td height="8"></td>
                        </tr>
                        <tr>
                          <td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" id="Communities">
                              <tr>
                                <td valign="top"><table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
                                  <tr>
                                    <td valign="top" ><p class="heading">THANK YOU FOR YOUR INTEREST!  </p>
                                      </td>
                                  </tr>
                                  <tr>
                                    <td valign="top"><?php if($mailStatus){ ?>Your mail has been sent successfully and we will get back to you as soon as possible.
                                      <?php }else{ ?>
                                      Oops !!! Unable to send the informations. <br />
                        The server might be busy. Try after some time.<?php }?></td>
                                    </tr>
                                  <tr>
                                    <td></td>
                                    </tr>
                                  <tr>
                                    <td></td>
                                    </tr>
                                  <tr>
                                    <td height="150"></td>
                                    </tr>
                                </table></td>
                              </tr>
                          </table></td>
                        </tr>
                    </table></td>
                  </tr>
              </table></td>
            </tr>
        </table></td>
      </tr>
      <tr>
        <td><img src="images/bg_footer.jpg" alt="" width="524" height="16" /></td>
      </tr>
      <tr>
        <td bgcolor="#62676d"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" id="footer">
          <tr>
            <td width="233"><!-- <a href="#">Terms of Service</a> | <a href="#">Privacy Policy</a>-->
              Creation by <a href="http://www.2adpro.com/" target="_blank">2adpro</a></td>
            <td width="291" align="right">Copyright 2012 All Rights Reserved.</td>
          </tr>
        </table></td>
      </tr>
    </table></td>
    <td height="153">&nbsp;</td>
  </tr>
  <tr>
    <td width="235" height="492" valign="top" bgcolor="#62676D" ><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td valign="top"><table width="198" border="0" align="center" cellpadding="5" cellspacing="0" class="contact-box">
          <!--   <tr>
              <td class="title">CONTACT US</td>
            </tr> -->
          <tr>
            <td><!-- <strong>Community  Outreach <br />
                Programme (CORP)</strong><br /> -->
              Methodist  Centre, 1st Floor<br />
              21  YMCA Road<br />
              Mumbai  Central, <br />
              Mumbai 400 008,
              India<br />
                      <!--Phone:  -->
              +91.22.2308.6789<br />
                      <!--Fax:  +91.22.2307.3406<br /> -->
                      <!--Email: -->
              <a href="mailto:info@corpindia.org"><strong>info@corpindia.org </strong></a></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table width="198" border="0" align="center" cellpadding="0" cellspacing="0" id="leftNav">
            <tr>
              <td class="title">WHAT WE DO</td>
            </tr>
            <tr>
              <td><table width="85%" border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr>
                    <td><a href="Childrens.html">For Children</a></td>
                  </tr>
                  <tr>
                    <td><a href="Women.html">For Women</a></td>
                  </tr>
                  <tr>
                    <td><a href="Communities.html">For Communities</a></td>
                  </tr>
                  <tr>
                    <td height="5"></td>
                  </tr>
              </table></td>
            </tr>
        </table></td>
      </tr>
    </table>
    <a href="http://www.facebook.com/corpindia" target="_blank" class="fb_icon_left"><img src="images/facebook_icon.jpg" alt="" /></a>
    </td>
    <td valign="top" bgcolor="#62676d">&nbsp;</td>
  </tr>
</table>
</body>
</html>

