<? include("../settings.php"); ?>
<!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>SICC10 Registration</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- Bootstrap -->
    <link href="css/bootstrap.css" rel="stylesheet">
      <link href="css/bootstrap-theme.css" rel="stylesheet">

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
      
        <noscript>
            <p>This site is best viewed with Javascript. If you are unable to turn on Javascript, please contact sylvia@sicc9.org.</p>
        </noscript>
      <script>
          
        function chkFrm(){
            if ($('#registrant_country').val()=="0"){
            	alert("Please select a country");
            	return false;
            }else if ($('input[name=general_registration]:checked').val()=='Full' && $('#registrant_dinner').val()=="2"){
            	alert("Please indicate your dinner attendance");
            	return false;
            }else if ($('#registrant_reception').val()=="2"){
            	alert("Please indicate your reception attendance");
            	return false;
            }else if (!$('#agree').is(':checked')){
                  alert("Please agree to the Terms and Conditions.");
                  return false;
            }else
            	$("registrant_papernum").attr('disabled',false);
                $("registrant_familyname").attr('disabled',false);
                 $("registrant_salutation").attr('disabled',false);
                  $("registrant_country").attr('disabled',false);
                  return true;
        }
          
        function submissiontype(){
        	if ($("input[name=registration_type]:checked").val()=="general")
        		window.location="index.php";
        	else if ($("input[name=registration_type]:checked").val()=="speakers")
        		window.location="speakers.php";
        	else
        		window.location="authors.php";
            	
        }
        
        function calculateextra(){
        	$('#total_extra_reception').val($('#registrant_extra_reception').val()*50);
        	$('#total_extra_dinner').val($('#registrant_extra_dinner').val()*140);
        	$('#total_extras').val($('#registrant_extra_reception').val()*50+$('#registrant_extra_dinner').val()*140);
        	calculatetotal();
        }
        
        
        
        function calculatetotal(){
        	$('#total_registration').val(Number($('#registration_cost').val())+Number($('#total_extras').val()));
        }
        
        
        function getSpeakerInfo(){
        	if ($('#registrant_papernum').val().length==0 || $('#registrant_familyname').val().length==0){
			alert("Please enter in your Paper Number and Family Name to proceed.");
			return false;
		}else{
                       var sURL = "getSpeakerInfo.php?papernumber="+$('#registrant_papernum').val()+"&lastname="+$('#registrant_familyname').val();
                       $.getJSON(sURL,
                       function(data){
                        if (data["status"]==0){
                            alert("There are no records found with the credentials provided. Please contact Sylvia at sylvia@sicc10.org for assistance.");
                            $('#valid').val(0);
                            return false;
                        }else{
                            $('#valid').val(1);
                            $('#registrant_salutation').val(data["registrant_salutation"]);
                            $('#registrant_fullname').val(data["registrant_fullname"]);
                            $('#registrant_organisation').val(data["registrant_organisation"]);
                            $('#registrant_mailing').val(data["registrant_mailing"]);
                            $('#registrant_city').val(data["registrant_city"]);
                            $('#registrant_postal').val(data["registrant_postal"]);
                            $('#registrant_country').val(data["registrant_country"]);
                            $('#registrant_contact').val(data["registrant_contact"]);
                            $('#registrant_email').val(data["registrant_email"]);
                            $("registrant_papernum").attr('disabled','disabled');
                            $("registrant_familyname").attr('disabled','disabled');
                            return true;
                        }
                   });                    
                }
        }
      </script>
  </head>
  <body>
