diff --git a/cms/admin.php b/cms/admin.php
index a3fd40e65..4edb324ec 100644
--- a/cms/admin.php
+++ b/cms/admin.php
@@ -26,6 +26,7 @@ require_once('../include/functions.inc.php');
require_once('../include/sprache.class.php');
require_once('../include/gruppe.class.php');
require_once('../include/xsdformprinter/xsdformprinter.php');
+require_once('../include/organisationseinheit.class.php');
$user = get_uid();
?>
@@ -60,7 +61,8 @@ $user = get_uid();
width: 420,
heigth: 400,
resizable: "yes",
- close_previous: "no"
+ close_previous: "no",
+ popup_css : false
},{
window: win,
input: field_name
@@ -110,6 +112,31 @@ if(isset($_GET['method']))
{
switch($_GET['method'])
{
+ case 'add_new_content':
+ $oe = new organisationseinheit();
+ $oe->getAll();
+ if(!isset($oe->result[0]))
+ die('Es ist keine Organisationseinheit vorhanden');
+
+ $template = new template();
+ $template->getAll();
+ if(!isset($template->result[0]))
+ die('Es ist kein Template vorhanden');
+
+ $content = new content();
+ $content->new = true;
+ $content->oe_kurzbz=$oe->result[0]->oe_kurzbz;
+ $content->template_kurzbz=$template->result[0]->template_kurzbz;
+ $content->titel = 'Neuer Eintrag';
+ $content->content = '';
+ $content->sichtbar=false;
+ $content->version='0';
+ $content->sprache='German';
+ $content->insertvon = $user;
+ $content->insertamum = date('Y-m-d H:i:s');
+
+ $content->save();
+ break;
case 'rights_add_group':
if(!isset($_POST['gruppe_kurzbz']))
die('Fehlender Parameter');
@@ -137,6 +164,43 @@ if(isset($_GET['method']))
$message .= 'Gruppe wurde erfolgreich entfernt';
break;
+ case 'prefs_save':
+ $content = new content();
+ $titel = $_POST['titel'];
+ $oe_kurzbz=$_POST['oe_kurzbz'];
+ $sichtbar=isset($_POST['sichtbar']);
+
+ if($content->getContent($content_id, $sprache, $version))
+ {
+ $content->titel = $titel;
+ $content->oe_kurzbz = $oe_kurzbz;
+ $content->sichtbar = $sichtbar;
+ $content->updateamum=date('Y-m-d H:i:s');
+ $content->updatevon=$user;
+
+ if($content->save())
+ $message.='Daten erfolgreich gespeichert';
+ else
+ $message.=''.$content->errormsg.'';
+ }
+ else
+ $message.=''.$content->errormsg.'';
+ break;
+ case 'childs_add':
+ $content = new content();
+ $content->content_id = $content_id;
+ $content->child_content_id = $_POST['child_content_id'];
+ $content->insertamum = date('Y-m-d');
+ $content->insertvon = $user;
+ if($content->addChild())
+ $message.='Daten erfolgreich gespeichert';
+ else
+ $message.=''.$content->errormsg.'';
+ break;
+ case 'childs_delete':
+ $content = new content();
+ $content->deleteChild($content_id, $_GET['child_content_id']);
+ break;
default: break;
}
}
@@ -154,7 +218,7 @@ echo '
$db = new basis_db();
echo '
-Neuen Eintrag hinzufügen
+Neuen Eintrag hinzufügen
';
$qry = "SELECT * FROM (
@@ -168,18 +232,19 @@ $qry = "SELECT * FROM (
ORDER BY contentchild_id, titel";
if($result = $db->db_query($qry))
{
- echo '';
+
while($row = $db->db_fetch_object($result))
{
-
+ echo '
';
$content = new content();
echo '| ';
drawmenulink($row->content_id, $row->titel);
echo ' | ';
drawsubmenu($row->content_id);
+ echo '
';
}
- echo '';
+
}
echo '
';
@@ -193,13 +258,16 @@ if(!is_null($content_id))
echo ' | Inhalt';
echo ' | Vorschau';
echo ' | Rechte';
+ echo ' | Childs';
echo ''.$message.'
';
echo '
';
switch($action)
{
- case 'prefs': break;
+ case 'prefs':
+ print_prefs();
+ break;
case 'content':
print_content();
break;
@@ -209,6 +277,9 @@ if(!is_null($content_id))
case 'rights':
print_rights();
break;
+ case 'childs':
+ print_childs();
+ break;
default: break;
}
@@ -221,7 +292,7 @@ echo '
-
-File 1
-File 2
-File 3
-File 4
-
+Dokument Auswählen
+
+
+
+ Kategorie: ';
+$dms = new dms();
+$dms->getKategorie();
+foreach($dms->result as $row)
+{
+ if($kategorie_kurzbz=='')
+ $kategorie_kurzbz=$row->kategorie_kurzbz;
+ echo ''.$row->bezeichnung.' ';
+}
+echo ' | ';
+$dms = new dms();
+$dms->getDocuments($kategorie_kurzbz);
+$mimetypes=array('application/pdf'=>'pdf.ico',
+ 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'=>'word2007.jpg',
+ 'application/vnd.openxmlformats-officedocument.presentationml.presentation'=>'x-office-presentation.png',
+ 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'=>'excel.gif',
+ 'application/zip'=>'zippic.jpg');
+foreach($dms->result as $row)
+{
+ echo '';
+}
+echo ' |
';
+echo '
Neue Datei hochladen';
+?>