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

<?cs def:display_frame() ?>
<body>
 <div id="container">
  <?cs call:top_container() ?>
  <?cs call:doIMenu() ?>
  <div id="content">
  <fieldset>
  <legend><?cs var:lang.super_upload_xml_roster_form.page_title ?></legend> 
   <br />
   <br />
   <div style="text-align: center;">
   <iframe src="<?cs var:top_url ?>" name="top" width="650" height="350"></iframe>
  <br />
  <br />
  <iframe src="<?cs var:buttom_url ?>" name="bottom" width="650" height="350"></iframe>
  </div>
   </div>
  </fieldset>
</boby>
<?cs /def ?>




<?cs def:display_form() ?>
<body>
  <div>
   <form id="xml_upload" method="post" enctype="multipart/form-data" action="super_upload_xml_roster" onsubmit="return check_file()" target="_top">
      <div> 
         <input type="hidden" name="id" value="<?cs var:Query.id ?>" />
      </div>
     <div class="center_block">
       <input type="file" name="file" title="<?cs var:lang.super_upload_xml_roster_form.file.help ?>" />
       <input type="submit" value="<?cs var:lang.super_upload_xml_roster_form.button_1.msg ?>" title="<?cs var:lang.super_upload_xml_roster_form.button_1.help ?>"  />
     </div>
   </form>
   </div>
     <?cs if:has_file ?> 
     <div>
       <form method="post" action="super_xml_create_courses" target="_top">
          <div>
           <input type="hidden" name="id" value="<?cs var:Query.id ?>" />
          </div>
          <div class="center_block">
           <input type="submit" value="<?cs var:lang.super_upload_xml_roster_form.button_2.msg ?>" title="<?cs var:lang.super_upload_xml_roster_form.button_2.help ?>" class="super_color_button" />
          </div>
       </form>
     </div>
     <?cs /if ?>
  </div>
 <?cs set:num = #0 ?>
 <div id="content" style="text-align: left">
 
 <div class="instruction">
  <?cs each:this = lang.super_upload_xml_roster_form.notes ?>
    <div><?cs var:this ?><br /><br /></div>
    <?cs if:num == #1 ?>
     <h4><?cs var:xml_path ?></h4>
   <?cs /if ?>     
  <?cs set:num = num + #1 ?>
  <?cs /each ?>
  </div>
</div>
</body>
<?cs /def ?>




<?cs call:html_header() ?>
   <head>
      <title><?cs var:lang.super_upload_xml_roster_form.page_title ?></title>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
   <link rel="StyleSheet" href="<?cs var:image_path ?>super_template.css" type="text/css"  />
   <?cs call:addDoIMenu()  ?> 
   <?cs if:form_display ?>
   <script type="text/javascript">
    function check_file()
    {
        var value = document.getElementById('xml_upload').file.value;
        if(value == "")
        {
            window.alert('<?cs var:lang.super_upload_xml_roster_form.must_provide_xml_file ?>');
            return false;
        }
        return true;
    }
   </script>
   <?cs /if ?>
  </head>
 
 <?cs if:frame_display ?>
   <?cs call:display_frame() ?>
 <?cs elif:form_display ?>
   <?cs call:display_form() ?>

 <?cs /if ?>
</html>

<?cs call:runtime() ?>
