Location: PHPKode > projects > ACollab > include/html/folder_editor.inc.php
<?php

if (!defined('AC_INCLUDE_PATH')) { exit; }

if (isset($_POST['delete'], $id)) {
	if (is_array($folders[$id]['children'])) {
		return;
	}

	echo '<p align="center"><strong>'._AC('confirm_delete').'</strong></p>';
	echo '<p align="center"><a href="'.$_SERVER['PHP_SELF'].'?d=1'.SEP.'id='.$id.'">'._AC('yes_delete').'</a>, <a href="'.$_SERVER['PHP_SELF'].'">'._AC('no_cancel').'</a></p>';

	return;
}
if (isset($id)) {
	echo '<p><a href="'.$_SERVER['PHP_SELF'].'?pid='.$id.'">'._AC('create_sub_folder').'</a></p>';
}

?>
<form action ="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form">
<input type="hidden" name="id" value="<?php echo $id; ?>" />
<input type="hidden" name="form_submit" value="1" />
<table border="0" cellspacing="0" cellpadding="2" align="center" class="box2">
<?php if (isset($id)): ?>
	<tr>
		<th colspan="5" class="box"><h3><?php echo _AC('edit_folder'); ?></h3></th>
	</tr>
<?php else: ?>
	<tr>
		<th colspan="5" class="box"><h3><?php echo _AC('create_folder'); ?></h3></th>
	</tr>
<?php endif; ?>
<tr>
	<td class="row1">&nbsp;</td>
	<td colspan="3" class="row1"><img src="images/clr.gif" height="1" width="1" alt="" /><br /><?php
		echo _AC('denotes_required', '<img src="images/required.gif" height="14" width="14" alt="'._AC('required_field').'" />');
	?><br /></td>
	<td class="row1">&nbsp;</td>
</tr>
<tr>
	<td class="row1">&nbsp;</td>
	<td class="row1" align="right"><label for="title"><b><?php echo _AC('title'); ?>:</b></label></td>
	<td class="row1"><img src="images/required.gif" height="14" width="14" alt="<?php echo _AC('required_field'); ?>" /></td>
	<td class="row1"><input type="text" name="title" class="input" size="40" maxlength="100" id="title" value="<?php echo  htmlentities($folders[$id]['title']); ?>" onfocus="this.className='input highlight'" onblur="this.className='input'" /></td>
	<td class="row1">&nbsp;</td>
</tr>
<tr>
	<td class="row1">&nbsp;</td>
	<td class="row1" align="right"><label for="parent"><b><?php echo _AC('parent_folder'); ?>:</b></label></td>
	<td class="row1"><img src="images/required.gif" height="14" width="14" alt="<?php echo _AC('required_field'); ?>" /></td>
	<td class="row1"><select name="parent_folder_id" id="parent"><?php

			if ($pid) {
				$current_folder_id = $pid;
				$exclude = FALSE; /* don't exclude the children */
			} else {
				$current_folder_id = $id;
				$exclude = TRUE; /* exclude the children */
			}

			echo '<option value="0">&nbsp;&nbsp;&nbsp;[ '._AC('none').' ]&nbsp;&nbsp;&nbsp;</option>';

			/* @See: include/lib/folders */
			select_folders($folders, 0, $current_folder_id, $exclude);
		?>
					</select></td>
	<td class="row1">&nbsp;</td>
</tr>
<tr>
	<td class="row1">&nbsp;</td>
	<td class="row1" colspan="3" align="right"><br />
		<?php if (isset($id)): ?>
			<input type="submit" name="submit" value=" <?php echo _AC('apply'); ?> " class="submitY" onfocus="this.className='submitY highlight'" onblur="this.className='submitY'" /> &nbsp; 
			<input type="submit" name="delete" value=" <?php echo _AC('delete'); ?> " class="submitN" onfocus="this.className='submitN highlight'" onblur="this.className='submitN'" /> &nbsp; 
		<?php else: ?>
				<input type="submit" name="submit" value="<?php echo _AC('create'); ?>" class="submitY" onfocus="this.className='submitY highlight'" onblur="this.className='submitY'" />
			
		<?php endif; ?>
			<input type="submit" name="cancel" value="<?php echo _AC('cancel'); ?>" class="submitN" onfocus="this.className='submitN highlight'" onblur="this.className='submitN'" /><br /><br /></td>
	<td class="row1">&nbsp;</td>
</tr>
</table>
</form>
Return current item: ACollab