Subversion-Projekte lars-tiefland.content-management

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
 
3
    //$Id: projekt_ort.php 3931 2011-09-16 08:17:57Z tiefland $
4
 
5
    /**
6
     * @author Lars Tiefland <tiefland@weban.de>
7
     * @copyright 2008 Webagentur Niewerth
8
     * @package Content-management
9
     * @subpackage Projekttool
10
     * @version $Rev: 3931 $
11
     * @license propietary
12
     * @filesource
13
     *
14
     */
15
 
16
    /**
17
     *
18
     * @author Lars Tiefland <tiefland@weban.de>
19
     * @copyright 2008 Webagentur Niewerth
20
     */
21
 
22
    require_once  "includes/common.php";
23
 
24
    if ( $projekt_recht )
25
    {
26
        switch ( $_POST["action"] )
27
        {
28
            case "new":
29
                $GLOBALS["ui"]->assign( "action", "save" );
30
                $GLOBALS["ui"]->display( "projekt_ort_new.tpl" );
31
                break;
32
            case "save":
33
            case "update":
34
                $po = new Projekt_Ort();
35
                $po->update( $_POST["po_id"], $_POST["po_name"] );
36
                $res = $po->save( $_POST["action"] );
37
                //if($res)
38
                {
39
                    $projekt_orte = Projekt_Ort::getProjektOrte();
40
                    $GLOBALS["ui"]->assign( "projekt_orte", $projekt_orte );
41
                    $GLOBALS["ui"]->display( "projekt_ort.tpl" );
42
                }
43
                break;
44
            case "view":
45
            case "edit":
46
                $po = new Projekt_Ort( $_POST["id"] );
47
                $GLOBALS["ui"]->assign( "projekt_ort", $po );
48
                $GLOBALS["ui"]->assign( "id", $po->po_id );
49
                $GLOBALS["ui"]->assign( "view", ($_POST["action"] == "view") ? true : false );
50
                $GLOBALS["ui"]->assign( "action", "update" );
51
 
52
                $GLOBALS["ui"]->display( ($_POST["action"] == "edit") ? "projekt_ort_new.tpl" :
53
                    "projekt_ort_view.tpl" );
54
                break;
55
            case "delete":
56
                $po = new Projekt_Ort( $_POST["id"] );
57
                $res = $po->save( "delete" );
58
                //if($res)
59
                {
60
                    $projekt_orte = Projekt_Ort::getProjektOrte();
61
                    $GLOBALS["ui"]->assign( "projekt_orte", $projekt_orte );
62
                    $GLOBALS["ui"]->display( "projekt_ort.tpl" );
63
                }
64
                break;
65
            default:
66
                $projekt_orte = Projekt_Ort::getProjektOrte();
67
                $GLOBALS["ui"]->assign( "projekt_orte", $projekt_orte );
68
                $GLOBALS["ui"]->display( "projekt_ort.tpl" );
69
                break;
70
        }
71
    }
72
    else
73
    {
74
        die( "Sie haben nicht das Recht dieses Tool zu nuten!" );
75
    }
76
 
77
?>