Project

General

Profile

« Previous | Next » 

Revision 1707

Added by Dietmar about 12 years ago

! update folder admin/pages, admin/skel/htt
! change multi-dimensional arrays (variables) to similar arrays
! change default templates, change code to new templates

View differences:

branches/2.8.x/CHANGELOG
13 13

  
14 14

  
15 15

  
16
29 Aug-2012 Build 1707 Dietmar Woellbrink (Luisehahne)
17
! update folder admin/pages, admin/skel/htt
18
! change multi-dimensional arrays (variables) to similar arrays
19
! change default templates, change code to new templates
16 20
29 Aug-2012 Build 1706 Dietmar Woellbrink (Luisehahne)
17 21
# fixed save page option 
18 22
27 Aug-2012 Build 1705 Dietmar Woellbrink (Luisehahne)
branches/2.8.x/wb/admin/skel/themes/htt/pages.htt
1 1
<!-- BEGIN main_block -->
2
<div class="{DISPLAY_ADD}">
2
<div class="{DISPLAY_ADD} left">
3 3
<h2>{HEADING_ADD_PAGE}</h2>
4 4
<form name="add" action="add.php" method="post">
5 5
{FTAN}
branches/2.8.x/wb/admin/skel/themes/htt/pages_modify.htt
1 1
<!-- BEGIN main_block -->
2

  
3 2
<table summary="" cellpadding="5" cellspacing="0" border="0" align="center" width="100%" style="margin-bottom:10px;">
4
<tr style="background:#f0f0f0;">
3
  <tr style="background:#f0f0f0;">
5 4
	<td valign="middle" align="left"><h2>{HEADING_MODIFY_PAGE}</h2></td>
6
	<td align="left" width="20%">ID: {PAGE_ID}</td>
5
	<td nowrap="nowrap">ID: {PAGE_ID}</td>
7 6
	<td align="right">
8 7
		{TEXT_CURRENT_PAGE}:
9 8
		<b>{PAGE_TITLE}</b>
10
		- 
11
		<a href="{ADMIN_URL}/pages/settings.php?page_id={PAGE_IDKEY}">{TEXT_CHANGE_SETTINGS}</a>
12
<!-- BEGIN show_section_block -->
13
		<font style="{DISPLAY_MANAGE_SECTIONS}">-</font>
14
		<a href="{ADMIN_URL}/pages/sections.php?page_id={PAGE_IDKEY}" style="{DISPLAY_MANAGE_SECTIONS}">{TEXT_MANAGE_SECTIONS}</a>
15
<!-- END show_section_block -->
16
		<font style="color:#999;" class="{CLASS_DISPLAY_MODIFIED}"><br />
17
<!-- BEGIN show_modify_block -->
18
		{LAST_MODIFIED} {MODIFIED_BY} ({MODIFIED_BY_USERNAME}), {MODIFIED_WHEN}
19
<!-- END show_modify_block -->
20
		</font>
9
		- {SETTINGS_LINK_BEFORE}{TEXT_CHANGE_SETTINGS}{SETTINGS_LINK_AFTER}
10
		<span class="{DISPLAY_MANAGE_SECTIONS}">
11
		- {SECTIONS_LINK_BEFORE}{TEXT_MANAGE_SECTIONS}{SECTIONS_LINK_AFTER}
12
		</span>
13
		<br />
14
		<span class="grey {DISPLAY_MODIFIED}">
15
			{TEXT_LAST_MODIFIED} {MODIFIED_BY} ({MODIFIED_BY_USERNAME}), {MODIFIED_WHEN}
16
		</span>
21 17
	</td>
22
</tr>
18
  </tr>
23 19
</table>
24 20

  
25 21
<!-- END main_block -->
branches/2.8.x/wb/admin/skel/themes/htt/pages_sections.htt
1 1
<!-- BEGIN main_block -->
2 2
<div class="jsadmin jcalendar hide"></div>
3 3
<table summary="" cellpadding="5" cellspacing="0" border="0" align="center" width="100%" style="margin-bottom:10px;">
4
	<tr style="background:#f0f0f0;">
5
		<td valign="middle" align="left"><h2>{HEADING_MANAGE_SECTIONS}</h2></td>
6
		<td align="left" width="20%">ID: {PAGE_ID}</td>
7
		<td align="right">{TEXT_CURRENT_PAGE}: <b>{PAGE_TITLE}</b>
8
			-
9
			<a href="{ADMIN_URL}/pages/modify.php?page_id={PAGE_IDKEY}">{HEADING_MODIFY_PAGE}</a>
10
			-
11
			<a href="{ADMIN_URL}/pages/settings.php?page_id={PAGE_IDKEY}">{TEXT_CHANGE_SETTINGS}</a>
12
		</td>
13
     </tr>
4
  <tr style="background:#f0f0f0;">
5
	<td valign="middle" align="left"><h2>{HEADING_MANAGE_SECTIONS}</h2></td>
6
	<td nowrap="nowrap">ID: {PAGE_ID}</td>
7
	<td align="right">{TEXT_CURRENT_PAGE}:<b>{PAGE_TITLE}</b>
8
		-
9
		{MODIFY_LINK_BEFORE}{HEADING_MODIFY_PAGE}{MODIFY_LINK_AFTER}
10
		<span class="{DISPLAY_MANAGE_SETTINGS}">
11
		- {SETTINGS_LINK_BEFORE}{TEXT_CHANGE_SETTINGS}{SETTINGS_LINK_AFTER}
12
		</span>
13
		<br />
14
		<span style="color:#999;" class="{DISPLAY_MODIFIED}">
15
			{TEXT_LAST_MODIFIED} {MODIFIED_BY} ({MODIFIED_BY_USERNAME}), {MODIFIED_WHEN}
16
		</span>
17
	</td>
18
  </tr>
14 19
</table>
15 20

  
16 21
        <form name="section_properties" action="{ADMIN_URL}/pages/sections_save.php?page_id={PAGE_IDKEY}" method="post">
17 22
		{FTAN}
18
		
23

  
19 24
        <table summary="" cellpadding="0" cellspacing="0" border="0" width="100%" class="img_noborder">
20 25
			<tr class="sections_list">
21 26
				<td class="header_list_type">{TEXT_TYPE}</td>
......
33 38
                      <input type="hidden" name="section_id" value="{VAR_SECTION_ID}"  />
34 39
                      {VAR_SECTION_ID}
35 40
                    </td>
36
					
41

  
37 42
                    <td>{LINK_MODIFY_URL_VAR_MODUL_NAME}</td>
38
					
43

  
39 44
                    <td class="{INPUT_ATTRIBUTE}"><span {STYLE_DISPLAY_SECTION_BLOCK}>
