Location: PHPKode > projects > WebETB > kraefte/fmskengen.php4
<?php
/******************************************************************************/
/*	MODUL:	kraefte/fmskengen.php4													      */
/*																										*/
/* DATUM:	12.02.2007, Version 0.1															*/
/* BESCHR.:	FMS-Kennunggenerator                                              */
/*																										*/
/*	AUTOR:   Marcus Groh																			*/
/*	LIZENZ:  GPL v2 vom Juni 1991 															*/
/*																										*/
/*	AENDERUNGEN:	01.07.2004        -initiale Version								   */
/*                27.03.2006 v 0.1, -Versionskennzeichnung eingefuehrt        */
/*                                  -Code unter GPL v2 gestellt               */
/*                                  -Tabellenname dynamisiert                 */
/*																										*/
/******************************************************************************/

/*

           BLOOKKKKSBRT
           ||| |   ||||
           ||| |   ||| - TKI      (0 .. 3) fur I bis IV
           ||| |   || -- Richtung (O oder 1)
           ||| |   | --- Baustufe (0 oder 1)
           ||| |    ---- Status   (0 .. f)
           |||  -------- Fahrzeug (4 Stellen 0 .. f)
           || ---------- Ort      (2 Stellen 0 .. f)
           | ----------- Land     (0 .. f)
            ------------ BOS      (0 .. f)


            92431821****   "1/82-1"     92431831****   "1/83-1"     82438831****   "8/83-1"
            92432825****   "2/82-5"     92431832****   "1/83-2"     82438832****   "8/83-2"
            92433822****   "3/82-2"     92431833****   "1/83-3"     82438833****   "8/83-3"
            92434824****   "4/82-4"     92431834****   "1/83-4"     82438834****   "8/83-4"
            82438825****   "8/82-5"     92431835****   "1/83-5"     82438835****   "8/83-5"
            B2439822****   "9/82-2"     D2437831****   "7/83-1"     82438838****   "8/83-8"
            92430832****   "0/83-2"     D2437832****   "7/83-2"     B2439831****   "9/83-1"
            92430839****   "0/83-9"     D2437833****   "7/83-3"     B2439832****   "9/83-2"



*/

$allowed_groups=array("elw");
include ('../_include/header_2.php4');
require ('ortskennungen.php4');

/***** Bei erstaufruf eine Defaultliste der BOS-kennungen laden     *****/
if(!isset($bos_nums))
{
   $selbosopt9="selected";
}
else
{
   $selbosopt0="";
   $selbosopt1="";
   $selbosopt2="";
   $selbosopt3="";
   $selbosopt4="";
   $selbosopt5="";
   $selbosopt6="";
   $selbosopt7="";
   $selbosopt8="";
   $selbosopt9="";
   $selbosoptA="";
   $selbosoptB="";
   $selbosoptC="";
   $selbosoptD="";
   $selbosoptE="";
   $selbosoptF="";
   eval ("\$"."selbosopt" . $bos_nums ."=\"selected\";");
}

/***** Bei erstaufruf eine Defaultliste der Land-kennungen laden     *****/
if(!isset($lnd_nums))
{
   $sellndopt2="selected";
}
else
{
   $sellndopt0="";
   $sellndopt1="";
   $sellndopt2="";
   $sellndopt3="";
   $sellndopt4="";
   $sellndopt5="";
   $sellndopt6="";
   $sellndopt7="";
   $sellndopt8="";
   $sellndopt9="";
   $sellndoptA="";
   $sellndoptB="";
   $sellndoptC="";
   $sellndoptD="";
   $sellndoptE="";
   $sellndoptF="";
   eval ("\$"."sellndopt" . $lnd_nums ."=\"selected\";");
}

/***** Bei erstaufruf eine Defaultliste der Stadtkennungen laden     *****/
if(!isset($lnd_nums))
{
   $stadtliste="land2_ret();";
}
else
{
      $stadtliste="land" .$lnd_nums ."_ret();";
}

/*****     Bei Aufruf mit Rufname fehlende Stellen mit 0 belegen     *****/
if(isset($ruf))
{

      $fzg_num1=0;
      $fzg_num2=0;
      $fzg_num3=0;
      $fzg_num4=0;
      
      $kenn=substr($ruf,0,1);
      if (strlen($kenn) != 0 )
         { $fzg_num1=$kenn; }
      $kenn=substr($ruf,1,1);
      if (strlen($kenn) != 0 )
         { $fzg_num2=$kenn; }
      $kenn=substr($ruf,2,1);
      if (strlen($kenn) != 0 )
         { $fzg_num3=$kenn; }
      $kenn=substr($ruf,3,1);
      if (strlen($kenn) != 0 )
         { $fzg_num4=$kenn; }         
}

