{if $action == ''}
<html>
<head>
<title>{$hauptframe_titel}</title>
<link type="text/css" rel="stylesheet" href="templates/{$global_template}/css/styles_refill.css">
  <link rel="stylesheet" type="text/css" href="fancybox/jquery.fancybox-1.3.4.css" media="screen" />
  <script type="text/javascript" src="./fancybox/jquery-1.5.1.min.js"></script>
  <!-- DATEI GIBTS NICHT   <script>!window.jQuery && document.write('<script src="jquery-1.4.3.min.js"><\/script>');</script>-->
  <script type="text/javascript" src="./fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
  <script type="text/javascript" src="./fancybox/jquery.fancybox-1.3.4.pack.js"></script>

  <script type="text/javascript">
    $(document).ready(function() {
        $(".box").fancybox({
            'width'                : '75%',
            'height'               : '75%',
            'autoScale'            : true,
            'transitionIn'         : 'elastic',
            'transitionOut'        : 'elastic',
            'type'                 : 'iframe'
        });
    });
  </script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">

<div class="header">
   <div>
      <div>{$erfassen_status_titel}</div>
   </div>
</div>

<div class="pat_list_box">
	<p>
    <table border="0" bordercolordark="white" bordercolorlight="lightgray" cellspacing="0" width="90%" height="90%">
        <tr>
            <td align="center" valign='top'>

            <form action="?action=status1" method='post' name='erfassen'>
              <table width='100%' >
                <tr>
                  <td width="5%">
                    <strong>{$erfassen_status_field_id}</strong>
                  </td>
                  <td>
                    <strong>{$erfassen_status_field_titel}</strong>
                  </td>
                  <td>
                    <strong>{$erfassen_status_field_erstelldatum}</strong>
                  </td>
                  <td align="center">
                    <strong>{$erfassen_status_field_select}</strong>
                  </td>
                </tr>

                {section name=table_data1 loop=$table_data1}
                {if $smarty.section.table_data1.rownum >= '1'}
                  <tr>
                    <td width="5%">
                      {$table_data1[table_data1].vid}
                    </td>
                    <td>
                      {$table_data1[table_data1].betreff}
                    </td>
                    <td>
                      {$table_data1[table_data1].erfass_dat1}
                    </td>
                    <td align="center">
                      <input type="radio" name="vid" value="{$table_data1[table_data1].vid}">
                    </td>
                  </tr>
                {/if}
                {/section}
              </table>
              <br />
              <br />
              <input type="submit" name="senden" value="Abschicken">
              </form>

            </td>
        </tr>
    </table>
</div>

</body>
</html>
{/if}


{if $action == 'status1'}
  <html>
  <head>
  <title>{$erfassen_status_titel}</title>
  <link type="text/css" rel="stylesheet" href="templates/{$global_template}/css/styles_refill.css">

    <link rel="stylesheet" type="text/css" href="fancybox/jquery.fancybox-1.3.4.css" media="screen" />

    <script type="text/javascript" src="js/ajaxtabs.js">
      /***********************************************
      * Ajax Tabs Content script v2.2- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
      * This notice MUST stay intact for legal use
      * Visit Dynamic Drive at https://www.dynamicdrive.com/ for full source code
      ***********************************************/
    </script>

    <script type="text/javascript" src="./fancybox/jquery-1.5.1.min.js"></script>
  <!-- DATEI GIBTS NICHT   <script>!window.jQuery && document.write('<script src="jquery-1.4.3.min.js"><\/script>');</script>-->
    <script type="text/javascript" src="./fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
    <script type="text/javascript" src="./fancybox/jquery.fancybox-1.3.4.pack.js"></script>

    <script type="text/javascript">
    {literal}
    $(document).ready(function() {
          $(".box").fancybox({
              'width'                : '75%',
              'height'               : '75%',
              'autoScale'            : true,
              'transitionIn'         : 'elastic',
              'transitionOut'        : 'elastic',
              'type'                 : 'iframe'
          });
      });
      {/literal}
    </script>


    <script language='javascript' type='text/javascript' src='tinymce/jscripts/tiny_mce/tiny_mce.js'></script>
    <script type='text/javascript'>
    {literal}
            function myCustomInitInstance(inst) {
               if(inst.editorId != 'mce_fullscreen')
                 inst.execCommand('mceFullScreen');
            }
    tinyMCE.init({
            // General options
            language: 'de',
            mode : 'textareas',
            theme : 'advanced',
            plugins : 'save,autosave,safari,style,table,advhr,advimage,advlink,iespell,insertdatetime,preview,searchreplace,contextmenu,paste,fullscreen,visualchars,nonbreaking,xhtmlxtras,template',
            remove_linebreaks : true,
            force_br_newlines : true,
            force_p_newlines : false,
            forced_root_block : '',
            apply_source_formatting : true,
            convert_newlines_to_brs : true,
            // init_instance_callback : 'myCustomInitInstance',

            // Theme options
            theme_advanced_buttons1 : 'undo,redo,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,cut,copy,paste,pastetext,pasteword,|,bullist,numlist,preview,|,link,unlink,anchor',
            theme_advanced_buttons2 : 'tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,|,fullscreen',
            theme_advanced_buttons3 : '',
            theme_advanced_toolbar_location : 'top',
            theme_advanced_toolbar_align : 'left',
            theme_advanced_statusbar_location : 'bottom',
            theme_advanced_resizing : true,


            // Example content CSS (should be your site CSS)
            content_css : 'css/example.css',

            // Drop lists for link/image/media/template dialogs
            template_external_list_url : 'js/template_list.js',
            external_link_list_url : 'js/link_list.js',
            external_image_list_url : 'js/image_list.js',
            media_external_list_url : 'js/media_list.js',


            autosave_ask_before_unload : false
    });
    {/literal}
    </script>

    <script type="text/javascript">
      {literal}
      function senden_aktiv(){
        if ( document.erfassen.versicherung.checked == true ){
           document.erfassen.senden.disabled = false;
        }else{
            document.erfassen.senden.disabled = true;
        }
      }
      {/literal}
    </script>

  </head>

  <body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">


