Revision 1707
Added by Dietmar about 12 years ago
sections.php | ||
---|---|---|
3 | 3 |
* |
4 | 4 |
* @category admin |
5 | 5 |
* @package pages |
6 |
* @author WebsiteBaker Project |
|
7 |
* @copyright 2004-2009, Ryan Djurovich |
|
8 |
* @copyright 2009-2011, Website Baker Org. e.V. |
|
6 |
* @author Ryan Djurovich, WebsiteBaker Project |
|
7 |
* @copyright 2009-2012, WebsiteBaker Org. e.V. |
|
9 | 8 |
* @link http://www.websitebaker2.org/ |
10 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
11 | 10 |
* @platform WebsiteBaker 2.8.x |
... | ... | |
149 | 148 |
if((!$in_old_group) && !is_numeric(array_search($admin->get_user_id(), $old_admin_users))) |
150 | 149 |
{ |
151 | 150 |
$admin->print_header(); |
152 |
$admin->print_error($MESSAGE['PAGES']['INSUFFICIENT_PERMISSIONS']);
|
|
151 |
$admin->print_error($MESSAGE['PAGES_INSUFFICIENT_PERMISSIONS']);
|
|
153 | 152 |
} |
154 | 153 |
|
155 | 154 |
// Get page details |
... | ... | |
165 | 164 |
if($results->numRows() == 0) |
166 | 165 |
{ |
167 | 166 |
// $admin->print_header(); |
168 |
$admin->print_error($MESSAGE['PAGES']['NOT_FOUND']);
|
|
167 |
$admin->print_error($MESSAGE['PAGES_NOT_FOUND']);
|
|
169 | 168 |
} |
170 | 169 |
$results_array = $results->fetchRow(); |
171 | 170 |
|
171 |
// Get display name of person who last modified the page |
|
172 |
$user=$admin->get_user_details($results_array['modified_by']); |
|
173 |
// Convert the unix ts for modified_when to human a readable form |
|
174 |
if($results_array['modified_when'] != 0) { |
|
175 |
$modified_ts = gmdate(TIME_FORMAT.', '.DATE_FORMAT, $results_array['modified_when']+TIMEZONE); |
|
176 |
} else { |
|
177 |
$modified_ts = 'Unknown'; |
|
178 |
} |
|
179 |
|
|
172 | 180 |
// Set module permissions |
173 | 181 |
$module_permissions = $_SESSION['MODULE_PERMISSIONS']; |
174 | 182 |
|
... | ... | |
218 | 226 |
'PAGE_TITLE' => ($results_array['page_title']), |
219 | 227 |
'MENU_TITLE' => ($results_array['menu_title']), |
220 | 228 |
'TEXT_CURRENT_PAGE' => $TEXT['CURRENT_PAGE'], |
229 |
'TEXT_LAST_MODIFIED' => $TEXT['LAST_UPDATED_BY'], |
|
221 | 230 |
'HEADING_MANAGE_SECTIONS' => $HEADING['MANAGE_SECTIONS'], |
222 | 231 |
'HEADING_MODIFY_PAGE' => $HEADING['MODIFY_PAGE'], |
223 | 232 |
'TEXT_CHANGE_SETTINGS' => $TEXT['CHANGE_SETTINGS'], |
... | ... | |
228 | 237 |
'TEXT_PUBL_START_DATE' => $TEXT{'PUBL_START_DATE'}, |
229 | 238 |
'TEXT_PUBL_END_DATE' => $TEXT['PUBL_END_DATE'], |
230 | 239 |
'TEXT_ACTIONS' => $TEXT['ACTIONS'], |
240 |
'MODIFIED_BY' => $user['display_name'], |
|
241 |
'MODIFIED_BY_USERNAME' => $user['username'], |
|
242 |
'MODIFIED_WHEN' => $modified_ts, |
|
231 | 243 |
'ADMIN_URL' => ADMIN_URL, |
232 | 244 |
'WB_URL' => WB_URL, |
233 | 245 |
'THEME_URL' => THEME_URL |
234 | 246 |
) |
235 | 247 |
); |
248 |
// check modify page permission |
|
249 |
if( $admin->get_permission('pages_modify') ) |
|
250 |
{ |
|
251 |
$tpl->set_var(array( |
|
252 |
'MODIFY_LINK_BEFORE' => '<a href="'.ADMIN_URL.'/pages/modify.php?page_id='.$results_array['page_id'].'">', |
|
253 |
'MODIFY_LINK_AFTER' => '</a>', |
|
254 |
'DISPLAY_MANAGE_MODIFY' => 'link', |
|
255 |
)); |
|
256 |
} else { |
|
257 |
$tpl->set_var(array( |
|
258 |
'MODIFY_LINK_BEFORE' => '<span class="bold grey">', |
|
259 |
'MODIFY_LINK_AFTER' => '</span>', |
|
260 |
'DISPLAY_MANAGE_MODIFY' => 'link', |
|
261 |
)); |
|
262 |
} |
|
236 | 263 |
|
264 |
// check settings page permission |
|
265 |
if( $admin->get_permission('pages_settings') ) |
|
266 |
{ |
|
267 |
$tpl->set_var(array( |
|
268 |
'SETTINGS_LINK_BEFORE' => '<a href="'.ADMIN_URL.'/pages/settings.php?page_id='.$results_array['page_id'].'">', |
|
269 |
'SETTINGS_LINK_AFTER' => '</a>', |
|
270 |
'DISPLAY_MANAGE_SETTINGS' => 'link', |
|
271 |
)); |
|
272 |
} else { |
|
273 |
$tpl->set_var(array( |
|
274 |
'SETTINGS_LINK_BEFORE' => '<span class="bold grey">', |
|
275 |
'SETTINGS_LINK_AFTER' => '</span>', |
|
276 |
'DISPLAY_MANAGE_SECTIONS' => 'link', |
|
277 |
)); |
|
278 |
} |
|
279 |
|
|
237 | 280 |
// Insert variables |
238 | 281 |
$tpl->set_var(array( |
239 | 282 |
'PAGE_ID' => $results_array['page_id'], |
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