40 45
                    	<select name="block{VAR_SECTION_ID}" class="input_normal">
41 46
                        {SET_NONE_DISPLAY_OPTION}
......
44 49
                    	<!-- END block_block -->
45 50
                    	</select></span>&nbsp;
46 51
                    </td>
47
					
52

  
48 53
                    <td class="list_pubdate_start"><input type="text" id="start_date{VAR_SECTION_ID}" name="start_date{VAR_SECTION_ID}" value="{VALUE_PUBL_START}" class="input_normal" />
49 54
                        <img src="{THEME_URL}/images/calendar_16.png" id="trigger_start{VAR_SECTION_ID}" style="cursor:pointer;" title="{TEXT_CALENDAR}" alt="{TEXT_CALENDAR}"  />
50 55
                        <img src="{THEME_URL}/images/{CLOCK_DEL_16_PNG}" style="cursor:pointer;" alt="{TEXT_DELETE_DATE}" title="{TEXT_DELETE_DATE}" onclick="document.section_properties.start_date{VAR_SECTION_ID}.value=''" />
51 56
                    </td>
52
					
57

  
53 58
                    <td class="list_pubdate_end"><input type="text" id="end_date{VAR_SECTION_ID}" name="end_date{VAR_SECTION_ID}" value="{VALUE_PUBL_END}" class="input_normal" />
54 59
                        <img src="{THEME_URL}/images/calendar_16.png" id="trigger_stop{VAR_SECTION_ID}" alt="{TEXT_CALENDAR}" style="cursor: pointer;" title="{TEXT_CALENDAR}"  />
55 60
                        <img src="{THEME_URL}/images/{CLOCK_DEL_16_PNG}" style="cursor:pointer;" alt="{TEXT_DELETE_DATE}" title="{TEXT_DELETE_DATE}" onclick="document.section_properties.end_date{VAR_SECTION_ID}.value=''" />
56 61
                    </td>
57 62

  
58 63
					<td>{VAR_MOVE_UP_URL}</td>
59
					
64

  
60 65
                    <td>{VAR_MOVE_DOWN_URL}</td>
61 66

  
62 67
                    <td>
branches/2.8.x/wb/admin/skel/themes/htt/pages_settings.htt
1 1
<!-- BEGIN main_block -->
2
<script src="{WB_URL}/include/jquery/overlib_mini.js" type="text/javascript"></script>
2 3
<script src="{ADMIN_URL}/pages/page_settings.js" type="text/javascript"></script>
4

  
3 5
<table summary="" cellpadding="5" cellspacing="0" border="0" align="center" width="100%" style="margin-bottom:10px;">
4 6
  <tr style="background:#f0f0f0;">
5 7
	<td valign="middle" align="left"><h2>{HEADING_MODIFY_PAGE_SETTINGS}</h2></td>
......
8 10
		{TEXT_CURRENT_PAGE}:
9 11
		<b>{PAGE_TITLE}</b>
10 12
		-
11
		<a href="{ADMIN_URL}/pages/modify.php?page_id={PAGE_ID}">{TEXT_MODIFY_PAGE}</a>
12
		<span style="{DISPLAY_MANAGE_SECTIONS}">
13
		- <a href="{ADMIN_URL}/pages/sections.php?page_id={PAGE_ID}">{TEXT_MANAGE_SECTIONS}</a>
13
		{MODIFY_LINK_BEFORE}{TEXT_MODIFY_PAGE}{MODIFY_LINK_AFTER}
14
		<span class="{DISPLAY_MANAGE_SECTIONS}">
15
		- {SECTIONS_LINK_BEFORE}{TEXT_MANAGE_SECTIONS}{SECTIONS_LINK_AFTER}
14 16
		</span>
15 17
		<br />
16 18
		<span style="color:#999;" class="{DISPLAY_MODIFIED}">
......
27 29
		<div class="page-settings-leftcol"> <!-- left column -->
28 30
			<div class="caption">{TEXT_SECTION_GENERAL}</div>
29 31
			<div>
30
				<label for="">{TEXT_PAGE_TITLE}:</label><input
31
					type="text" name="page_title" value="{PAGE_TITLE}" />
32
				<label for="page_title">{TEXT_PAGE_TITLE}:</label>
33
				<input type="text" id="page_title" name="page_title" value="{PAGE_TITLE}" />
32 34
			</div>
33 35
			<div>
34
				<label for="" style="vertical-align: bottom;">{TEXT_PAGE_ICON}:<br />
35
					<span style="font-size:0.85em;">( {ICON_DIR} )</span></label><select
36
					name="page_icon">
36
				<label for="page_icon" {p_page_icon_dir} style="background-image: url({THEME_URL}/icons/help_16.png);" >{TEXT_PAGE_ICON}:
37
				</label>
38
				<select id="page_icon" name="page_icon">
37 39
					<option value="0">--- {TEXT_NO_SELECTION} ---</option>
38 40
				<!-- BEGIN page_icon_list_block -->
39 41
					<option value="{VALUE}"{SELECTED}>{NAME}</option>
......
41 43
				</select>
42 44
			</div>
43 45
			<div>
44
				<label for="">{TEXT_MENU_TITLE}:</label><input
45
					type="text" name="menu_title" value="{MENU_TITLE}" />
46
				<label for="menu_title">{TEXT_MENU_TITLE}:</label>
47
				<input type="text" id="menu_title" name="menu_title" value="{MENU_TITLE}" />
46 48
			</div>
47 49
			<div>
48
				<label for="" style="vertical-align: bottom;">{TEXT_MENU_ICON_0}:<br />
49
					<span style="font-size:0.85em;">( {ICON_DIR} )</span></label><select
50
					name="menu_icon_0">
50
				<label for="menu_icon_0" {p_menu_icon0_dir} style="background-image: url({THEME_URL}/icons/help_16.png);">{TEXT_MENU_ICON_0}:</label>
51
					<select id="menu_icon_0" name="menu_icon_0">
51 52
					<option value="0">--- {TEXT_NO_SELECTION} ---</option>
52 53
				<!-- BEGIN menu_icon0_list_block -->
53 54
					<option value="{VALUE}"{SELECTED}>{NAME}</option>
......
55 56
				</select>
56 57
			</div>
57 58
			<div>
58
				<label for="" style="vertical-align: bottom;">{TEXT_MENU_ICON_1}:<br />
59
					<span style="font-size:0.85em;">( {ICON_DIR} )</span></label><select
60
					name="menu_icon_1">
59
				<label for="menu_icon_1" {p_menu_icon1_dir} style="background-image: url({THEME_URL}/icons/help_16.png);">{TEXT_MENU_ICON_1}:</label>
