Beispiel #1
0
/**
 * about main function
 * @return string html
 */
function about_main()
{
    global $config;
    if (getVar("consistentcheck")) {
        return check_db_constraints(false);
    }
    $txt = '
      <div class="row-fluid">
      <div class="span3 bs-docs-sidebar">
        <ul id="navlist" class="nav nav-list bs-docs-sidenav affix-top">
          <li><a href="#log1">' . t("about") . " " . getConf("site_name") . '</a>';
    if (user_access("administer persons", "churchcore")) {
        $txt .= '
          <li><a href="#log2">' . t("current.permissions") . '</a>
          <li><a href="#log3">' . t("current.config") . '</a>
          <li><a href="#log4">' . t("consistence.check") . '</a>';
    }
    $txt .= '
      </div>
      <div class="span9">
        <anchor id="log1"/><h1>' . t("about") . " " . getConf("site_name") . '</h1>
        <div class="well">';
    $txt = applyFilter('add_about_text', $txt);
    $txt .= '
        </div>
        <p>PHP-Version: ' . phpversion() . '
        <br>Browser: ' . $_SERVER['HTTP_USER_AGENT'] . '
        <br>ChurchTools2.0-Version: ' . $config["version"];
    if ($user = getVar("user", false, $_SESSION)) {
        $txt .= "\n        <p>" . t("logged.in.as", "{$user->vorname} {$user->name} [{$user->id}]") . " - {$user->email}";
        // print out user permissions
        ob_start();
        print_r($user->auth);
        // ob_get_clean() returns the contents of the output buffer. Then improve it for showing on a webpage
        $var = preg_replace('/\\n/', "<br>", ob_get_clean());
        $var = preg_replace('/ /', "&nbsp; ", $var);
        $txt .= '
        <anchor id="log2"/><h2>' . t("current.permissions") . '</h2><p >' . $var;
        // print out configuration
        if (user_access("administer persons", "churchcore")) {
            $config["password"] = "******";
            $config["encryptionkey"] = "****";
            if (getConf("mail_pear_args")) {
                $config["mail_pear_args"]["password"] = "******";
            }
            ob_start();
            print_r($config);
            // ob_get_clean() returns the contents of the output buffer. Then improve it for showing on a webpage
            $var = preg_replace('/\\n/', "<br>", ob_get_clean());
            $var = preg_replace('/ /', "&nbsp; ", $var);
            $txt .= '
          <anchor id="log3"/><h2>' . t("current.config") . '</h2><p >' . $var . '
          <anchor id="log4"/><h2>' . t("current.db.consistence.check") . '</h2>
          <p >';
            $res = check_db_constraints();
            if ($res == "") {
                $txt .= "\n          <p>" . t("found.no.problem");
            } else {
                $txt .= $res . '
          <p><a href="?q=about&consistentcheck=true" class="btn">' . t("detailed.report") . '</a>';
            }
        }
    }
    $txt .= '</div>';
    return $txt;
}
Beispiel #2
0
function about_main()
{
    global $config;
    if (isset($_GET["consistentcheck"])) {
        return check_db_constraints(false);
    }
    $txt = '<div class="row-fluid">';
    $txt .= '<div class="span3 bs-docs-sidebar">';
    $txt .= '<ul id="navlist" class="nav nav-list bs-docs-sidenav affix-top">';
    $txt .= '<li><a href="#log1">' . t("about") . " " . variable_get("site_name") . '</a>';
    if (user_access("administer persons", "churchcore")) {
        $txt .= '<li><a href="#log2">' . t("current.permissions") . '</a>';
        $txt .= '<li><a href="#log3">' . t("current.config") . '</a>';
        $txt .= '<li><a href="#log4">' . t("consistence.check") . '</a>';
    }
    $txt .= '</div>';
    $txt .= '<div class="span9">';
    $txt .= '<anchor id="log1"/><h1>' . t("about") . " " . variable_get("site_name") . '</h1><div class="well">';
    $txt .= '
<p>' . t("churchtools.claim") . '
<br>' . t("read.more") . ': <a href="http://www.churchtools.de" target="_clean">www.churchtools.de</a>
</p>
ChurchTools 2.0  is licensed under the following license: MIT license
<br/>The MIT License (MIT)
<br/>Copyright (c) 2014 Jens Martin Rauen
<br/>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
<br/>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
<br/>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
<br/>ChurchTools Pro is licensed under commercial licence.
<br/>(C) 2014 Jens Martin Rauen
</p></div>
';
    $txt .= "<p>PHP-Version: " . phpversion();
    $txt .= "<br>Browser: " . $_SERVER['HTTP_USER_AGENT'];
    $txt .= "<br>ChurchTools2.0-Version: " . $config["version"];
    if (isset($_SESSION["user"])) {
        $user = $_SESSION["user"];
        $txt .= "<p>" . t("logged.in.as", "{$user->vorname} {$user->name} [{$user->id}]");
        $txt .= " - {$user->email}";
        ob_start();
        print_r($user->auth);
        // ob_get_clean() returns the contents of the last buffer opened.  The first "blah" and the output of var_dump are flushed from the top buffer on exit
        $var = preg_replace('/\\n/', "<br>", ob_get_clean());
        $var = preg_replace('/ /', "&nbsp; ", $var);
        $txt .= '<anchor id="log2"/><h2>' . t("current.permissions") . '</h2><p >' . $var;
        if (user_access("administer persons", "churchcore")) {
            $config["password"] = "******";
            $config["encryptionkey"] = "****";
            if (isset($config["mail_pear_args"])) {
                $config["mail_pear_args"]["password"] = "******";
            }
            ob_start();
            print_r($config);
            // ob_get_clean() returns the contents of the last buffer opened.  The first "blah" and the output of var_dump are flushed from the top buffer on exit
            $var = preg_replace('/\\n/', "<br>", ob_get_clean());
            $var = preg_replace('/ /', "&nbsp; ", $var);
            $txt .= '<anchor id="log3"/><h2>' . t("current.config") . '</h2><p >' . $var;
            $txt .= '<anchor id="log4"/><h2>' . t("current.db.consistence.check") . '</h2><p >';
            $res = check_db_constraints();
            if ($res == "") {
                $txt .= "<p>" . t("no.problem.found");
            } else {
                $txt .= $res;
                $txt .= '<p><a href="?q=about&consistentcheck=true" class="btn">' . t("detailed.report") . '</a>';
            }
        }
    }
    $txt .= '</div>';
    return $txt;
}