This commit is contained in:
Andreas Österreicher
2011-04-06 12:14:46 +00:00
parent affc12ab1b
commit 6bbdd30fb7
6 changed files with 60 additions and 32 deletions
+23 -4
View File
@@ -142,7 +142,15 @@ if(isset($_GET['method']))
$content->insertvon = $user;
$content->insertamum = date('Y-m-d H:i:s');
$content->save();
if($content->save())
{
$message .= '<span class="ok">Eintrag wurde erfolgreich angelegt</span>';
$action='prefs';
$content_id=$content->content_id;
}
else
$message .= '<span class="error">'.$content->errormsg.'</span>';
break;
case 'rights_add_group':
if(!isset($_POST['gruppe_kurzbz']))
@@ -207,8 +215,19 @@ if(isset($_GET['method']))
$message.='<span class="error">'.$content->errormsg.'</span>';
break;
case 'childs_delete':
$content = new content();
$content->deleteChild($content_id, $_GET['child_content_id']);
if(isset($_GET['contentchild_id']))
{
$contentchild_id = $_GET['contentchild_id'];
$content = new content();
if($content->deleteChild($contentchild_id))
$message.='<span class="ok">Zuordnung wurde erfolgreich entfernt</span>';
else
$message.='<span class="error">'.$content->errormsg.'</span>';
}
else
{
$message.='<span class="error">Fehler: ID wurde nicht uebergeben</span>';
}
break;
default: break;
}
@@ -373,7 +392,7 @@ function print_childs()
echo '<td>',$row->child_content_id,'</td>';
echo '<td>',$row->titel,'</td>';
echo '<td>
<a href="'.$_SERVER['PHP_SELF'].'?action=childs&content_id='.$content_id.'&sprache='.$sprache.'&version='.$version.'&child_content_id='.$row->child_content_id.'&method=childs_delete" title="entfernen">
<a href="'.$_SERVER['PHP_SELF'].'?action=childs&content_id='.$content_id.'&sprache='.$sprache.'&version='.$version.'&contentchild_id='.$row->contentchild_id.'&method=childs_delete" title="entfernen">
<img src="../skin/images/delete_x.png">
</a>
</td>';
+3 -2
View File
@@ -446,6 +446,7 @@ class content extends basis_db
{
$obj = new content();
$obj->contentchild_id = $row->contentchild_id;
$obj->content_id = $row->content_id;
$obj->child_content_id = $row->child_content_id;
$obj->titel = $row->titel;
@@ -501,9 +502,9 @@ class content extends basis_db
* @param $child_content_id
* @return boolean
*/
public function deleteChild($content_id, $child_content_id)
public function deleteChild($contentchild_id)
{
$qry = "DELETE FROM campus.tbl_contentchild WHERE content_id='".addslashes($content_id)."' AND child_content_id='".addslashes($child_content_id)."'";
$qry = "DELETE FROM campus.tbl_contentchild WHERE contentchild_id='".addslashes($contentchild_id)."'";
if($this->db_query($qry))
{
+7 -1
View File
@@ -38,6 +38,7 @@ class gruppe extends basis_db
public $generiert; // boolean
public $sichtbar; // boolean
public $aktiv; // boolean
public $content_visible=false; // boolean
public $updateamum; // timestamp
public $updatevon; // varchar(16)
public $insertamum; // timestamp
@@ -127,6 +128,7 @@ class gruppe extends basis_db
$this->beschreibung = $row->beschreibung;
$this->sichtbar = ($row->sichtbar=='t'?true:false);
$this->aktiv = ($row->aktiv=='t'?true:false);
$this->content_visible = ($row->content_visible=='t'?true:false);
$this->generiert = ($row->generiert=='t'?true:false);
$this->updateamum = $row->updateamum;
$this->updatevon = $row->updatevon;
@@ -173,6 +175,7 @@ class gruppe extends basis_db
$grp_obj->beschreibung = $row->beschreibung;
$grp_obj->sichtbar = ($row->sichtbar=='t'?true:false);
$grp_obj->aktiv = ($row->aktiv=='t'?true:false);
$grp_obj->content_visible = ($row->content_visible=='t'?true:false);
$grp_obj->generiert = ($row->generiert=='t'?true:false);
$grp_obj->updateamum = $row->updateamum;
$grp_obj->updatevon = $row->updatevon;
@@ -258,6 +261,7 @@ class gruppe extends basis_db
$grp_obj->beschreibung = $row->beschreibung;
$grp_obj->sichtbar = ($row->sichtbar=='t'?true:false);
$grp_obj->aktiv = ($row->aktiv=='t'?true:false);
$grp_obj->content_visible = ($row->content_visible=='t'?true:false);
$grp_obj->generiert = ($row->generiert=='t'?true:false);
$grp_obj->updateamum = $row->updateamum;
$grp_obj->updatevon = $row->updatevon;
@@ -370,7 +374,7 @@ class gruppe extends basis_db
$kurzbz = $this->gruppe_kurzbz;
$qry = 'INSERT INTO public.tbl_gruppe (gruppe_kurzbz, studiengang_kz, bezeichnung, semester, sort,
mailgrp, beschreibung, sichtbar, generiert, aktiv, lehre,
mailgrp, beschreibung, sichtbar, generiert, aktiv, lehre, content_visible,
updateamum, updatevon, insertamum, insertvon, orgform_kurzbz)
VALUES('.$this->addslashes($kurzbz).','.
$this->addslashes($this->studiengang_kz).','.
@@ -383,6 +387,7 @@ class gruppe extends basis_db
($this->generiert?'true':'false').','.
($this->aktiv?'true':'false').','.
($this->lehre?'true':'false').','.
($this->content_visible?'true':'false').','.
$this->addslashes($this->updateamum).','.
$this->addslashes($this->updatevon).','.
$this->addslashes($this->insertamum).','.
@@ -402,6 +407,7 @@ class gruppe extends basis_db
' generiert='.($this->generiert?'true':'false').','.
' aktiv='.($this->aktiv?'true':'false').','.
' lehre='.($this->lehre?'true':'false').','.
' content_visible='.($this->content_visible?'true':'false').','.
' updateamum='.$this->addslashes($this->updateamum).','.
' updatevon='.$this->addslashes($this->updatevon).','.
' orgform_kurzbz='.$this->addslashes($this->orgform_kurzbz).
+1 -1
View File
@@ -190,7 +190,7 @@ $menu=array
),
'Auswertung'=> array
(
'name'=>'Auswertung', 'opener'=>'true', 'hide'=>'true', 'permissions'=>array('admin','lv-plan','support'), 'image'=>'statistic.png',
'name'=>'Auswertung', 'opener'=>'true', 'hide'=>'true', 'permissions'=>array('admin','lv-plan','support','assistenz','wawi/inventar'), 'image'=>'statistic.png',
'link'=>'left.php?categorie=Auswertung', 'target'=>'nav',
/*
'Raumauslastung'=>array('name'=>'Raumauslastung...', 'link'=>'lehre/raumauslastung.php', 'target'=>'main'),
+25 -23
View File
@@ -57,21 +57,21 @@ $rechte = new benutzerberechtigung();
$rechte->getBerechtigungen($uid);
?>
<html>
<head>
<title>Gruppe-Verwaltung</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../skin/vilesci.css" type="text/css">
<link rel="stylesheet" href="../../include/js/tablesort/table.css" type="text/css">
<script src="../../include/js/tablesort/table.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">
function conf_del()
{
return confirm('Diese Gruppe wirklich löschen?');
}
</script>
</head>
<head>
<title>Gruppe-Verwaltung</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../skin/vilesci.css" type="text/css">
<link rel="stylesheet" href="../../include/js/tablesort/table.css" type="text/css">
<script src="../../include/js/tablesort/table.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">
function conf_del()
{
return confirm('Diese Gruppe wirklich löschen?');
}
</script>
</head>
<body>
<H2>Gruppen - Verwaltung</H2>
<H2>Gruppen - Verwaltung</H2>
<?php
if (isset($_POST['newFrm']) || isset($_GET['newFrm']))
@@ -158,6 +158,8 @@ function doSave()
$e->generiert=isset($_POST['generiert']);
$e->aktiv=isset($_POST['aktiv']);
$e->sort=$_POST['sort'];
$e->content_visible=isset($_POST['content_visible']);
if(!$e->save())
echo $e->errormsg;
}
@@ -193,7 +195,7 @@ function doEdit($kurzbz,$new=false)
</td>
</tr>
<tr>
<td><i>Studiengang</i><t/td>
<td><i>Studiengang</i></td>
<td>
<SELECT name="studiengang_kz">
<option value="-1">- auswählen -</option>
@@ -212,13 +214,14 @@ function doEdit($kurzbz,$new=false)
</SELECT>
</td>
</tr>
<tr><td><i>Semester</i><t/td><td><input type="text" name="semester" size="2" maxlength="1" value="<?php echo $e->semester ?>"></td></tr>
<tr><td><i>Mailgrp</i><t/td><td><input type='checkbox' name='mailgrp' <?php echo ($e->mailgrp?'checked':'');?>>
<tr><td><i>Sichtbar</i><t/td><td><input type='checkbox' name='sichtbar' <?php echo ($e->sichtbar?'checked':'');?>>
<tr><td><i>Generiert</i><t/td><td><input type='checkbox' name='generiert' <?php echo ($e->generiert?'checked':'');?>>
<tr><td><i>Aktiv</i><t/td><td><input type='checkbox' name='aktiv' <?php echo ($e->aktiv?'checked':'');?>>
<tr><td><i>Semester</i></td><td><input type="text" name="semester" size="2" maxlength="1" value="<?php echo $e->semester ?>"></td></tr>
<tr><td><i>Mailgrp</i></td><td><input type='checkbox' name='mailgrp' <?php echo ($e->mailgrp?'checked':'');?>>
<tr><td><i>Sichtbar</i></td><td><input type='checkbox' name='sichtbar' <?php echo ($e->sichtbar?'checked':'');?>>
<tr><td><i>Generiert</i></td><td><input type='checkbox' name='generiert' <?php echo ($e->generiert?'checked':'');?>>
<tr><td><i>Aktiv</i></td><td><input type='checkbox' name='aktiv' <?php echo ($e->aktiv?'checked':'');?>>
<tr><td><i>ContentVisible</i></td><td><input type='checkbox' name='content_visible' <?php echo ($e->content_visible?'checked':'');?>>
<tr>
<td><i>Sort</i><t/td><td><input type='text' name='sort' maxlength="4" value="<?php echo $e->sort;?>">
<td><i>Sort</i></td><td><input type='text' name='sort' maxlength="4" value="<?php echo $e->sort;?>">
</td>
</tr>
</table>
@@ -287,6 +290,5 @@ function getUebersicht()
}
?>
</body>
</html>
</html>
+1 -1
View File
@@ -54,7 +54,7 @@ echo '<h2>Statistik - '.$statistik->bezeichnung.'</h2>';
//Beschreibung zu der Statistik anzeigen
if($statistik->content_id!='')
{
echo "\n",'<a href="#" onclick="window.open(\'../../cms/content.php?content_id='.$statistik->content_id.'\', \'Beschreibung\', \'width=600,height=600\');">Beschreibung anzeigen</a><br><br>';
echo "\n",'<a href="#" onclick="window.open(\'../../cms/content.php?content_id='.$statistik->content_id.'\', \'Beschreibung\', \'width=600,height=600, scrollbars=yes\');">Beschreibung anzeigen</a><br><br>';
}
$variablenstring='';
$action='';