コード例 #1
0
        $V .= "<h2>{$text}</h2>\n";
        $V .= $this->DatabaseMetrics();
        $V .= "</td>";
        $V .= "</tr></table>\n";
        $text = _("Active FOSSology queries");
        $V .= "<h2>{$text}</h2>\n";
        $V .= $this->DatabaseQueries();
        $text = _("Disk Space");
        $V .= "<h2>{$text}</h2>\n";
        $V .= $this->DiskFree();
        return $V;
    }
    /**
     * \brief execute a shell command
     * \param $cmd - command to execute
     * \return command results
     */
    protected function DoCmd($cmd)
    {
        $fin = popen($cmd, "r");
        $buffer = "";
        while (!feof($fin)) {
            $buffer .= fread($fin, 8192);
        }
        pclose($fin);
        return $buffer;
    }
}
$NewPlugin = new dashboard();
$NewPlugin->Initialize();