Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<!--
2
    $Id: index.tpl,v 1.1 2003/01/30 17:18:24 cain Exp $
3
-->
4
 
5
<html>
6
<body>
7
<style>
8
    body, table.simple
9
    \{
10
        font-family : verdana, geneva, arial;
11
        font-size : 11px;
12
        background-color: #DCDCDC;
13
    \}
14
    table,td, input
15
    \{
16
        background-color: white;
17
    \}
18
    input.button,img.button
19
    \{
20
        border: 1px outset black;
21
    \}
22
    td.selected
23
    \{
24
        background-color: lightblue;
25
    \}
26
    a
27
    \{
28
        color: red;
29
        text-decoration: none;
30
    \}
31
 
32
</style>
33
 
34
<form method="post" action="{$_SERVER['PHP_SELF']}">
35
 
36
    {if(@$session->action == 'cut')}
37
        <img src="cut"> &nbsp;
38
        <img src="copy"> &nbsp;
39
    {else}
40
        <input id="cut" src="cut" name="action_cut" type="image" class="button" onmousedown="document.getElementById('cut').style.border='1px inset black'" alt="cut" name="cut" title="cut"> &nbsp;
41
        <input id="copy" src="copy" name="action_copy" type="image" class="button" onmousedown="document.getElementById('copy').style.border='1px inset black'" title="copy"> &nbsp;
42
    <input id="paste" src="paste" name="action_paste" type="image" class="button" onmousedown="document.getElementById('paste').style.border='1px inset black'" title="paste"> &nbsp;
43
 
44
    <img src="" width="1" height="22" class="button"> &nbsp;
45
 
46
    {if(@$session->action == 'cut')}
47
        <img src="delete"> &nbsp;
48
    {else}
49
        <input id="delete" src="delete" name="action_delete" type="image" class="button" onmousedown="document.getElementById('delete').style.border='1px inset black'" title="delete">
50
 
51
    &nbsp;
52
    <img src="" width="1" height="22" class="button"> &nbsp;
53
 
54
    &nbsp;
55
    work on: &nbsp;
56
    <input type="submit" value="DB" name="use_DB">
57
    &nbsp;
58
    <input type="submit" value="Filesystem" name="use_Filesystem">
59
    &nbsp;
60
    <input type="submit" value="XML" name="use_XML">
61
    &nbsp;
62
    <input type="submit" value="Array" name="use_Array">
63
 
64
    <br><br>
65
 
66
    current tree instanciation used:
67
    <code>
68
    {if( @$session->use == 'DB' )}
69
        $tree = new treeClass( 'DBnested' , 'mysql://root@localhost/test' , array('table'=&gt;TABLE_TREE , 'order' =&gt;  'name') );
70
    {else}
71
        $tree = new treeClass( 'Filesystem' , '/home/cain/tmp' ,array('order' =&gt;  'name') );
72
    </code>
73
 
74
    <hr>
75
 
76
    <table align="left">
77
        {foreach( $allVisibleFolders as $aFolder )}
78
            { $class=''}
79
            {if( in_array($aFolder['id'],$session->data) )}
80
                { $class=' class="selected"'}
81
            <tr>
82
                <td {$class}>
83
                    {if( @$session->action == 'cut')}
84
                        <input type="radio" name="moveDest" value="{$aFolder['id']}">
85
                    {else}
86
                        <input type="checkbox" name="selectedNodes[]" value="{$aFolder['id']}">
87
                </td>
88
                <td {$class}>
89
                    {%tree_showNode($aFolder)%}
90
                </td>
91
            </tr>
92
    </table>
93
 
94
    {if( @$session->action!='cut' )}
95
        <table class="simple" border="1">
96
            <tr>
97
                <th colspan="2">Add Folder</th>
98
            </tr>
99
            <tr>
100
                <td colspan="2">
101
                    Choose the parent folder on the left side,
102
                    <br>
103
                    under which the new folder shall be created!
104
                </td>
105
            </tr>
106
            <tr>
107
                <td>Name</td>
108
                <td>
109
                    <input name="newFolder[name]">
110
                </td>
111
            </tr>
112
            <tr>
113
                <td>&nbsp;</td>
114
                <td>
115
                    <input type="submit" name="action_add" value="add">
116
                </td>
117
            </tr>
118
        </table>
119
 
120
 
121
 
122
    {if(@$session->action=='cut')}
123
        You have chosen 'CUT', those folders are in the clipboard now.<br>
124
        Please select the destination and push the 'PASTE' button! <img class="button" src="paste">
125
        <br>
126
    {if(@$session->action=='copy')}
127
        You have chosen 'COPY', those folders are in the clipboard now.<br>
128
        Please select the destination and push the 'PASTE' button! <img class="button" src="paste"><br>
129
        Or choose other folder(s) that you want to put in the clipboard.
130
        <br>
131
 
132
 
133
    {if(@$results)}
134
        <font color="red">
135
            {if( @$methodFailed )}
136
                ERROR
137
            {else}
138
                OK
139
            <br>
140
        </font>
141
        {if(sizeof($methodCalls))}
142
            <table class="simple" border="1">
143
                <tr>
144
                    <th>methods called</th>
145
                    <th>returned</th>
146
                </tr>
147
                {foreach( $methodCalls as $key=>$aCall)}
148
                    <tr>
149
                        <td nowrap>{$aCall}</td>
150
                        <td align="center">
151
                            {if(PEAR::isError($results[$key]))}
152
                                <font color="red">{$results[$key]->getMessage()}</font>
153
                                <br>
154
                            {print_r($results[$key])}
155
                        </td>
156
                    </tr>
157
            </table>
158
        {else}
159
            <font color="red">
160
                {print_r($results)}
161
            </font>
162
 
163
 
164
 
165
 
166
</form>
167
 
168
<script type="text/javascript" language="JavaScript" src="{$config->vApplRoot}/external/calendar/popcalendar.js.php"></script>
169
 
170
</body>
171
</html>
172
 
173
 
174
 
175
 
176
 
177
 
178
 
179
<!--
180
    this macro shows a node for the explorer view
181
 
182
    @param  array   the current project
183
-->
184
{%macro tree_showNode($aNode)%}
185
    {global $tree,$session}
186
 
187
    {%repeat $aNode['level'] times%}
188
        &nbsp; &nbsp;
189
 
190
    {if( $tree->hasChildren($aNode['id']) )}
191
        <a href="{$_SERVER['PHP_SELF']}?unfold={$aNode['id']}">
192
            {if(@$session->temp->openProjectFolders[$aNode['id']])}
193
                <img src="openFolder" border="0"></a>
194
            {else}
195
                <img src="closedFolder" border="0"></a>
196
    {else}
197
        <img src="folder">
198
 
199
    &nbsp;
200
    <b>
201
        {if( $tree->getRootId() == $aNode['id'] )}
202
            ...{echo substr($aNode['name'],-28)}
203
        {else}
204
            {$aNode['name']}
205
    </b>
206
 
207
    {if( $tree->getRootId() == $aNode['id'] )}
208
        &nbsp; <a href="{$_SERVER['PHP_SELF']}?unfoldAll=true" title="unfold all">++</a>