mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
Mehrsprachige Felder für Dokumentenbeschreibung können nun in der GUI editiert werden
This commit is contained in:
+77
-21
@@ -42,6 +42,9 @@ class dokument extends basis_db
|
||||
public $ext_id;
|
||||
public $onlinebewerbung;
|
||||
|
||||
public $bezeichnung_mehrsprachig;
|
||||
public $dokumentbeschreibung_mehrsprachig;
|
||||
|
||||
/**
|
||||
* Konstruktor - Laedt optional ein Dokument
|
||||
* @param $dokument_kurzbz
|
||||
@@ -216,15 +219,43 @@ class dokument extends basis_db
|
||||
|
||||
if($new)
|
||||
{
|
||||
$qry = 'INSERT INTO public.tbl_dokument(dokument_kurzbz, bezeichnung) VALUES('.
|
||||
$this->db_add_param($this->dokument_kurzbz).','.
|
||||
$this->db_add_param($this->bezeichnung).');';
|
||||
$qry = 'INSERT INTO public.tbl_dokument(dokument_kurzbz, ';
|
||||
foreach($this->bezeichnung_mehrsprachig as $key=>$value)
|
||||
{
|
||||
$idx = sprache::$index_arr[$key];
|
||||
$qry.=" bezeichnung_mehrsprachig[$idx],";
|
||||
}
|
||||
|
||||
foreach($this->dokumentbeschreibung_mehrsprachig as $key=>$value)
|
||||
{
|
||||
$idx = sprache::$index_arr[$key];
|
||||
$qry.=" dokumentbeschreibung_mehrsprachig[$idx],";
|
||||
}
|
||||
$qry.='bezeichnung) VALUES('.
|
||||
$this->db_add_param($this->dokument_kurzbz).',';
|
||||
foreach($this->bezeichnung_mehrsprachig as $key=>$value)
|
||||
$qry.=$this->db_add_param($value).',';
|
||||
foreach($this->dokumentbeschreibung_mehrsprachig as $key=>$value)
|
||||
$qry.=$this->db_add_param($value).',';
|
||||
$this->db_add_param($this->bezeichnung).');';
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$qry = 'UPDATE public.tbl_dokument SET '.
|
||||
'bezeichnung = '.$this->db_add_param($this->bezeichnung).
|
||||
'WHERE dokument_kurzbz = '.$this->db_add_param($this->dokument_kurzbz);
|
||||
'bezeichnung = '.$this->db_add_param($this->bezeichnung).',';
|
||||
foreach($this->bezeichnung_mehrsprachig as $key=>$value)
|
||||
{
|
||||
$idx = sprache::$index_arr[$key];
|
||||
$qry.=" bezeichnung_mehrsprachig[$idx]=".$this->db_add_param($value).",";
|
||||
}
|
||||
foreach($this->dokumentbeschreibung_mehrsprachig as $key=>$value)
|
||||
{
|
||||
$idx = sprache::$index_arr[$key];
|
||||
$qry.=" dokumentbeschreibung_mehrsprachig[$idx]=".$this->db_add_param($value).",";
|
||||
}
|
||||
$qry = mb_substr($qry,0,-1);
|
||||
$qry.='WHERE dokument_kurzbz = '.$this->db_add_param($this->dokument_kurzbz);
|
||||
}
|
||||
|
||||
if($this->db_query($qry))
|
||||
@@ -455,7 +486,8 @@ class dokument extends basis_db
|
||||
*/
|
||||
public function loadDokumentStudiengang($dokument_kurzbz, $studiengang_kz)
|
||||
{
|
||||
$qry="SELECT * FROM public.tbl_dokumentstudiengang
|
||||
$sprache = new sprache();
|
||||
$qry="SELECT *,".$sprache->getSprachQuery('beschreibung_mehrsprachig')." FROM public.tbl_dokumentstudiengang
|
||||
WHERE
|
||||
studiengang_kz=".$this->db_add_param($studiengang_kz)."
|
||||
AND dokument_kurzbz=".$this->db_add_param($dokument_kurzbz);
|
||||
@@ -468,6 +500,7 @@ class dokument extends basis_db
|
||||
$this->studiengang_kz = $row->studiengang_kz;
|
||||
$this->onlinebewerbung = $this->db_parse_bool($row->onlinebewerbung);
|
||||
$this->pflicht = $this->db_parse_bool($row->pflicht);
|
||||
$this->beschreibung_mehrsprachig = $sprache->parseSprachResult('beschreibung_mehrsprachig',$row);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@@ -521,18 +554,35 @@ class dokument extends basis_db
|
||||
{
|
||||
if(!$this->existsDokumentStudiengang($this->dokument_kurzbz, $this->studiengang_kz))
|
||||
{
|
||||
$qry='INSERT INTO public.tbl_dokumentstudiengang (dokument_kurzbz, studiengang_kz, pflicht, onlinebewerbung)
|
||||
$qry='INSERT INTO public.tbl_dokumentstudiengang (dokument_kurzbz, studiengang_kz,';
|
||||
foreach($this->beschreibung_mehrsprachig as $key=>$value)
|
||||
{
|
||||
$idx = sprache::$index_arr[$key];
|
||||
$qry.=" beschreibung_mehrsprachig[$idx],";
|
||||
}
|
||||
|
||||
$qry.=' pflicht, onlinebewerbung)
|
||||
VALUES ('.
|
||||
$this->db_add_param($this->dokument_kurzbz).','.
|
||||
$this->db_add_param($this->studiengang_kz,FHC_INTEGER).','.
|
||||
$this->db_add_param($this->pflicht,FHC_BOOLEAN).','.
|
||||
$this->db_add_param($this->studiengang_kz,FHC_INTEGER).',';
|
||||
|
||||
foreach($this->beschreibung_mehrsprachig as $key=>$value)
|
||||
$qry.=$this->db_add_param($value).',';
|
||||
|
||||
$qry.= $this->db_add_param($this->pflicht,FHC_BOOLEAN).','.
|
||||
$this->db_add_param($this->onlinebewerbung,FHC_BOOLEAN).')';
|
||||
}
|
||||
else
|
||||
{
|
||||
$qry = 'UPDATE public.tbl_dokumentstudiengang SET
|
||||
onlinebewerbung='.$this->db_add_param($this->onlinebewerbung, FHC_BOOLEAN).',
|
||||
pflicht='.$this->db_add_param($this->pflicht, FHC_BOOLEAN).'
|
||||
onlinebewerbung='.$this->db_add_param($this->onlinebewerbung, FHC_BOOLEAN).',';
|
||||
|
||||
foreach($this->beschreibung_mehrsprachig as $key=>$value)
|
||||
{
|
||||
$idx = sprache::$index_arr[$key];
|
||||
$qry.=" beschreibung_mehrsprachig[$idx]=".$this->db_add_param($value).",";
|
||||
}
|
||||
$qry.=' pflicht='.$this->db_add_param($this->pflicht, FHC_BOOLEAN).'
|
||||
WHERE
|
||||
dokument_kurzbz='.$this->db_add_param($this->dokument_kurzbz).'
|
||||
AND studiengang_kz='.$this->db_add_param($this->studiengang_kz);
|
||||
@@ -556,7 +606,11 @@ class dokument extends basis_db
|
||||
*/
|
||||
public function loadDokumenttyp($dokument_kurzbz)
|
||||
{
|
||||
$qry="SELECT * FROM public.tbl_dokument
|
||||
$sprache = new sprache();
|
||||
$bezeichnung_mehrsprachig = $sprache->getSprachQuery('bezeichnung_mehrsprachig');
|
||||
$dokumentbeschreibung_mehrsprachig = $sprache->getSprachQuery('dokumentbeschreibung_mehrsprachig');
|
||||
|
||||
$qry="SELECT *, ".$bezeichnung_mehrsprachig.",".$dokumentbeschreibung_mehrsprachig." FROM public.tbl_dokument
|
||||
WHERE dokument_kurzbz =".$this->db_add_param($dokument_kurzbz).";";
|
||||
|
||||
if($this->db_query($qry))
|
||||
@@ -565,6 +619,8 @@ class dokument extends basis_db
|
||||
{
|
||||
$this->dokument_kurzbz = $row->dokument_kurzbz;
|
||||
$this->bezeichnung = $row->bezeichnung;
|
||||
$this->bezeichnung_mehrsprachig = $sprache->parseSprachResult('bezeichnung_mehrsprachig', $row);
|
||||
$this->dokumentbeschreibung_mehrsprachig = $sprache->parseSprachResult('dokumentbeschreibung_mehrsprachig', $row);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -623,7 +679,7 @@ class dokument extends basis_db
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Liefert die Beschreibungstexte des uebergebenen Dokuments und der uebergebenen Studiengaenge
|
||||
* @param array $studiengangs_kz Array mit den Studiengangskennzahlen
|
||||
@@ -634,16 +690,16 @@ class dokument extends basis_db
|
||||
$sprache = new sprache();
|
||||
$dokumentbeschreibung_mehrsprachig = $sprache->getSprachQuery('dokumentbeschreibung_mehrsprachig');
|
||||
$beschreibung_mehrsprachig = $sprache->getSprachQuery('beschreibung_mehrsprachig');
|
||||
|
||||
$qry = " SELECT DISTINCT dokument_kurzbz, studiengang_kz,
|
||||
$dokumentbeschreibung_mehrsprachig, $beschreibung_mehrsprachig
|
||||
FROM public.tbl_dokumentstudiengang
|
||||
JOIN public.tbl_dokument using (dokument_kurzbz)
|
||||
|
||||
$qry = " SELECT DISTINCT dokument_kurzbz, studiengang_kz,
|
||||
$dokumentbeschreibung_mehrsprachig, $beschreibung_mehrsprachig
|
||||
FROM public.tbl_dokumentstudiengang
|
||||
JOIN public.tbl_dokument using (dokument_kurzbz)
|
||||
WHERE dokument_kurzbz=".$this->db_add_param($dokument_kurzbz, FHC_STRING)."
|
||||
AND (dokumentbeschreibung_mehrsprachig IS NOT NULL OR beschreibung_mehrsprachig IS NOT NULL)
|
||||
AND studiengang_kz IN (".implode(",", $studiengangs_kz).")
|
||||
ORDER BY studiengang_kz";
|
||||
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object($result))
|
||||
@@ -663,7 +719,7 @@ class dokument extends basis_db
|
||||
$this->errormsg="Fehler bei der Abfrage aufgetreten";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -700,7 +756,7 @@ class dokument extends basis_db
|
||||
$this->errormsg = 'Studiengang_kz ist ungueltig';
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
$qry = "SELECT
|
||||
*
|
||||
FROM
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright 2014 fhcomplete.org
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301, USA.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Martin Tatzber <tatzberm@technikum-wien.at>
|
||||
*
|
||||
@@ -26,10 +26,15 @@ require_once('../../include/functions.inc.php');
|
||||
require_once('../../include/studiengang.class.php');
|
||||
require_once('../../include/dokument.class.php');
|
||||
require_once('../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../include/sprache.class.php');
|
||||
|
||||
$stg_kz = isset($_REQUEST['stg_kz']) ? $_REQUEST['stg_kz'] : '0';
|
||||
$dokument_kurzbz = isset($_REQUEST['dokument_kurzbz']) ? $_REQUEST['dokument_kurzbz'] : '';
|
||||
$onlinebewerbung = isset($_REQUEST['onlinebewerbung']);
|
||||
$pflicht = isset($_POST['pflicht']);
|
||||
|
||||
$sprache = new sprache();
|
||||
$sprache->getAll(true);
|
||||
|
||||
$action=isset($_GET['action'])?$_GET['action']:'';
|
||||
if(isset($_POST['add']))
|
||||
@@ -40,7 +45,7 @@ if(isset($_POST['saveDoc']))
|
||||
$uid = get_uid();
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($uid);
|
||||
|
||||
$db = new basis_db();
|
||||
if(!$rechte->isBerechtigt('basis/studiengang', $stg_kz, 'suid'))
|
||||
die('Sie haben keine Berechtigung für diese Seite');
|
||||
|
||||
@@ -52,7 +57,16 @@ if($action=='add')
|
||||
$dokument->dokument_kurzbz = $dokument_kurzbz;
|
||||
$dokument->studiengang_kz = $stg_kz;
|
||||
$dokument->onlinebewerbung = $onlinebewerbung;
|
||||
$dokument->pflicht = filter_input(INPUT_POST, 'pflicht', FILTER_VALIDATE_BOOLEAN);
|
||||
$dokument->pflicht = $pflicht;
|
||||
|
||||
$beschreibung_mehrsprachig=array();
|
||||
foreach($sprache->result as $row_sprache)
|
||||
{
|
||||
if(isset($_POST['beschreibung_mehrsprachig_'.$row_sprache->sprache]))
|
||||
$beschreibung_mehrsprachig[$row_sprache->sprache]=$_POST['beschreibung_mehrsprachig_'.$row_sprache->sprache];
|
||||
}
|
||||
$dokument->beschreibung_mehrsprachig = $beschreibung_mehrsprachig;
|
||||
|
||||
$dokument->saveDokumentStudiengang();
|
||||
}
|
||||
}
|
||||
@@ -102,13 +116,13 @@ if($action=='saveDoc')
|
||||
{
|
||||
$dokBezeichnung=isset($_POST['dokument_bezeichnung'])?$_POST['dokument_bezeichnung']:'';
|
||||
$dokKurzbz=isset($_POST['dokument_kurzbz'])?$_POST['dokument_kurzbz']:'';
|
||||
|
||||
|
||||
if($dokBezeichnung!='')
|
||||
{
|
||||
$dokument=new dokument();
|
||||
$dokument->dokument_kurzbz=$dokKurzbz;
|
||||
$dokument->bezeichnung=$dokBezeichnung;
|
||||
|
||||
|
||||
if($dokument->saveDokument(true))
|
||||
{
|
||||
echo 'Dokument hinzugefügt';
|
||||
@@ -129,16 +143,16 @@ echo '<!DOCTYPE HTML>
|
||||
<script type="text/javascript" src="../../include/js/jquery.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#t1").tablesorter(
|
||||
{
|
||||
sortList: [[0,0]],
|
||||
widgets: ["zebra"],
|
||||
headers: {2:{sorter:false}}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
function showDocumentForm(dokument_kurzbz="",bezeichnung="",neu=true)
|
||||
{
|
||||
document.getElementById("dokument_kurzbz").value=dokument_kurzbz;
|
||||
@@ -149,7 +163,11 @@ echo '<!DOCTYPE HTML>
|
||||
document.getElementById("dokument_kurzbz").readOnly=true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function confdel()
|
||||
{
|
||||
return confirm("Wollen Sie diesen Eintrag wirklich löschen?");
|
||||
}
|
||||
</script>
|
||||
<title>Zuordnung Studiengang - Dokumente</title>
|
||||
</head>
|
||||
@@ -167,7 +185,7 @@ if(isset($_GET['action']) && $_GET['action']=='dokumenttypen')
|
||||
$dokument = new dokument();
|
||||
if(!$dokument->deleteDokumenttyp($_GET['dokument_kurzbz']))
|
||||
echo $dokument->errormsg;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
if(isset($_POST['saveDokumenttyp']))
|
||||
@@ -180,6 +198,22 @@ if(isset($_GET['action']) && $_GET['action']=='dokumenttypen')
|
||||
else
|
||||
$neu=false;
|
||||
|
||||
$bezeichnung_mehrsprachig=array();
|
||||
foreach($sprache->result as $row_sprache)
|
||||
{
|
||||
if(isset($_POST['bezeichnung_mehrsprachig_'.$row_sprache->sprache]))
|
||||
$bezeichnung_mehrsprachig[$row_sprache->sprache]=$_POST['bezeichnung_mehrsprachig_'.$row_sprache->sprache];
|
||||
}
|
||||
$dokument->bezeichnung_mehrsprachig = $bezeichnung_mehrsprachig;
|
||||
|
||||
$dokumentbeschreibung_mehrsprachig=array();
|
||||
foreach($sprache->result as $row_sprache)
|
||||
{
|
||||
if(isset($_POST['dokumentbeschreibung_mehrsprachig_'.$row_sprache->sprache]))
|
||||
$dokumentbeschreibung_mehrsprachig[$row_sprache->sprache]=$_POST['dokumentbeschreibung_mehrsprachig_'.$row_sprache->sprache];
|
||||
}
|
||||
$dokument->dokumentbeschreibung_mehrsprachig = $dokumentbeschreibung_mehrsprachig;
|
||||
|
||||
if(!$dokument->saveDokument($neu))
|
||||
echo $dokument->errormsg;
|
||||
}
|
||||
@@ -188,7 +222,7 @@ if(isset($_GET['action']) && $_GET['action']=='dokumenttypen')
|
||||
$dokument->getAllDokumente();
|
||||
|
||||
echo '
|
||||
<form action="'.$_SERVER['PHP_SELF'].'?action=dokumenttypen" method="post">
|
||||
|
||||
<table id="t1" class="tablesorter" style="width:auto">
|
||||
<thead>
|
||||
<th></th>
|
||||
@@ -203,7 +237,7 @@ if(isset($_GET['action']) && $_GET['action']=='dokumenttypen')
|
||||
<td>
|
||||
<a href="'.$_SERVER['PHP_SELF'].'?action=dokumenttypen&type=edit&dokument_kurzbz='.$row->dokument_kurzbz.'"><img src="../../skin/images/edit.png" title="Bearbeiten" /></a>
|
||||
';
|
||||
// Lichtbil und Zeugnis duerfen nicht geloescht werden da diese fuer Bildupload und
|
||||
// Lichtbil und Zeugnis duerfen nicht geloescht werden da diese fuer Bildupload und
|
||||
// Zeugnisarchivierung verwendet werden
|
||||
if(!in_array($row->dokument_kurzbz,array('Lichtbil','Zeugnis')))
|
||||
echo '<a href="'.$_SERVER['PHP_SELF'].'?action=dokumenttypen&type=delete&dokument_kurzbz='.$row->dokument_kurzbz.'"><img src="../../skin/images/cross.png" title="Löschen" /></a>';
|
||||
@@ -211,7 +245,7 @@ if(isset($_GET['action']) && $_GET['action']=='dokumenttypen')
|
||||
echo '
|
||||
</td>
|
||||
<td>'.$row->dokument_kurzbz.'</td>
|
||||
<td>'.$row->bezeichnung.'</td>
|
||||
<td>'.$row->bezeichnung.'</td>
|
||||
</tr>';
|
||||
}
|
||||
|
||||
@@ -230,17 +264,49 @@ if(isset($_GET['action']) && $_GET['action']=='dokumenttypen')
|
||||
|
||||
echo '
|
||||
</tbody>
|
||||
<tfoot>
|
||||
</table>
|
||||
<form action="'.$_SERVER['PHP_SELF'].'?action=dokumenttypen" method="post">
|
||||
<table>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>Kurzbezeichnung</td>
|
||||
<td>
|
||||
<input typ="text" id="dokument_kurzbz" name="dokument_kurzbz" maxlength="8" size="8" '.($dokument_kurzbz!=''?'readonly':'').' value="'.$dokument_kurzbz.'"/>
|
||||
<input type="hidden" id="neu" name="neu" value="'.($dokument_kurzbz==''?'true':'false').'" />
|
||||
</td>
|
||||
<td><input type="text" id="dokument_bezeichnung" name="dokument_bezeichnung" maxlength="128" value="'.$dokument_bezeichnung.'">
|
||||
<input type="submit" name="saveDokumenttyp" value="Speichern"></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tr>
|
||||
<td>Bezeichnung</td>
|
||||
<td>
|
||||
<input type="text" id="dokument_bezeichnung" name="dokument_bezeichnung" size="50" maxlength="128" value="'.$dokument_bezeichnung.'">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Bezeichnung Mehrsprachig</td>
|
||||
<td></td>
|
||||
</tr>';
|
||||
foreach($sprache->result as $s)
|
||||
{
|
||||
echo '<tr><td>'.$s->sprache.'</td><td>';
|
||||
echo '<input type="text" maxlength="128" size="50" name="bezeichnung_mehrsprachig_'.$s->sprache.'" value="'.(isset($dokument->bezeichnung_mehrsprachig[$s->sprache])?$db->convert_html_chars($dokument->bezeichnung_mehrsprachig[$s->sprache]):'').'" />';
|
||||
}
|
||||
echo '
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Dokumentbeschreibung Mehrsprachig</td>
|
||||
<td></td>
|
||||
</tr>';
|
||||
foreach($sprache->result as $s)
|
||||
{
|
||||
echo '<tr><td>'.$s->sprache.'</td><td>';
|
||||
echo '<textarea cols="50" name="dokumentbeschreibung_mehrsprachig_'.$s->sprache.'" >'.(isset($dokument->dokumentbeschreibung_mehrsprachig[$s->sprache])?$db->convert_html_chars($dokument->dokumentbeschreibung_mehrsprachig[$s->sprache]):'').'</textarea></td></tr>';
|
||||
}
|
||||
|
||||
echo '
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><input type="submit" name="saveDokumenttyp" value="Speichern"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>';
|
||||
}
|
||||
@@ -295,10 +361,21 @@ else
|
||||
<td>'.$dok->bezeichnung.'</td>
|
||||
<td><a href="'.$_SERVER['PHP_SELF'].'?action=toggleonline&dokument_kurzbz='.$dok->dokument_kurzbz.'&stg_kz='.$stg_kz.'"><img src="../../skin/images/'.$checked_onlinebewerbung.'.png" /></a></td>
|
||||
<td><a href="'.$_SERVER['PHP_SELF'].'?action=togglepflicht&dokument_kurzbz='.$dok->dokument_kurzbz.'&stg_kz='.$stg_kz.'"><img src="../../skin/images/'.$checked_pflicht.'.png" /></a></td>
|
||||
<td><a href="'.$_SERVER['PHP_SELF'].'?action=delete&dokument_kurzbz='.$dok->dokument_kurzbz.'&stg_kz='.$stg_kz.'">Zuordnung löschen</a></td>
|
||||
<td>
|
||||
<a href="'.$_SERVER['PHP_SELF'].'?action=edit&dokument_kurzbz='.$dok->dokument_kurzbz.'&stg_kz='.$stg_kz.'"><img src="../../skin/images/edit.png" title="Zuordnung bearbeiten" size="17px" /></a>
|
||||
<a href="'.$_SERVER['PHP_SELF'].'?action=delete&dokument_kurzbz='.$dok->dokument_kurzbz.'&stg_kz='.$stg_kz.'" onclick="return confdel()"><img src="../../skin/images/delete.png" title="Zuordnung löschen" height="17px"/></a>
|
||||
</td>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
|
||||
$dok = new dokument();
|
||||
if($action=='edit')
|
||||
{
|
||||
if(!$dok->loadDokumentStudiengang($dokument_kurzbz, $stg_kz))
|
||||
die('Failed to load:'.$dok->errormsg);
|
||||
}
|
||||
|
||||
echo '
|
||||
</tbody>
|
||||
<tfoot>
|
||||
@@ -306,18 +383,28 @@ else
|
||||
<td><select name="dokument_kurzbz">';
|
||||
$dokAll=new dokument();
|
||||
$dokAll->getAllDokumente();
|
||||
foreach($dokAll->result as $dok)
|
||||
foreach($dokAll->result as $dok_row)
|
||||
{
|
||||
if(!in_array($dok->dokument_kurzbz,$zugewieseneDokumente))
|
||||
echo '<option value="'.$dok->dokument_kurzbz.'">'.$dok->bezeichnung.'</option>';
|
||||
if($dok->dokument_kurzbz==$dok_row->dokument_kurzbz)
|
||||
echo '<option value="'.$dok_row->dokument_kurzbz.'" selected="selected">'.$dok_row->bezeichnung.'</option>';
|
||||
elseif(!in_array($dok_row->dokument_kurzbz,$zugewieseneDokumente))
|
||||
echo '<option value="'.$dok_row->dokument_kurzbz.'">'.$dok_row->bezeichnung.'</option>';
|
||||
}
|
||||
echo '</select></td>
|
||||
<td><input type="checkbox" name="onlinebewerbung" checked></td>
|
||||
<td>
|
||||
<input type="hidden" name="pflicht" value="0">
|
||||
<input type="checkbox" name="pflicht" value="1" checked>
|
||||
echo '</select>';
|
||||
echo '<table>';
|
||||
foreach($sprache->result as $s)
|
||||
{
|
||||
echo '<tr><td>Beschreibung '.$s->sprache.'</td><td>';
|
||||
echo '<textarea cols="50" name="beschreibung_mehrsprachig_'.$s->sprache.'" >'.(isset($dok->beschreibung_mehrsprachig[$s->sprache])?$db->convert_html_chars($dok->beschreibung_mehrsprachig[$s->sprache]):'').'</textarea></td></tr>';
|
||||
}
|
||||
echo '</table>';
|
||||
echo '</td>
|
||||
<td valign="top">
|
||||
<input type="checkbox" name="onlinebewerbung" '.($dok->onlinebewerbung?'checked="checked"':'').'></td>
|
||||
<td valign="top">
|
||||
<input type="checkbox" name="pflicht" '.($dok->pflicht?'checked="checked"':'').'>
|
||||
</td>
|
||||
<td><input type="submit" name="add" value="Hinzufügen"></td>
|
||||
<td valign="top"><input type="submit" name="add" value="Hinzufügen"></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user