<?
$pre   = '../../';
include  $pre . "common.php";
$title = "2009 US GLOBEC Pan-Regional Synthesis Workshop";
$logo  = false;
$imenu = 'calendar';
$t = array('t_p','t_s','w_a','w_p','w_s','th_a','th_p','th_s','f_a');

include HEAD;
unset($id);
?>

<script type="text/javascript">
function actionChange(id){
   if(escape(id)){
      document.location="<?=$_SERVER['PHP_SELF']?>?id=" + escape(id);
   }
   else{
      document.location="<?=$_SERVER['PHP_SELF']?>";
   }
}
</script>

<form name="mainform" method="get" action="attendee_detail.php">
<table class="register">
<tr>
   <td width="170"><b>Attendee</b></td>
   <td>
<?
if(!empty($_GET['id'])){
   $id     = $_GET['id'];
   $query  = "SELECT * FROM workshops WHERE workshop='synth08' AND uid='$id'";
   $result = mysql_query($query);
   $data   = mysql_fetch_assoc($result);
   $proj   = explode(';',$data['projects']);
   $times  = explode(';',$data['times']);
}

$query  = "SELECT uid,last,first FROM workshops WHERE workshop='synth08' ORDER BY last,first";
$result = mysql_query($query);
$html   = '   <select name="id" onChange="actionChange(this.options[this.selectedIndex].value);">';
while( $row = mysql_fetch_assoc($result) ){
   if(isset($id) && $id == $row['uid']){
      $selected = ' selected';
   } else {
      $selected = '';
   }

   $html .= '      <option value="' . $row['uid'] . '"' . $selected . '>';
   $html .= $row['last'] . ", " . $row['first'] . "</option>\n";
}
$html .= "   </select>\n" . '<input type="submit" name="but" value="Submit" />';
echo $html;
?>
   </td>