{if $bearbeiten_err == '1'}
  <html>
  <head>
  <title>{$erfassen_status_err_titel}</title>
  <link type="text/css" rel="stylesheet" href="templates/{$global_template}/css/styles_refill.css">
  </head>

  <body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">

  <div class="header">
     <div>
        <div>{$erfassen_status_err_titel}</div>
     </div>
  </div>

  <div class="pat_list_box">
  	<p>
      <table border="0" bordercolordark="white" bordercolorlight="lightgray" cellspacing="0" width="100%" height="90%">
          <tr>
              <td align="center">
                <b>{$erfassen_status_err_text}</b>
              </td>
          </tr>
      </table>
  </div>

  </body>
  </html>
{/if}

{if $bearbeiten_err == '0'}
  <div class="header">
     <div>
        <div>{$erfassen_status_titel}</div>
     </div>
  </div>

  <div class="pat_list_box">
  	<p>



      <table valign="top" border="0" bordercolordark="white" bordercolorlight="lightgray" cellspacing="0" width="90%">
          <tr>
              <td width="50%">
                <strong>{$erfassen_status_field_id}</strong>
              </td>
              <td>
                {$erfassen_status_vid}
              </td>
          </tr>


          <tr>
              <td width="50%">
                <strong>{$erfassen_status_field_ersteller}</strong>
              </td>
              <td>
                {$erfassen_status_vorname} {$erfassen_status_nachname}
              </td>
          </tr>

          <tr>
              <td width="50%">
                <strong>{$erfassen_status_field_mailadresse}</strong>
              </td>
              <td>
                {$erfassen_status_mail}
              </td>
          </tr>

          <tr>
              <td width="50%">
                <strong>{$erfassen_status_field_gruppe}</strong>
              </td>
              <td>
                {$erfassen_status_beziehung}
              </td>
          </tr>

          <tr>
              <td width="50%">
                &nbsp;
              </td>
              <td>
                &nbsp;
              </td>
          </tr>

          <tr>
              <td width="50%">
                <strong>{$erfassen_status_field_gruppenmitglieder}</strong>
              </td>
              <td>
                {section name=table_data2 loop=$table_data2}
                  {$table_data2[table_data2].name}<br />
                {/section}
              </td>
          </tr>

          <tr>
              <td width="50%">
                &nbsp;
              </td>
              <td>
                &nbsp;
              </td>
          </tr>

          <tr>
              <td width="50%">
                <strong>{$erfassen_status_field_betreff}</strong>
              </td>
              <td>
                {$erfassen_status_betreff}
              </td>
          </tr>

          <tr>
              <td width="50%">
                &nbsp;
              </td>
              <td>
                &nbsp;
              </td>
          </tr>

          <tr>
              <td width="50%">
                  <strong>{$erfassen_status_field_beschreibung}</strong>
              </td>
              <td>
                {$erfassen_status_beschreibung}
              </td>
          </tr>

          <tr>
              <td width="50%">
                &nbsp;
              </td>
              <td>
                &nbsp;
              </td>
          </tr>

          <tr>
              <td width="50%">
                  <strong>{$erfassen_status_field_vorschlag}</strong>
              </td>
              <td>
                {$erfassen_status_vorschlag}
              </td>
          </tr>

          <tr>
              <td width="50%">
                &nbsp;
              </td>
              <td>
                &nbsp;
              </td>
          </tr>

          <tr>
              <td width="50%">
                  <strong>{$erfassen_status_field_nutzen}</strong>
              </td>
              <td>
                {$erfassen_status_nutzen}
              </td>
          </tr>

          <tr>
              <td width="50%">
                &nbsp;
              </td>
              <td>
                &nbsp;
              </td>
          </tr>

          <tr>
              <td width="50%">
                <strong>{$erfassen_status_field_public}</strong>
              </td>
              <td>
               {$erfassen_status_public}
              </td>
          </tr>

      </table>
      <br />
      <br />

       <fieldset>
      <form action="?action=status2" method='post' name='erfassen'>
      <legend><b>Kategogie / Hinweise</b></legend>

	      <table valign="top" border="0" bordercolordark="white" bordercolorlight="lightgray" cellspacing="0" width="100%">
	        <tr>
	          <td width="50%">
	            <strong>{$erfassen_status_field_kategorie}</strong>
	          </td>
	          <td>
	            {$erfassen_status_kategorie}
	          </td>
            </tr>

	        <tr>
	          <td width="50%">
	            &nbsp;
	          </td>
	          <td>
	            &nbsp;
	          </td>
            </tr>

	        <tr>
	          <td width="50%">
	            <strong>{$erfassen_status_field_admhinweis}</strong>
	          </td>
	          <td>
	            {$erfassen_status_hinweis_admin}
	          </td>
            </tr>

	        <tr>
	          <td width="50%">
	            &nbsp;
	          </td>
	          <td>
	            &nbsp;
	          </td>
            </tr>

	        <tr>
	          <td width="50%">
	            <strong>{$erfassen_status_field_eigenhinweis}</strong>
	          </td>
	          <td>
	            <textarea name='erfassen_status_hinweis_eigen'>{$erfassen_status_hinweis_eigen}</textarea>
	          </td>
            </tr>

	        <tr>
	          <td width="50%">
	            &nbsp;
	          </td>
	          <td>
	            <input type="submit" name="senden" value="Hinweis speichern">
	          </td>
            </tr>

          </table>
      </fieldset>
      </form>
      <br />
      <br />
      <fieldset>
      <legend><b>Statusdetails</b></legend>

	      <table valign="top" border="0" bordercolordark="white" bordercolorlight="lightgray" cellspacing="0" width="90%">
	        <tr>
	          <td width="50%">
	            <strong>{$erfassen_status_field_datum}</strong>
	          </td>
	          <td>
	            <strong>{$erfassen_status_field_status}</strong>
	          </td>
            </tr>


            {section name=table_data3 loop=$table_data3}
            {if $table_data3[table_data3].status != ''}
            <tr>
	          <td width="50%">
	            {$table_data3[table_data3].datum1}
	          </td>
	          <td>
	            {$table_data3[table_data3].status} {if $table_data3[table_data3].info == '1'}<a class="box" href="info_entscheid.php?vid={$table_data3[table_data3].erfassen_status_vid}"><img src="templates/{$global_template}/images/i.jpg" title="Informationen zur Entscheidung" border="0"></a>{/if}
	          </td>
            </tr>
            {/if}
            {/section}

          </table>
      </fieldset>

  </div>

  </body>
  </html>
{/if}
{/if}

{if $action == 'status2'}
  <html>
  <head>
  <title>{$hauptframe_titel}</title>
  <link type="text/css" rel="stylesheet" href="templates/{$global_template}/css/styles_refill.css">
  </head>

  <body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">

  <div class="header">
     <div>
        <div>{$erfassen_status_success_titel}</div>
     </div>
  </div>

  <div class="pat_list_box">
  	<p>
      <table border="0" bordercolordark="white" bordercolorlight="lightgray" cellspacing="0" width="94%" height="90%">
          <tr>
              <td align="center">
                <b>{$erfassen_status_success_text}</b>

              </td>
          </tr>
      </table>
  </div>

  </body>
  </html>
{/if}