Project

General

Profile

« Previous | Next » 

Revision 529

Added by doc almost 17 years ago

introduced the enhanced pages admin dialogue developed by icouto

View differences:

index.php
99 99

  
100 100
function make_list($parent, $editable_pages) {
101 101
	// Get objects and vars from outside this function
102
	global $admin, $template, $database, $TEXT, $MESSAGE;
102
	global $admin, $template, $database, $TEXT, $MESSAGE, $HEADING;
103 103
	?>
104 104
	<ul id="p<?php echo $parent; ?>" <?php if($parent != 0) { echo 'class="page_list" '; if($_COOKIE["p".$parent] =="1"){echo'style="display:block;"'; }} ?>>
105 105
	<?php	
......
131 131
					$editable_pages = $editable_pages+1;
132 132
				}
133 133
			} else {
134
				if($page['visibility'] == 'private') {
135
					continue;
136
				}
137
				else {
138
					$can_modify = false;
139
				}
134
				$can_modify = false;
140 135
			}
141 136
						
142 137
			// Work out if we should show a plus or not
......
171 166
				</td>
172 167
				<?php if($admin->get_permission('pages_modify') == true AND $can_modify == true) { ?>
173 168
				<td>
174
					<a href="<?php echo ADMIN_URL; ?>/pages/modify.php?page_id=<?php echo $page['page_id']; ?>" title="<?php echo $TEXT['MODIFY']; ?>"><?php echo ($page['page_title']); ?></a>				
169
					<a href="<?php echo ADMIN_URL; ?>/pages/modify.php?page_id=<?php echo $page['page_id']; ?>" title="<?php echo $TEXT['MODIFY']; ?>">
170
						<?php if($page['visibility'] == 'public') { ?>
171
							<img src="<?php echo ADMIN_URL; ?>/images/visible_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['PUBLIC']; ?>" border="0" align="left" style="margin-right: 5px" />
172
						<?php } elseif($page['visibility'] == 'private') { ?>
173
							<img src="<?php echo ADMIN_URL; ?>/images/private_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['PRIVATE']; ?>" border="0" align="left" style="margin-right: 5px" />
174
						<?php } elseif($page['visibility'] == 'registered') { ?>
175
							<img src="<?php echo ADMIN_URL; ?>/images/keys_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['REGISTERED']; ?>" border="0" align="left" style="margin-right: 5px" />
176
						<?php } elseif($page['visibility'] == 'hidden') { ?>
177
							<img src="<?php echo ADMIN_URL; ?>/images/hidden_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['HIDDEN']; ?>" border="0" align="left" style="margin-right: 5px" />
178
						<?php } elseif($page['visibility'] == 'none') { ?>
179
							<img src="<?php echo ADMIN_URL; ?>/images/none_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['NONE']; ?>" border="0" align="left" style="margin-right: 5px" />
180
						<?php } elseif($page['visibility'] == 'deleted') { ?>
181
							<img src="<?php echo ADMIN_URL; ?>/images/deleted_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['DELETED']; ?>" border="0" align="left" style="margin-right: 5px" />
182
						<?php } 
183
						echo ($page['page_title']); ?>
184
					</a>				
175 185
				</td>
176 186
				<?php } else { ?>
177 187
				<td>
178
					<?php echo ($page['page_title']); ?>
188
					<?php if($page['visibility'] == 'public') { ?>
189
						<img src="<?php echo ADMIN_URL; ?>/images/visible_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['PUBLIC']; ?>" border="0" align="left" style="margin-right: 5px" />
190
					<?php } elseif($page['visibility'] == 'private') { ?>
191
						<img src="<?php echo ADMIN_URL; ?>/images/private_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['PRIVATE']; ?>" border="0" align="left" style="margin-right: 5px" />
192
					<?php } elseif($page['visibility'] == 'registered') { ?>
193
						<img src="<?php echo ADMIN_URL; ?>/images/keys_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['REGISTERED']; ?>" border="0" align="left" style="margin-right: 5px" />
194
					<?php } elseif($page['visibility'] == 'hidden') { ?>
195
						<img src="<?php echo ADMIN_URL; ?>/images/hidden_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['HIDDEN']; ?>" border="0" align="left" style="margin-right: 5px" />
196
					<?php } elseif($page['visibility'] == 'none') { ?>
197
						<img src="<?php echo ADMIN_URL; ?>/images/none_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['NONE']; ?>" border="0" align="left" style="margin-right: 5px" />
198
					<?php } elseif($page['visibility'] == 'deleted') { ?>
199
						<img src="<?php echo ADMIN_URL; ?>/images/deleted_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['DELETED']; ?>" border="0" align="left" style="margin-right: 5px" />
200
					<?php } 
201
					echo ($page['page_title']); ?>
179 202
				</td>
180 203
				<?php } ?>
