Exemplo n.º 1
0
    static function print_footer()
    {
        print '
		</div>
		<div class="footer">
			' . common::get_version() . ' | <a href="' . common::url('website') . '">www.phpBF.net</a>
		</div>
		</body></html>
		';
        ob_flush();
    }
Exemplo n.º 2
0
<?php

if (LOGGED !== true) {
    die;
}
print '
<h2>New configuration saved</h2>
To edit again, hit <a href="' . common::url('self') . '?view=config">Configure</a>. The new content of <i>config.php</i> is below. To access this values from you scripts, read the Configuration section in the doc.
<br/><br/>
<pre>' . htmlentities(file_get_contents(CONFIG_FILE)) . '</pre>';
Exemplo n.º 3
0
					if(rules[i].selectorText.toLowerCase()==".advanced"){
						targetrule=rules[i]
						break outer;
					}
				}
			}
			targetrule.style.display = advanced? "block":"none";
		}
	</script>';
    print '<div style="float: left; width: 130px; margin-right: 20px;"><ul id="menu">';
    foreach (config::$sections as $id => $sec) {
        print '<li' . (isset($sec['advanced']) && $sec['advanced'] ? ' class="advanced"' : '') . '><a id="tabbutton_' . $id . '" ' . ($first == $id ? 'class="selected"' : '') . ' onclick="showtab(\'' . $id . '\');">' . $sec['title'] . '</a></li>';
    }
    print '</ul>';
    print '<br/><a style="font-size: 80%;" href="' . common::url('self') . '?view=reset_confirm">Reset to default settings</a>';
    print '</div><form action="' . common::url('self') . '?edit=config" method="post"><div style="position: absolute; right: 0; top: 40px; text-align:right; font-size: 90%;"><label>Show advanced options <input id="advancedButton" type="checkbox" onclick="switchAdvanced(this.checked);"/></label></div>';
    print '<script language="javascript">switchAdvanced(get("advancedButton").checked);</script>';
    foreach (config::$sections as $id_sec => $sec) {
        if (!isset($sec['advanced'])) {
            $sec['advanced'] = false;
        }
        print '<div' . ($sec['advanced'] ? ' class="advanced"' : '') . ' id="tab_' . $id_sec . '" style="float: left;width: 650px; margin-bottom: 30px; display: ' . ($first == $id_sec ? 'block' : 'none') . ';">';
        foreach (config::$subsections[$id_sec] as $id_sub => $sub) {
            if (!isset($sub['advanced'])) {
                $sub['advanced'] = false;
            }
            if (!isset($sub['desc'])) {
                $sub['desc'] = "";
            }
            print '<h3' . ($sec['advanced'] || $sub['advanced'] ? ' class="advanced"' : '') . '>' . $sub['title'] . '</h3>';
            if ($sub['desc']) {
Exemplo n.º 4
0
<?php

if (LOGGED !== true) {
    die;
}
print '
<h2>Thank for using the phpBF Framework</h2>
To get started click on <a href="' . common::url('self') . '?view=config">Configure</a>.
<br/><br/>
<b>Version:</b> ' . common::get_version() . '
<br/><br/>
<b>License</b>: <a href="' . common::url('self') . '?view=license">GNU Lesser General Public License v3</a>
<br/><br/>
Please help by reporting any bugs you encounter, and <a href="http://loicminghetti.net/en/contact" target="_blank">contact me</a> if you need any help ;-)
<br/><br/>
Project website: <a href="' . common::url('website') . '">' . common::url('website') . '</a>
<br/>
Project on sourceforge.net: <a href="' . common::url('sourceforge') . '">' . common::url('sourceforge') . '</a>
';
Exemplo n.º 5
0
<?php

if (LOGGED !== true) {
    die;
}
print '
<h2>Backup</h2>
To download a complete backup of your website root, your server must be running on a linux OS and PHP must be allowed to execute shell commands.
<br/><br/>
<a href="' . common::url('self') . '?edit=backup">Download backup</a>.
';
Exemplo n.º 6
0
<?php

if (LOGGED !== true) {
    die;
}
$log = get_file("log", "errorlog.txt")->read();
$dom = new DOMDocument();
$dom->loadXML('<root>' . $log . '</root>');
print '
<h2>Error log (<a href="' . common::url('self') . '?edit=clear_log">clear</a>)</h2>
<ol>';
foreach ($dom->childNodes->item(0)->childNodes as $error) {
    if (!$error instanceof DOMElement) {
        continue;
    }
    print '<li>';
    foreach ($error->childNodes as $line) {
        if (!$line instanceof DOMElement) {
            continue;
        }
        if ($line->tagName == 'trace') {
            print 'Trace:<ul>';
            foreach ($line->childNodes as $item) {
                if (!$item instanceof DOMElement || trim($item->nodeValue) == '') {
                    continue;
                }
                print '<li>' . $item->nodeValue . '</li>';
            }
            print '</ul><br/>';
        } else {
            print $line->tagName . ': <b>' . $line->nodeValue . '</b><br/>';
Exemplo n.º 7
0
<?php

if (LOGGED !== true) {
    die;
}
print '
	<h2>Reset config file</h2>
	Are you sure you want to reset config file with default values?<br/>It is recommended to backup config file first.
	<br/><br/>
	<input type="button" value="Reset" onclick="document.location.href=\'' . common::url('self') . '?edit=config\';"/>&nbsp;
	<input type="button" value="Cancel" onclick="document.location.href=\'' . common::url('self') . '?view=config\';"/>
	';
Exemplo n.º 8
0
		table.tests td {
			vertical-align: middle;
			border-bottom: solid 1px #CCCCCC;
		}
		table.tests td.title {
			width: 300px;
		}
	</style>';
print '
<h2>Test server configuration</h2>
This page gives you information about the server based on current configuration. Make sure you have no values in red otherwise the framework might not work properly. Values in orange might need your attention, but will not prevent the framework from working.';
print '<h3>Web server</h3>
	<table cellspacing="0" cellpadding="5" class="tests"><tr>
		<td class="title"><b>Running on Apache</b> (Recommended but not required)</td><td>' . (test::get_apache_version() ? test::ok() . " (" . test::get_apache_version() . ")" : test::warning("No")) . '</td>
	</tr><tr>
		<td class="title"><b>PHP Version</b> (Required 5.0+, recommended 5.2+)</td><td>' . (test::get_php_version() >= 5.0 ? test::get_php_version() >= 5.2 ? test::ok() : test::warning("OK") : test::invalid("No")) . ' (' . test::get_php_version() . ')&nbsp;&nbsp;&nbsp;&nbsp;<a href="' . common::url('self') . '?view=phpinfo">View PHP Info</a></td>
	</tr><tr>
		<td class="title"><b>Sessions</b> (Required)</td><td>' . (test::session_enabled() ? test::ok() : test::invalid()) . '</td>
	</tr><tr>
		<td class="title"><b>Magic quotes</b> (Recommended to be off)</td><td>' . (test::magic_quotes_on() ? test::warning("Turn off for better performance") : test::ok("OFF")) . '</td>
	</tr></table>

	<h3>Admin console and config file</h3>
	<table cellspacing="0" cellpadding="5" class="tests"><tr>
		<td class="title"><b>Valid path to root</b></td><td>' . (test::root_path_valid() ? test::ok("YES") : test::invalid("NO")) . ' (Path: <i>' . PATH_TO_ROOT . '</i>)</td>
	</tr><tr>
		<td class="title"><b>Valid path to root for editing</b></td><td>' . (test::root_path_write_valid() ? test::ok("YES") : test::invalid("NO. Update will not work if it is not valid")) . ' (Path: <i>' . PATH_TO_ROOT_WRITE . '</i>)</td>
	</tr><tr>
		<td class="title"><b>Config file exists</b></td><td>' . (test::config_exists() ? test::ok("YES") : test::invalid("NO")) . ' (Path: <i>' . CONFIG_FILE . '</i>)</td>
	</tr><tr>
		<td class="title"><b>Config file is writable</b> (though edit path)</td><td>' . (test::config_writable() ? test::ok("YES") : test::invalid("NO")) . ' (Path: <i>' . CONFIG_FILE_WRITE . '</i>)</td>