Revision 1707
Added by Dietmar about 12 years ago
index.php | ||
---|---|---|
4 | 4 |
* @category admin |
5 | 5 |
* @package pages |
6 | 6 |
* @author Ryan Djurovich, WebsiteBaker Project |
7 |
* @copyright 2009-2011, Website Baker Org. e.V.
|
|
7 |
* @copyright 2009-2012, Website Baker Org. e.V.
|
|
8 | 8 |
* @link http://www.websitebaker2.org/ |
9 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
10 | 10 |
* @platform WebsiteBaker 2.8.x |
... | ... | |
24 | 24 |
// Include the WB functions file |
25 | 25 |
require_once(WB_PATH.'/framework/functions.php'); |
26 | 26 |
// eggsurplus: add child pages for a specific page |
27 |
?> |
|
28 |
<script type="text/javascript" src="<?php print ADMIN_URL; ?>/pages/eggsurplus.js"></script> |
|
27 |
/**/ |
|
28 |
|
|
29 |
?> |
|
30 |
<script type="text/javascript" src="<?php print ADMIN_URL; ?>/pages/eggsurplus.js"></script> |
|
29 | 31 |
<?php |
30 |
|
|
31 | 32 |
// fixes A URI contains impermissible characters or quotes around the URI are not closed. |
32 | 33 |
$MESSAGE['PAGES_DELETE_CONFIRM'] = url_encode( $MESSAGE['PAGES_DELETE_CONFIRM'] ); |
33 | 34 |
|
... | ... | |
55 | 56 |
function make_list($parent = 0, $editable_pages = 0) { |
56 | 57 |
// Get objects and vars from outside this function |
57 | 58 |
global $admin, $template, $database, $TEXT, $MESSAGE, $HEADING, $par; |
58 |
|
|
59 |
static $row,$iLevel,$iOldLevel; |
|
60 |
static $aRowLevel = array(); |
|
59 | 61 |
print set_node ($parent,$par); |
60 | 62 |
|
61 | 63 |
// Get page list from database |
... | ... | |
129 | 131 |
} |
130 | 132 |
// Work out how many pages there are for this parent |
131 | 133 |
$num_pages = $get_pages->numRows(); |
132 |
?> |
|
133 |
<li class="p<?php echo $page['parent']; ?>"> |
|
134 |
<table summary="<?php echo $TEXT['EXPAND'].'/'.$TEXT['COLLAPSE']; ?>" class="pages_view" cellpadding="0" cellspacing="0"> |
|
135 |
<tr> |
|
136 |
<td valign="middle" width="20" style="padding-left: <?php if($page['level'] > 0){ echo $page['level']*20; } else { echo '7'; } ?>px;"> |
|
134 |
|
|
135 |
|
|
136 |
$row = $row ? 0 : 1; |
|
137 |
|
|
138 |
/* |
|
139 |
// look and set vars for first run |
|
140 |
$iOldLevel = !isset($iOldLevel) ? $page['level'] : $iOldLevel; |
|
141 |
$iOldLevel = $iOldLevel < $page['level'] ? $iOldLevel : $page['level']; |
|
142 |
// look for new sub |
|
143 |
if(!isset($aRowLevel[$page['level']])) |
|
144 |
{ |
|
145 |
$row = !$row ? 0 : $aRowLevel[$iOldLevel]; |
|
146 |
$aRowLevel[$page['level']] = $row ? $row : 0; |
|
147 |
$iOldLevel = $page['level']; |
|
148 |
// look level before |
|
149 |
} elseif($iLevel!=$iOldLevel) { |
|
150 |
$aRowLevel[$page['level']] = $aRowLevel[$iOldLevel] ? $aRowLevel[$iOldLevel] : $row ; |
|
151 |
$iOldLevel = $page['level']; |
|
152 |
// normal change |
|
153 |
} else { |
|
154 |
$aRowLevel[$page['level']] = $aRowLevel[$iLevel] ? $aRowLevel[$iLevel] : $row ; |
|
155 |
$iLevel = $page['level']; |
|
156 |
} |
|
157 |
// set and save level |
|
158 |
$aRowLevel[$page['level']] = $aRowLevel[$page['level']] ? 0 : 1; |
|
159 |
// final set $row |
|
160 |
$row = $aRowLevel[$page['level']]; |
|
161 |
*/ |
|
162 |
?> |
|
163 |
<li class="p<?php echo $page['parent']; ?>"> |
|
164 |
<table summary="<?php echo $TEXT['EXPAND'].'/'.$TEXT['COLLAPSE']; ?>" class="pages_view" cellpadding="0" cellspacing="0"> |
|
165 |
<tr class="row_<?php echo $row ?>"> |
|
166 |
<td valign="middle" width="20" style="padding-left: <?php echo $page['level']==0 ? 0 : ($page['level']*25)-pow($page['level'],2); ?>px;"> |
|
137 | 167 |
<?php |
138 | 168 |
if($display_plus == true) { |
139 |
?> |
|
140 |
<a href="javascript:toggle_visibility('p<?php echo $page['page_id']; ?>');" title="<?php echo $TEXT['EXPAND'].'/'.$TEXT['COLLAPSE']; ?>"> |
|
141 |
<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']; ?>" alt="+" /> |
|
169 |
?> |
|
170 |
<a href="javascript:toggle_visibility('p<?php echo $page['page_id']; ?>');" title="<?php echo $TEXT['EXPAND'].'/'.$TEXT['COLLAPSE']; ?>"> |
|
171 |
<span> |
|
172 |
<img src="<?php echo THEME_URL; ?>/images/<?php echo ( isset($_COOKIE['p'.$page['page_id']]) && $_COOKIE['p'.$page['page_id']] == '1') ?'minus' : 'plus'; ?>_16.png" onclick="toggle_plus_minus('<?php echo $page['page_id']; ?>');" name="plus_minus_<?php echo $page['page_id']; ?>" alt="+" /> |
|
173 |
</span> |
|
174 |
|
|
142 | 175 |
</a> |
143 | 176 |
<?php |
144 | 177 |
} |
145 |
?> |
|
178 |
?>
|
|
146 | 179 |
</td> |
147 |
<?php if($admin->get_permission('pages_modify') == true && $can_modify == true) { ?> |
|
180 |
<?php if($admin->get_permission('pages_modify') == true && $can_modify == true) { ?>
|
|
148 | 181 |
<td class="list_menu_title"> |
149 |
<a href="<?php echo ADMIN_URL; ?>/pages/modify.php?page_id=<?php echo $page['page_id']; ?>" title="<?php echo $TEXT['MODIFY']; ?>"> |
|
150 |
<?php if($page['visibility'] == 'public') { ?> |
|
151 |
<img src="<?php echo THEME_URL; ?>/images/visible_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['PUBLIC']; ?>" class="page_list_rights" /> |
|
152 |
<?php } elseif($page['visibility'] == 'private') { ?> |
|
153 |
<img src="<?php echo THEME_URL; ?>/images/private_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['PRIVATE']; ?>" class="page_list_rights" /> |
|
154 |
<?php } elseif($page['visibility'] == 'registered') { ?> |
|
155 |
<img src="<?php echo THEME_URL; ?>/images/keys_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['REGISTERED']; ?>" class="page_list_rights" /> |
|
156 |
<?php } elseif($page['visibility'] == 'hidden') { ?> |
|
157 |
<img src="<?php echo THEME_URL; ?>/images/hidden_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['HIDDEN']; ?>" class="page_list_rights" /> |
|
158 |
<?php } elseif($page['visibility'] == 'none') { ?> |
|
159 |
<img src="<?php echo THEME_URL; ?>/images/none_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['NONE']; ?>" class="page_list_rights" /> |
|
160 |
<?php } elseif($page['visibility'] == 'deleted') { ?> |
|
161 |
<img src="<?php echo THEME_URL; ?>/images/deleted_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['DELETED']; ?>" class="page_list_rights" /> |
|
182 |
<a href="<?php echo ADMIN_URL; ?>/pages/modify.php?page_id=<?php echo $page['page_id']; ?>" title="<?php echo $TEXT['MODIFY']; ?>"> |
|
183 |
<span> |
|
184 |
<?php if($page['visibility'] == 'public') { ?> |
|
185 |
<img src="<?php echo THEME_URL; ?>/images/visible_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['PUBLIC']; ?>" class="page_list_rights" /> |
|
186 |
<?php } elseif($page['visibility'] == 'private') { ?> |
|
187 |
<img src="<?php echo THEME_URL; ?>/images/private_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['PRIVATE']; ?>" class="page_list_rights" /> |
|
188 |
<?php } elseif($page['visibility'] == 'registered') { ?> |
|
189 |
<img src="<?php echo THEME_URL; ?>/images/keys_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['REGISTERED']; ?>" class="page_list_rights" /> |
|
190 |
<?php } elseif($page['visibility'] == 'hidden') { ?> |
|
191 |
<img src="<?php echo THEME_URL; ?>/images/hidden_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['HIDDEN']; ?>" class="page_list_rights" /> |
|
192 |
<?php } elseif($page['visibility'] == 'none') { ?> |
|
193 |
<img src="<?php echo THEME_URL; ?>/images/none_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['NONE']; ?>" class="page_list_rights" /> |
|
194 |
<?php } elseif($page['visibility'] == 'deleted') { ?> |
|
195 |
<img src="<?php echo THEME_URL; ?>/images/deleted_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['DELETED']; ?>" class="page_list_rights" /> |
|
162 | 196 |
<?php } |
163 |
echo '<span class="modify_link">'.($page['menu_title']).'</span>'; ?> |
|
197 |
echo '<span class="modify_link">'.($page['menu_title']).'</span>'; ?> |
|
198 |
</span> |
|
164 | 199 |
</a> |
165 | 200 |
</td> |
166 |
<?php } else { ?> |
|
201 |
<?php } else { ?>
|
|
167 | 202 |
<td class="list_menu_title"> |
168 |
<?php if($page['visibility'] == 'public') { ?> |
|
169 |
<img src="<?php echo THEME_URL; ?>/images/visible_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['PUBLIC']; ?>" class="page_list_rights" /> |
|
170 |
<?php } elseif($page['visibility'] == 'private') { ?> |
|
171 |
<img src="<?php echo THEME_URL; ?>/images/private_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['PRIVATE']; ?>" class="page_list_rights" /> |
|
172 |
<?php } elseif($page['visibility'] == 'registered') { ?> |
|
173 |
<img src="<?php echo THEME_URL; ?>/images/keys_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['REGISTERED']; ?>" class="page_list_rights" /> |
|
174 |
<?php } elseif($page['visibility'] == 'hidden') { ?> |
|
175 |
<img src="<?php echo THEME_URL; ?>/images/hidden_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['HIDDEN']; ?>" class="page_list_rights" /> |
|
176 |
<?php } elseif($page['visibility'] == 'none') { ?> |
|
177 |
<img src="<?php echo THEME_URL; ?>/images/none_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['NONE']; ?>" class="page_list_rights" /> |
|
178 |
<?php } elseif($page['visibility'] == 'deleted') { ?> |
|
179 |
<img src="<?php echo THEME_URL; ?>/images/deleted_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['DELETED']; ?>" class="page_list_rights" /> |
|
203 |
<span> |
|
204 |
<?php if($page['visibility'] == 'public') { ?> |
|
205 |
<img src="<?php echo THEME_URL; ?>/images/visible_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['PUBLIC']; ?>" class="page_list_rights" /> |
|
206 |
<?php } elseif($page['visibility'] == 'private') { ?> |
|
207 |
<img src="<?php echo THEME_URL; ?>/images/private_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['PRIVATE']; ?>" class="page_list_rights" /> |
|
208 |
<?php } elseif($page['visibility'] == 'registered') { ?> |
|
209 |
<img src="<?php echo THEME_URL; ?>/images/keys_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['REGISTERED']; ?>" class="page_list_rights" /> |
|
210 |
<?php } elseif($page['visibility'] == 'hidden') { ?> |
|
211 |
<img src="<?php echo THEME_URL; ?>/images/hidden_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['HIDDEN']; ?>" class="page_list_rights" /> |
|
212 |
<?php } elseif($page['visibility'] == 'none') { ?> |
|
213 |
<img src="<?php echo THEME_URL; ?>/images/none_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['NONE']; ?>" class="page_list_rights" /> |
|
214 |
<?php } elseif($page['visibility'] == 'deleted') { ?> |
|
215 |
<img src="<?php echo THEME_URL; ?>/images/deleted_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['DELETED']; ?>" class="page_list_rights" /> |
|
180 | 216 |
<?php } |
181 |
echo ($page['menu_title']); ?> |
|
217 |
echo '<span class="bold grey">'.($page['menu_title']).'</span>'; ?> |
|
218 |
</span> |
|
182 | 219 |
</td> |
183 |
<?php } ?> |
|
220 |
<?php } ?>
|
|
184 | 221 |
<td class="list_page_title"> |
185 |
<?php echo ($page['page_title']); ?> |
|
222 |
<?php echo ($page['page_title']); ?>
|
|
186 | 223 |
</td> |
187 |
<td class="list_page_id"> |
|
188 |
<?php echo $page['page_id']; ?> |
|
224 |
<td class="list_page_id right">
|
|
225 |
<?php echo $page['page_id']; ?>
|
|
189 | 226 |
</td> |
190 | 227 |
|
191 | 228 |
<td class="list_actions"> |
192 |
<?php if($page['visibility'] != 'deleted' && $page['visibility'] != 'none') { ?> |
|
193 |
<a href="<?php echo $admin->page_link($page['link']); ?>" target="_blank" title="<?php echo $TEXT['VIEW']; ?>">
|
|
194 |
<img src="<?php echo THEME_URL; ?>/images/view_16.png" alt="<?php echo $TEXT['VIEW']; ?>" />
|
|
229 |
<?php if($page['visibility'] != 'deleted' && $page['visibility'] != 'none') { ?>
|
|
230 |
<a href="<?php echo $admin->page_link($page['link']); ?>" target="_blank" title="<?php echo $TEXT['VIEW']; ?>">
|
|
231 |
<img src="<?php echo THEME_URL; ?>/images/view_16.png" alt="<?php echo $TEXT['VIEW']; ?>" />
|
|
195 | 232 |
</a> |
196 |
<?php } ?> |
|
233 |
<?php } ?>
|
|
197 | 234 |
</td> |
198 | 235 |
<td class="list_actions"> |
199 |
<?php if($page['visibility'] != 'deleted') { ?> |
|
200 |
<?php if($admin->get_permission('pages_settings') == true && $can_modify == true) { ?> |
|
201 |
<a href="<?php echo ADMIN_URL; ?>/pages/settings.php?page_id=<?php echo $page['page_id']; ?>" title="<?php echo $TEXT['SETTINGS']; ?>">
|
|
202 |
<img src="<?php echo THEME_URL; ?>/images/modify_16.png" alt="<?php echo $TEXT['SETTINGS']; ?>" />
|
|
236 |
<?php if($page['visibility'] != 'deleted') { ?>
|
|
237 |
<?php if($admin->get_permission('pages_settings') == true && $can_modify == true) { ?>
|
|
238 |
<a href="<?php echo ADMIN_URL; ?>/pages/settings.php?page_id=<?php echo $page['page_id']; ?>" title="<?php echo $TEXT['SETTINGS']; ?>">
|
|
239 |
<img src="<?php echo THEME_URL; ?>/images/modify_16.png" alt="<?php echo $TEXT['SETTINGS']; ?>" />
|
|
203 | 240 |
</a> |
204 |
<?php } ?> |
|
205 |
<?php } else { ?> |
|
206 |
<a href="<?php echo ADMIN_URL; ?>/pages/restore.php?page_id=<?php echo $page['page_id']; ?>" title="<?php echo $TEXT['RESTORE']; ?>">
|
|
207 |
<img src="<?php echo THEME_URL; ?>/images/restore_16.png" alt="<?php echo $TEXT['RESTORE']; ?>" />
|
|
241 |
<?php } ?>
|
|
242 |
<?php } else { ?>
|
|
243 |
<a href="<?php echo ADMIN_URL; ?>/pages/restore.php?page_id=<?php echo $page['page_id']; ?>" title="<?php echo $TEXT['RESTORE']; ?>">
|
|
244 |
<img src="<?php echo THEME_URL; ?>/images/restore_16.png" alt="<?php echo $TEXT['RESTORE']; ?>" />
|
|
208 | 245 |
</a> |
209 |
<?php } ?> |
|
246 |
<?php } ?>
|
|
210 | 247 |
</td> |
211 | 248 |
<!-- MANAGE SECTIONS AND DATES BUTTONS --> |
212 | 249 |
<td class="list_actions"> |
213 | 250 |
<?php |
214 | 251 |
// Work-out if we should show the "manage dates" link |
215 |
if(MANAGE_SECTIONS == 'enabled' && $admin->get_permission('pages_modify')==true && $can_modify==true)
|
|
252 |
if( (MANAGE_SECTIONS == true) && $admin->get_permission('pages_add')==true && $can_modify==true)
|
|
216 | 253 |
{ |
217 | 254 |
$sql = 'SELECT `publ_start`, `publ_end` FROM `'.TABLE_PREFIX.'sections` '; |
218 | 255 |
$sql .= 'WHERE `page_id` = '.$page['page_id'].' AND `module` != \'menu_link\' '; |
... | ... | |
231 | 268 |
if($mdate_display==1) |
232 | 269 |
{ |
233 | 270 |
$file=$admin->page_is_active($page)?"clock_16.png":"clock_red_16.png"; |
234 |
?> |
|
235 |
<a href="<?php echo ADMIN_URL; ?>/pages/sections.php?page_id=<?php echo $page['page_id']; ?>" title="<?php echo $HEADING['MANAGE_SECTIONS']; ?>">
|
|
236 |
<img src="<?php echo THEME_URL."/images/$file"; ?>" alt="<?php echo $HEADING['MANAGE_SECTIONS']; ?>" />
|
|
271 |
?>
|
|
272 |
<a href="<?php echo ADMIN_URL; ?>/pages/sections.php?page_id=<?php echo $page['page_id']; ?>" title="<?php echo $HEADING['MANAGE_SECTIONS']; ?>">
|
|
273 |
<img src="<?php echo THEME_URL."/images/$file"; ?>" alt="<?php echo $HEADING['MANAGE_SECTIONS']; ?>" />
|
|
237 | 274 |
</a> |
238 |
<?php } else { ?> |
|
239 |
<a href="<?php echo ADMIN_URL; ?>/pages/sections.php?page_id=<?php echo $page['page_id']; ?>" title="<?php echo $HEADING['MANAGE_SECTIONS']; ?>">
|
|
240 |
<img src="<?php echo THEME_URL; ?>/images/noclock_16.png" alt="<?php echo $HEADING['MANAGE_SECTIONS']; ?>" /></a>
|
|
241 |
<?php } ?> |
|
242 |
<?php } ?> |
|
243 |
<?php } ?> |
|
275 |
<?php } else { ?>
|
|
276 |
<a href="<?php echo ADMIN_URL; ?>/pages/sections.php?page_id=<?php echo $page['page_id']; ?>" title="<?php echo $HEADING['MANAGE_SECTIONS']; ?>">
|
|
277 |
<img src="<?php echo THEME_URL; ?>/images/noclock_16.png" alt="<?php echo $HEADING['MANAGE_SECTIONS']; ?>" /></a>
|
|
278 |
<?php } ?>
|
|
279 |
<?php } ?>
|
|
280 |
<?php } ?>
|
|
244 | 281 |
</td> |
245 | 282 |
<td class="list_actions"> |
246 |
<?php if($page['position'] != 1) { ?> |
|
247 |
<?php if($page['visibility'] != 'deleted') { ?> |
|
248 |
<?php if($admin->get_permission('pages_settings') == true && $can_modify == true) { ?> |
|
249 |
<a href="<?php echo ADMIN_URL; ?>/pages/move_up.php?page_id=<?php echo $page['page_id']; ?>" title="<?php echo $TEXT['MOVE_UP']; ?>">
|
|
250 |
<img src="<?php echo THEME_URL; ?>/images/up_16.png" alt="<?php echo $TEXT['MOVE_UP']; ?>" />
|
|
283 |
<?php if($page['position'] != 1) { ?>
|
|
284 |
<?php if($page['visibility'] != 'deleted') { ?>
|
|
285 |
<?php if($admin->get_permission('pages_settings') == true && $can_modify == true) { ?>
|
|
286 |
<a href="<?php echo ADMIN_URL; ?>/pages/move_up.php?page_id=<?php echo $page['page_id']; ?>" title="<?php echo $TEXT['MOVE_UP']; ?>">
|
|
287 |
<img src="<?php echo THEME_URL; ?>/images/up_16.png" alt="<?php echo $TEXT['MOVE_UP']; ?>" />
|
|
251 | 288 |
</a> |
252 |
<?php } ?> |
|
253 |
<?php } ?> |
|
254 |
<?php } ?> |
|
289 |
<?php } ?>
|
|
290 |
<?php } ?>
|
|
291 |
<?php } ?>
|
|
255 | 292 |
</td> |
256 | 293 |
<td class="list_actions"> |
257 |
<?php if($page['position'] != $num_pages) { ?> |
|
258 |
<?php if($page['visibility'] != 'deleted') { ?> |
|
259 |
<?php if($admin->get_permission('pages_settings') == true && $can_modify == true) { ?> |
|
260 |
<a href="<?php echo ADMIN_URL; ?>/pages/move_down.php?page_id=<?php echo $page['page_id']; ?>" title="<?php echo $TEXT['MOVE_DOWN']; ?>">
|
|
261 |
<img src="<?php echo THEME_URL; ?>/images/down_16.png" alt="<?php echo $TEXT['MOVE_DOWN']; ?>" />
|
|
294 |
<?php if($page['position'] != $num_pages) { ?>
|
|
295 |
<?php if($page['visibility'] != 'deleted') { ?>
|
|
296 |
<?php if($admin->get_permission('pages_settings') == true && $can_modify == true) { ?>
|
|
297 |
<a href="<?php echo ADMIN_URL; ?>/pages/move_down.php?page_id=<?php echo $page['page_id']; ?>" title="<?php echo $TEXT['MOVE_DOWN']; ?>">
|
|
298 |
<img src="<?php echo THEME_URL; ?>/images/down_16.png" alt="<?php echo $TEXT['MOVE_DOWN']; ?>" />
|
|
262 | 299 |
</a> |
263 |
<?php } ?> |
|
264 |
<?php } ?> |
|
265 |
<?php } ?> |
|
300 |
<?php } ?>
|
|
301 |
<?php } ?>
|
|
302 |
<?php } ?>
|
|
266 | 303 |
</td> |
267 | 304 |
<td class="list_actions"> |
268 |
<?php if($admin->get_permission('pages_delete') == true && $can_modify == true) { // add IdKey ?> |
|
269 |
<a href="javascript:confirm_link('<?php echo $MESSAGE['PAGES_DELETE_CONFIRM']; ?>?','<?php echo ADMIN_URL; ?>/pages/delete.php?page_id=<?php echo $admin->getIDKEY($page['page_id']); ?>');" title="<?php echo $TEXT['DELETE']; ?>">
|
|
270 |
<img src="<?php echo THEME_URL; ?>/images/delete_16.png" alt="<?php echo $TEXT['DELETE']; ?>" />
|
|
305 |
<?php if($admin->get_permission('pages_delete') == true && $can_modify == true) { // add IdKey ?>
|
|
306 |
<a href="javascript:confirm_link('<?php echo $MESSAGE['PAGES_DELETE_CONFIRM']; ?>?','<?php echo ADMIN_URL; ?>/pages/delete.php?page_id=<?php echo $admin->getIDKEY($page['page_id']); ?>');" title="<?php echo $TEXT['DELETE']; ?>">
|
|
307 |
<img src="<?php echo THEME_URL; ?>/images/delete_16.png" alt="<?php echo $TEXT['DELETE']; ?>" />
|
|
271 | 308 |
</a> |
272 |
<?php } ?> |
|
309 |
<?php } ?>
|
|
273 | 310 |
</td> |
274 | 311 |
<?php |
275 | 312 |
// eggsurplus: Add action to add a page as a child |
276 |
?> |
|
313 |
?>
|
|
277 | 314 |
<td class="list_actions"> |
278 |
<?php if(($admin->get_permission('pages_add')) == (true && $can_modify == true) && ($page['visibility'] != 'deleted')) { ?>
|
|
279 |
<a href="javascript:add_child_page('<?php echo $page['page_id']; ?>');" title="<?php echo $HEADING['ADD_CHILD_PAGE']; ?>">
|
|
280 |
<img src="<?php echo THEME_URL; ?>/images/siteadd.png" name="addpage_<?php echo $page['page_id']; ?>" alt="Add Child Page" />
|
|
315 |
<?php if(($admin->get_permission('pages_add')) == true && ($can_modify == true) && ($page['visibility'] != 'deleted')) { ?>
|
|
316 |
<a href="javascript:add_child_page('<?php echo $page['page_id']; ?>');" title="<?php echo $HEADING['ADD_CHILD_PAGE']; ?>">
|
|
317 |
<img src="<?php echo THEME_URL; ?>/images/siteadd.png" name="addpage_<?php echo $page['page_id']; ?>" alt="Add Child Page" />
|
|
281 | 318 |
</a> |
282 |
<?php } ?> |
|
319 |
<?php } ?>
|
|
283 | 320 |
</td> |
284 | 321 |
<?php |
285 | 322 |
// end [IC] jeggers 2009/10/14: Add action to add a page as a child |
286 |
?> |
|
287 |
|
|
323 |
?> |
|
288 | 324 |
</tr> |
289 | 325 |
</table> |
290 | 326 |
<?php |
... | ... | |
305 | 341 |
|
306 | 342 |
// Generate pages list |
307 | 343 |
if($admin->get_permission('pages_view') == true) { |
308 |
?> |
|
344 |
?>
|
|
309 | 345 |
<div class="jsadmin hide"></div> |
310 |
<table summary="<?php echo $HEADING['MODIFY_DELETE_PAGE']; ?>" cellpadding="0" cellspacing="0" width="100%"> |
|
346 |
<table summary="<?php echo $HEADING['MODIFY_DELETE_PAGE']; ?>" cellpadding="0" cellspacing="0" width="100%">
|
|
311 | 347 |
<tr> |
312 | 348 |
<td> |
313 |
<h2><?php echo $HEADING['MODIFY_DELETE_PAGE']; ?></h2>
|
|
349 |
<h2 class="left"><?php echo $HEADING['MODIFY_DELETE_PAGE']; ?></h2>
|
|
314 | 350 |
</td> |
315 | 351 |
<td align="right"></td> |
316 | 352 |
</tr> |
317 | 353 |
</table> |
318 | 354 |
<div class="pages_list"> |
319 |
<table summary="<?php echo $HEADING['MODIFY_DELETE_PAGE']; ?>" cellpadding="0" cellspacing="0"> |
|
355 |
<table summary="<?php echo $HEADING['MODIFY_DELETE_PAGE']; ?>" cellpadding="0" cellspacing="0">
|
|
320 | 356 |
<tr class="pages_list_header"> |
321 | 357 |
<td class="header_list_menu_title"> |
322 |
<?php echo $TEXT['VISIBILITY'] .' / ' .$TEXT['MENU_TITLE']; ?>: |
|
358 |
<?php echo $TEXT['VISIBILITY'] .' / ' .$TEXT['MENU_TITLE']; ?>:
|
|
323 | 359 |
</td> |
324 | 360 |
<td class="header_list_page_title"> |
325 |
<?php echo $TEXT['PAGE_TITLE']; ?>: |
|
361 |
<?php echo $TEXT['PAGE_TITLE']; ?>:
|
|
326 | 362 |
</td> |
327 | 363 |
<td class="header_list_page_id"> |
328 |
ID:
|
|
364 |
PID
|
|
329 | 365 |
</td> |
330 | 366 |
<td class="header_list_actions"> |
331 |
<?php echo $TEXT['ACTIONS']; ?>: |
|
367 |
<?php echo $TEXT['ACTIONS']; ?>:
|
|
332 | 368 |
</td> |
333 | 369 |
</tr> |
334 | 370 |
</table> |
... | ... | |
342 | 378 |
} else { |
343 | 379 |
$editable_pages = 0; |
344 | 380 |
} |
345 |
?></div><?php |
|
381 |
?></div><?php
|
|
346 | 382 |
|
347 | 383 |
if(intval($editable_pages) == 0 ) { |
348 |
?> |
|
384 |
?>
|
|
349 | 385 |
<div class="empty_list"> |
350 |
<?php echo $TEXT['NONE_FOUND']; ?> |
|
386 |
<?php echo $TEXT['NONE_FOUND']; ?>
|
|
351 | 387 |
</div> |
352 | 388 |
<?php |
353 | 389 |
} |
354 | 390 |
// Setup template object, parse vars to it, then parse it |
355 | 391 |
// Create new template object |
356 |
$template = new Template(dirname($admin->correct_theme_source('pages.htt'))); |
|
392 |
$template = new Template(dirname($admin->correct_theme_source('pages.htt')),'keep');
|
|
357 | 393 |
// $template->debug = true; |
358 | 394 |
$template->set_file('page', 'pages.htt'); |
359 | 395 |
$template->set_block('page', 'main_block', 'main'); |
... | ... | |
475 | 511 |
// Get user perms |
476 | 512 |
$admin_groups = explode(',', str_replace('_', '', $page['admin_groups'])); |
477 | 513 |
$admin_users = explode(',', str_replace('_', '', $page['admin_users'])); |
478 |
|
|
514 |
|
|
479 | 515 |
$in_group = FALSE; |
480 | 516 |
foreach($admin->get_groups_id() as $cur_gid) { |
481 | 517 |
if (in_array($cur_gid, $admin_groups)) { |
... | ... | |
571 | 607 |
'TEXT_ADMINISTRATORS' => $TEXT['ADMINISTRATORS'], |
572 | 608 |
'TEXT_PRIVATE_VIEWERS' => $TEXT['PRIVATE_VIEWERS'], |
573 | 609 |
'TEXT_REGISTERED_VIEWERS' => $TEXT['REGISTERED_VIEWERS'], |
574 |
'INTRO_LINK' => $MESSAGE['PAGES']['INTRO_LINK'],
|
|
610 |
'INTRO_LINK' => $MESSAGE['PAGES_INTRO_LINK'],
|
|
575 | 611 |
) |
576 | 612 |
); |
577 | 613 |
|
Also available in: Unified diff
! update folder admin/pages, admin/skel/htt
! change multi-dimensional arrays (variables) to similar arrays
! change default templates, change code to new templates