Пример #1
0
 * 
 * This program is free software;
 * you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation;
 * version 3 of the License.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
 * See the GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License along with this program;
 * if not, see <http://www.gnu.org/licenses/>.
 */
/**
 * 
 */
set_time_limit(0);
header("Content-Type: text/html; charset=utf-8");
define("UNIT_TEST", false);
require_once "config/version.php";
require_once "core/include/base/system/system_config.class.php";
SystemConfig::load_system_config("config/main.php");
date_default_timezone_set($server['timezone']);
require_once "core/include/base/system/template.class.php";
require_once "core/include/base/system/html_template.class.php";
require_once "core/include/base/system/js_template.class.php";
Template::set_fallback_folder("xhtml");
Template::set_current_folder("xhtml");
require_once "core/main.php";
$main = new Main();
$main->init();
Пример #2
0
     translator_edit($option, $task);
     break;
 case 'del_lang':
 case 'lang':
     translator($option);
     break;
 case 'recurse_database':
     goRecurseDatabases();
     break;
 case 'recurse_files':
     goRecurseFiles();
     break;
 case 'cleanup':
     include_once "classes/main.class.php";
     $main = new Main();
     $main->init($_CONFIG);
     $main->cleanUp();
     break;
 case 'refresh':
     generateBackuprefresh($cid, $option, $_REQUEST['backup'], $_CONFIG['refresh_mode']);
     break;
 case 'generate':
     if (empty($_POST) || !wp_verify_nonce($_POST['csrf'], 'generate')) {
         print 'Sorry, your nonce did not verify.';
         exit;
     }
     if ($_CONFIG['refresh_mode']) {
         $_REQUEST['mode'] = "start";
         if ($_CONFIG['enable_db_backup']) {
             goRecurseDatabases();
         }
Пример #3
0
<?php

/*
 * Created on 		19.09.2009
 *
 * @see http://github.com/swwwfactory/entry8
 *
 */
namespace swwwfactory\Dev;

class Main
{
    public static function init()
    {
        //called
        include __DIR__ . '/utils.php';
        include __DIR__ . '/loader.php';
    }
    public static function setup()
    {
        //setup
        echo 'Called phar stub with method: ', __METHOD__, PHP_EOL;
    }
}
Main::init();
Пример #4
0
<?php

/**
 * Plugin Name:  Combined Query
 * Description:  This plugin allows you to combine multiple WP_Query() queries, into a single one.
 * Plugin URI:   https://github.com/birgire/wp-combined-queries
 * Author:       birgire
 * GitHub Plugin URI: https://github.com/birgire/wp-combined-queries.git
 * Author URI:   https://github.com/birgire
 * License:      MIT
 * Version:      1.0.0
 */
namespace Birgir\CombinedQuery;

/**
 * Autoload
 */
\add_action('plugins_loaded', function () {
    if (file_exists(__DIR__ . '/vendor/autoload.php')) {
        require __DIR__ . '/vendor/autoload.php';
    }
});
/**
 * Init
 */
\add_action('init', function () {
    if (class_exists(__NAMESPACE__ . '\\Main')) {
        $o = new Main();
        $o->init(new Generator(new EmptyQuery()), $GLOBALS['wpdb']);
    }
});