-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathcmd.php
57 lines (49 loc) · 1.07 KB
/
cmd.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
<?php
function cmd($c)
{
$href = $_SESSION['RelativePath'];
printf("<a href=\"%s/../script/%s.php\">%s</a>", $href, $c, $c);
}
function cmds()
{
$numargs = func_num_args();
$arg_list = func_get_args();
for ($i = 0; $i < $numargs; $i++) {
cmd($arg_list[$i]);
if($i < $numargs - 1)
echo(", ");
}
}
function usedby()
{
$numargs = func_num_args();
$arg_list = func_get_args();
echo("<span style=\"background-color:#FFeeDD;\">[Used by ");
if($numargs == 0)
cmds("convert", "mogrify");
else
{
call_user_func_array(cmds,$arg_list);
}
echo(".]</span>\n");
}
function intro()
{
$numargs = func_num_args();
$arg_list = func_get_args();
echo("<table style='background-color:#FFFFE0; margin-left:40px; margin-right:40px; width:88%'><tr><td style='width:75%'>");
echo($arg_list[0]);
echo("</td><td style='text-align:right;'>");
array_shift($arg_list);
if($numargs > 1)
{
echo("[");
call_user_func_array('cmds',$arg_list);
echo("]");
}
echo("</td></tr></table>\n");
}
// margin: 1.33em 0px;
// cellpadding='0%' cellspacing='0'
// display: block
?>