Beispiel #1
0
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Bittytorrent.  If not, see <http://www.gnu.org/licenses/>. 
*/
require $path . '/libs/Smarty.class.php';
require $path . '/libs/db.php';
require $path . '/libs/database/ez_sql_core.php';
require $path . '/libs/database/ez_sql_mysql.php';
require $path . "/libs/categories.class.php";
require $path . '/libs/default.class.php';
require $path . '/libs/SmartyPaginate.class.php';
require $path . '/libs/Hooks.class.php';
$db = new ezSQL_mysql($dbuser, $dbpass, $dbname, $dbhost);
$smarty = new Smarty();
$hook = new phphooks();
$startUp = new Bittytorrent();
$conf = $startUp->getConfigs();
$startUp->I18n();
require $path . '/libs/lang/lang_' . $_SESSION['strLangue'] . '.php';
// Smarty config
$smarty->addPluginsDir($path . '/libs/plugins/');
// $smarty->template_dir = $path.'/themes/v2/';
$smarty->template_dir = $path . '/themes/' . $conf['theme'] . '/';
$smarty->compile_dir = $path . '/libs/cache/compile_tpl/';
$smarty->cache_dir = $path . '/libs/cache/';
$smarty->debugging = false;
//$smarty->caching = $conf['timecache'];
$smarty->caching = false;
$smarty->force_compile = false;
$smarty->cache_lifetime = $conf['timecache'];
Beispiel #2
0
<?php

// get all plugins from folder and read the headers
$plugin_list = new phphooks();
$plugin_headers = $plugin_list->get_plugins_header();
?>
<table class="global width-100" cellpadding="0" cellspacing="0" id="active-plugins-table">
	<thead>
		<tr>
			<th scope="col">Plugin</th>
			<th scope="col">Version</th>
			<th scope="col"><?php 
echo _description;
?>
</th>
			<th scope="col"><?php 
echo _edit;
?>
</th>
		</tr>
	</thead>

	<tfoot>
	</tfoot>

	<tbody class="plugins">
<?php 
foreach ($plugin_headers as $plugin_header) {
    $field = $plugin_header['filename'];
    $action = querySQL('get_plugins');
    ?>
// Dev     : Atmoner
// Website : http://atmoner.com
// Contact : contact@atmoner.com
// Twitter : @atmon3r
//
/////////////////////////////////////////////////////////////////////////
require $path . '/libs/Smarty.class.php';
require $path . '/libs/db.php';
require $path . '/libs/database/ez_sql_core.php';
require $path . '/libs/database/ez_sql_mysql.php';
require $path . '/libs/default.class.php';
require $path . '/libs/Hooks.class.php';
$db = new ezSQL_mysql($user, $pass, $db, $host);
$smarty = new Smarty();
$startUp = new pasteUsers();
$hook = new phphooks();
$conf = $startUp->getConfigs();
$startUp->I18n();
// Smarty config
$smarty->addPluginsDir($path . '/libs/plugins/');
// $smarty->template_dir = $path.'/themes/v2/';
$smarty->template_dir = $path . '/themes/' . $conf['theme'] . '/';
$smarty->compile_dir = $path . '/cache/compile_tpl/';
$smarty->cache_dir = $path . '/cache/';
$smarty->debugging = false;
$smarty->caching = $conf['timecache'];
$smarty->cache_lifetime = $conf['timecache'];
$smarty->config_dir = $path . '/libs/lang/';
$sql = "SELECT filename FROM plugins WHERE action = '" . $db->escape(1) . "'";
$items = $db->get_results($sql, ARRAY_A);
if ($items) {
Beispiel #4
0
<?php

//create instance of class
$hook = new phphooks();
//fetch the active plugins name form db. store in array $plugins.
$result_rows = querySQL('active_plugins');
if ($result_rows) {
    foreach ($result_rows as $result_rows) {
        $plugins[] = $result_rows->filename;
    }
}
//unset means load all plugins in the plugin fold. set it, just load the plugins in this array.
//$hook->active_plugins = "";
$hook->active_plugins = $plugins;
//set multiple hooks to which plugin developers can assign functions
$hook->set_hooks(array('debug', 'debug_online', 'after_booking', 'before_booking', 'filter'));
// hooks info:
//   hook				file
// debugging		/web/main_page.php
// after_booking	/web/ajax/process_reservation.php
//load plugins from folder, if no argument is supplied, a 'plugins/' constant will be used
//trailing slash at the end is REQUIRED!
//this method will load all *.plugin.php files from given directory, INCLUDING subdirectories
$hook->load_plugins();
//now, this is a workaround because plugins, when included, can't access $hook variable, so we
//as developers have to basically redefine functions which can be called from plugin files
function add_hook($tag, $function, $priority = 10)
{
    global $hook;
    $hook->add_hook($tag, $function, $priority);
}
Beispiel #5
0
<?php

//create instance of class
$hook = new phphooks();
//fetch the active plugins name form db. store in array $plugins.
$result_rows = querySQL('active_plugins');
if ($result_rows) {
    foreach ($result_rows as $result_row) {
        $plugins[] = $result_row->filename;
    }
}
//unset means load all plugins in the plugin fold. set it, just load the plugins in this array.
//$hook->active_plugins = "";
$hook->active_plugins = $plugins;
//set multiple hooks to which plugin developers can assign functions
$hook->set_hooks(array('debug', 'after_booking', 'after_del_event', 'after_del_outlet', 'after_del_user', 'after_del_res', 'after_alw_res'));
//load plugins from folder, if no argument is supplied, a 'plugins/' constant will be used
//trailing slash at the end is REQUIRED!
//this method will load all *.plugin.php files from given directory, INCLUDING subdirectories
$hook->load_plugins($plugin_path);
//now, this is a workaround because plugins, when included, can't access $hook variable, so we
//as developers have to basically redefine functions which can be called from plugin files
function add_hook($tag, $function, $priority = 10)
{
    global $hook;
    $hook->add_hook($tag, $function, $priority);
}
//same as above
function register_plugin($plugin_id, $data)
{
    global $hook;
Beispiel #6
0
\__  \    __\/     \ /  _ \ /    \_/ __ \_  __ \
 / __ \|  | |  Y Y  (  <_> )   |  \  ___/|  | \/
(____  /__| |__|_|  /\____/|___|  /\___  >__|   
     \/           \/            \/     \/     

Website:  http://atmoner.com/
Contact:  contact@atmoner.com     
*/
require $path . '/libs/db.php';
require $path . '/libs/Smarty.class.php';
require $path . '/libs/Database.class.php';
require $path . '/libs/Hooks.functions.class.php';
require $path . '/libs/Hooks.class.php';
$smarty = new Smarty();
$db = new Database($host, $user, $pass, $db);
$hook = new phphooks();
$db->connect();
// Smarty config
$smarty->addPluginsDir($path . '/libs/plugins/');
$smarty->template_dir = $path . '/themes/';
$smarty->compile_dir = $path . '/cache/compile_tpl/';
$smarty->cache_dir = $path . '/cache/';
$smarty->debugging = true;
$smarty->caching = false;
$smarty->cache_lifetime = 0;
$sql = "SELECT filename FROM plugins WHERE action = '" . $db->escape(1) . "'";
$result_rows = $db->fetch_all_array($sql);
if ($result_rows) {
    foreach ($result_rows as $result_rows) {
        $plugins[] = $result_rows['filename'];
    }