60
					<select id="menu_icon_1" name="menu_icon_1">
61 61
					<option value="0">--- {TEXT_NO_SELECTION} ---</option>
62 62
				<!-- BEGIN menu_icon1_list_block -->
63 63
					<option value="{VALUE}"{SELECTED}>{NAME}</option>
64 64
				<!-- END menu_icon1_list_block -->
65 65
				</select>
66 66
			</div>
67

  
68 67
			<div>
69
				<label for="">{TEXT_DESCRIPTION}:</label><textarea
70
					name="description" rows="14" cols="1">{DESCRIPTION}</textarea>
68
				<label for="description">{TEXT_DESCRIPTION}:</label>
69
				<textarea id="description" name="description" rows="14" cols="1">{DESCRIPTION}</textarea>
71 70
			</div>
72 71
			<div>
73
				<label for="">{TEXT_KEYWORDS}:</label><textarea
74
					name="keywords" rows="14" cols="1">{KEYWORDS}</textarea>
72
				<label for="keywords">{TEXT_KEYWORDS}:</label>
73
				<textarea id="keywords" name="keywords" rows="14" cols="1">{KEYWORDS}</textarea>
75 74
			</div>
76 75
			<div class="caption">{TEXT_SECTION_ORGANISATION}</div>
77 76
			<div>
78
				<label for="">{TEXT_PARENT}:</label><select name="parent">
77
				<label for="parent">{TEXT_PARENT}:</label>
78
				<select id="parent" name="parent">
79 79
				<!-- BEGIN parent_page_list_block -->
80 80
					<option value="{ID}"{SELECTED} style="background: {FLAG_ROOT_ICON} no-repeat center left; padding-left: 20px;">{TITLE}</option>
81 81
				<!-- END parent_page_list_block -->
......
83 83
			</div>
84 84
		<!-- BEGIN show_menu_list_block -->
85 85
			<div>
86
				<label for="">{TEXT_MENU}:</label><select
87
					name="menu">
86
				<label for="menu">{TEXT_MENU}:</label>
87
				<select id="menu" name="menu">
88 88
				<!-- BEGIN menu_list_block -->
89 89
					<option value="{VALUE}"{SELECTED}>{NAME}</option>
90 90
				<!-- END menu_list_block -->
......
92 92
			</div>
93 93
		<!-- END show_menu_list_block -->
94 94
			<div>
95
				<label for="">{TEXT_TARGET}:</label><select
96
					name="target" ><!--  value="{TARGET}" -->
95
				<label for="target">{TEXT_TARGET}:</label>
96
				<select id="target" name="target" ><!--  value="{TARGET}" -->
97 97
					<option value="_blank"{BLANK_SELECTED}>{TEXT_NEW_WINDOW}</option>
98 98
					<option value="_self"{SELF_SELECTED}>{TEXT_SAME_WINDOW}</option>
99 99
					<option value="_top"{TOP_SELECTED}>{TEXT_TOP_FRAME}</option>
100 100
				</select>
101 101
			</div>
102 102
			<div>
103
				<label for="">{TEXT_TEMPLATE}:</label><select
104
					name="template">
103
				<label for="template">{TEXT_TEMPLATE}:</label>
104
				<select id="template" name="template">
105 105
					<option value="">{TEXT_SYSTEM_DEFAULT}</option>
106 106
					<option value="">----------------------</option>
107 107
				<!-- BEGIN template_list_block -->
......
111 111
			</div>
112 112
			<div class="caption">{TEXT_SECTION_CONTENT}</div>
113 113
			<div>
114
				<label for="">{TEXT_LANGUAGE}:</label><select
115
					name="language">
114
				<label for="language">{TEXT_LANGUAGE}:</label>
115
				<select id="language" name="language">
116 116
				<!-- BEGIN language_list_block -->
117 117
					<option value="{VALUE}"{SELECTED} style="background: {FLAG_LANG_ICONS} no-repeat center left; padding-left: 20px;">{NAME}</option>
118 118
				<!-- END language_list_block -->
......
120 120
			</div>
121 121
		<!-- BEGIN show_page_code_block -->
122 122
			<div>
123
				<label for="">{TEXT_PAGE_CODE}:</label><select
124
					name="page_code" class="value_page_code">
123
				<label for="page_code" {p_menu_page_code} style="background-image: url({THEME_URL}/icons/help_16.png);">{TEXT_PAGE_CODE}:</label>
124
				<select id="page_code" name="page_code" class="value_page_code">
125 125
				<!-- BEGIN page_code_list_block -->
126 126
						<option value="{VALUE}"{SELECTED} style="background: {FLAG_CODE_ICON} no-repeat center left; padding-left: 20px;">&nbsp;{PAGE_VALUE}</option>
127 127
				<!-- END page_code_list_block -->
......
129 129
			</div>
130 130
		<!-- END show_page_code_block -->
131 131
			<div>
132
				<label for="">{TEXT_SEARCHING}:</label><select
133
					name="searching">
132
				<label for="searching">{TEXT_SEARCHING}:</label>
133
				<select id="searching" name="searching">
134 134
					<option value="1"{SEARCHING_SELECTED_ON}>{TEXT_ENABLED}</option>
135 135
					<option value="0"{SEARCHING_SELECTED_OFF}>{TEXT_DISABLED}</option>
136 136
				</select>
......
139 139
		<div class="page-settings-righttoprow">
140 140
			<div class="caption">{TEXT_SECTION_SECURITY}</div>
141 141
			<div>
142
				<label for="">{TEXT_VISIBILITY}:</label><select
143
					name="visibility" onchange="javascript: toggle_viewers();">
142
				<label for="visibility">{TEXT_VISIBILITY}:</label>
143
				<select id="visibility" name="visibility" onchange="javascript: toggle_viewers();">
144 144
					<option value="public"{PUBLIC_SELECTED}>{TEXT_PUBLIC}</option>
145 145
					<option value="private"{PRIVATE_SELECTED}>{TEXT_PRIVATE}</option>
146 146
					<option value="registered"{REGISTERED_SELECTED}>{TEXT_REGISTERED}</option>
......
151 151
		</div>
152 152

  
153 153

  
154
	<!-- BEGIN admin_group_show_list_block -->
154 155
		<div class="page-settings-centercol"> <!-- center column -->
155 156
			<b>{TEXT_ADMINISTRATORS}</b><hr />
156 157
			<u>{TEXT_GROUP}</u><br />
......
173 174
			<!-- END admin_user_list_block -->
174 175
			</select>
175 176
		</div>
177
	<!-- END admin_group_show_list_block -->
176 178

  
177 179
		<div id="allowed_viewers" class="page-settings-rightcol" style="{DISPLAY_VIEWERS}"> <!-- right column -->