?>
   <script language="JavaScript">
   <!--
      function createfmskenn()
      {
         var FMSCODE="";
         FMSCODE=document.forms['create_fmsken'].elements['bos_nums'].value;
         FMSCODE="" + FMSCODE + document.forms['create_fmsken'].elements['lnd_nums'].value;
         FMSCODE=FMSCODE + document.forms['create_fmsken'].elements['stdt_nums'].value;
         FMSCODE=FMSCODE + document.forms['create_fmsken'].elements['fzg_num1'].value;
         FMSCODE=FMSCODE + document.forms['create_fmsken'].elements['fzg_num2'].value;
         FMSCODE=FMSCODE + document.forms['create_fmsken'].elements['fzg_num3'].value;
         FMSCODE=FMSCODE + document.forms['create_fmsken'].elements['fzg_num4'].value;
         FMSCODE=FMSCODE + "****";
         document.forms['create_fmsken'].elements['fmscode'].value=FMSCODE;
      }

      function resizemywin()
      {
         var NS = (navigator.appName=="Netscape")?true:false;
         iWidth = (NS)?top.window.innerWidth:document.body.clientWidth;
         iHeight = (NS)?top.window.innerHeight:document.body.clientHeight;
         iWidth = 476 - iWidth;
         iHeight = 326 - iHeight;
         top.window.resizeBy(iWidth, iHeight);
         top.self.focus();
      }
      function updateparent()
      {
        parent.window.document.forms['manage_kraefte'].elements['fmscode'].value=document.forms['create_fmsken'].elements['fmscode'].value;
      }       
   //-->
   </script>

 <body onload="resizemywin();">  
<br><br>
<center>
<form action="" method=post name="create_fmsken">
<table border="0" cellpadding="0" cellspacing="0" width="370">
<tr>
   <td colspan="2" width="370" height="5" style="background-color: #CCCCCC;"><img src="../_img/spacer.gif" height="5" width="370" border="0"></td>   
</tr>
<tr>
   <td width=70>&nbsp;BOS:</td>
   <td><select name="bos_nums" size=1 style="width: 295px; border-width: 1px solid silver;" >
         <option <? echo $selbosopt0; ?> value="0">0: nicht vergeben
         <option <? echo $selbosopt1; ?> value="1">1: Polizei (POL)
         <option <? echo $selbosopt2; ?> value="2">2: Bundesgrenzschutz (BGS)
         <option <? echo $selbosopt3; ?> value="3">3: Bundeskriminalamt (BKA)
         <option <? echo $selbosopt4; ?> value="4">4: Katastophenschutz (KATS)
         <option <? echo $selbosopt5; ?> value="5">5: Zoll
         <option <? echo $selbosopt6; ?> value="6">6: Feuerwehr (FW)
         <option <? echo $selbosopt7; ?> value="7">7: Technisches Hilfwerk (THW)
         <option <? echo $selbosopt8; ?> value="8">8: Arbeiter-Samariter-Bund (ASB)
         <option <? echo $selbosopt9; ?> value="9">9: Deutsches Rotes Kreuz (DRK)
         <option <? echo $selbosoptA; ?> value="A">A: Johanniter Unfallhilfe (JUH)
         <option <? echo $selbosoptB; ?> value="B">B: Maltheser Hilfsdienst (MHD)
         <option <? echo $selbosoptC; ?> value="C">C: Deutsche Lebensrettungsgesellschaft (DLRG)
         <option <? echo $selbosoptD; ?> value="D">D: andere Rettungsdienste (RD)
         <option <? echo $selbosoptE; ?> value="E">E: Zivilschutz (ZS)
         <option <? echo $selbosoptF; ?> value="F">F: FERN
   </td>
</tr>
<tr>
   <td colspan="2" width="370" height="5" style="background-color: #CCCCCC;"><img src="../_img/spacer.gif" height="5" width="370" border="0"></td>   
