1<?php
2
3require_once(dirname(__FILE__)."/../pfccommand.class.php");
4
5class pfcCommand_debug extends pfcCommand
6{
7  function run(&$xml_reponse, $p)
8  {
9    $c =& pfcGlobalConfig::Instance();
10    $u =& pfcUserConfig::Instance();
11
12    if ($p["param"] == "userconfig")
13    {
14      $msg   = "";
15      $msg  .= var_export($u, true);
16      $msg = str_replace("\n","",addslashes(nl2br($msg)));
17      $xml_reponse->script("pfc.handleResponse('".$this->name."', 'ok', '".$msg."');");
18    }
19
20    if ($p["param"] == "globalconfig")
21    {
22      $msg   = "";
23      $msg  .= var_export($c, true);
24      $msg = str_replace("\n","",addslashes(nl2br($msg)));
25      $xml_reponse->script("pfc.handleResponse('".$this->name."', 'ok', '".$msg."');");
26    }
27    if ($p["param"] == "phpserver")
28    {
29      $msg   = "";
30      $msg  .= var_export($_SERVER, true);
31      $msg = str_replace("\n","",addslashes(nl2br($msg)));
32      $xml_reponse->script("pfc.handleResponse('".$this->name."', 'ok', '".$msg."');");
33    }
34
35  }
36}
37
38?>