178 180
			<b>{TEXT_ALLOWED_VIEWERS}</b><hr />
branches/2.8.x/wb/admin/pages/settings.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
......
118 117
// Convert the unix ts for modified_when to human a readable form
119 118
	if($aCurrentPage['modified_when'] != 0) {
120 119
		$modified_ts = gmdate(TIME_FORMAT.', '.DATE_FORMAT, $aCurrentPage['modified_when']+TIMEZONE);
121
	}else {
120
	} else {
122 121
		$modified_ts = 'Unknown';
123 122
	}
124 123
// Setup template object, parse vars to it, then parse it
125 124
// Create new template object
126
	$oTpl = new Template(dirname($admin->correct_theme_source('pages_settings.htt')), 'keep');
125
	$oTpl = new Template(dirname($admin->correct_theme_source('pages_settings.htt')),'keep' );
127 126
	$oTpl->set_file('page', 'pages_settings.htt');
128 127
	$oTpl->set_block('page', 'main_block', 'main');
129 128
	$oTpl->set_var('FTAN', $admin->getFTAN());
......
141 140
			'WB_URL'               => WB_URL,
142 141
			'THEME_URL'            => THEME_URL
143 142
			));
143

  
144
	if( $admin->get_permission('pages_modify') )
145
	{
146
		$oTpl->set_var(array(
147
				'MODIFY_LINK_BEFORE' => '<a href="'.ADMIN_URL.'/pages/modify.php?page_id='.$aCurrentPage['page_id'].'">',
148
				'MODIFY_LINK_AFTER' => '</a>',
149
				'DISPLAY_MANAGE_MODIFY' => 'link',
150
				));
151
	} else {
152
		$oTpl->set_var(array(
153
				'MODIFY_LINK_BEFORE' => '<span class="bold grey">',
154
				'MODIFY_LINK_AFTER' => '</span>',
155
				'DISPLAY_MANAGE_MODIFY' => 'link',
156
				));
157
	}
158

  
159

  
144 160
/*-- workout if we should show the "manage sections" link ------------------------------*/
145 161
	$sql = 'SELECT COUNT(*) FROM `'.TABLE_PREFIX.'sections` '
146 162
	     . 'WHERE `page_id`='.$page_id.' AND `module`=\'menu_link\'';
147 163
	$bIsMenuLink = (intval($database->get_one($sql)) != 0);
148
	$oTpl->set_block('main_block', 'show_manage_sections_block', 'show_manage_sections');
