fhiiqm/form/info_betrst_form.inc.php
changeset 31 0a1eb975fbd9
parent 29 72f79dab938e
child 36 4411d3239444
equal deleted inserted replaced
30:d02d02efc55a 31:0a1eb975fbd9
    37              ?>
    37              ?>
    38         </td>
    38         </td>
    39     </tr>
    39     </tr>
    40     <tr>
    40     <tr>
    41         <td>Kurzinformation<br/><br />
    41         <td>Kurzinformation<br/><br />
    42             &nbsp;&nbsp;&nbsp;max. 8000 Zeichen m&ouml;glich<br /><br />
    42             &nbsp;&nbsp;&nbsp;max. 8000 Zeichen m&ouml;glich
    43             &nbsp;&nbsp;&nbsp;erforderlich f&uuml;r <br />
       
    44             &nbsp;&nbsp;&nbsp;Gesch&auml;ftsverteilungsplan
       
    45         </td>
    43         </td>
    46         <td><textarea name="inf[ilong]" cols="80" rows="6"><?php echo $inf['ilong']; ?></textarea>
    44         <td><textarea name="inf[ilong]" cols="80" rows="6"><?php echo $inf['ilong']; ?></textarea>
    47         </td>
    45         </td>
    48     </tr>
    46     </tr>
    49 	<?php if ($ityp != 8)
    47 	<?php if (substr($ityp,0,1) != 8)
    50     {                       ?>
    48     {                       
       
    49         if ($ityp == 71) $inf['sort'] = "BSI_7_" . substr($inf['sort'],6);
       
    50     ?>
    51     <tr>
    51     <tr>
    52 	   <td>Kennzeichen(Sort.)</td>
    52 	   <td>Kennzeichen(Sort.)</td>
    53 	   <td><input name="inf[sort]" type="text" size="10" maxlength="10" value="<?php echo $inf['sort']; ?>" /></td>
    53 	   <td><input name="inf[sort]" type="text" size="10" maxlength="10" value="<?php echo $inf['sort']; ?>" />
       
    54        <?php if ($ityp==7) echo "&nbsp;&nbsp;&nbsp;BSI_... "; ?></td>
    54     </tr>
    55     </tr>
    55     <?php 
    56     <?php 
    56     }                       ?>      
    57     }                       ?>      
    57     <tr><td>geh&ouml;rt zu Info</td>
    58     <tr><td>geh&ouml;rt zu Info</td>
    58         <td><select name="inf[infrel]">
    59         <td><select name="inf[infrel]">
   164         <td><input class="long10" name="inf[bdat]" id="bdat"  value="<?php echo $inf['bdat']; ?>" /></td>
   165         <td><input class="long10" name="inf[bdat]" id="bdat"  value="<?php echo $inf['bdat']; ?>" /></td>
   165     </tr>
   166     </tr>
   166     <tr><td>Status Freigabe</td>
   167     <tr><td>Status Freigabe</td>
   167         <td><select name="inf[fg]" size="1">
   168         <td><select name="inf[fg]" size="1">
   168             <?php
   169             <?php
   169                 if (!isset($inf["fg"])) $inf["fg"] = 1;
   170                 if (!isset($inf["fg"]))
       
   171                 {
       
   172                     if ($ityp == 71) $inf["fg"] = 3; else  $inf["fg"] = 1;
       
   173                 } 
   170                 if ($inf['fg']) $select = ( "-1" == $inf['fg'] ) ? ' selected' : null;
   174                 if ($inf['fg']) $select = ( "-1" == $inf['fg'] ) ? ' selected' : null;
   171                 echo "<option $select value=\"-1\"></option>\n";
   175                 echo "<option $select value=\"-1\"></option>\n";
   172                 $sql = "SELECT info_freigabe_ID, info_freigabe_bez FROM Info_Freigabe ORDER BY 2";
   176                 if ($ityp == 71) $wher = " WHERE info_freigabe_ID=3 "; else $wher="";
       
   177                 $sql = "SELECT info_freigabe_ID, info_freigabe_bez FROM Info_Freigabe $wher ORDER BY 2";
   173                 if ($result = $dbc -> queryObjectArray($sql))
   178                 if ($result = $dbc -> queryObjectArray($sql))
   174                 {
   179                 {
   175                     foreach ($result as $row)
   180                     foreach ($result as $row)
   176                     {
   181                     {
   177                         if ($inf['fg']) $select = ( $row->info_freigabe_ID == $inf['fg'] ) ? ' selected' : null;
   182                         if ($inf['fg']) $select = ( $row->info_freigabe_ID == $inf['fg'] ) ? ' selected' : null;
   203         ?>
   208         ?>
   204         </select></td>
   209         </select></td>
   205     </tr>
   210     </tr>
   206     <tr>
   211     <tr>
   207         <td>zugeordnet zu Produkt<br /><br />
   212         <td>zugeordnet zu Produkt<br /><br />
   208             &nbsp;&nbsp;&nbsp;Mehrfachauswahl m&ouml;glich:<br />
   213             <?php
       
   214                 if ($ityp != 71)
       
   215                 echo 
       
   216             "&nbsp;&nbsp;&nbsp;Mehrfachauswahl m&ouml;glich:<br />
   209             &nbsp;&nbsp;&nbsp;[Strg]-Taste + Anklicken der<br /> 
   217             &nbsp;&nbsp;&nbsp;[Strg]-Taste + Anklicken der<br /> 
   210             &nbsp;&nbsp;&nbsp;gewünschten Listeneinträge</td>
   218             &nbsp;&nbsp;&nbsp;gewünschten Listeneinträge";
       
   219             ?>
       
   220         </td>
   211         <td>
   221         <td>
   212             <select name="inf[prid][]" size="9" multiple="multiple">
   222             <?php
   213             <?php 
   223                 if ($ityp != 71)
       
   224                     echo "<select name=\"inf[prid][]\" size=\"9\" multiple=\"multiple\">\n";
       
   225                 else
       
   226                 {   // Betriebsstörung dezentrale Technik
       
   227                     echo "<select name=\"inf[prid][]\" size=\"3\">\n";
       
   228                     $inf['prid'][0] = "4108"; // Branschutz- und Steuerungstechnik
       
   229                 }   
   214                 if (is_array($inf['prid'])) $select = in_array( "-1", $inf['prid'] ) ? ' selected' : null;
   230                 if (is_array($inf['prid'])) $select = in_array( "-1", $inf['prid'] ) ? ' selected' : null;
   215                 echo "<option $select value=\"-1\"></option>\n";
   231                 echo "<option $select value=\"-1\"></option>\n";
   216 //                $sql = "SELECT produkt_ID, LEFT(prod_name,70) AS prod, LENGTH(prod_name) AS lenp FROM Produkt ORDER BY 2";
   232 //                $sql = "SELECT produkt_ID, LEFT(prod_name,70) AS prod, LENGTH(prod_name) AS lenp FROM Produkt ORDER BY 2";
   217                 if ($ityp == 7) $sql = "CALL prod_hiera_all(4,41)"; 
   233                 if (substr($ityp,0,1) == 7) $sql = "CALL prod_hiera_all(4,41)"; 
   218                 elseif (substr($ityp,0,1) == 8) $sql = "CALL prod_hiera_all(1,15)";  
   234                 elseif (substr($ityp,0,1) == 8) $sql = "CALL prod_hiera_all(1,15)";  
   219                 if ($result = $dbc->queryObjectArray($sql))
   235                 if ($result = $dbc->queryObjectArray($sql))
   220                 {
   236                 {
   221                     foreach ($result as $row)
   237                     foreach ($result as $row)
   222                     {
   238                     {
   224                             $prod=str_replace(" ","&nbsp;",htmlentities(substr($row->bez,0,70))) ."..."; 
   240                             $prod=str_replace(" ","&nbsp;",htmlentities(substr($row->bez,0,70))) ."..."; 
   225                         else 
   241                         else 
   226                             $prod=str_replace(" ","&nbsp;",htmlentities($row->bez));
   242                             $prod=str_replace(" ","&nbsp;",htmlentities($row->bez));
   227                         if ($row->prid >0) $color=" class='green'"; else $color="";
   243                         if ($row->prid >0) $color=" class='green'"; else $color="";
   228                         if (is_array($inf['prid'])) $select = in_array($row->prid, $inf['prid']) ? ' selected' : null;
   244                         if (is_array($inf['prid'])) $select = in_array($row->prid, $inf['prid']) ? ' selected' : null;
   229                         echo "<option $color $select value=\"$row->prid\">$prod</option>\n";
   245                         if ($ityp != 71)
       
   246                         {
       
   247                             echo "<option $color $select value=\"$row->prid\">$prod</option>\n";
       
   248                         }
       
   249                         else
       
   250                         {
       
   251                             if ($row->prid == $inf['prid'][0] || $row->prid == 0)
       
   252                                 echo "<option $color $select value=\"$row->prid\">$prod</option>\n";
       
   253                         }
   230                     }
   254                     }
   231                 }
   255                 }
   232                 unset($result);
   256                 unset($result);
   233             ?>
   257             ?>
   234             </select>
   258             </select>
   236         </td>
   260         </td>
   237     </tr>
   261     </tr>
   238 	<?php if (substr($ityp,0,1) != 8)  // 8 - Betriebsanweisung
   262 	<?php if (substr($ityp,0,1) != 8)  // 8 - Betriebsanweisung
   239     {                       ?>
   263     {                       ?>
   240     <tr><td>Adressat (Beauftragte)<br />
   264     <tr><td>Adressat (Beauftragte)<br />
       
   265     <?php
       
   266         if ($ityp != 71)
       
   267         {
       
   268     ?>
   241             &nbsp;&nbsp;&nbsp;leeres Feld = L&ouml;schen</td>
   269             &nbsp;&nbsp;&nbsp;leeres Feld = L&ouml;schen</td>
   242         <td>
   270         <td>
   243             <div id="add">
   271             <div id="add">
   244             <select name="inf[adr][]" size="1">
   272             <select name="inf[adr][]" size="1">
   245             <?php
   273             <?php
   292                     }
   320                     }
   293                 }
   321                 }
   294             ?>
   322             ?>
   295             </div>
   323             </div>
   296         </td>
   324         </td>
       
   325     <?php
       
   326     }
       
   327     else
       
   328     {
       
   329         echo "</td>";
       
   330         echo "<td><select name='inf[adr][]' size='1'>";
       
   331         echo "<option selected value='LV'>LV - Laborverantwortlicher</option></select></td>";
       
   332     }
       
   333     ?>
   297     </tr>
   334     </tr>
   298     <?php 
   335     <?php 
   299     }                       
   336     }                       
   300         if ($ityp == 81)    // Betriebsanweisung Anlage
   337         if ($ityp == 81)    // Betriebsanweisung Anlage
   301         {
   338         {
   333 				}
   370 				}
   334 				else
   371 				else
   335 				{
   372 				{
   336                     if ($inf['ifname']>='!' && file_exists("infos/".$inf['ifname']))
   373                     if ($inf['ifname']>='!' && file_exists("infos/".$inf['ifname']))
   337                         echo "<br />Dokument anschauen:&nbsp;<a href='infos/" . $inf['ifname'] ."'>" . $inf['ifname'] . "</a>";
   374                         echo "<br />Dokument anschauen:&nbsp;<a href='infos/" . $inf['ifname'] ."'>" . $inf['ifname'] . "</a>";
   338                     if ($okn) $okn = true; else $okn=false;
   375 //                    if ($okn) $okn = true; else $okn=false;
   339                 }
   376                 }
   340 		?>
   377 		?>
   341 		</td>
   378 		</td>
   342     </tr>
   379     </tr>
   343 
   380 
   344     <input type="hidden" name="inf[pers]" id="pid" value="<?php echo $inf['pers']; // Author ?>"/> 
   381     <input type="hidden" name="inf[pers]" id="pid" value="<?php echo $inf['pers']; // Author ?>"/> 
   345     <input type="hidden" name="MAX_FILE_SIZE" value="6000000"/>    
   382     <input type="hidden" name="MAX_FILE_SIZE" value="32000000"/>    
   346     <input type="hidden" name="inf[okn]" value="<?php echo $okn; ?>"/>
   383     <input type="hidden" name="inf[okn]" value="<?php echo $okn; ?>"/>
   347 <!--  </table>
   384 <!--  </table>
   348  </div>   
   385  </div>   
   349 </form> -->
   386 </form> -->