</tr>
<?
if(!empty($_GET['id'])){
?>
<tr>
   <td width="170px;">
      <b>Last name: </b>
   </td>
   <td>
      <?=$data['last']?>
   </td>
</tr>
<tr>
   <td>
      <b>First Name: </b>
   </td>
   <td>
      <?=$data['first']?>     
   </td>
</tr>
<tr>
   <td>
      <b>Institution: </b>
   </td>
   <td>
      <?=$data['institution']?>
   </td>
</tr>
<tr>
   <td>
      <b>email: </b>
   </td>
   <td>
      <?=$data['email']?>
   </td>
</tr>
<tr>
   <td>
      <b>Phone: </b>
   </td>
   <td>
      <?=$data['phone']?>
   </td>
</tr>
<tr><td colspan="2">&nbsp;</td></tr>
<tr>
   <td>
      <b>Project(s) represented: </b><br>check all that apply
   </td>
   <td align="left">
      <table border="1"><tr><td width="50%"><div class="hangwrap">
         <div class="hang"><input type="checkbox" name="P01" <?if(!empty($proj) && in_array('P01',$proj)) echo "checked";?> value="Y">Comparative Ecology of Krill in Coastal and Oceanic Waters around the Pacific Rim</div>
         <div class="hang"><input type="checkbox" name="P02" <?if(!empty($proj) && in_array('P02',$proj)) echo "checked";?> value="Y">Comparative Analysis of Salmon and Cod Population Responses</div>
         <div class="hang"><input type="checkbox" name="P03" <?if(!empty($proj) && in_array('P03',$proj)) echo "checked";?> value="Y">Climate Variability and Change in the U.S. GLOBEC Regions as Simulated by the IPCC Climate Models: Ecosystem Implications</div>
         <div class="hang"><input type="checkbox" name="P04" <?if(!empty($proj) && in_array('P04',$proj)) echo "checked";?> value="Y">Copepods in a Warming Climate: A Pan-Regional Model of Arctic and Northwest Atlantic Systems</div>
         <div class="hang"><input type="checkbox" name="P05" <?if(!empty($proj) && in_array('P05',$proj)) echo "checked";?> value="Y">Pacific Ocean Boundary Ecosystems: response to natural and anthropogenic climate forcing</div>
         <div class="hang"><input type="checkbox" name="P06" <?if(!empty($proj) && in_array('P06',$proj)) echo "checked";?> value="Y">The Effect of Varying Freshwater Inputs on Regional Ecosystems in the North Atlantic</div>
      </div></td>
      <td width="50%"><div class="hangwrap">
         <div class="hang"><input type="checkbox" name="P07" <?if(!empty($proj) && in_array('P07',$proj)) echo "checked";?> value="Y">End-to-end Energy Budgets in US-GLOBEC Regions</div>
         <div class="hang"><input type="checkbox" name="P08" <?if(!empty($proj) && in_array('P08',$proj)) echo "checked";?> value="Y">Climate Forcing of Calanus finmarchicus Populations of the North Atlantic</div>
         <div class="hang"><input type="checkbox" name="P09" <?if(!empty($proj) && in_array('P09',$proj)) echo "checked";?> value="Y">Estimating Ecosystem Model Uncertainties in Pan-Regional Syntheses and Climate Change Impacts on Coastal Domains of the North Pacific Ocean</div>
         <div class="hang"><input type="checkbox" name="P10" <?if(!empty($proj) && in_array('P10',$proj)) echo "checked";?> value="Y">Life histories of species in the genus Calanus in the North Atlantic and North Pacific Oceans and responses to climate forcing</div>
         <div class="hang"><input type="checkbox" name="P11" <?if(!empty($proj) && in_array('P11',$proj)) echo "checked";?> value="Y">National Office / Pan-Regional Synthesis Working Group</div>
      </td></tr></table>
   </td>
</tr>
<tr><td colspan="2">&nbsp;</td></tr>
<tr>
   <td>
      <b>Project role: </b>
   </td>
   <td align="left">
      <table border="1">
      <tr>
         <td width="50%">
            <input type="radio" name="proj_role" <?if(!empty($data['proj_role']) && $data['proj_role'] == 'PI') echo "checked";?> value="PI" /> PI<br />
            <input type="radio" name="proj_role" <?if(!empty($data['proj_role']) && $data['proj_role'] == 'Co-PI') echo "checked";?> value="Co-PI" /> Co-PI<br />
            <input type="radio" name="proj_role" <?if(!empty($data['proj_role']) && $data['proj_role'] == 'Intl Collab') echo "checked";?> value="Intl Collab" /> International Collaborator<br>
            <input type="radio" name="proj_role" <?if(!empty($data['proj_role']) && $data['proj_role'] == 'Program Manager / National Office') echo "checked";?> value="Program Manager / National Office" /> Program Manager / National Office
         </td>
         <td width="50%">
            <input type="radio" name="proj_role" <?if(!empty($data['proj_role']) && $data['proj_role'] == 'Grad Student') echo "checked";?> value="Grad Student" /> Grad Student<br />
            <input type="radio" name="proj_role" <?if(!empty($data['proj_role']) && $data['proj_role'] == 'Post-doc') echo "checked";?> value="Post-doc" /> Post-doc<br />
            <input type="radio" name="proj_role" <?if(!empty($data['proj_role']) && $data['proj_role'] == 'Other') echo "checked";?> value="Other" /> Other (please specify)
            <input type="text" name="role_other" value="<?=$tmp?>" size="35" maxlength="255"  onkeypress="return noenter(this,event)" />
         </td>
      </tr>
      </table>
   </td>
</tr>
<tr><td colspan="2">&nbsp;</td></tr>
<tr>
   <td>
      <b>Attendance: </b>
   </td>
   <td>
      <input type="radio" name="attending" <?if(!empty($data['attending']) && $data['attending'] == 'Y') echo "checked";?> value="Y" /> I will attend in person<br />
      <input type="radio" name="attending" <?if(!empty($data['attending']) && $data['attending'] == 'W') echo "checked";?> value="W" /> I will attend via WebEx<br />
      <input type="radio" name="attending" <?if(!empty($data['attending']) && $data['attending'] == 'N') echo "checked";?> value="N" /> I will not be able to attend
   </td>
</tr>
<tr><td colspan="2">&nbsp;</td></tr>
<tr>
   <td>
      <b>Travel Support: </b>
   </td>
   <td><div class="hangwrap">
      <div style="text-indent:-25px"><input type="radio" name="support" <?if(!empty($data['support']) && $data['support'] == 'A') echo "checked";?> value="A" /> I am a US academic PI or Co-PI and will accept support from the national office</div>
      <div style="text-indent:-25px"><input type="radio" name="support" <?if(!empty($data['support']) && $data['support'] == 'S') echo "checked";?> value="S" /> I am not a US academic PI or Co-PI but will attend on my own support</div>
      <div style="text-indent:-25px"><input type="radio" name="support" <?if(!empty($data['support']) && $data['support'] == 'N') echo "checked";?> value="N" /> I am a US academic student, post-doc or affiliated scientist (not a PI or Co-PI) who would like to attend but would need support if available</div>
      <div style="text-indent:-25px"><input type="radio" name="support" <?if(!empty($data['support']) && $data['support'] == 'F') echo "checked";?> value="F" /> I am a Federal PI or Co-PI wishing to attend as a citizen scientist and will accept support from the national office</div>
   </div></td>
</tr>
<tr><td colspan="2">&nbsp;</td></tr>
<tr>
   <td>
      <b>I intend to attend the workshop on the following days:</b>
   </td>
   <td>
   <table class="reg" border="1">
      <tr>
         <td width="160"><b>Sessions</b></td>
         <td width="40" align="center"><b>AM</b></td>
         <td width="40" align="center"><b>PM</b></td>
         <td width="40" align="center"><b>Reception</b></td>
      </tr>

      <tr>
         <td>Tuesday, February 17</td>
         <td align="center">&nbsp;</td>
         <td align="center"><input type="checkbox" name="t_p" <?if(!empty($times) && in_array('t_p',$times)) echo "checked";?> /></td>
         <td align="center"><input type="checkbox" name="t_s" <?if(!empty($times) && in_array('t_s',$times)) echo "checked";?> /></td>
      </tr>
      <tr>
         <td>Wednesday, February 18</td>
         <td align="center"><input type="checkbox" name="w_a" <?if(!empty($times) && in_array('w_a',$times)) echo "checked";?> /></td>
         <td align="center"><input type="checkbox" name="w_p" <?if(!empty($times) && in_array('w_p',$times)) echo "checked";?> /></td>
         <td align="center"><input type="checkbox" name="w_s" <?if(!empty($times) && in_array('w_s',$times)) echo "checked";?> /></td>
      </tr>
      <tr>
         <td>Thursday, February 19</td>
         <td align="center"><input type="checkbox" name="th_a" <?if(!empty($times) && in_array('th_a',$times)) echo "checked";?> /></td>
         <td align="center"><input type="checkbox" name="th_p" <?if(!empty($times) && in_array('th_p',$times)) echo "checked";?> ></td>
         <td align="center"><input type="checkbox" name="th_s" <?if(!empty($times) && in_array('th_s',$times)) echo "checked";?> ></td>
      </tr>
      <tr>
         <td>Friday, February 20</td>
         <td align="center"><input type="checkbox" name="f_a" <?if(!empty($times) && in_array('f_a',$times)) echo "checked";?> ></td>
         <td align="center">&nbsp;</td>
         <td align="center">&nbsp;</td>
      </tr>
      </table>
   </td>
</tr>
   <td>
      <b>
<tr><td colspan="2">&nbsp;</td></tr>
<tr>
   <td>
      <b>Flight Reservations: </b><br>National office supported attendees only
   </td>
   <td>
      <input type="radio" name="fres" <?if(!empty($data['fres']) && $data['fres'] == 'S') echo "checked";?> value="S" /> I will make my own flight reservations<br />
      <input type="radio" name="fres" <?if(!empty($data['fres']) && $data['fres'] == 'N') echo "checked";?> value="N" /> I would like the national office to make my flight reservations<br><br>

      <b>Note:</b> If you wish to have your reservations handled by the national office please be sure to read the registration confirmation email for further details.
   </td>
</tr>
<tr><td colspan="2">&nbsp;</td></tr>
<tr>
   <td>
      <b>Hotel Information:</b>
   </td>
   <td>
      All attendees are responsible for making their own hotel reservations.<br>
      For reservation information <a target="_blank" href="hotels.php">click
      here</a>.<br><br>To assist in planning, if you do not require a hotel room
      please check the box below.<br>

       <input type="checkbox" name="hotel" <?if(!empty($data['hotel']) && $data['hotel'] == 'N') echo "checked";?> value="N" /> I do not need a hotel room<br />
   </td>
</tr>
<?
}
?>
</table>
</form>
<?
include FOOT;
?>
