3179cf67e28587a943d4494468ca5821592c6d9b
[atutor.git] / mods / wiki / tools / t_control.php
1 <?php
2   #-- remake of an existing admin/ plugin
3   include("t_config.php");
4   include("plugins/admin/control.php");
5   #-- override some settings, if not concurrently included
6   if (!defined("CONCURRENT_INCLUDE")) {
7     $ewiki_config["script"] = "t_control.php?id=";
8     $ewiki_config["print_title"] = 0;
9     $ewiki_ring = 0;
10   }
11 ?>
12 <html>
13 <head>
14  <title>single page control (combined admin features)</title>
15  <link rel="stylesheet" type="text/css" href="t_config.css">
16 </head>
17 <body bgcolor="#ffffff" text="#000000">
18 <?php
19
20    #-- id + title
21    $id = ewiki_id();
22    if ($l = strpos($id, "/")) {
23       $id = substr($id, $l+1);
24    }
25    echo "<h1>control page '" .htmlentities($id) . "'</h1>\n\n";
26
27    #-- exec plugin
28    if ($data = ewiki_db::GET($id)) {
29       $action = "control";
30       echo str_replace("<hr>", "", ewiki_action_control_page($id, $data, $action));
31    }
32    else {
33       echo "<b>error</b>: page does not exist\n<br>\n\n<br><br>\n";
34    }
35
36 ?>
37 </body>
38 </html>