| 1 |
joko |
1.1 |
<html> |
| 2 |
|
|
<body> |
| 3 |
|
|
<!-- |
| 4 |
|
|
Id: index.tpl,v 1.1 2003/01/30 17:18:24 cain Exp |
| 5 |
|
|
$Id: index.tpl,v 1.1 2003/01/30 17:18:24 cain Exp $ |
| 6 |
|
|
--> |
| 7 |
|
|
|
| 8 |
|
|
<style> |
| 9 |
|
|
td\{padding:5px;\} |
| 10 |
|
|
</style> |
| 11 |
|
|
|
| 12 |
|
|
{if(@$methodCall)} |
| 13 |
|
|
<font color="red"> |
| 14 |
|
|
{if( @$methodFailed )} |
| 15 |
|
|
ERROR |
| 16 |
|
|
{else} |
| 17 |
|
|
OK |
| 18 |
|
|
<br> |
| 19 |
|
|
call: ${$methodCall}<br> |
| 20 |
|
|
method returned: {print_r($result)} |
| 21 |
|
|
</font> |
| 22 |
|
|
|
| 23 |
|
|
<form action="{$_SERVER['PHP_SELF']}" method="post" name="myForm"> |
| 24 |
|
|
<input type="hidden" name="fid" value="{$_REQUEST['fid']}"> |
| 25 |
|
|
|
| 26 |
|
|
<table border="1" align="left"> |
| 27 |
|
|
<tr> |
| 28 |
|
|
<td colspan="3"> |
| 29 |
|
|
path<br> |
| 30 |
|
|
{foreach( $path as $index=>$aFolder )} |
| 31 |
|
|
<a href="{$_SERVER['PHP_SELF']}?fid={$aFolder['id']}">{$aFolder['name']}</a> / |
| 32 |
|
|
</td> |
| 33 |
|
|
</tr> |
| 34 |
|
|
|
| 35 |
|
|
<tr> |
| 36 |
|
|
<td rowspan="20" valign="top"> |
| 37 |
|
|
children<br> |
| 38 |
|
|
{foreach( $children as $aChild )} |
| 39 |
|
|
<a href="{$_SERVER['PHP_SELF']}?fid={$aChild['id']}">{$aChild['name']}</a><br> |
| 40 |
|
|
</td> |
| 41 |
|
|
|
| 42 |
|
|
<!-- |
| 43 |
|
|
| add folder |
| 44 |
|
|
+--> |
| 45 |
|
|
<th colspan="2"> |
| 46 |
|
|
<input type="hidden" name="parentId" value="{$aFolder['id']}"> |
| 47 |
|
|
add folder under '{$aFolder['name']}' |
| 48 |
|
|
</th> |
| 49 |
|
|
</tr> |
| 50 |
|
|
|
| 51 |
|
|
<tr> |
| 52 |
|
|
<td> </td> |
| 53 |
|
|
<td> |
| 54 |
|
|
<select name="prevId"> |
| 55 |
|
|
{%copy block childrenAsOptions here %} |
| 56 |
|
|
</select> |
| 57 |
|
|
</td> |
| 58 |
|
|
</tr> |
| 59 |
|
|
<tr> |
| 60 |
|
|
<td>name</td> |
| 61 |
|
|
<td><input name="newData[name]"></td> |
| 62 |
|
|
</tr> |
| 63 |
|
|
<tr> |
| 64 |
|
|
<td>comment</td> |
| 65 |
|
|
<td><textarea name="newData[comment]" cols="50" rows="3"></textarea></td> |
| 66 |
|
|
</tr> |
| 67 |
|
|
<tr> |
| 68 |
|
|
<td colspan="2" align="center"><input type="submit" name="action_add" value="add"></td> |
| 69 |
|
|
</tr> |
| 70 |
|
|
|
| 71 |
|
|
<!-- |
| 72 |
|
|
| remove folder |
| 73 |
|
|
+--> |
| 74 |
|
|
<tr> |
| 75 |
|
|
<th colspan="2"> |
| 76 |
|
|
remove folder |
| 77 |
|
|
</th> |
| 78 |
|
|
</tr> |
| 79 |
|
|
<tr> |
| 80 |
|
|
<td>name</td> |
| 81 |
|
|
<td> |
| 82 |
|
|
<select name="removeId" onChange="updateComment(this.value)"> |
| 83 |
|
|
{%copy block childrenAsRemoveOptions here %} |
| 84 |
|
|
</select> |
| 85 |
|
|
</td> |
| 86 |
|
|
</tr> |
| 87 |
|
|
<tr> |
| 88 |
|
|
<td>comment</td> |
| 89 |
|
|
<td><textarea name="removeData[comment]" cols="50" rows="3" readonly></textarea></td> |
| 90 |
|
|
</tr> |
| 91 |
|
|
<tr> |
| 92 |
|
|
<td colspan="2" align="center"><input type="submit" name="action_remove" value="remove"></td> |
| 93 |
|
|
</tr> |
| 94 |
|
|
<!-- |
| 95 |
|
|
| update folder |
| 96 |
|
|
+--> |
| 97 |
|
|
<tr> |
| 98 |
|
|
<th colspan="2"> |
| 99 |
|
|
update folder |
| 100 |
|
|
</th> |
| 101 |
|
|
</tr> |
| 102 |
|
|
<tr> |
| 103 |
|
|
<td>name</td> |
| 104 |
|
|
<td> |
| 105 |
|
|
<select name="updateId" onChange="updateComment(this.value)"> |
| 106 |
|
|
{%copy block childrenAsRemoveOptions here %} |
| 107 |
|
|
</select> |
| 108 |
|
|
</td> |
| 109 |
|
|
</tr> |
| 110 |
|
|
<tr> |
| 111 |
|
|
<td>name</td> |
| 112 |
|
|
<td><input name="updateData[name]"></td> |
| 113 |
|
|
</tr> |
| 114 |
|
|
<tr> |
| 115 |
|
|
<td>comment</td> |
| 116 |
|
|
<td><textarea name="updateData[comment]" cols="50" rows="3"></textarea></td> |
| 117 |
|
|
</tr> |
| 118 |
|
|
<tr> |
| 119 |
|
|
<td colspan="2" align="center"><input type="submit" name="action_update" value="update"></td> |
| 120 |
|
|
</tr> |
| 121 |
|
|
<!-- |
| 122 |
|
|
| move folder |
| 123 |
|
|
+--> |
| 124 |
|
|
<tr> |
| 125 |
|
|
<th colspan="2"> |
| 126 |
|
|
move folder |
| 127 |
|
|
</th> |
| 128 |
|
|
</tr> |
| 129 |
|
|
<tr> |
| 130 |
|
|
<td>name</td> |
| 131 |
|
|
<td> |
| 132 |
|
|
<select name="move_id"> |
| 133 |
|
|
{%copy block treeAsOptions here %} |
| 134 |
|
|
</select> |
| 135 |
|
|
under parent |
| 136 |
|
|
<select name="move_newParentId"> |
| 137 |
|
|
<option value="0"></option> |
| 138 |
|
|
{%copy block treeAsOptions here %} |
| 139 |
|
|
</select> |
| 140 |
|
|
or behind |
| 141 |
|
|
<select name="move_newPrevId"> |
| 142 |
|
|
<option value="0"></option> |
| 143 |
|
|
{%copy block treeAsOptions here %} |
| 144 |
|
|
</select> |
| 145 |
|
|
</td> |
| 146 |
|
|
</tr> |
| 147 |
|
|
<tr> |
| 148 |
|
|
<td colspan="2" align="center"><input type="submit" name="action_move" value="move"></td> |
| 149 |
|
|
</tr> |
| 150 |
|
|
</table> |
| 151 |
|
|
|
| 152 |
|
|
the entire tree:<br><br> |
| 153 |
|
|
{foreach($entireTree as $aNode)} |
| 154 |
|
|
|
| 155 |
|
|
{%repeat $aNode['level']%} |
| 156 |
|
|
- |
| 157 |
|
|
<a href="{$_SERVER['PHP_SELF']}?fid={$aNode['id']}">{$aNode['name']}</a> |
| 158 |
|
|
(id={$aNode['id']})<br> |
| 159 |
|
|
|
| 160 |
|
|
|
| 161 |
|
|
</form> |
| 162 |
|
|
|
| 163 |
|
|
<script> |
| 164 |
|
|
function updateComment(id) |
| 165 |
|
|
\{ |
| 166 |
|
|
var comments = new Array(); |
| 167 |
|
|
{foreach( $children as $aChild )} |
| 168 |
|
|
comments[{$aChild['id']}] = "{echo addslashes($aChild['comment'])}"; |
| 169 |
|
|
document.myForm["updateData[comment]"].value = comments[id]; |
| 170 |
|
|
document.myForm["removeData[comment]"].value = comments[id]; |
| 171 |
|
|
\} |
| 172 |
|
|
</script> |
| 173 |
|
|
|
| 174 |
|
|
</body> |
| 175 |
|
|
</html> |
| 176 |
|
|
|
| 177 |
|
|
|
| 178 |
|
|
|
| 179 |
|
|
|
| 180 |
|
|
|
| 181 |
|
|
|
| 182 |
|
|
|
| 183 |
|
|
|
| 184 |
|
|
{%block childrenAsOptions%} |
| 185 |
|
|
<option value="0">as first</option> |
| 186 |
|
|
{foreach( $children as $aChild )} |
| 187 |
|
|
<option value="{$aChild['id']}">after '{$aChild['name']}'</option> |
| 188 |
|
|
{%/block%} |
| 189 |
|
|
|
| 190 |
|
|
|
| 191 |
|
|
{%block childrenAsRemoveOptions%} |
| 192 |
|
|
{foreach( $children as $aChild )} |
| 193 |
|
|
<option value="{$aChild['id']}">{$aChild['name']}</option> |
| 194 |
|
|
{%/block%} |
| 195 |
|
|
|
| 196 |
|
|
{%block treeAsOptions%} |
| 197 |
|
|
{foreach( $entireTree as $aNode )} |
| 198 |
|
|
<option value="{$aNode['id']}"> |
| 199 |
|
|
{%repeat $aNode['level']%} |
| 200 |
|
|
- |
| 201 |
|
|
{$aNode['name']} |
| 202 |
|
|
</option> |
| 203 |
|
|
{%/block%} |
| 204 |
|
|
|