directories

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
zuzupus
Forum Commoner
Posts: 70
Joined: Thu Jul 17, 2003 4:54 am

directories

Post by zuzupus »

hi,

i created one admin page where admin can give the rights

Directory under which to create new one and Directory to copy rights from
u can c from attached img the problem is when i click on left directory let say SPECIALS it opens some child trees i want something like when i click SPECIALS at same time right side SPECIAL also show child trees

hope its understandable

Code: Select all

<? $side = 1; list($tree, $maxdepth) = make_tree($session->opens[$side-1]); ?>
						<table border="0" cellpadding="0" cellspacing="0">
							<th style="line-height: 150%" colspan="<?=($maxdepth+1) ?>">Directory under which to create new one<br /></th>
							<tr>
									<td class="black2"><input type="radio" name="ddir" value="0" id="ddir0" /></td>
									<td class="black2 colspan="<?=($maxdepth+1) ?>">
										&nbsp;<label for="<?="ddir0" ?>"><top level></label>
									</td>
							</tr>
							<? foreach($tree as $r) { ?>
								<tr>
									<?=str_repeat('<td></td>', $r->depth-1) ?>
									<td class="black2"><input type="radio" name="ddir" value="<?=$r->sys_pk ?>" id="<?="dir{$r->sys_pk}" ?>" /></td>
									<td width="99%" class="black2"<?=($r->depth < $maxdepth ? (' colspan="'.($maxdepth-$r->depth+1).'"') : '') ?>>
										&nbsp;<label for="<?="dir{$r->sys_pk}" ?>"><? if ($r->mode) { ?><a href="<?=htmlentities("diradmin.phtml?click=".($r->mode == 2 ? 1 : 2)."&id={$r->sys_pk}&side={$side}") ?>" style="color: inherit;"><?=htmlentities(($r->mode == 2) ? '-' : '+') ?><? } ?><?=htmlentities($r->name) ?><? if ($r->mode) { ?></a><? } ?></label>
									</td>
								</tr>
							<? } ?>
						</table>


<td valign="top">
						<? $side = 2; list($tree, $maxdepth) = make_tree($session->opens[$side-1]); ?>
						<table border="0" cellpadding="0" cellspacing="0">
							<th style="line-height: 150%" colspan="<?=($maxdepth+1) ?>">Directory to copy rights from<br /></th>
							<? foreach($tree as $r) { ?>
								<tr>
									<?=str_repeat('<td></td>', $r->depth-1) ?>
									<td class="black2"><input type="radio" name="dir" value="<?=$r->sys_pk ?>" id="<?="dir{$r->sys_pk}" ?>" /></td>
									<td width="99%" class="black2"<?=($r->depth < $maxdepth ? (' colspan="'.($maxdepth-$r->depth+1).'"') : '') ?>>
										&nbsp;<label for="<?="dir{$r->sys_pk}" ?>"><? if ($r->mode) { ?><a href="<?=htmlentities("diradmin.phtml?click=".($r->mode == 2 ? 1 : 2)."&id={$r->sys_pk}&side={$side}") ?>" style="color: inherit;"><?=htmlentities(($r->mode == 2) ? '-' : '+') ?><? } ?><?=htmlentities($r->name) ?><? if ($r->mode) { ?></a><? } ?></label>
									</td>
								</tr>
							<? } ?>
						</table><br />
					</td>
the link is http://server2.vitodesign.com/scripts/diradmin.phtml

thanks in advance
zuzupus
Forum Commoner
Posts: 70
Joined: Thu Jul 17, 2003 4:54 am

Re: directories

Post by zuzupus »

anybody understood my problem please help me out in this situation im helpless even i never faced this kind of problem that if u click on one link then same link on other hand will open

thanks in advance
Post Reply