181 204
				<td align="left" width="232">
182 205
					<font color="#999999"><?php echo ($page['menu_title']); ?></font>
183 206
				</td>
184
				<td align="center" valign="middle" width="90">
185
				<?php if($page['visibility'] == 'public') { ?>
186
					<img src="<?php echo ADMIN_URL; ?>/images/visible_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['PUBLIC']; ?>" border="0" />
187
				<?php } elseif($page['visibility'] == 'private') { ?>
188
					<img src="<?php echo ADMIN_URL; ?>/images/private_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['PRIVATE']; ?>" border="0" />
189
				<?php } elseif($page['visibility'] == 'registered') { ?>
190
					<img src="<?php echo ADMIN_URL; ?>/images/keys_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['REGISTERED']; ?>" border="0" />
191
				<?php } elseif($page['visibility'] == 'hidden') { ?>
192
					<img src="<?php echo ADMIN_URL; ?>/images/hidden_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['HIDDEN']; ?>" border="0" />
193
				<?php } elseif($page['visibility'] == 'none') { ?>
194
					<img src="<?php echo ADMIN_URL; ?>/images/none_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['NONE']; ?>" border="0" />
195
				<?php } elseif($page['visibility'] == 'deleted') { ?>
196
					<img src="<?php echo ADMIN_URL; ?>/images/deleted_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['DELETED']; ?>" border="0" />
197
				<?php } ?>
207
				<td width="20">
208
					<?php if($page['visibility'] != 'deleted' AND $page['visibility'] != 'none') { ?>
209
					<a href="<?php echo $admin->page_link($page['link']); ?>" target="_blank" title="<?php echo $TEXT['VIEW']; ?>">
210
						<img src="<?php echo ADMIN_URL; ?>/images/view_16.png" border="0" alt="<?php echo $TEXT['VIEW']; ?>" />
211
					</a>
212
					<?php } ?>
198 213
				</td>
199 214
				<td width="20">
200 215
					<?php if($page['visibility'] != 'deleted') { ?>
......
209 224
						</a>
210 225
					<?php } ?>
211 226
				</td>
227
				
228
				<!-- 'MANAGE SECTIONS' BUTTON -->
212 229
				<td width="20">
230
					<?php
231
					// Work-out if we should show the "manage sections" link
232
					$query_sections = $database->query("SELECT section_id FROM ".TABLE_PREFIX."sections WHERE page_id = '" . $page['page_id'] . "' AND module = 'menu_link'");
233
					if(($query_sections->numRows() == 0) && (MANAGE_SECTIONS == 'enabled')) {
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 ADMIN_URL; ?>/images/sections_16.png" border="0" alt="<?php echo $HEADING['MANAGE_SECTIONS']; ?>" />	
237
						</a>
238
					<?php } ?>
239
				</td>
240
				
241
				
242
				<td width="20">
213 243
				<?php if($page['position'] != 1) { ?>
214 244
					<?php if($page['visibility'] != 'deleted') { ?>
215 245
						<?php if($admin->get_permission('pages_settings') == true AND $can_modify == true) { ?>
......
238 268
					</a>
239 269
					<?php } ?>
240 270
				</td>
241
				<td width="20">
242
					<?php if($page['visibility'] != 'deleted' AND $page['visibility'] != 'none') { ?>
243
					<a href="<?php echo $admin->page_link($page['link']); ?>" target="_blank">
244
						<img src="<?php echo ADMIN_URL; ?>/images/view_16.png" border="0" alt="<?php echo $TEXT['VIEW']; ?>" />
245
					</a>
246
					<?php } ?>
247
				</td>
248 271
			</tr>
249 272
			</table>
250 273
			</li>
......
293 316
			&nbsp;
294 317
		</td>
295 318
		<td>
296
			<?php echo $TEXT['PAGE_TITLE']; ?>:
319
			<?php echo $TEXT['VISIBILITY'] .' / ' .$TEXT['PAGE_TITLE']; ?>:
297 320
		</td>
298
		<td width="175" align="left">
321
		<td width="235" align="left">
299 322
			<?php echo $TEXT['MENU_TITLE']; ?>:
300 323
		</td>
301
		<td width="130" align="right">
302
			<?php echo $TEXT['VISIBILITY']; ?>:
303
		</td>
304 324
		<td width="125" align="center">
305 325
			<?php echo $TEXT['ACTIONS']; ?>:
306 326
		</td>		

Also available in: Unified diff