149
	if(!$bIsMenuLink && (MANAGE_SECTIONS == true)) {
150
		$oTpl->parse('show_manage_sections', 'show_manage_sections_block', true);
164
//	$oTpl->set_block('main_block', 'show_manage_sections_block', 'show_manage_sections');
165
//	if(!$bIsMenuLink && (MANAGE_SECTIONS == true) && $admin->get_permission('pages_add') )
166
	if((MANAGE_SECTIONS == true) && $admin->get_permission('pages_add') )
167
	{
168
//		$oTpl->parse('show_manage_sections', 'show_manage_sections_block', true);
169
		$oTpl->set_var(array(
170
				'SECTIONS_LINK_BEFORE' => '<a href="'.ADMIN_URL.'/pages/sections.php?page_id='.$aCurrentPage['page_id'].'">',
171
				'SECTIONS_LINK_AFTER' => '</a>',
172
				'DISPLAY_MANAGE_SECTIONS' => 'link',
173
				));
151 174
	}else {
152
		$oTpl->set_block('show_manage_sections', '');
175
//		$oTpl->set_block('show_manage_sections', '');
176
		$oTpl->set_var(array(
177
				'SECTIONS_LINK_BEFORE' => '<span class="bold grey">',
178
				'SECTIONS_LINK_AFTER' => '</span>',
179
				'DISPLAY_MANAGE_SECTIONS' => 'link',
180
				));
153 181
	}
154 182

  
155 183
/*-- collect page-icons for select boxes -----------------------------------------------*/
......
159 187
	$sTemplate = ($aCurrentPage['template'] == '' ? DEFAULT_TEMPLATE : $aCurrentPage['template']);
160 188
	$sIconDir = str_replace('\\', '/', ((defined('PAGE_ICON_DIR') && PAGE_ICON_DIR != '') ? PAGE_ICON_DIR : MEDIA_DIRECTORY));
161 189
	$sIconDir = str_replace('/*', '/'.$sTemplate, $sIconDir);
162
	$oTpl->set_var('ICON_DIR', WB_REL.$sIconDir);
190
//	$oTpl->set_var('ICON_DIR', WB_REL.$sIconDir);
191
	$sHelp = replaceVars($mLang->HELP_PAGE_IMAGE_DIR, array('icon_dir'=>WB_REL.$sIconDir ) );
192

  
193
	$oTpl->set_var('p_page_icon_dir',  p($sHelp,$mLang->TEXT_PAGE_ICON_DIR));
194
	$oTpl->set_var('p_menu_icon0_dir', p($sHelp,$mLang->TEXT_MENU_ICON_0_DIR));
195
	$oTpl->set_var('p_menu_icon1_dir', p($sHelp,$mLang->TEXT_MENU_ICON_1_DIR));
196
	$oTpl->set_var('p_menu_page_code', p($mLang->HELP_PAGE_CODE,$mLang->TEXT_PAGE_CODE));
197

  
163 198
	if(is_readable(WB_PATH.$sIconDir)) {
164 199
		$oIterator = new DirectoryIterator(WB_PATH.$sIconDir);
165 200
		foreach ($oIterator as $fileinfo) {
......
173 208
	}
174 209
/*-- show page-icon select box ---------------------------------------------------------*/
175 210
	$oTpl->set_block('main_block', 'page_icon_list_block', 'page_icon_list');
176
	foreach($aPageIcons as $value) {
177
		$aIcon = $value;
178
		$aIcon['SELECTED'] = ($aCurrentPage['page_icon'] == $aIcon['VALUE'] ? $sSelected : '');
179
		$oTpl->set_var($aIcon);
180
		$oTpl->parse('page_icon_list', 'page_icon_list_block', true);
211
	if(sizeof($aPageIcons)>0){
212
		foreach($aPageIcons as $value) {
213
			$aIcon = $value;
214
			$aIcon['SELECTED'] = ($aCurrentPage['page_icon'] == $aIcon['VALUE'] ? $sSelected : '');
215
			$oTpl->set_var($aIcon);
216
			$oTpl->parse('page_icon_list', 'page_icon_list_block', true);
217
		}
218
	} else {
219
	$oTpl->parse('page_icon_list', '');
181 220
	}
182 221
/*-- show menu-icon-0 select box -------------------------------------------------------*/
183 222
	$oTpl->set_block('main_block', 'menu_icon0_list_block', 'menu_icon0_list');
184
	foreach($aPageIcons as $value) {
185
		$aIcon = $value;
186
		$aIcon['SELECTED'] = ($aCurrentPage['menu_icon_0'] == $aIcon['VALUE'] ? $sSelected : '');
187
		$oTpl->set_var($aIcon);
188
		$oTpl->parse('menu_icon0_list', 'menu_icon0_list_block', true);
223
	if(sizeof($aPageIcons)>0){
224
		foreach($aPageIcons as $value) {
225
			$aIcon = $value;
226
			$aIcon['SELECTED'] = ($aCurrentPage['menu_icon_0'] == $aIcon['VALUE'] ? $sSelected : '');
227
			$oTpl->set_var($aIcon);
228
			$oTpl->parse('menu_icon0_list', 'menu_icon0_list_block', true);
229
		}
230
	} else {
231
	$oTpl->parse('menu_icon0_list', '');
189 232
	}
190 233
/*-- show menu-icon-1 select box -------------------------------------------------------*/
191 234
	$oTpl->set_block('main_block', 'menu_icon1_list_block', 'menu_icon1_list');
192
	foreach($aPageIcons as $value) {
193
		$aIcon = $value;
194
		$aIcon['SELECTED'] = ($aCurrentPage['menu_icon_1'] == $aIcon['VALUE'] ? $sSelected : '');
195
		$oTpl->set_var($aIcon);
196
		$oTpl->parse('menu_icon1_list', 'menu_icon1_list_block', true);
235
	if(sizeof($aPageIcons)>0){
236
		foreach($aPageIcons as $value) {
237
			$aIcon = $value;
238
			$aIcon['SELECTED'] = ($aCurrentPage['menu_icon_1'] == $aIcon['VALUE'] ? $sSelected : '');
239
			$oTpl->set_var($aIcon);
240
			$oTpl->parse('menu_icon1_list', 'menu_icon1_list_block', true);
241
		}
242
	} else {
243
	$oTpl->parse('menu_icon1_list', '');
197 244
	}
198

  
199 245
/*-- show visibility select box --------------------------------------------------------*/
200 246
	$aVisibility = array();
201 247
	$aVisibility['PUBLIC_SELECTED']     = ($aCurrentPage['visibility'] == 'public' ? $sSelected : '');
......
263 309
	}
264 310

  
265 311
/*-- admin user list block -------------------------------------------------------------*/
312
// admin_group_show_list_block
313
	$oTpl->set_block('main_block', 'admin_group_show_list_block', 'admin_group_show_list');
314

  
266 315
	$aAdminUsers = ($aCurrentPage['admin_users'] == ''
267 316
	                ? array()
268 317
	                : explode(',', $aCurrentPage['admin_users']));
269 318
	$aAdminUsers = explode(',', $aCurrentPage['admin_users']);
270
	$oTpl->set_block('main_block', 'admin_user_list_block', 'admin_user_list');
319
	$oTpl->set_block('admin_group_show_list_block', 'admin_user_list_block', 'admin_user_list');
271 320
	$sAllowedAdminUsers = trim(implode(',',$aAdminUsers));
272 321
	$sAllowedAdminUsers = $sAllowedAdminUsers ? $sAllowedAdminUsers : '-1';
273 322
	$sql = 'SELECT `user_id`, `display_name` '
......
285 334
			$oTpl->parse('admin_user_list', 'admin_user_list_block', true);
286 335
		}
287 336
	}
337
	if($admin->ami_group_member('1')) {
338
		$oTpl->parse('admin_group_show_list', 'admin_group_show_list_block', true);
288 339

  
340
	} else {
341
		$oTpl->parse('admin_group_show_list', '', true);
342
	}
343

  
289 344
/*-- viewer users list block -----------------------------------------------------------*/
290 345
	$aViewingUsers = ($aCurrentPage['viewing_users'] == ''
291 346
	                  ? array()
......
339 394
	{
340 395
		// workout field is set but module missing
341 396
		$oTpl->set_var('TEXT_PAGE_CODE',
342
						   '<a href="'.WB_URL.'/modules/mod_multilingual/update_keys.php?page_id='.
343
						   $page_id.'">'.$mLang->TEXT_PAGE_CODE.'</a>'
397
						   '<a href="'.WB_URL.'/modules/mod_multilingual/update_keys.php?page_id='.$page_id.'">'.$mLang->TEXT_PAGE_CODE.'</a>'
344 398
		);
345 399
	/*-- begin recursive function page_code list ---------------------------------------*/
346 400
		function page_code_list($parent)
......
531 585
	$oTpl->pparse('output', 'page');
532 586
// Print admin footer
533 587
	$admin->print_footer();
588

  
589
function p($text,$lang)
590
{
591
	global $admin;
592
	$retVal  = 'onmouseover="return overlib(';
593
	$retVal .= '\''.$text.'\',';
594
	$retVal .= 'CAPTION,\''.$lang.'\',';
595
	$retVal .= 'FGCOLOR,\'#ffffff\',';
596
	$retVal .= 'BGCOLOR,\'#557c9e\',';
597
	$retVal .= 'BORDER,1,';
598
	$retVal .= 'WIDTH,';
599
	$retVal .= 'HEIGHT,';
600
	$retVal .= 'STICKY,';
601
	$retVal .= 'CAPTIONSIZE,\'13px\',';
602
	$retVal .= 'CLOSETEXT,\'X\',';
603
	$retVal .= 'CLOSESIZE,\'14px\',';
604
	$retVal .= 'CLOSECOLOR,\'#ffffff\',';
605
	$retVal .= 'TEXTSIZE,\'12px\',';
606
	$retVal .= 'VAUTO,';
607
	$retVal .= 'HAUTO,';
608
	$retVal .= 'MOUSEOFF,';
609
	$retVal .= 'WRAP,';
610
	$retVal .= 'CELLPAD,5';
611
	$retVal .= ')" onmouseout="return nd()"';
612
//	$retVal .= '';
613

  
614
	return $retVal;
615
}
616

  
617
/**
618
* replace varnames with values in a string
619
*
620
* @param string $subject: stringvariable with vars placeholder
621
* @param array $replace: values to replace vars placeholder
622
* @return string
623
*/
624
function replaceVars($subject = '', $replace = null )
625
{
626
	if(is_array($replace)==true)
627
	{
628
		foreach ($replace  as $key => $value) {
629
			$subject = str_replace("{{".$key."}}", $value, $subject);
630
		}
631
	}
632
	return $subject;
633
}
branches/2.8.x/wb/admin/pages/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

  
branches/2.8.x/wb/admin/pages/languages/EN.php
18 18
$TEXT['HIDDEN']          = 'Hidden';
19 19
$TEXT['KEYWORDS']        = 'Keywords';
20 20
$TEXT['LANGUAGE']        = 'Language';
21
$TEXT['LAST_MODIFIED']   = 'Last modified by';
21 22
$TEXT['MANAGE_SECTIONS'] = 'Manage Sections';
22 23
$TEXT['MENU']            = 'Menu';
23 24
$TEXT['MENU_TITLE']      = 'Menu Title';
24 25
$TEXT['MODIFY']          = 'Modify';
26
$TEXT['MODIFY_PAGE']     = 'Modify page';
25 27
$TEXT['NEW_WINDOW']      = 'New Window';
26 28
$TEXT['NO_SELECTION']    = 'no selection';
27 29
$TEXT['NONE']            = 'None';
28
$TEXT['PAGE_CODE']       = 'Pagecode (language link)';
30
$TEXT['PAGE_CODE']       = 'PageLanguageCode';
29 31
$TEXT['PAGE_TITLE']      = 'Page Title';
30 32
$TEXT['PARENT']          = 'Parent';
31 33
$TEXT['PLEASE_SELECT']   = 'Please select';
......
49 51
$TEXT['SECTION_CONTENT']      = 'Content';
50 52
$TEXT['SECTION_SECURITY']     = 'Security';
51 53
$TEXT['PAGE_ICON']            = 'Page image';
54
$TEXT['PAGE_ICON_DIR']        = 'Folder Page image';
52 55
$TEXT['MENU_ICON_0']          = 'Menu image normal';
56
$TEXT['MENU_ICON_0_DIR']      = 'Folder Menu image normal';
53 57
$TEXT['MENU_ICON_1']          = 'Menu image hover';
58
$TEXT['MENU_ICON_1_DIR']      = 'Folder Menu image hover';
59
$TEXT['SEO_TITLE']            = 'Seotitle';
54 60

  
55
$MESSAGE['PAGES_LAST_MODIFIED'] = 'Last modification by';
61
$MESSAGE['PAGES_LAST_MODIFIED'] = 'Last modification by';
62

  
63

  
64
$HELP['PAGE_IMAGE_DIR']  = '<p>The topical side picture path is<br /> <b>{{icon_dir}}</b>.</p>';
65
$HELP['PAGE_IMAGE_DIR'] .='<p>As a system administrator you can change the folder for side pictures and menu pictures under options extendet options in server setting.</p>';
66
$HELP['PAGE_IMAGE_DIR'] .='<p>Example::<br /><b>/media/banner</b></p>';
67
$HELP['PAGE_IMAGE_DIR'] .='<p>&nbsp;</p>';
68

  
69
$HELP['PAGE_CODE']  = '<p>If you see this field, you have registered the module for the multilingual facility.</p>';
70
$HELP['PAGE_CODE'] .= '<p>The first step is to be provided a side tree like in the help described</p>';
71
$HELP['PAGE_CODE'] .= '<p><a href=\\\'http:\/\/www.websitebaker2.org/en/help/designer-guide/multilingual-websites.php\\\' target=\\\'_blank\\\'>Multilingual Websites</a></p>';
72
$HELP['PAGE_CODE'] .= '<p>The side linguistic tree is provided from the provided sides of the standard language (<i>Options</i>).</p>';
73
$HELP['PAGE_CODE'] .= '<p>They can update any time the side linguistic tree by click on the title! The assigned sides remain unchanged.</p>';
74
$HELP['PAGE_CODE'] .= '<p>If you have put a side into another language, confirm from this list the matching entry of the standard language</p>';
75
$HELP['PAGE_CODE'] .= '<p>Example:<br />Created page in sub DE: <b>Impressum</b> choose Default Language EN: <b>Imprint</b></p>';
branches/2.8.x/wb/admin/pages/languages/DE.php
5 5
 * deutsch                                                                              *
6 6
 ****************************************************************************************/
7 7

  
8
$HEADING['MODIFY_PAGE']          = 'Seite &auml;ndern';
9
$HEADING['MODIFY_PAGE_SETTINGS'] = 'Seitenoptionen &auml;ndern';
8
$HEADING['MODIFY_PAGE']          = 'Seite ändern';
9
$HEADING['MODIFY_PAGE_SETTINGS'] = 'Seitenoptionen ändern';
10 10

  
11 11
$TEXT['ADMINISTRATORS']  = 'Administratoren';
12 12
$TEXT['ALLOWED_VIEWERS'] = 'Zugelassene Besucher';
......
16 16
$TEXT['ENABLED']         = 'Eingeschaltet';
17 17
$TEXT['GROUP']           = 'Gruppen';
18 18
$TEXT['HIDDEN']          = 'Versteckt';
19
$TEXT['KEYWORDS']        = 'Schl&uuml;sselw&ouml;rter';
19
$TEXT['KEYWORDS']        = 'Schlüsselwörter';
20 20
$TEXT['LANGUAGE']        = 'Sprache';
21
$TEXT['LAST_MODIFIED']   = 'Letzte &Auml;nderung durch';
21
$TEXT['LAST_MODIFIED']   = 'Letzte Änderung durch';
22 22
$TEXT['MANAGE_SECTIONS'] = 'Abschnitte verwalten';
23
$TEXT['MENU']            = 'Men&uuml;';
24
$TEXT['MENU_TITLE']      = 'Men&uuml;titel';
25
$TEXT['MODIFY']          = '&Auml;ndern';
26
$TEXT['MODIFY_PAGE']     = 'Seite &auml;ndern';
23
$TEXT['MENU']            = 'Menü';
24
$TEXT['MENU_TITLE']      = 'Menütitel';
25
$TEXT['MODIFY']          = 'Ändern';
26
$TEXT['MODIFY_PAGE']     = 'Seite ändern';
27 27
$TEXT['NEW_WINDOW']      = 'Neues Fenster';
28 28
$TEXT['NO_SELECTION']    = 'keine Auswahl';
29 29
$TEXT['NONE']            = 'Keine';
30
$TEXT['PAGE_CODE']       = 'Seitencode (Sprachlink)';
30
$TEXT['PAGE_CODE']       = 'Seitensprachcode';
31 31
$TEXT['PAGE_TITLE']      = 'Seitentitel';
32
$TEXT['PARENT']          = '&Uuml;bergeordnete Seite';
33
$TEXT['PLEASE_SELECT']   = 'Bitte ausw&auml;hlen';
32
$TEXT['PARENT']          = 'Übergeordnete Seite';
33
$TEXT['PLEASE_SELECT']   = 'Bitte auswählen';
34 34
$TEXT['PRIVATE']         = 'Privat';
35
$TEXT['PUBLIC']          = '&Ouml;ffentlich';
35
$TEXT['PUBLIC']          = 'Öffentlich';
36 36
$TEXT['REGISTERED']      = 'registriert';
37
$TEXT['RESET']           = 'Zur&uuml;cksetzen';
37
$TEXT['RESET']           = 'Zurücksetzen';
38 38
$TEXT['SAME_WINDOW']     = 'Gleiches Fenster';
39 39
$TEXT['SAVE']            = 'Speichern';
40 40
$TEXT['SEARCHING']       = 'Suchfunktion';
......
51 51
$TEXT['SECTION_CONTENT']      = 'Inhalt';
52 52
$TEXT['SECTION_SECURITY']     = 'Sicherheit';
53 53
$TEXT['PAGE_ICON']            = 'Seitenbild';
54
$TEXT['PAGE_ICON_DIR']        = 'Verzeichnis Seitenbilder';
54 55
$TEXT['MENU_ICON_0']          = 'Menübild normal';
56
$TEXT['MENU_ICON_0_DIR']      = 'Verzeichnis Menübild normal';
55 57
$TEXT['MENU_ICON_1']          = 'Menübild hover';
58
$TEXT['MENU_ICON_1_DIR']      = 'Verzeichnis Menübild hover';
59
$TEXT['SEO_TITLE']            = 'Seotitel';
60
$MESSAGE['PAGES_LAST_MODIFIED'] = 'Letze Änderung durch';
56 61

  
57
$MESSAGE['PAGES_LAST_MODIFIED'] = 'Letze &Auml;nderung durch';
62
$HELP['PAGE_IMAGE_DIR']  = '<p>Der aktuelle Seitenbildpfad ist<br /> <b>{{icon_dir}}</b>.</p>';
63
$HELP['PAGE_IMAGE_DIR'] .='<p>Als Systemadministrator können Sie das Verzeichnis für Seiten-/Menuebilder unter <i>Optionen</i> <i>Erweiterte Optionen</i> in <i>Servereinstellung</i> ändern.</p>';
64
$HELP['PAGE_IMAGE_DIR'] .='<p>Beispiel:<br /><b>/media/banner</b></p>';
65
$HELP['PAGE_IMAGE_DIR'] .='<p>&nbsp;</p>';
66

  
67
$HELP['PAGE_CODE']  = '<p>Wenn Sie dieses Feld sehen, haben Sie das Modul für die Mehrsprachigkeit registriert.</p>';
68
$HELP['PAGE_CODE'] .= '<p>Der erste Schritt ist einen Seitenbaum, wie in der WebsiteBaker Hilfe beschrieben, zu erstellen</p>';
69
$HELP['PAGE_CODE'] .= '<p>Link: <a href=\\\'http:\/\/www.websitebaker2.org/de/hilfe/designerhandbuch/mehrsprachige-webseiten.php\\\' target=\\\'_blank\\\'>Mehrsprachige Webseiten</a></p>';
70
$HELP['PAGE_CODE'] .= '<p>Der Seitensprachbaum wird aus den erstellten Seiten der Standardsprache (Standardeinstellungen in <i>Optionen</i>) erstellt.</p>';
71
$HELP['PAGE_CODE'] .= '<p>Sie können jederzeit den Standard Seitensprachbaum durch Klick auf den Titeltext aktualisieren! Die zugewiesenen Seiten bleiben unverändert.</p>';
72
$HELP['PAGE_CODE'] .= '<p>Wenn sie eine Seite in einer anderen Sprache angelegt haben, bestätigen Sie aus dieser Liste den dazugehörigen Eintrag der Standardsprache.</p>';
73
$HELP['PAGE_CODE'] .= '<p>Beispiel:<br />Erstellte Seite im Zweig EN: <b>Imprint</b> zuweisen an Standardsprache DE: <b>Impressum</b></p>';
74

  
branches/2.8.x/wb/admin/pages/modify.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
......
14 13
 * @filesource		$HeadURL$
15 14
 * @lastmodified    $Date$
16 15
 *
17
*/
16
 */
18 17
/*
19 18
*/
20 19
// Create new admin object
......
48 47

  
49 48
// Get perms
50 49
if(!$admin->get_page_permission($page_id,'admin')) {
51
	$admin->print_error($MESSAGE['PAGES']['INSUFFICIENT_PERMISSIONS']);
50
	$admin->print_error($MESSAGE['PAGES_INSUFFICIENT_PERMISSIONS']);
52 51
}
53 52

  
54 53
$sectionId = isset($_GET['wysiwyg']) ? htmlspecialchars($admin->get_get('wysiwyg')) : NULL;
......
67 66
// $ftan_module = $GLOBALS['ftan_module'];
68 67
// Setup template object, parse vars to it, then parse it
69 68
// Create new template object
70
$template = new Template(dirname($admin->correct_theme_source('pages_modify.htt')));
69
$template = new Template(dirname($admin->correct_theme_source('pages_modify.htt')),'keep');
71 70
// $template->debug = true;
72 71
$template->set_file('page', 'pages_modify.htt');
73 72
$template->set_block('page', 'main_block', 'main');
......
88 87
			'MODIFIED_BY' => $user['display_name'],
89 88
			'MODIFIED_BY_USERNAME' => $user['username'],
90 89
			'MODIFIED_WHEN' => $modified_ts,
91
			'LAST_MODIFIED' => $MESSAGE['PAGES']['LAST_MODIFIED'],
90
//			'LAST_MODIFIED' => $MESSAGE['PAGES_LAST_MODIFIED'],
91
			'TEXT_LAST_MODIFIED' => $TEXT['LAST_UPDATED_BY'],
92
			'TEXT_MANAGE_SECTIONS' => $HEADING['MANAGE_SECTIONS']
92 93
			));
93 94

  
94 95
$template->set_block('main_block', 'show_modify_block', 'show_modify');
......
103 104
}
104 105

  
105 106
// Work-out if we should show the "manage sections" link
106
$sql  = 'SELECT `section_id` FROM `'.TABLE_PREFIX.'sections` WHERE `page_id` = '.(int)$page_id.' ';
107
$sql .= 'AND `module` = "menu_link"';
108
$query_sections = $database->query($sql);
107
//$sql  = 'SELECT `section_id` FROM `'.TABLE_PREFIX.'sections` WHERE `page_id` = '.(int)$page_id.' ';
108
//$sql .= 'AND `module` = "menu_link"';
109
//$query_sections = $database->query($sql);
109 110

  
111
if( $admin->get_permission('pages_settings') )
112
{
113
	$template->set_var(array(
114
			'SETTINGS_LINK_BEFORE' => '<a href="'.ADMIN_URL.'/pages/settings.php?page_id='.$results_array['page_id'].'">',
115
			'SETTINGS_LINK_AFTER' => '</a>',
116
			'DISPLAY_MANAGE_SETTINGS' => 'link',
117
			));
118
} else {
119
	$template->set_var(array(
120
			'SETTINGS_LINK_BEFORE' => '<span class="bold grey">',
121
			'SETTINGS_LINK_AFTER' => '</span>',
122
			'DISPLAY_MANAGE_SECTIONS' => 'link',
123
			));
124
}
125

  
126
/*-- workout if we should show the "manage sections" link ------------------------------*/
127
	$sql = 'SELECT COUNT(*) FROM `'.TABLE_PREFIX.'sections` '
128
	     . 'WHERE `page_id`='.$page_id.' AND `module`=\'menu_link\'';
129
	$bIsMenuLink = (intval($database->get_one($sql)) != 0);
130
//	$oTpl->set_block('main_block', 'show_manage_sections_block', 'show_manage_sections');
131
//	if(!$bIsMenuLink && (MANAGE_SECTIONS == true) && $admin->get_permission('pages_add') )
132
	if((MANAGE_SECTIONS == true) && $admin->get_permission('pages_add') )
133
	{
134
//		$oTpl->parse('show_manage_sections', 'show_manage_sections_block', true);
135
		$template->set_var(array(
136
				'SECTIONS_LINK_BEFORE' => '<a href="'.ADMIN_URL.'/pages/sections.php?page_id='.$results_array['page_id'].'">',
137
				'SECTIONS_LINK_AFTER' => '</a>',
138
				'DISPLAY_MANAGE_SECTIONS' => 'link',
139
				));
140
	}else {
141
//		$oTpl->set_block('show_manage_sections', '');
142
		$template->set_var(array(
143
				'SECTIONS_LINK_BEFORE' => '<span class="bold grey">',
144
				'SECTIONS_LINK_AFTER' => '</span>',
145
				'DISPLAY_MANAGE_SECTIONS' => 'link',
146
				));
147
	}
148

  
149
/*
110 150
$template->set_block('main_block', 'show_section_block', 'show_section');
111 151
if($query_sections->numRows() > 0)
112 152
{
......
124 164
	$template->set_var('DISPLAY_MANAGE_SECTIONS', 'display:none;');
125 165

  
126 166
}
127

  
167
*/
128 168
// Insert language TEXT
129 169
$template->set_var(array(
130 170
				'TEXT_CURRENT_PAGE' => $TEXT['CURRENT_PAGE'],
branches/2.8.x/wb/admin/pages/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'],
branches/2.8.x/wb/admin/pages/add.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
......
53 52
if ($parent!=0) {
54 53
	if (!$admin->get_page_permission($parent,'admin'))
55 54
    {
56
        $admin->print_error($MESSAGE['PAGES']['INSUFFICIENT_PERMISSIONS']);
55
        $admin->print_error($MESSAGE['PAGES_INSUFFICIENT_PERMISSIONS']);
57 56
    }
58 57

  
59 58
} elseif (!$admin->get_permission('pages_add_l0','system'))
60 59
{
61
	$admin->print_error($MESSAGE['PAGES']['INSUFFICIENT_PERMISSIONS']);
62
}	
60
	$admin->print_error($MESSAGE['PAGES_INSUFFICIENT_PERMISSIONS']);
61
}
63 62

  
64 63
// check module permissions:
65 64
if (!$admin->get_permission($module, 'module'))
66 65
{
67
	$admin->print_error($MESSAGE['PAGES']['INSUFFICIENT_PERMISSIONS']);
68
}	
66
	$admin->print_error($MESSAGE['PAGES_INSUFFICIENT_PERMISSIONS']);
67
}
69 68

  
70 69
// Validate data
71 70
if($title == '' || substr($title,0,1)=='.')
72 71
{
73
	$admin->print_error($MESSAGE['PAGES']['BLANK_PAGE_TITLE']);
72
	$admin->print_error($MESSAGE['PAGES_BLANK_PAGE_TITLE']);
74 73
}
75 74

  
76 75
// Check to see if page created has needed permissions
......
82 81
		if (in_array($adm_group, $admin->get_groups_id()))
83 82
        {
84 83
			$admin_perm_ok = true;
85
		} 
84
		}
