<?cs include:"util.cs" ?>

<?cs def:show_add_list() ?>
 <table border="1"  cellspacing="0" cellpadding="4">
  <caption class="regheading"><?cs var:lang.show_add_drop.add_description ?></caption>
  <tr class="table_heading">
     <?cs each:element = lang.show_add_drop.lable ?>
        <th><?cs var:element ?></th>
     <?cs /each ?>
     <th><?cs var:lang.show_add_drop.addedtime ?></th>
  </tr>
  <?cs var:add_list ?>
  <tr><td colspan="4" align="center">
      <div><form method="post" action="show_add_drop">
           <div><input type="hidden" name="crs" value="<?cs var:Query.crs ?>" /> 
                <input type="hidden" name="id" value="<?cs var:Query.id ?>" /> 
                <input type="hidden" name="add_confirm" value="yes" /> 
                <input type="submit" value ="<?cs var:lang.show_add_drop.continue ?>" />
           </div>
          </form>
     </div>
    </td></tr>
 </table>
<?cs /def ?>

<?cs def:show_drop_list() ?>
 <div><form method="post" action="show_add_drop">
      <div><input type="hidden" name="crs" value="<?cs var:Query.crs ?>" />
           <input type="hidden" name="id" value="<?cs var:Query.id ?>" />
           <input type="hidden" name="drop_confirm" value="yes" />
      </div>
  <table border="1" width="75%" cellspacing="0" cellpadding="4">
    <caption class="regheading"><?cs var:lang.show_add_drop.drop_description ?> 
     <br />
     <br />
     <br />
    </option>
   <tr class="table_heading">
     <?cs each:element = lang.show_add_drop.lable ?>
        <th><?cs var:element ?></th>
     <?cs /each ?>
     <th><?cs var:lang.show_add_drop.group ?></th>
     <th><?cs var:lang.show_add_drop.delete ?></th>
     <th><?cs var:lang.show_add_drop.keep ?></th>
     <th><?cs var:lang.show_add_drop.keep_as_normal_student ?></th>
  </tr>
  <?cs set:x = #0 ?> 
  <?cs each:student = user ?>
    <tr>
       <td><?cs var:student.id ?></td>
       <td><?cs var:student.username ?></td>
       <td nowrap="nowrap"><?cs var:student.realname ?></td>
       <td><?cs var:student.group ?></td>
       <td align="center">
        <div> <input type="hidden" name="userid_<?cs var:x ?>" value="<?cs var:student.id ?>" />      
         <input type="hidden" name="username_<?cs var:x ?>" value="<?cs var:student.username ?>" />      
         <input type="hidden" name="realname_<?cs var:x ?>" value="<?cs var:student.realname ?>" />      
         <input type="hidden" name="group_<?cs var:x ?>" value="<?cs var:student.group ?>" />      
        </div>
         <input type="radio" name="choice_<?cs var:x ?>" value="delete" checked="checked" /> 
       </td>
       <td align="center">     
         <input type="radio" name="choice_<?cs var:x ?>" value="keep" /> 
       </td> 
       <td align="center">     
         <input type="radio" name="choice_<?cs var:x ?>" value="keep_normal" /> 
       </td> 
     </tr>
     <?cs set:x = x + #1 ?> 
  <?cs /each ?> 
    <tr><td colspan="7" align="center">
        <input type="submit" value="<?cs var:lang.show_add_drop.continue ?>" />
       </td>
    </tr>
  </table>
  <div><input type="hidden" name="number_user" value="<?cs var:x ?>" />
  </div>
 </form>
</div>
<?cs /def ?>

<?cs call:html_heading() ?>
   <head>
      <title><?cs var:lang.show_add_drop.title ?> <?cs var:current_time ?></title>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
   <link rel="StyleSheet" href="<?cs var:image_path ?>common.css" type="text/css"  />
  </head>
<?cs call:define_body() ?>
<?cs call:print_course_heading("javascript:history.back()", lang.show_add_drop.goback) ?>
<br />
<br />
<table width="100%">
 <tr><td align="center">
 <?cs if:add_list ?>
   <?cs call:show_add_list() ?>
 <?cs else ?>
  <?cs call:show_drop_list() ?>
 <?cs /if ?>
</td></tr>
</table>
</body>
</html>
<?cs call:runtime() ?>
