/** * Mobilitaetsprogrammliste */ function getMobilitaetsprogrammliste($firma_id, $user) { // Init $htmlstr = ''; // Plausib if (empty($firma_id) || !is_numeric($firma_id)) { return 'Firma fehlt.'; } $htmlstr .= '<table class="liste"> <tr> <th width="45%">Mobilitätsprogramm</th> <th width="5%"></th> <td width="15%" align="center" valign="top" colspan="2"> <form action="' . $_SERVER['PHP_SELF'] . '?firma_id=' . $firma_id . '&work=saveMobilitaetsprogramm" METHOD="POST"> <SELECT name="mobilitaetsprogramm_code">'; $mob = new mobilitaetsprogramm(); $mob->getAll(); foreach ($mob->result as $row) { $htmlstr .= '<OPTION value="' . $mob->convert_html_chars($row->mobilitaetsprogramm_code) . '">' . $mob->convert_html_chars($row->kurzbz) . '</OPTION>'; } $htmlstr .= ' </SELECT> <input type="submit" value="Hinzufügen"> </form> </td> </tr> '; // Datenlesen zur Firma $mob = new mobilitaetsprogramm(); if (!$mob->getFirmaMobilitaetsprogramm($firma_id)) { return $htmlstr . '</table>'; } $i = 0; foreach ($mob->result as $row) { $htmlstr .= "<tr class='liste" . $i % 2 . "'>\n"; $htmlstr .= '<td>' . $row->kurzbz . '</td>'; $htmlstr .= "<td align='center'><a href='" . $_SERVER['PHP_SELF'] . "?deletemobilitaetsprogramm=true&firma_id=" . $firma_id . "&mobilitaetsprogramm_code=" . $row->mobilitaetsprogramm_code . "' onclick='return confdel()'><img src='../../skin/images/application_form_delete.png' alt='loeschen' title='loeschen'/></a></td>"; $htmlstr .= '</tr>'; $i++; } $htmlstr .= '</table>'; return $htmlstr; }