Quote:
If you want to do this using an old TBDEV as a base isn't the answer.
The team responsible for u232 have put lots of hours into their releases. Why not contribute to their source on github?
|
I see there is FreeTSP, FreeSpirit, u-232 all based on TBDev which makes me wonder if I can do a copy myself I don't mean to offend anyone by doing this project I just wanted to see if I could attempt another version for people to consider, I will be using open source projects to utilize this goal.
PHP Code:
<?php
# ************************************************************************
# Licence Info: GPL *
# Copyright (C) 2016 Project R2 *
# Source Base TBDev/FreeTSP/FreeSpirit/U-232/Gazelle/MyBB *
# Project Developer: SceneGod *
# ************************************************************************
/* Disallow direct access to this file for security reasons */
if (!defined("PROJECT_R2")) {
print_r("Direct initialization of this file is not allowed.");
}
error_reporting(E_ALL);
const REQUIRED_PHP = 50400, REQUIRED_PHP_VERSION = '5.4.0';
if (PHP_VERSION_ID < REQUIRED_PHP) {
print_r('PHP '.REQUIRED_PHP_VERSION.' or higher is required.');
}
if (isset($_SERVER["HTTP_HOST"]) && $_SERVER["HTTP_HOST"] == "") {
$_SERVER["HTTP_HOST"] = $_SERVER["SERVER_NAME"];
}
define('TIME_NOW', time());
$TBDEV['time_adjust'] = 0;
$TBDEV['time_offset'] = '0';
$TBDEV['time_use_relative'] = 1;
$TBDEV['time_use_relative_format'] = '{--}, h:i A';
$TBDEV['time_joined'] = 'j-F y';
$TBDEV['time_short'] = 'jS F Y - h:i A';
$TBDEV['time_long'] = 'M j Y, h:i A';
$TBDEV['time_tiny'] = '';
$TBDEV['time_date'] = '';
/* Set the database access information as constants: */
define('DB_HOST', 'localhost');
define('DB_USER', 'root');
define('DB_PASSWORD', 'MagicMushrooms');
define('DB_DATABASE', 'project');
/* Site Settings */
define ('UC_USER', 0);
define ('UC_POWER_USER', 1);
define ('UC_ELITE_USER', 2);
define ('UC_DJ_USER', 3);
define ('UC_TRUSTED_USER', 4);
define ('UC_VIP', 5);
define ('UC_TORRENT_EDITOR', 6);
define ('UC_MODERATOR', 7);
define ('UC_ADMINISTRATOR', 8);
define ('UC_TEAM_LEADER', 9);
define ('UC_DESIGNER', 10);
define ('UC_SYSOP', 11);
define ('UC_CO_OWNER', 12);
define ('UC_OWNER', 13);
define('PATH', dirname(__FILE__).DIRECTORY_SEPARATOR);
define('ROOT_PATH', realpath(PATH.'..'.DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR);
$TBDEV['announce_urls'] = array();
$TBDEV['site_online'] = 1;
$TBDEV['baseurl'] = 'http' . (isset($_SERVER['HTTPS']) && (bool)$_SERVER['HTTPS'] == true ? 's' : '') . '://' . $_SERVER['HTTP_HOST'];
$TBDEV['announce_urls'][] = "https://'.$_SERVER['HTTP_HOST'].'/announce.php";
$TBDEV['tracker_post_key'] = 'bsghrtheu6!5y$etr';
$TBDEV['max_torrent_size'] = 3 * 1024 * 1024;
$TBDEV['announce_interval'] = 60 * 30;
$TBDEV['signup_timeout'] = 86400 * 3;
$TBDEV['minvotes'] = 1;
$TBDEV['max_dead_torrent_time'] = 6 * 3600;
$TBDEV['autoclean_interval'] = 1800;
$TBDEV['maxusers'] = 5000;
$TBDEV['site_email'] = "noreply@localhost";
$TBDEV['site_name'] = "Scene Club";
$TBDEV['language'] = 'en';
$TBDEV['msg_alert'] = 0;
$TBDEV['torrent_dir'] = ROOT_PATH . '/torrents';
$TBDEV['sql_error_log'] = ROOT_PATH.'/logs/'.date("M_D_Y").'_sql.log';
$TBDEV['pic_base_url'] = "./pic/";
$TBDEV['stylesheet'] = "2";
$TBDEV['readpost_expiry'] = 14*86400;
$TBDEV['av_img_height'] = 100;
$TBDEV['av_img_width'] = 100;
$TBDEV['allowed_ext'] = array('image/gif', 'image/png', 'image/jpeg');
define ('BETA_VER','R2');
?>
to utilize the config file you must place this code:
PHP Code:
/* above require_once("include/config.php"); */
define('PROJECT_R2', true);
/* needs updating but works */
function dbconn($autoclean = false) {
mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_DATABASE) or mysqli_errno("Connection Failed: %s\n", mysqli_connect_error());
userlogin();
if ($autoclean) {
register_shutdown_function("autoclean");
}
}
inside of bittorrent.php
I know you may not see my point but I am trying something different to the other sources within saying that using some code to help secure and guide me into the correct direction.