</tr>
<tr>
   <td width=70>&nbsp;Land:</td>
   <td><select name="lnd_nums" size=1 style="width: 295px; border-width: 1px solid silver;" onchange="submit();">
         <option <? echo $sellndopt0; ?> value="0">0: Sachsen (Sac)
         <option <? echo $sellndopt1; ?> value="1">1: Bund (Bun)
         <option <? echo $sellndopt2; ?> value="2">2: Baden-Wuerttemberg (BW)
         <option <? echo $sellndopt3; ?> value="3">3: Bayern 1 (By1)
         <option <? echo $sellndopt4; ?> value="4">4: Berlin (Ber)
         <option <? echo $sellndopt5; ?> value="5">5: Hansestadt Bremen (HB)
         <option <? echo $sellndopt6; ?> value="6">6: Hansestadt Hamburg (HH)
         <option <? echo $sellndopt7; ?> value="7">7: Hessen (Hes)
         <option <? echo $sellndopt8; ?> value="8">8: Niedersachsen (NS)
         <option <? echo $sellndopt9; ?> value="9">9: Nordrhein-Westfalen (NRW)
         <option <? echo $sellndoptA; ?> value="A">A: Rheinland Pfalz (RPf)
         <option <? echo $sellndoptB; ?> value="B">B: Schleswig Holstein (SH)
         <option <? echo $sellndoptC; ?> value="C">C: Saarland (SL)
         <option <? echo $sellndoptD; ?> value="D">D: Bayern 2 (By2)
         <option <? echo $sellndoptE; ?> value="E">E: Mecklenburg-Vorpommern (MV)/ Sachsen-Anhalt (SA)
         <option <? echo $sellndoptF; ?> value="F">F: Brandenburg (Bra)/ Thuringen (Thu)
   </td>
</tr>
<tr>
   <td colspan="2" width="370" height="5" style="background-color: #CCCCCC;"><img src="../_img/spacer.gif" height="5" width="370" border="0"></td>   
</tr>
<tr>
   <td width=70>&nbsp;Stadt:</td>
   <td><select name="stdt_nums" size=1 style="width: 295px; border-width: 1px solid silver;">
       <?
         eval ($stadtliste);
       ?>
   </td>
</tr>
<tr>
   <td colspan="2" width="370" height="5" style="background-color: #CCCCCC;"><img src="../_img/spacer.gif" height="5" width="370" border="0"></td>   
</tr>
<tr>
   <td width=70>&nbsp;Fzg:</td>
   <td><input type=text name="fzg_num1" value="<? echo $fzg_num1; ?>" style="width: 30px; border: 1px solid silver;">
       <input type=text name="fzg_num2" value="<? echo $fzg_num2; ?>" style="width: 30px; border: 1px solid silver;">
       <input type=text name="fzg_num3" value="<? echo $fzg_num3; ?>" style="width: 30px; border: 1px solid silver;">
       <input type=text name="fzg_num4" value="<? echo $fzg_num4; ?>" style="width: 30px; border: 1px solid silver;"></td>
</tr>   
<tr>
   <td colspan="2" width="370" height="5" style="background-color: #CCCCCC;"><img src="../_img/spacer.gif" height="5" width="370" border="0"></td>   
</tr>
<tr>
   <td colspan="2" align="middle"><input type=submit VALUE="Erzeugen" style="border: 1px solid silver;" onclick="createfmskenn();"></td>
</tr>
<tr>
   <td colspan="2" width="370" height="5" style="background-color: #CCCCCC;"><img src="../_img/spacer.gif" height="5" width="370" border="0"></td>   
</tr>
<tr>
   <td width=70>&nbsp;Code:</td>
   <td<input type=text name="fmscode" value="<? echo $fmscode; ?>" style="width: 295px; border: 1px solid silver;"></td>
</tr>
<tr>
   <td colspan="2" width="370" height="5" style="background-color: #CCCCCC;"><img src="../_img/spacer.gif" height="5" width="370" border="0"></td>   
</tr>
<tr>
   <td colspan="2" align="middle"><input type=button VALUE="&Uuml;bernehmen und schlie&szlig;en" style="border: 1px solid silver;" onclick="updateparent();"></td>
</tr>
<tr>
   <td colspan="2" width="370" height="5" style="background-color: #CCCCCC;"><img src="../_img/spacer.gif" height="5" width="370" border="0"></td>   
</tr>
</table>
</form>
</center>
<?
include ('../_include/footer_2.php4');
?>
Return current item: WebETB