Пример #1
0
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
	oR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
	POSSIBILITY OF SUCH DAMAGE.
*/
// Turn on buffering to speed up rendering
ini_set('output_buffering', 'true');
// Start buffering with a cache size of 100000
ob_start(null, "1000");
## Load Essential Includes
require_once 'guiconfig.inc';
if (isset($_REQUEST['closenotice'])) {
    close_notice($_REQUEST['closenotice']);
    echo get_menu_messages();
    exit;
}
##build list of widgets
$directory = "/usr/local/www/widgets/widgets/";
$dirhandle = opendir($directory);
$filename = "";
$widgetnames = array();
$widgetfiles = array();
$widgetlist = array();
while (false !== ($filename = readdir($dirhandle))) {
    $periodpos = strpos($filename, ".");
    /* Ignore files not ending in .php */
    if (substr($filename, -4, 4) != ".php") {
        continue;
Пример #2
0
##|*IDENT=page-system-login/logout
##|*NAME=System: Login / Logout page / Dashboard
##|*DESCR=Allow access to the 'System: Login / Logout' page and Dashboard.
##|*MATCH=index.php*
##|-PRIV
// Turn on buffering to speed up rendering
ini_set('output_buffering', 'true');
// Start buffering with a cache size of 100000
ob_start(null, "1000");
## Load Essential Includes
require_once 'guiconfig.inc';
require_once 'functions.inc';
require_once 'notices.inc';
require_once "pkg-utils.inc";
if (isset($_GET['closenotice'])) {
    close_notice($_GET['closenotice']);
    echo get_menu_messages();
    exit;
}
if ($g['disablecrashreporter'] != true) {
    // Check to see if we have a crash report
    $x = 0;
    if (file_exists("/tmp/PHP_errors.log")) {
        $total = `/usr/bin/grep -vi warning /tmp/PHP_errors.log | /usr/bin/wc -l | /usr/bin/awk '{ print \$1 }'`;
        if ($total > 0) {
            $x++;
        }
    }
    $crash = glob("/var/crash/*");
    $skip_files = array(".", "..", "minfree", "");
    if (is_array($crash)) {