86 85
	}
87 86
	if ($admin_perm_ok == false)
88 87
    {
89
		$admin->print_error($MESSAGE['PAGES']['INSUFFICIENT_PERMISSIONS']);
88
		$admin->print_error($MESSAGE['PAGES_INSUFFICIENT_PERMISSIONS']);
90 89
	}
91 90
	$admin_perm_ok = false;
92 91
	foreach ($viewing_groups as $view_group)
......
98 97
	}
99 98
	if ($admin_perm_ok == false)
100 99
    {
101
		$admin->print_error($MESSAGE['PAGES']['INSUFFICIENT_PERMISSIONS']);
100
		$admin->print_error($MESSAGE['PAGES_INSUFFICIENT_PERMISSIONS']);
102 101
	}
103 102
}
104 103

  
......
134 133
$get_same_page = $database->query("SELECT page_id FROM ".TABLE_PREFIX."pages WHERE link = '$link'");
135 134
if($get_same_page->numRows() > 0 OR file_exists(WB_PATH.PAGES_DIRECTORY.$link.PAGE_EXTENSION) OR file_exists(WB_PATH.PAGES_DIRECTORY.$link.'/'))
136 135
{
137
	$admin->print_error($MESSAGE['PAGES']['PAGE_EXISTS']);
136
	$admin->print_error($MESSAGE['PAGES_PAGE_EXISTS']);
138 137
}
139 138

  
140 139
// Include the ordering class
......
238 237
if($database->is_error()) {
239 238
	$admin->print_error($database->get_error());
240 239
} else {
241
	$admin->print_success($MESSAGE['PAGES']['ADDED'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
240
	$admin->print_success($MESSAGE['PAGES_ADDED'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
242 241
}
243 242

  
244 243
// Print admin footer
branches/2.8.x/wb/admin/interface/version.php
51 51

  
52 52
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
53 53
if(!defined('VERSION')) define('VERSION', '2.8.3');
54
if(!defined('REVISION')) define('REVISION', '1706');
54
if(!defined('REVISION')) define('REVISION', '1707');
55 55
if(!defined('SP')) define('SP', '');
branches/2.8.x/wb/pages/index.php
1
<?php
2

  
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
header('Location: ../index.php');
27 0

  

Also available in: Unified diff