Revision 944
Added by Matthias almost 16 years ago
index.php | ||
---|---|---|
58 | 58 |
} |
59 | 59 |
} |
60 | 60 |
var plus = new Image; |
61 |
plus.src = "<?php echo ADMIN_URL; ?>/images/plus_16.png";
|
|
61 |
plus.src = "<?php echo THEME_URL; ?>/images/plus_16.png";
|
|
62 | 62 |
var minus = new Image; |
63 |
minus.src = "<?php echo ADMIN_URL; ?>/images/minus_16.png";
|
|
63 |
minus.src = "<?php echo THEME_URL; ?>/images/minus_16.png";
|
|
64 | 64 |
function toggle_plus_minus(id) { |
65 | 65 |
var img_src = document.images['plus_minus_' + id].src; |
66 | 66 |
if(img_src == plus.src) { |
... | ... | |
71 | 71 |
} |
72 | 72 |
</script> |
73 | 73 |
|
74 |
<style type="text/css"> |
|
75 |
.pages_list img { |
|
76 |
display: block; |
|
77 |
} |
|
78 |
ul, li { |
|
79 |
list-style: none; |
|
80 |
margin: 0; |
|
81 |
padding: 0; |
|
82 |
} |
|
83 |
.page_list { |
|
84 |
display: none; |
|
85 |
} |
|
86 |
</style> |
|
87 |
|
|
88 |
<noscript> |
|
89 |
<style type="text/css"> |
|
90 |
.page_list { |
|
91 |
display: block; |
|
92 |
} |
|
93 |
</style> |
|
94 |
</noscript> |
|
95 | 74 |
<?php |
96 | 75 |
|
97 | 76 |
function make_list($parent, $editable_pages) { |
98 | 77 |
// Get objects and vars from outside this function |
99 | 78 |
global $admin, $template, $database, $TEXT, $MESSAGE, $HEADING; |
100 | 79 |
?> |
101 |
<ul id="p<?php echo $parent; ?>" <?php if($parent != 0) { echo 'class="page_list" '; if(isset($_COOKIE["p".$parent]) && $_COOKIE["p".$parent] =="1"){echo'style="display:block;"'; }} ?>>
|
|
80 |
<ul id="p<?php echo $parent; ?>" <?php if($parent != 0) { echo 'class="page_list" '; if(isset($_COOKIE['p'.$parent]) && $_COOKIE['p'.$parent] == '1'){ echo 'style="display:block"'; }} ?>>
|
|
102 | 81 |
<?php |
103 | 82 |
// Get page list from database |
104 | 83 |
$database = new database(); |
... | ... | |
159 | 138 |
$num_pages = $get_pages->numRows(); |
160 | 139 |
?> |
161 | 140 |
|
162 |
<li id="p<?php echo $page['parent']; ?>" style="padding: 2px 0px 2px 0px;">
|
|
163 |
<table width="720" cellpadding="1" cellspacing="0" border="0" style="background-color: #ECF3F7;">
|
|
164 |
<tr onmouseover="this.style.backgroundColor = '#F1F8DD'" onmouseout="this.style.backgroundColor = '#ECF3F7'">
|
|
165 |
<td width="20" style="padding-left: <?php echo $page['level']*20; ?>px;">
|
|
141 |
<li id="p<?php echo $page['parent']; ?>"> |
|
142 |
<table class="pages_view">
|
|
143 |
<tr> |
|
144 |
<td width="20" style="padding-left: <?php if($page['level'] > 0){ echo $page['level']*20; } else { echo '7'; } ?>px;">
|
|
166 | 145 |
<?php |
167 | 146 |
if($display_plus == true) { |
168 | 147 |
?> |
169 | 148 |
<a href="javascript: toggle_visibility('p<?php echo $page['page_id']; ?>');" title="<?php echo $TEXT['EXPAND'].'/'.$TEXT['COLLAPSE']; ?>"> |
170 |
<img src="<?php echo ADMIN_URL; ?>/images/<?php if(isset($_COOKIE["p".$page['page_id']]) && $_COOKIE["p".$page['page_id']] =="1"){echo"minus";}else{echo"plus";}?>_16.png" onclick="toggle_plus_minus('<?php echo $page['page_id']; ?>');" name="plus_minus_<?php echo $page['page_id']; ?>" border="0" alt="+" />
|
|
149 |
<img src="<?php echo THEME_URL; ?>/images/<?php if(isset($_COOKIE['p'.$page['page_id']]) && $_COOKIE['p'.$page['page_id']] == '1'){ echo 'minus'; } else { echo 'plus'; } ?>_16.png" onclick="toggle_plus_minus('<?php echo $page['page_id']; ?>');" name="plus_minus_<?php echo $page['page_id']; ?>" border="0" alt="+" />
|
|
171 | 150 |
</a> |
172 | 151 |
<?php |
173 | 152 |
} |
... | ... | |
177 | 156 |
<td> |
178 | 157 |
<a href="<?php echo ADMIN_URL; ?>/pages/modify.php?page_id=<?php echo $page['page_id']; ?>" title="<?php echo $TEXT['MODIFY']; ?>"> |
179 | 158 |
<?php if($page['visibility'] == 'public') { ?> |
180 |
<img src="<?php echo ADMIN_URL; ?>/images/visible_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['PUBLIC']; ?>" border="0" align="left" style="margin-right: 5px" />
|
|
159 |
<img src="<?php echo THEME_URL; ?>/images/visible_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['PUBLIC']; ?>" class="page_list_rights" />
|
|
181 | 160 |
<?php } elseif($page['visibility'] == 'private') { ?> |
182 |
<img src="<?php echo ADMIN_URL; ?>/images/private_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['PRIVATE']; ?>" border="0" align="left" style="margin-right: 5px" />
|
|
161 |
<img src="<?php echo THEME_URL; ?>/images/private_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['PRIVATE']; ?>" class="page_list_rights" />
|
|
183 | 162 |
<?php } elseif($page['visibility'] == 'registered') { ?> |
184 |
<img src="<?php echo ADMIN_URL; ?>/images/keys_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['REGISTERED']; ?>" border="0" align="left" style="margin-right: 5px" />
|
|
163 |
<img src="<?php echo THEME_URL; ?>/images/keys_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['REGISTERED']; ?>" class="page_list_rights" />
|
|
185 | 164 |
<?php } elseif($page['visibility'] == 'hidden') { ?> |
186 |
<img src="<?php echo ADMIN_URL; ?>/images/hidden_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['HIDDEN']; ?>" border="0" align="left" style="margin-right: 5px" />
|
|
165 |
<img src="<?php echo THEME_URL; ?>/images/hidden_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['HIDDEN']; ?>" class="page_list_rights" />
|
|
187 | 166 |
<?php } elseif($page['visibility'] == 'none') { ?> |
188 |
<img src="<?php echo ADMIN_URL; ?>/images/none_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['NONE']; ?>" border="0" align="left" style="margin-right: 5px" />
|
|
167 |
<img src="<?php echo THEME_URL; ?>/images/none_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['NONE']; ?>" class="page_list_rights" />
|
|
189 | 168 |
<?php } elseif($page['visibility'] == 'deleted') { ?> |
190 |
<img src="<?php echo ADMIN_URL; ?>/images/deleted_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['DELETED']; ?>" border="0" align="left" style="margin-right: 5px" />
|
|
169 |
<img src="<?php echo THEME_URL; ?>/images/deleted_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['DELETED']; ?>" class="page_list_rights" />
|
|
191 | 170 |
<?php } |
192 |
echo ($page['page_title']); ?>
|
|
171 |
echo '<div class="modify_link">'.($page['page_title']).'</div>'; ?>
|
|
193 | 172 |
</a> |
194 | 173 |
</td> |
195 | 174 |
<?php } else { ?> |
196 | 175 |
<td> |
197 | 176 |
<?php if($page['visibility'] == 'public') { ?> |
198 |
<img src="<?php echo ADMIN_URL; ?>/images/visible_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['PUBLIC']; ?>" border="0" align="left" style="margin-right: 5px" />
|
|
177 |
<img src="<?php echo THEME_URL; ?>/images/visible_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['PUBLIC']; ?>" class="page_list_rights" />
|
|
199 | 178 |
<?php } elseif($page['visibility'] == 'private') { ?> |
200 |
<img src="<?php echo ADMIN_URL; ?>/images/private_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['PRIVATE']; ?>" border="0" align="left" style="margin-right: 5px" />
|
|
179 |
<img src="<?php echo THEME_URL; ?>/images/private_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['PRIVATE']; ?>" class="page_list_rights" />
|
|
201 | 180 |
<?php } elseif($page['visibility'] == 'registered') { ?> |
202 |
<img src="<?php echo ADMIN_URL; ?>/images/keys_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['REGISTERED']; ?>" border="0" align="left" style="margin-right: 5px" />
|
|
181 |
<img src="<?php echo THEME_URL; ?>/images/keys_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['REGISTERED']; ?>" class="page_list_rights" />
|
|
203 | 182 |
<?php } elseif($page['visibility'] == 'hidden') { ?> |
204 |
<img src="<?php echo ADMIN_URL; ?>/images/hidden_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['HIDDEN']; ?>" border="0" align="left" style="margin-right: 5px" />
|
|
183 |
<img src="<?php echo THEME_URL; ?>/images/hidden_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['HIDDEN']; ?>" class="page_list_rights" />
|
|
205 | 184 |
<?php } elseif($page['visibility'] == 'none') { ?> |
206 |
<img src="<?php echo ADMIN_URL; ?>/images/none_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['NONE']; ?>" border="0" align="left" style="margin-right: 5px" />
|
|
185 |
<img src="<?php echo THEME_URL; ?>/images/none_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['NONE']; ?>" class="page_list_rights" />
|
|
207 | 186 |
<?php } elseif($page['visibility'] == 'deleted') { ?> |
208 |
<img src="<?php echo ADMIN_URL; ?>/images/deleted_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['DELETED']; ?>" border="0" align="left" style="margin-right: 5px" />
|
|
187 |
<img src="<?php echo THEME_URL; ?>/images/deleted_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['DELETED']; ?>" class="page_list_rights" />
|
|
209 | 188 |
<?php } |
210 | 189 |
echo ($page['page_title']); ?> |
211 | 190 |
</td> |
... | ... | |
216 | 195 |
<td width="20"> |
217 | 196 |
<?php if($page['visibility'] != 'deleted' AND $page['visibility'] != 'none') { ?> |
218 | 197 |
<a href="<?php echo $admin->page_link($page['link']); ?>" target="_blank" title="<?php echo $TEXT['VIEW']; ?>"> |
219 |
<img src="<?php echo ADMIN_URL; ?>/images/view_16.png" border="0" alt="<?php echo $TEXT['VIEW']; ?>" />
|
|
198 |
<img src="<?php echo THEME_URL; ?>/images/view_16.png" border="0" alt="<?php echo $TEXT['VIEW']; ?>" />
|
|
220 | 199 |
</a> |
221 | 200 |
<?php } ?> |
222 | 201 |
</td> |
... | ... | |
224 | 203 |
<?php if($page['visibility'] != 'deleted') { ?> |
225 | 204 |
<?php if($admin->get_permission('pages_settings') == true AND $can_modify == true) { ?> |
226 | 205 |
<a href="<?php echo ADMIN_URL; ?>/pages/settings.php?page_id=<?php echo $page['page_id']; ?>" title="<?php echo $TEXT['SETTINGS']; ?>"> |
227 |
<img src="<?php echo ADMIN_URL; ?>/images/modify_16.png" border="0" alt="<?php echo $TEXT['SETTINGS']; ?>" />
|
|
206 |
<img src="<?php echo THEME_URL; ?>/images/modify_16.png" border="0" alt="<?php echo $TEXT['SETTINGS']; ?>" />
|
|
228 | 207 |
</a> |
229 | 208 |
<?php } ?> |
230 | 209 |
<?php } else { ?> |
231 | 210 |
<a href="<?php echo ADMIN_URL; ?>/pages/restore.php?page_id=<?php echo $page['page_id']; ?>" title="<?php echo $TEXT['RESTORE']; ?>"> |
232 |
<img src="<?php echo ADMIN_URL; ?>/images/restore_16.png" border="0" alt="<?php echo $TEXT['RESTORE']; ?>" />
|
|
211 |
<img src="<?php echo THEME_URL; ?>/images/restore_16.png" border="0" alt="<?php echo $TEXT['RESTORE']; ?>" />
|
|
233 | 212 |
</a> |
234 | 213 |
<?php } ?> |
235 | 214 |
</td> |
236 | 215 |
<!-- MANAGE SECTIONS AND DATES BUTTONS --> |
216 |
|
|
217 |
<!-- 'MANAGE SECTIONS' BUTTON --> |
|
237 | 218 |
<td width="20"> |
219 |
<?php |
|
220 |
// Work-out if we should show the "manage sections" link |
|
221 |
$query_sections = $database->query("SELECT section_id FROM ".TABLE_PREFIX."sections WHERE page_id = '" . $page['page_id'] . "' AND module = 'menu_link'"); |
|
222 |
if(($query_sections->numRows() == 0) && (MANAGE_SECTIONS == 'enabled')) { |
|
223 |
?> |
|
224 |
<a href="<?php echo ADMIN_URL; ?>/pages/sections.php?page_id=<?php echo $page['page_id']; ?>" title="<?php echo $HEADING['MANAGE_SECTIONS']; ?>"> |
|
225 |
<img src="<?php echo THEME_URL; ?>/images/sections_16.png" border="0" alt="<?php echo $HEADING['MANAGE_SECTIONS']; ?>" /> |
|
226 |
</a> |
|
227 |
<?php } ?> |
|
228 |
</td> |
|
229 |
|
|
230 |
<td width="20"> |
|
238 | 231 |
<?php |
239 | 232 |
// Work-out if we should show the "manage dates" link |
240 | 233 |
if(MANAGE_SECTIONS == 'enabled' && $admin->get_permission('pages_modify')==true && $can_modify==true) { |
... | ... | |
251 | 244 |
$file=$admin->page_is_active($page)?"clock_16.png":"clock_red_16.png"; |
252 | 245 |
?> |
253 | 246 |
<a href="<?php echo ADMIN_URL; ?>/pages/sections.php?page_id=<?php echo $page['page_id']; ?>" title="<?php echo $HEADING['MANAGE_SECTIONS']; ?>"> |
254 |
<img src="<?php echo ADMIN_URL."/images/$file"; ?>" border="0" alt="<?php echo $HEADING['MANAGE_SECTIONS']; ?>" />
|
|
247 |
<img src="<?php echo THEME_URL."/images/$file"; ?>" border="0" alt="<?php echo $HEADING['MANAGE_SECTIONS']; ?>" />
|
|
255 | 248 |
</a> |
256 | 249 |
<?php } else { ?> |
257 | 250 |
<a href="<?php echo ADMIN_URL; ?>/pages/sections.php?page_id=<?php echo $page['page_id']; ?>" title="<?php echo $HEADING['MANAGE_SECTIONS']; ?>"> |
258 |
<img src="<?php echo ADMIN_URL; ?>/images/noclock_16.png" border="0" alt="<?php echo $HEADING['MANAGE_SECTIONS']; ?>" /></a>
|
|
251 |
<img src="<?php echo THEME_URL; ?>/images/noclock_16.png" border="0" alt="<?php echo $HEADING['MANAGE_SECTIONS']; ?>" /></a>
|
|
259 | 252 |
<?php } ?> |
260 | 253 |
<?php } ?> |
261 | 254 |
<?php } ?> |
... | ... | |
265 | 258 |
<?php if($page['visibility'] != 'deleted') { ?> |
266 | 259 |
<?php if($admin->get_permission('pages_settings') == true AND $can_modify == true) { ?> |
267 | 260 |
<a href="<?php echo ADMIN_URL; ?>/pages/move_up.php?page_id=<?php echo $page['page_id']; ?>" title="<?php echo $TEXT['MOVE_UP']; ?>"> |
268 |
<img src="<?php echo ADMIN_URL; ?>/images/up_16.png" border="0" alt="^" />
|
|
261 |
<img src="<?php echo THEME_URL; ?>/images/up_16.png" border="0" alt="^" />
|
|
269 | 262 |
</a> |
270 | 263 |
<?php } ?> |
271 | 264 |
<?php } ?> |
... | ... | |
276 | 269 |
<?php if($page['visibility'] != 'deleted') { ?> |
277 | 270 |
<?php if($admin->get_permission('pages_settings') == true AND $can_modify == true) { ?> |
278 | 271 |
<a href="<?php echo ADMIN_URL; ?>/pages/move_down.php?page_id=<?php echo $page['page_id']; ?>" title="<?php echo $TEXT['MOVE_DOWN']; ?>"> |
279 |
<img src="<?php echo ADMIN_URL; ?>/images/down_16.png" border="0" alt="v" />
|
|
272 |
<img src="<?php echo THEME_URL; ?>/images/down_16.png" border="0" alt="v" />
|
|
280 | 273 |
</a> |
281 | 274 |
<?php } ?> |
282 | 275 |
<?php } ?> |
... | ... | |
285 | 278 |
<td width="20"> |
286 | 279 |
<?php if($admin->get_permission('pages_delete') == true AND $can_modify == true) { ?> |
287 | 280 |
<a href="javascript: confirm_link('<?php echo $MESSAGE['PAGES']['DELETE_CONFIRM']; ?>?', '<?php echo ADMIN_URL; ?>/pages/delete.php?page_id=<?php echo $page['page_id']; ?>');" title="<?php echo $TEXT['DELETE']; ?>"> |
288 |
<img src="<?php echo ADMIN_URL; ?>/images/delete_16.png" border="0" alt="X" />
|
|
281 |
<img src="<?php echo THEME_URL; ?>/images/delete_16.png" border="0" alt="X" />
|
|
289 | 282 |
</a> |
290 | 283 |
<?php } ?> |
291 | 284 |
</td> |
... | ... | |
321 | 314 |
if($query_trash->numRows() > 0) { |
322 | 315 |
?> |
323 | 316 |
<a href="<?php echo ADMIN_URL; ?>/pages/trash.php"> |
324 |
<img src="<?php echo ADMIN_URL; ?>/images/delete_16.png" alt="<?php echo $TEXT['PAGE_TRASH']; ?>" border="0" />
|
|
317 |
<img src="<?php echo THEME_URL; ?>/images/delete_16.png" alt="<?php echo $TEXT['PAGE_TRASH']; ?>" border="0" />
|
|
325 | 318 |
<?php echo $TEXT['VIEW_DELETED_PAGES']; ?></a> |
326 | 319 |
<?php |
327 | 320 |
} |
... | ... | |
331 | 324 |
</tr> |
332 | 325 |
</table> |
333 | 326 |
<div class="pages_list"> |
334 |
<table cellpadding="0" cellspacing="0" width="720px" border="0">
|
|
327 |
<table cellpadding="0" cellspacing="0" border="0"> |
|
335 | 328 |
<tr> |
336 | 329 |
<td width="20px"> |
337 | 330 |
|
... | ... | |
360 | 353 |
} |
361 | 354 |
|
362 | 355 |
// Setup template object |
363 |
$template = new Template(ADMIN_PATH.'/pages');
|
|
364 |
$template->set_file('page', 'template.html');
|
|
356 |
$template = new Template(THEME_PATH.'/templates');
|
|
357 |
$template->set_file('page', 'pages.htt');
|
|
365 | 358 |
$template->set_block('page', 'main_block', 'main'); |
366 | 359 |
|
367 | 360 |
// Figure out if the no pages found message should be shown or not |
... | ... | |
517 | 510 |
if($can_modify == true) { |
518 | 511 |
$template->set_var('DISABLED', ''); |
519 | 512 |
} else { |
520 |
$template->set_var('DISABLED', ' disabled="disabled" style="color: #aaa;"');
|
|
513 |
$template->set_var('DISABLED', ' disabled="disabled" class="disabled"');
|
|
521 | 514 |
} |
522 | 515 |
$template->parse('page_list2', 'page_list_block2', true); |
523 | 516 |
} |
Also available in: Unified diff
added skinable Admin Interface