<div class="well">
<div class="content" bgcolor="#FFFFD0">
  <div class="col-12 feature">
      <form class="form-horizontal" method="post" action="processing.php" enctype="multipart/form-data">
          <center>
              <img src="../masthead.jpg" width="800"></img>
          </center>
          <br/>
          <div class="panel panel-default" id="Abstract">
            <div class="panel-heading  text-center"><h4>Plenary Speakers Registration</h4></div>
            <div class="panel-body">      
                <div class="form-group">
                  <label for="submission_type" class="col-lg-4 control-label"> Registration Type</label>
                  <div class="col-lg-5">
                      <input type="radio" name="registration_type" value="plenary" checked> Plenary Speaker Registration
                  </div>
                </div>
                <div class="form-group">
                    <label for="registrant_papernum" class="col-lg-4 control-label"> Paper Number</label>
                    <div class="col-lg-6">
                        <input type="text" name="registrant_papernum" id="registrant_papernum" placeholder="E.g. OR-99-999" class="form-control" required>
                    </div>
                </div>
                <div class="form-group">
                    <label for="registrant_familyname" class="col-lg-4 control-label"> Family Name</label>
                    <div class="col-lg-4">
                        <input type="text" name="registrant_familyname" id="registrant_familyname" placeholder="E.g. Smith" class="form-control" required>
                    </div>
                    <div class="col-lg-2">
                        <input type="button" name="getInfo" id="getInfo" value="Get Author's Information" onclick="getSpeakerInfo();" class="form-control">
                    </div>
                </div>
                <div class="form-group">
                  <label for="registrant_salutation" class="col-lg-4 control-label"> Salutation</label>
                  <div class="col-lg-3">
                      <input type="text" name="registrant_salutation" id="registrant_salutation" placeholder="" class="form-control" readonly>
                  </div>
                </div>
                <div class="form-group">
                    <label for="registrant_fullname" class="col-lg-4 control-label"> Full Name</label>
                    <div class="col-lg-6">
                        <input type="text" name="registrant_fullname" id="registrant_fullname" placeholder="E.g. John Smith" class="form-control" readonly required>
                    </div>
                </div>
                <div class="form-group">
                    <label for="registrant_organisation" class="col-lg-4 control-label"> Organisation</label>
                    <div class="col-lg-6">
                        <input type="text" name="registrant_organisation" id="registrant_organisation" placeholder="E.g. Acme Pte Ltd" class="form-control" required readonly>
                    </div>
                </div>
                <div class="form-group">
                    <label for="registrant_email" class="col-lg-4 control-label"> Email</label>
                    <div class="col-lg-6">
                        <input type="text" name="registrant_email" id="registrant_email" placeholder="E.g. john@acme.com" class="form-control" required readonly>
                    </div>
                </div>
                <div class="form-group">
                    <label for="registrant_mailing" class="col-lg-4 control-label"> Mailing Address</label>
                    <div class="col-lg-6">
                        <input type="text" name="registrant_mailing" id="registrant_mailing" placeholder="E.g. 7 Acme Ave" class="form-control" required readonly>
                    </div>
                </div>
                <div class="form-group">
                    <label for="registrant_city" class="col-lg-4 control-label"> City</label>
                    <div class="col-lg-6">
                        <input type="text" name="registrant_city" id="registrant_city" placeholder="E.g. Singapore" class="form-control" required readonly>
                    </div>
                </div>
                <div class="form-group">
                    <label for="registrant_postal" class="col-lg-4 control-label"> Postal</label>
                    <div class="col-lg-6">
                        <input type="text" name="registrant_postal" id="registrant_postal" placeholder="E.g. 123456" class="form-control" required readonly>
                    </div>
                </div>
                <div class="form-group">
                  <label for="registrant_country" class="col-lg-4 control-label">Country</label>
                  <div class="col-lg-3">
                      <input type="text" name="registrant_country" id="registrant_country" placeholder="" class="form-control" required readonly>
                  </div>
                </div>
                <div class="form-group">
                    <label for="registrant_contact" class="col-lg-4 control-label"> Mobile Number</label>
                    <div class="col-lg-4">
                        <input type="text" name="registrant_contact" id="registrant_contact" placeholder="E.g. 91234567" class="form-control" required readonly>
                    </div>
                </div>
                <div class="form-group">
                  <label for="registrant_diet" class="col-lg-4 control-label"> Diet</label>
                  <div class="col-lg-3">
                      <select class="form-control" id="registrant_diet" name="registrant_diet">
                          <option value="None" selected>None</option>
                          <option value="Vegetarian">Vegetarian</option>
                      </select>
                  </div>
                </div>
                
            </div>
        </div>   
        <div class="panel panel-default">
            <div class="panel-heading  text-center"><h4>REGISTRATION INFORMATION</h4></div>
            <div class="panel-body">   
                <div class="form-group">
                    <label for="registrationinformation" class="col-lg-2 control-label">&nbsp;</label>
                    <div class="col-lg-8">
                        Registration Fee includes the following:<br/>
                        (a)  Admission to all session<br/>
                        (b)  Daily refreshments<br/>
                        (c)  Proceedings<br/>
                        (d)  Welcome Reception+<br/>
                        (e)  Banquet Dinner <br/><br/>
                    </div>
                </div>
               
                <div class="form-group">
                  <label for="registrant_reception" class="col-lg-4 control-label"> Welcome Reception</label>
                  <div class="col-lg-3">
                      <select class="form-control" id="registrant_reception" name="registrant_reception">
                          <option value="2">Please select</option>
                          <option value="1">Attending</option>
                          <option value="0">Not Attending</option>
                      </select>
                  </div>
                </div>
                <div class="form-group" id="dinnerchoice">
                  <label for="registrant_dinner" class="col-lg-4 control-label"> Banquet Dinner</label>
                  <div class="col-lg-3">
                      <select class="form-control" id="registrant_dinner" name="registrant_dinner">
                          <option value="2">Please select</option>
                          <option value="1">Attending</option>
                          <option value="0">Not Attending</option>
                      </select>
                  </div>
                </div>
            </div>
        </div>    
        <div class="panel panel-default">
            <div class="panel-heading  text-center"><h4>ADDITIONAL ITEMS FOR ACCOMPANYING GUEST</div>
            <div class="panel-body">     
                <div class="form-group">
                    <label for="general_registration" class="col-lg-2 control-label">&nbsp;</label>
                    <div class="col-lg-8">
                        <table class="table table-hover">
                            <thead>
                              <tr>
                                <th>Items</th>
                                <th>Price)</th>
                                <th>Quantity</th>
                                <th>Total</th>
                              </tr>
                            </thead>
                            <tbody>  
                                <tr>
                                    <td>
                                        Additional Welcome Reception
                                    </td>
                                    <td>
                                        SGD 50
                                    </td>
                                    <td>
                                        <select class="form-control" id="registrant_extra_reception" name="registrant_extra_reception"  onchange="calculateextra();">
                                          <option value="0">0</option>
                                          <option value="1">1</option>
                                          <option value="2">2</option>
                                        </select>
                                    </td>
                                    <td>
                                        <input type="text" name="total_extra_reception" id="total_extra_reception" value="0" readonly class="form-control">
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        Additional Banquet Dinner
                                    </td>
                                    <td>
                                        SGD 140
                                    </td>
                                    <td>
                                        <select class="form-control" id="registrant_extra_dinner" name="registrant_extra_dinner" onchange="calculateextra();">
                                          <option value="0">0</option>
                                          <option value="1">1</option>
                                          <option value="2">2</option>
                                        </select>
                                    </td>
                                    <td>
                                        <input type="text" name="total_extra_dinner" id="total_extra_dinner" value="0" readonly class="form-control">
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        Additional Items Total
                                    </td>
                                    <td>
                                        &nbsp;
                                    </td>
                                    <td>
                                        &nbsp;
                                    </td>
                                    <td>
                                        <input type="text" name="total_extras" id="total_extras" value="0" readonly class="form-control">
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        Total Registration Fee
                                    </td>
                                    <td>
                                        &nbsp;
                                    </td>
                                    <td>
                                        &nbsp;
                                    </td>
                                    <td>
                                        <input type="text" name="total_registration" id="total_registration" value="0" readonly class="form-control">
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
      </div>
        <div class="panel panel-info">
            <div class="panel-heading  text-center"><h3>INSTRUCTIONS</h3></div>
            <div class="panel-body">
                <div class="col-lg-1"></div>
                <div class="col-lg-10">
                        Please print a copy of this registration page before clicking on the "Submit" button<br/>
						Confirmation of additional items for accompany guest is upon receipt of your payment (if applicable)<br/>
						Official receipt will be issued during event registration (16-19 December) (if applicable)<br/>
						We only accept paypal only for additional items. For any other payment modes, please contact Sylvia at <a href="mailto:contact@sicc10.org">contact@sicc10.org</a> (if applicable)<br/>
						A registration confirmation email will be sent to you upon receipt of payment of additional items (if applicable)
                </div>
                <div class="col-lg-1"></div>
            </div>
        </div>     
          
        <div class="panel panel-info">
            <div class="panel-heading  text-center"><h3>PAYMENT & CANCELLATION TERMS</h3></div>
            <div class="panel-body">
                <div class="col-lg-1"></div>
                <div class="col-lg-10">
                        All prices quoted are in Singapore Dollars (SGD) and inclusive of prevailing GST<br/>
						Travel and accommodation expenses are excluded from the registration fees.<br/><br/>
                    
                        <b>(a) Credit Card (PayPal Payment)</b><br/>
                        Online payment is made to Spark Planners Pte Ltd through PayPal only<br/>
                        An acknowledgement page will appear upon successful payment via PayPal<br/>
                        A confirmation email will be sent to you to acknowledge the receipt of your payment and to confirm the additional items<br/><br/>
                        
                        
                        Request of cancellation should be sent in writing only to Sylvia at <a href="mailto:contact@sicc10.org">contact@sicc10.org</a><br/>
                        Refunds of registration fees will be made as follows:<br/>
                        • Cancellations received before 14 October 2018 (GMT + 8), a 70% of payment received will be refunded.<br/>
                        • Thereafter - No refund<br/>
                        • SGD50.00 admin fee is chargeable for all cancellation requests (if applicable).<br/>
                </div>
                <div class="col-lg-1"></div>
            </div>
        </div>  
        <div class="panel panel-info">
            <div class="panel-heading  text-center"><h3>Terms & Conditions</h3></div>
            <div class="panel-body">
                <div class="col-lg-1"></div>
                <div class="col-lg-10">
                	By providing your information above, you hereby agree that the SICC10 Organising Committee may collect, use, 							
                        disclose and store your data for the following purposes:<br/>							
                        • Facilitate the management and logistics of the event	<br/>						
                        • Legal purposes where necessary, including investigation or proceeding		<br/>					
                        • The available information are in accordance with the Singapore Personal Data Protection Act – 2012 (PDPA).<br/>  							
                        • Organiser may contact you via email or mobile for any notifications related to the conference			<br/><br/>				

                        For any corrections to your registration, please contact the secretariat immediately.			<br/>				
                        The organiser reserves the right to modify the content of the programme and time of presentations.	<br/>	<br/>					


                        <b><u>Photography and Videography</u></b> 							<br/>
                        Professional photography and videography will take place during the event. By partaking in the event,
                        you are consenting for the for the organiser to use the images for  any form of publicity usage such as website, media and publication purposes.							
                </div>
                <div class="col-lg-1"></div>
            </div>
        </div>     
       
        <div class="form-group">
            <div class="col-lg-12 text-center">
            	<b><u>Payment Mode</u></b></br>
        	<input type="radio" name="payment_mode" value="Credit Card" checked> Credit Card<br/><br/>
            </div>
            <div class="col-lg-12 text-center">
                <input type="checkbox" name="agree" id="agree" value="yes">  I have read and I agree to abide by all of the above terms and conditions <br/><br/>
            </div>
            <div class="col-lg-12 text-center">
                <button type="submit" name="confirm" value="confirm" class="btn btn-primary" onclick="return chkFrm();">Submit</button>
                <button type="reset" class="btn btn-default">Cancel</button>
            </div>
        </div>
          <input type="hidden" name="registration_cost" id="registration_cost" value="0">
          <input type="hidden" name="valid" id="valid" value="0">
          <input type="hidden" name="general_registration" value="Full">
        </form>
    </div>


    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="js/jquery-1.11.2.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="js/bootstrap.min.js"></script>
    <script>
        registrationchange();
        
    </script>
  </div>
</div>
</body>
</html>
