<?php 
	require_once 'includes/php_header_en.php';
	require_once('recaptchalib.php'); 
	
  // 
  list($errorsAndAlerts, $lists, $authUserNum, $authUserEmail) = nlb_frontend_dispatcher3();


?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>	<!-- CLF 2.0 TEMPLATE VERSION 1.04 | VERSION 1.04 DU GABARIT NSI 2.0 -->
<!-- HEADER BEGINS | DEBUT DE L EN-TETE -->
<!-- TITLE BEGINS | DEBUT DU TITRE -->
<title>Newsletter Subscription</title>
<!-- TITLE ENDS | FIN DU TITRE --><!-- METADATA BEGINS | DEBUT DES METADONNEES -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" />
<link rel="schema.dcterms" href="http://purl.org/dc/terms/" />
<meta name="dc.description" content="Newsletter subscription 704 Air Cadet Squadron" />
<meta name="description" content="Newsletter subscription 704 Air Cadet Squadron" />
<meta name="keywords" content="Newsletter subscription" />
<meta name="dc.creator" content="704 Air Cadet Squadron" />
<meta name="dcterms.issued" scheme="W3CDTF" content="2014-01-15" />
<meta name="dcterms.modified" scheme="W3CDTF" content="2014-01-15" />
<meta name="dc.subject" scheme="CLF 2.0" content="Common Look and Feel 2.0" />
<meta name="dc.language" scheme="ISO639-2/T" content="eng" />
<!-- METADATA ENDS | FIN DES METADONNEES -->
<?php include "includes/1col_script.php"; ?>
</head>
<body>
<div class="page">
<div class="core">
<?php include "includes/fip_banner.php"; ?>
<?php include "includes/1col_menu.php"; ?>
<!-- CONTENT BEGINS | DEBUT DU CONTENU -->
<div class="center">
<div class="blackborder" id="box1">
<h1><center>Newsletter Subscription</center></h1>
<br />

  <h1>Manage Subscriptions</h1>
  
	  <?php if ($errorsAndAlerts): ?>
    <div style="color: #C00; font-weight: bold; font-size: 12px;"><?php echo $errorsAndAlerts; ?></div><br/>
  <?php endif ?>

  <form method="post" action="verify.php">
  
    <input type="hidden" name="submitForm" value="1" />
    <input type="hidden" name="n" value="<?php echo htmlencode(@$_REQUEST['n']); ?>" /><?php // subscriber num ?>
    <input type="hidden" name="a" value="<?php echo htmlencode(@$_REQUEST['a']); ?>" /><?php // subscriber authkey ?>

    <div style="float: left; width: 100px; clear: both;">Email:</div>
    <div style="float: left; ">
      <?php if (@$authUserNum): ?>
        <?php echo htmlencode($authUserEmail); ?>
      <?php else: ?>
        <input type="text" name="e" value="<?php echo htmlencode(@$_REQUEST['e']) ?>" size="50"/>
      <?php endif ?>
    </div>
    
    <div style="float: left; width: 100px; clear: both;">Newsletters:</div>
    <div style="float: left;">
      <?php foreach ($lists as $list): ?>
        <?php
          $isChecked   = @$_REQUEST['lists'] && in_array($list['num'], $_REQUEST['lists']);
          $checkedAttr = checkedIf($isChecked, true, true);
        ?>
        <label>
          <input type="checkbox" name="lists[]" value="<?php echo htmlencode($list['num']); ?>"  <?php echo $checkedAttr; ?> />
          <?php echo htmlencode($list['name']); ?><br/>
        </label>
      <?php endforeach ?>
      <br /><br />
      
      <?php 
        
  	$publickey = "6LfqFu0SAAAAAHAU6Z2mHIG2qf5IpPV4BV2y5id9"; // you got this from the signup page
  	echo recaptcha_get_html($publickey);

	?>
      
      <input type="submit" name="subscribe" value="Update Subscriptions" /><br/>
    </div>
    
    <div style="clear: both;"></div>
    
  </form>
<?php /*** END: SUBSCRIBE FORM ***/ ?>
</div></div>
<!-- CONTENT ENDS | FIN DU CONTENU -->
<!-- THREE COLUMN LAYOUT ENDS | FIN DE LA MISE EN PAGE DE DEUX COLONNES -->
<!-- FOOTER BEGINS | DEBUT DU PIED DE LA PAGE -->
<?php include "includes/3col_footer.php"; ?>
</div></div>
</body>
</html>