{if $action == ''}
<html>
  <head>
    <link type="text/css" rel="stylesheet" href="templates/{$global_template}/css/styles_refill.css">
    <link rel="stylesheet" href="jquery/jquery-ui.css">
    <script src="jquery/jquery-1.12.4.js"></script>
    <script src="jquery/jquery-ui.js"></script>
    <script src="jquery/globalize.js"></script>
    <script src="jquery/globalize.culture.de-DE.js"></script>
    <script src="jquery/jquery.mousewheel.js"></script>
    <style type="text/css">
      .spinner {
      width: 200px;
      height: 15px;
      font-size: 12px !important;
      }
    </style>
    <script>
      $( function() {
           $( ".spinner" ).spinner({
          change: function (event, ui) {
           if(this.name == 'basislvsgemlv'){
             gesvol_calc();
           }
          },
          spin: function (event, ui) {
           if(this.name == 'basislvsgemlv'){
             gesvol_calc();
           }
          },
          start: function (event, ui) {
           if(this.name == 'basislvsgemlv'){
	         gesvol_calc();
	       }
	      },
	      stop: function (event, ui) {
	        if(this.name == 'basislvsgemlv'){
	         gesvol_calc();
	        }
	      },

          step: 0.1,
          numberFormat: "i",
          min:0,
          decimals:0
        });
        Globalize.culture( "de-DE" );
      } );

         function trackKeys(evnt,regEx) {
         	var keyCode = evnt.keyCode ? evnt.keyCode : evnt.which;
       	return !!String.fromCharCode(keyCode).match(regEx);
         }
       //-->
    </script>

    <script>
      function felder_einblenden() {
        /* Bei Master darf eine Betreuungspauschle eingegeben werden */
        if (document.getElementById("kaid").value == "2") {
          //<![CDATA[
          $(document).ready(function () {
            var id1 = "pauschaleblock1";
            var id2 = "pauschaleblock2";
            $("#" + id1).show();
            $("#" + id2).hide();
          });
          //]]>
        }else{
          //<![CDATA[
          $(document).ready(function () {
            var id1 = "pauschaleblock1";
            var id2 = "pauschaleblock2";
            $("#" + id1).hide();
            $("#" + id2).show();
          });
          //]]>
        }
      }
    </script>
  </head>
  <body onload="felder_einblenden();">
    <br />
    <br />
    <div class="header">
      <div>
        <div>{$abschluss_titel}</div>
      </div>
    </div>
    <form action="?action=register" method='post' name='erfassen'>
      <div class="pat_list_box">
        {if $abschluss_error == '1'}
        <table width="70%" class="errorTable" align="center">
          <tr>
            <td>
              <img src="templates/{$global_template}/images/pflichtfelder/achtung_gross.gif">
            </td>
            <td><b>Achtung!</b><br>
              {$abschluss_error_text}
            </td>
          </tr>
        </table>
        <br />
        {/if}
        {if $abschluss_abschluss == '0'}
        <fieldset>
          <legend>
            <b>Abschlussarbeit erfassen</b>
          </legend>
          <br />
          <br />
          <table cellspacing="0" cellpadding="0" width="100%" border="0" class="StandardTable">
            <tr>
              <td width="20%" height="25">
                Name des Studierenden
              </td>
              <td valign="top">
                <input type="text" name="name"  id="name"  size="101" value="{$abschluss_value_name}">
              </td>
            </tr>
            <tr>
              <td width="20%" height="39">
                Art der Abschlussarbeit
              </td>
              <td valign="top">
                <select name="kaid" id="kaid" size=2 onchange='felder_einblenden();'>
                {section name=table_data1 loop=$table_data1}
                <option value="{$table_data1[table_data1].kaid}" {if $abschluss_value_kaid == $table_data1[table_data1].kaid} selected {/if} >{$table_data1[table_data1].bezeichnung}</option>
                {/section}
                </select>
              </td>
            </tr>
              <tr id="pauschaleblock1">
                <td width="20%" height="25">
                 Betreuungspauschale (LVS)
                </td>
                <td valign="top">
                  <input type="text" class="spinner" name="pauschale" id="pauschale" size="101" value="{$abschluss_value_pauschale}" onKeypress="return trackKeys(event,/[0-9,]/);">
                </td>
              </tr>
              <tr id="pauschaleblock2">
                <td width="20%" height="25">
                 &nbsp;
                </td>
                <td valign="top">
                  &nbsp;
                </td>
              </tr>
            <tr>
              <td width="20%" height="25">
                Semester
              </td>
              <td valign="top">
                <select name="semester" id="semester" size=2>
                <option value="WS" {if $abschluss_value_semester == "WS"} selected {/if} >Wintersemester</option>
                <option value="SS" {if $abschluss_value_semester == "SS"} selected {/if} >Sommersemester</option>
                </select>
              </td>
            </tr>
            <tr>
              <td>
                &nbsp;
              </td>
              <td>
                <br>
                <table width="70%" class="errorTable">
                  <tr>
                    <td>
                      <b>Informationen</b><br>
                      <ul>
                        <li>Es können höchstens {$abschluss_value_max_arbeiten} Abschlussarbeiten pro Semester erfasst werden.</li>
                      </ul>
                    </td>
                  </tr>
                </table>
              </td>
            </tr>
          </table>
          <br />
          <p align='center'>
            <input type='submit' name='senden' value="Speichern">
          </p>
          <br />
        </fieldset>
    </form>
    <br />
    <br />
    <fieldset>
    <legend>
    <b>Erfasste Abschlussarbeiten im Wintersemester</b>
    </legend>
    <table cellspacing="0" cellpadding="2" width="100%" border="1">
    <tr>
    <td width="5%">
    <b>lfd.Nr.</b>
    </td>
    <td width="20%">
    <b>Name</b>
    </td>
    <td width="20%">
    <b>Art</b>
    </td>
    <td  width="20%">
    <b>Semester</b>
    </td>
    <td width="10%">
    <b>Betreuungspauschale</b>
    </td>
    <td align="right" width="20%">
    <b>LVS</b>
    </td>
    <td align="center" width="5%">
    <b>Edit</b>
    </td>
    <tr>
    {section name=table_data2 loop=$table_data2}
    {if $smarty.section.table_data2.rownum != ''}
    <tr>
    <td>
    {$smarty.section.table_data2.rownum}
    </td>
    <td>
    {$table_data2[table_data2].name}
    </td>
    <td>
    {$table_data2[table_data2].abschlussarbeit}
    </td>
    <td>
    {$table_data2[table_data2].semesterbez}
    </td>
    <td align="right">
    {$table_data2[table_data2].pauschale}
    </td>
    <td align="right">
    {$table_data2[table_data2].lvs}
    </td>
    <td align="center">
    <a href=?edit={$table_data2[table_data2].daid}><img title = "Abschlussarbeit bearbeiten" border="0" height=10 src="templates/{$global_template}/images/edit.png"></a>
    &nbsp;
    <a href="?action=del&daid={$table_data2[table_data2].daid}"><img title = 'Abschlussarbeit l&ouml;schen' border="0" height=10 src="templates/{$global_template}/images/drop.png"></a>
    </td>
    </tr>
    {/if}
    {/section}
    <tr>
    <td colspan="5">&nbsp;</td>
    <td align="right"><b>Summe: {$abschluss_value_ws_summe_lvs}</b></td>
    <td>&nbsp;</td>
    </tr>
    </table>
    </fieldset>
    <br />
    <fieldset>
    <legend>
    <b>Erfasste Abschlussarbeiten im Sommersemester</b>
    </legend>
    <table cellspacing="0" cellpadding="2" width="100%" border="1">
    <tr>
    <td width="5%">
    <b>lfd.Nr.</b>
    </td>
    <td width="20%">
    <b>Name</b>
    </td>
    <td width="20%">
    <b>Art</b>
    </td>
    <td width="20%">
    <b>Semester</b>
    </td>
    <td width="10%">
    <b>Betreuungspauschale</b>
    </td>
    <td align="right" width="20%">
    <b>LVS</b>
    </td>
    <td align="center" width="5%">
    <b>Edit</b>
    </td>
    <tr>
    {section name=table_data3 loop=$table_data3}
    {if $smarty.section.table_data3.rownum != ''}
    <tr>
    <td>
    {$smarty.section.table_data3.rownum}
    </td>
    <td>
    {$table_data3[table_data3].name}
    </td>
    <td>
    {$table_data3[table_data3].abschlussarbeit}
    </td>
    <td>
    {$table_data3[table_data3].semesterbez}
    </td>
    <td align="right">
    {$table_data3[table_data3].pauschale}
    </td>
    <td align="right">
    {$table_data3[table_data3].lvs}
    </td>
    <td align="center">
    <a href=?edit={$table_data3[table_data3].daid}><img title = "Abschlussarbeit bearbeiten" border="0" height=10 src="templates/{$global_template}/images/edit.png"></a>
    &nbsp;
    <a href="?action=del&daid={$table_data3[table_data3].daid}"><img title = 'Abschlussarbeit l&ouml;schen' border="0" height=10 src="templates/{$global_template}/images/drop.png"></a>
    </td>
    </tr>
    {/if}
    {/section}
    <tr>
    <td colspan="5">&nbsp;</td>
    <td align="right"><b>Summe: {$abschluss_value_ss_summe_lvs}</b></td>
    <td>&nbsp;</td>
    </tr>
    </table>
    </fieldset>
    {/if}
    <br />
    <br />
    </div>
  </body>
</html>
{/if}