Revision 1245
Added by Luisehahne almost 16 years ago
| modify.php | ||
|---|---|---|
| 1 | 1 |
<?php |
| 2 |
/**************************************************************************** |
|
| 3 |
* SVN Version information: |
|
| 4 |
* |
|
| 5 |
* $Id$ |
|
| 6 |
* |
|
| 7 |
***************************************************************************** |
|
| 8 |
* WebsiteBaker |
|
| 9 |
* |
|
| 10 |
* WebsiteBaker Project <http://www.websitebaker2.org/> |
|
| 11 |
* Copyright (C) 2009, Website Baker Org. e.V. |
|
| 12 |
* http://start.websitebaker2.org/impressum-datenschutz.php |
|
| 13 |
* Copyright (C) 2004-2009, Ryan Djurovich |
|
| 14 |
* |
|
| 15 |
* About WebsiteBaker |
|
| 16 |
* |
|
| 17 |
* Website Baker is a PHP-based Content Management System (CMS) |
|
| 18 |
* designed with one goal in mind: to enable its users to produce websites |
|
| 19 |
* with ease. |
|
| 20 |
* |
|
| 21 |
***************************************************************************** |
|
| 22 |
* |
|
| 23 |
***************************************************************************** |
|
| 24 |
* LICENSE INFORMATION |
|
| 25 |
* |
|
| 26 |
* WebsiteBaker is free software; you can redistribute it and/or |
|
| 27 |
* modify it under the terms of the GNU General Public License |
|
| 28 |
* as published by the Free Software Foundation; either version 2 |
|
| 29 |
* of the License, or (at your option) any later version. |
|
| 30 |
* |
|
| 31 |
* WebsiteBaker is distributed in the hope that it will be useful, |
|
| 32 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 33 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
| 34 |
* See the GNU General Public License for more details. |
|
| 35 |
* |
|
| 36 |
* You should have received a copy of the GNU General Public License |
|
| 37 |
* along with this program; if not, write to the Free Software |
|
| 38 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|
| 39 |
**************************************************************************** |
|
| 40 |
* |
|
| 41 |
***************************************************************************** |
|
| 42 |
* WebsiteBaker Extra Information |
|
| 43 |
* |
|
| 44 |
* |
|
| 45 |
* |
|
| 46 |
* |
|
| 47 |
*****************************************************************************/ |
|
| 48 |
/** |
|
| 49 |
* @category admin |
|
| 50 |
* @package pages |
|
| 51 |
* @author Ryan Djurovich |
|
| 52 |
* @copyright 2004-2009, Ryan Djurovich |
|
| 53 |
* @copyright 2009-2010, Website Baker Org. e.V. |
|
| 54 |
* @version $Id$ |
|
| 55 |
* @platform WebsiteBaker 2.8.x |
|
| 56 |
* @requirements >= PHP 4.3.4 |
|
| 57 |
* @license http://www.gnu.org/licenses/gpl.html |
|
| 58 |
* |
|
| 59 |
*/ |
|
| 2 | 60 |
|
| 3 |
// $Id$ |
|
| 4 |
|
|
| 5 |
/* |
|
| 6 |
|
|
| 7 |
Website Baker Project <http://www.websitebaker.org/> |
|
| 8 |
Copyright (C) 2004-2009, Ryan Djurovich |
|
| 9 |
|
|
| 10 |
Website Baker is free software; you can redistribute it and/or modify |
|
| 11 |
it under the terms of the GNU General Public License as published by |
|
| 12 |
the Free Software Foundation; either version 2 of the License, or |
|
| 13 |
(at your option) any later version. |
|
| 14 |
|
|
| 15 |
Website Baker is distributed in the hope that it will be useful, |
|
| 16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 18 |
GNU General Public License for more details. |
|
| 19 |
|
|
| 20 |
You should have received a copy of the GNU General Public License |
|
| 21 |
along with Website Baker; if not, write to the Free Software |
|
| 22 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
| 23 |
|
|
| 24 |
*/ |
|
| 25 |
|
|
| 26 | 61 |
// Get page id |
| 27 | 62 |
if(!isset($_GET['page_id']) OR !is_numeric($_GET['page_id'])) {
|
| 28 | 63 |
header("Location: index.php");
|
| ... | ... | |
| 31 | 66 |
$page_id = $_GET['page_id']; |
| 32 | 67 |
} |
| 33 | 68 |
|
| 34 |
|
|
| 35 |
|
|
| 36 | 69 |
// Create new admin object |
| 37 | 70 |
require('../../config.php');
|
| 38 | 71 |
require_once(WB_PATH.'/framework/class.admin.php'); |
| ... | ... | |
| 52 | 85 |
$user=$admin->get_user_details($results_array['modified_by']); |
| 53 | 86 |
|
| 54 | 87 |
// Convert the unix ts for modified_when to human a readable form |
| 55 |
if($results_array['modified_when'] != 0) {
|
|
| 56 |
$modified_ts = gmdate(TIME_FORMAT.', '.DATE_FORMAT, $results_array['modified_when']+TIMEZONE); |
|
| 57 |
} else {
|
|
| 58 |
$modified_ts = 'Unknown'; |
|
| 59 |
} |
|
| 60 | 88 |
|
| 89 |
$modified_ts = ($results_array['modified_when'] != 0) |
|
| 90 |
? $modified_ts = gmdate(TIME_FORMAT.', '.DATE_FORMAT, $results_array['modified_when']+TIMEZONE) |
|
| 91 |
: 'Unknown'; |
|
| 92 |
|
|
| 61 | 93 |
// Include page info script |
| 62 | 94 |
$template = new Template(THEME_PATH.'/templates'); |
| 63 | 95 |
$template->set_file('page', 'pages_modify.htt');
|
| ... | ... | |
| 65 | 97 |
$template->set_var(array( |
| 66 | 98 |
'PAGE_ID' => $results_array['page_id'], |
| 67 | 99 |
'PAGE_TITLE' => ($results_array['page_title']), |
| 100 |
'MENU_TITLE' => ($results_array['menu_title']), |
|
| 68 | 101 |
'MODIFIED_BY' => $user['display_name'], |
| 69 | 102 |
'MODIFIED_BY_USERNAME' => $user['username'], |
| 70 | 103 |
'MODIFIED_WHEN' => $modified_ts, |
| ... | ... | |
| 75 | 108 |
) |
| 76 | 109 |
); |
| 77 | 110 |
if($modified_ts == 'Unknown') {
|
| 78 |
$template->set_var('DISPLAY_MODIFIED', 'hide');
|
|
| 111 |
$template->set_var('CLASS_DISPLAY_MODIFIED', 'hide');
|
|
| 79 | 112 |
} else {
|
| 80 |
$template->set_var('DISPLAY_MODIFIED', '');
|
|
| 113 |
$template->set_var('CLASS_DISPLAY_MODIFIED', '');
|
|
| 81 | 114 |
} |
| 82 | 115 |
|
| 83 | 116 |
// Work-out if we should show the "manage sections" link |
| 84 | 117 |
$query_sections = $database->query("SELECT section_id FROM ".TABLE_PREFIX."sections WHERE page_id = '$page_id' AND module = 'menu_link'");
|
| 85 | 118 |
if($query_sections->numRows() > 0) {
|
| 86 |
$template->set_var('DISPLAY_MANAGE_SECTIONS', 'none');
|
|
| 119 |
$template->set_var('DISPLAY_MANAGE_SECTIONS', 'display:none;');
|
|
| 87 | 120 |
} elseif(MANAGE_SECTIONS == 'enabled') {
|
| 88 | 121 |
$template->set_var('TEXT_MANAGE_SECTIONS', $HEADING['MANAGE_SECTIONS']);
|
| 89 | 122 |
} else {
|
| 90 |
$template->set_var('DISPLAY_MANAGE_SECTIONS', 'none');
|
|
| 123 |
$template->set_var('DISPLAY_MANAGE_SECTIONS', 'display:none;');
|
|
| 91 | 124 |
} |
| 92 | 125 |
|
| 93 | 126 |
// Insert language TEXT |
Also available in: Unified diff
Ticket #911 3. continue to fix CSS-errors in WB backend