changed git call from https to git readonly
[atutor.git] / mods / wiki / tools / t_commander / filemenu.php
1 <?php
2 #  include("t_config.php");
3 ?>
4 <html>
5 <head>
6  <title>WikiCommander:FileMenu</title>
7  <link rel="stylesheet" type="text/css" href="80x25.css">
8 </head>
9 <body bgcolor="#222222" text="#dddddd" class="FileMenu Menu">
10 <div width="100%">
11 <?php
12
13   $menu = array(
14     "Left" => array(
15        "Reload" => "parent.page.location.reload()",
16        "Disable" => "parent.left_off=1, parent.page.location.href='action.php?nop=1'",
17        "EditorOn" => "parent.left_off=0",
18     ),
19     "File" => array(
20        "Edit" => "parent.page.location.href='edit.php?id='+escape(parent.id)",
21        "New" => "parent.new_page()",
22        "Rename" => "parent.rename_page()",
23        "Copy" => "parent.copy_page()",
24        "Delete" => "parent.delete_page()",
25     ),
26     "Command" => array(
27        "CmdLineHelp" => "parent.page.location.href='action.php?cmd=1&input=help'",
28        "Backup" => "",
29        "Upload" => "",
30        "Transfer" => "",
31     ),
32     "Option" => "0==0",
33     "Right" => array(
34        "Select" => "parent.list_selection()",
35        "Filter" => "parent.show_filtered_list()",
36        "Reload" => "parent.list.location.reload()",
37     ),
38   );
39 #  if ($e = $_REQUEST["which"]) {
40 #     $menu = $menu[$e];
41 #  }
42   
43   #-- output first-level menu
44   echo "<a name=\"main\"></a>\n";
45   foreach ($menu as $id=>$js) {
46      if (is_array($js)) {
47         $href = "#$id";
48         $old = 'filemenu.php?which='.$id;
49         echo "<a href=\"$href\">$id</a>\n";
50      }
51      else {
52         echo "<a href=\"#main\" onClick=\"void($js);\">$id</a>\n";
53      }
54   }
55
56   #-- output second-level menus
57   foreach ($menu as $id=>$ent) {
58      if (is_array($ent)) {
59         echo "\n\n<br><br>\n";
60         echo "<a name=\"$id\"><small><small>$id</small></small></a>\n";
61         echo "<small><a href=\"#main\">back</a></small>\n";
62         foreach ($ent as $id=>$js) {
63            echo "<a href=\"#main\" onClick=\"void($js);\">$id</a>\n";
64         }
65      }
66   }
67
68 ?>
69 </div>
70 </body>
71 </html>