This repository has been archived by the owner on Jan 3, 2023. It is now read-only.
forked from sjsrey/gtd-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes2.php
74 lines (74 loc) · 2.46 KB
/
types2.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
$title='Change hierarchy levels';
require_once 'header.inc.php';
$levels=array('m','v','o','g','p');
?>
<form action='processTypes.php' method='post'>
<table class='datatable' summary='table showing which items can be children of other types'>
<thead>
<tr>
<th>Child \ PARENT</th>
<?php foreach ($levels as $ptype) { ?>
<th><?php echo strtoupper(getTypes($ptype)); ?></th>
<?php } ?>
<th>Suppress from orphans report</th>
</tr>
</thead>
<tbody>
<?php
$ccount=0;
foreach (getTypes() as $ctype=>$ctypename) {
if ($ctype==='i' || $ctype==='T' || $ctype==='s' || $ctype==='m') continue;
?>
<tr>
<th><?php echo $ctypename; ?></th>
<?php
$pcount=0;
foreach ($levels as $ptype) { ?>
<td><?php if ($pcount<=$ccount+1) {
echo "<input type='checkbox' name='parentchild[]' "
,"value='$ptype$ctype' "
,"title='Mark if a $ctypename can be the child of a "
,getTypes($ptype),"' ";
if ( in_array($ptype ,$_SESSION['hierarchy']['parents'][$ctype] ) )
echo " checked='checked' ";
if ($ptype==='p')
echo " disabled='disabled' ";
echo " />";
} else
echo ' ';
?></td>
<?php
$pcount++;
} ?>
<td>
<input type='checkbox' name='suppressAsOrphan[]' value='<?php
echo $ctype;
?>' title='Mark if items of type <?php
echo $ctypename;
?> should be suppressed from the list of orphans' <?php
if (strpos($_SESSION['hierarchy']['suppressAsOrphans'],$ctype)!==false)
echo " checked='checked' ";
if ($ctype==='m') echo " disabled='disabled' ";
?> />
</td>
</tr>
<?php
$ccount++;
} ?>
</tbody>
</table>
<div class='formbuttons'>
<input type='submit' value='Apply' name='submit' />
<input type='reset' value='Reset' name='reset' />
<input type='submit' value='Revert to original (pre-v0.9) level names and relationships' name='L0p8' />
<input type='hidden' name='suppressAsOrphan[]' value='m' />
<input type='hidden' name='suppressAsOrphan[]' value='i' />
<?php foreach (array('pL','pC','pa','pr','pw','pp','LT','CT') as $PCpair) { ?>
<input type='hidden' name='parentchild[]' value='<?php
echo $PCpair;
?>' />
<?php } ?>
</div>
</form>
<?php require_once 'footer.inc.php'; ?>