if (isset($_SESSION["wpincode"]) && $_SESSION["wpincode"] >= 5) {
sql_query("UPDATE users set enabled = 'no' WHERE id = ".sqlesc($CURUSER['id']));
stderr("Error","Access Denied! You have been exceed your max pincode attempts therefore we have been disabled your account.");
}
$sql = sql_query("SELECT * FROM pincode WHERE area = 2 LIMIT 1");
$res = mysql_fetch_array($sql);
$sechash = $res['sechash'];
$pincode = $res['pincode'];
if (isset($_SESSION['wpincode']) && $_SESSION['wpincode'] >= 5) {
sql_query("UPDATE users set enabled = 'no' WHERE id = ".sqlesc($CURUSER['id']));
stderr("Error", "Access Denied! You have been exceed your max pincode attempts therefore we have been disabled your account.");
die;
}
$sql = sql_query("SELECT * FROM pincode WHERE area = 1 LIMIT 1");
$res = mysql_fetch_array($sql);
$sechash = $res['sechash'];
$pincode = $res['pincode'];
if ($action == 'checkpincode') {
$userpincode = trim($_POST['pincode']);
$userpincode = md5(md5($sechash).md5($userpincode));
if ($userpincode != $pincode) {
if (isset($_SESSION['wpincode']))
++$_SESSION['wpincode'];
else
{
session_register('wpincode');
++$_SESSION['wpincode'];
}
stderr('Error','Invalid PINCODE!');
}
else {
unset($_SESSION['wpincode']);
$_SESSION['pincode_settings'] = $userpincode;
header('Location: settings.php?action=showmenu');
}
}
if (empty($_SESSION['pincode_settings']) || $_SESSION['pincode_settings'] != $pincode) {
stdhead("Website Settings by xam ".S_VERSION." - Pincode");
?>
stdfoot();
die;
}
stdhead("Staff Panel");
begin_frame("WELCOME TO ".strtoupper($SITENAME)." - STAFF PANEL");
print("
");
print("
\n");
///////////////////// Remove And Edit Options Sys.Admin \\\\\\\\\\\\\\\\\\\\\\\\\\\\
$sure = $_GET['sure'];
if($sure == "yes") {
$delsosadminid = (int)$_GET['delsosadminid'];
$query = "DELETE FROM sysoppanel WHERE id=" .sqlesc($delsosadminid) . " LIMIT 1";
$sql = sql_query($query);
echo("The option is successfully removed![ Back ]");
end_frame();
print("
");
stdfoot();
die();
}
$delsosadminid = (int)$_GET['delsosadminid'];
$name = trim(htmlspecialchars($_GET['mod']));
if($delsosadminid > 0) {
echo("Only Sys.Admin is able to do it
");
if (get_user_class() >= UC_SYSOP) {
echo("You and in the truth wish to remove an option? ($name) ( Yes! / No! )");
}
end_frame();
print("
");
stdfoot();
die();
}
$editsosadmin = (int)$_GET['editsosadmin'];
if($editsosadmin == 1) {
$id = (int)$_GET['id'];
$mod_name = trim(htmlspecialchars($_GET['mod_name']));
$mod_url = trim(htmlspecialchars($_GET['mod_url']));
$mod_info = trim(htmlspecialchars($_GET['mod_info']));
$query = "UPDATE sysoppanel SET
name = ".sqlesc($mod_name).",
url = ".sqlesc($mod_url).",
info = ".sqlesc($mod_info)."
WHERE id=".sqlesc($id);
$sql = sql_query($query);
if($sql) {
echo("Only Sys.Admin is able to do it
");
}
end_frame();
print("");
stdfoot();
die();
}
}
$editsosadminid = (int)$_GET['editsosadminid'];
$name = trim(htmlspecialchars($_GET['name']));
$url = trim(htmlspecialchars($_GET['url']));
$info = trim(htmlspecialchars($_GET['info']));
if($editsosadminid > 0) {
echo("Only Sys.Admin is able to do it
");
if (get_user_class() >= UC_SYSOP) {
echo("");
}
end_frame();
print("");
stdfoot();
die();
}
///////////////////// Remove And Edit Options Admin \\\\\\\\\\\\\\\\\\\\\\\\\\\\
$suree = $_GET['suree'];
if($suree == "yes") {
$deladminid = (int)$_GET['deladminid'];
$query = "DELETE FROM adminpanel WHERE id=" .sqlesc($deladminid) . " LIMIT 1";
$sql = sql_query($query);
echo("The option is successfully removed![ Back ]");
end_frame();
print("");
stdfoot();
die();
}
$deladminid = (int)$_GET['deladminid'];
$nameadmin = htmlspecialchars(trim($_GET['admin']));
if($deladminid > 0) {
echo("Only Sys.Admin is able to do it
");
if (get_user_class() >= UC_SYSOP) {
echo("You and in the truth wish to remove an option? ($nameadmin) ( Yes! / No! )");
}
end_frame();
print("");
stdfoot();
die();
}
$editadmin = (int)$_GET['editadmin'];
if($editadmin == 1) {
$id = (int)$_GET['id'];
$mod_name = trim(htmlspecialchars($_GET['mod_name']));
$mod_url = trim(htmlspecialchars($_GET['mod_url']));
$mod_info = trim(htmlspecialchars($_GET['mod_info']));
$query = "UPDATE adminpanel SET
name = ".sqlesc($mod_name).",
url = ".sqlesc($mod_url).",
info = ".sqlesc($mod_info)."
WHERE id=".sqlesc($id);
$sql = sql_query($query);
if($sql) {
echo("Only Sys.Admin is able to do it
$editadminid = (int)$_GET['editadminid'];
$name = trim(htmlspecialchars($_GET['name']));
$url = trim(htmlspecialchars($_GET['url']));
$info = trim(htmlspecialchars($_GET['info']));
if($editadminid > 0) {
echo("Only Sys.Admin is able to do it
///////////////////// Remove And Edit Options Moderator \\\\\\\\\\\\\\\\\\\\\\\\\\\\
$sureee = $_GET['sureee'];
if($sureee == "yes") {
$delmodid = (int)$_GET['delmodid'];
$query = "DELETE FROM modpanel WHERE id=" .sqlesc($delmodid) . " LIMIT 1";
$sql = sql_query($query);
echo("The option is successfully removed![ Back ]");
end_frame();
print("");
stdfoot();
die();
}
$delmodid = (int)$_GET['delmodid'];
$namemod = htmlspecialchars(trim($_GET['mod']));
if($delmodid > 0) {
echo("Only Sys.Admin is able to do it
");
if (get_user_class() >= UC_SYSOP) {
echo("You and in the truth wish to remove an option? ($namemod) ( Yes! / No! )");
}
end_frame();
print("");
stdfoot();
die();
}
$editmod = (int)$_GET['editmod'];
if($editmod == 1) {
$id = (int)$_GET['id'];
$mod_name = trim(htmlspecialchars($_GET['mod_name']));
$mod_url = trim(htmlspecialchars($_GET['mod_url']));
$mod_info = trim(htmlspecialchars($_GET['mod_info']));
$query = "UPDATE modpanel SET
name = ".sqlesc($mod_name).",
url = ".sqlesc($mod_url).",
info = ".sqlesc($mod_info)."
WHERE id=".sqlesc($id);
$sql = sql_query($query);
if($sql) {
echo("Only Sys.Admin is able to do it
$editmodid = (int)$_GET['editmodid'];
$name = trim(htmlspecialchars($_GET['name']));
$url = trim(htmlspecialchars($_GET['url']));
$info = trim(htmlspecialchars($_GET['info']));
if($editmodid > 0) {
echo("Only Sys.Admin is able to do it
if (@ini_get('output_handler') == 'ob_gzhandler' AND @ob_get_length() !== false)
{ // if output_handler = ob_gzhandler, turn it off and remove the header sent by PHP
@ob_end_clean();
header('Content-Encoding:');
}
if (($CURUSER['downloadpos'] == 'no' OR $usergroups['candownload'] == 'no' OR $usergroups['candownload'] != 'yes') OR ($gigs > '5' AND $ratio <= 0.4 AND $CURUSER['downloaded'] <> 0)) {
print_no_permission();
exit;
}
$res = sql_query("SELECT torrents.name, torrents.filename, torrents.size, torrents.owner, categories.minclassread AS minclassread FROM torrents LEFT JOIN categories ON torrents.category = categories.id WHERE torrents.id = ".sqlesc($id)) or sqlerr(__FILE__, __LINE__);
$row = mysql_fetch_array($res);
if ($CURUSER['class'] < $row['minclassread'])
print_no_permission();
$fn = "$torrent_dir/$id.torrent";
if (!$row || !is_file($fn) || !is_readable($fn))
httperr();
sql_query("UPDATE torrents SET hits = hits + 1 WHERE id = ".sqlesc($id)) or sqlerr(__FILE__, __LINE__);
require_once ($rootpath . 'include/benc.php');
if (strlen($CURUSER['passkey']) != 32) {
$CURUSER['passkey'] = md5($CURUSER['username'].get_date_time().$CURUSER['passhash']);
sql_query("UPDATE users SET passkey=".sqlesc($CURUSER['passkey'])." WHERE id=".sqlesc($CURUSER['id']));
}
i don't know how to deal with " agent ban " in staff panel.
i want to know the way to ban or unban clients.
now, i can't use bitcomet 0.99 at all.
please help me.
djlee
9th March 2008 05:43
Re: TS SE v3.1 Nulled
want a tip .. dont
do not allow bitcomet if you are opening a private tracker ... it has already been stopped for possible ratio problems
never mind the fact that it used to fook about with tracker swarms (do not kno about current version thats why i said "used" lol)
wMan
4th April 2008 15:10
Re: TS SE v3.1 Nulled
this is total crap set pincode for staff panel doesnt work,how do you get users to shout in shoutbox
:mad: :sos: :blink: :shock:
oem
10th April 2008 21:07
Re: TS SE v3.1 Nulled
hmmm.....works fine but i get this all the time..'
An error has occcured!
Unable to upload torrent!
wMan
11th April 2008 17:00
Re: TS SE v3.1 Nulled
actually this isnt nulled i tried it on a test site still as callback function in it
sharky
30th April 2008 10:48
Re: TS SE v3.1 Nulled
can someone re-upload the source? Cuz i'm interested in ripping the ajax rating from this source. and if i succeed i will post it here. cheers
thedizzy
1st May 2008 12:08
Re: TS SE v3.1 Nulled
Can we find someone who can null ts special v4.3 ? :) :hi:
djlee
1st May 2008 20:40
Re: TS SE v3.1 Nulled
if we knew someone dont u think we would have done it already ..
i dont see why people still devote CPU power to nulling this source to be honest .. i mean if your silly enough to use it then your silly enough to pay for it in my opinion
thedizzy
3rd May 2008 15:52
Re: TS SE v3.1 Nulled
First when i installed ts i click on Staff panel and then i see one form for pincode.I wrote my true code but i saw a error "Your passkey is wrong!" .So i edit my file staffpanel.php like this:
if ($usergroups['canstaffpanel'] == 'no' OR $usergroups['canstaffpanel'] != 'yes') {
print_no_permission(true);
exit;
}
?>
stdhead("Staff Panel");
begin_frame("WELCOME TO ".strtoupper($SITENAME)." - STAFF PANEL");
print("
");
print("
\n");
///////////////////// Remove And Edit Options Sys.Admin \\\\\\\\\\\\\\\\\\\\\\\\\\\\
$sure = $_GET['sure'];
if($sure == "yes") {
$delsosadminid = (int)$_GET['delsosadminid'];
$query = "DELETE FROM sysoppanel WHERE id=" .sqlesc($delsosadminid) . " LIMIT 1";
$sql = sql_query($query);
echo("The option is successfully removed![ Back ]");
end_frame();
print("
");
stdfoot();
die();
}
$delsosadminid = (int)$_GET['delsosadminid'];
$name = trim(htmlspecialchars($_GET['mod']));
if($delsosadminid > 0) {
echo("Only Sys.Admin is able to do it
");
if (get_user_class() >= UC_SYSOP) {
echo("You and in the truth wish to remove an option? ($name) ( Yes! / No! )");
}
end_frame();
print("
");
stdfoot();
die();
}
$editsosadmin = (int)$_GET['editsosadmin'];
if($editsosadmin == 1) {
$id = (int)$_GET['id'];
$mod_name = trim(htmlspecialchars($_GET['mod_name']));
$mod_url = trim(htmlspecialchars($_GET['mod_url']));
$mod_info = trim(htmlspecialchars($_GET['mod_info']));
$query = "UPDATE sysoppanel SET
name = ".sqlesc($mod_name).",
url = ".sqlesc($mod_url).",
info = ".sqlesc($mod_info)."
WHERE id=".sqlesc($id);
$sql = sql_query($query);
if($sql) {
echo("Only Sys.Admin is able to do it
");
}
end_frame();
print("");
stdfoot();
die();
}
}
$editsosadminid = (int)$_GET['editsosadminid'];
$name = trim(htmlspecialchars($_GET['name']));
$url = trim(htmlspecialchars($_GET['url']));
$info = trim(htmlspecialchars($_GET['info']));
if($editsosadminid > 0) {
echo("Only Sys.Admin is able to do it
");
if (get_user_class() >= UC_SYSOP) {
echo("");
}
end_frame();
print("");
stdfoot();
die();
}
///////////////////// Remove And Edit Options Admin \\\\\\\\\\\\\\\\\\\\\\\\\\\\
$suree = $_GET['suree'];
if($suree == "yes") {
$deladminid = (int)$_GET['deladminid'];
$query = "DELETE FROM adminpanel WHERE id=" .sqlesc($deladminid) . " LIMIT 1";
$sql = sql_query($query);
echo("The option is successfully removed![ Back ]");
end_frame();
print("");
stdfoot();
die();
}
$deladminid = (int)$_GET['deladminid'];
$nameadmin = htmlspecialchars(trim($_GET['admin']));
if($deladminid > 0) {
echo("Only Sys.Admin is able to do it
");
if (get_user_class() >= UC_SYSOP) {
echo("You and in the truth wish to remove an option? ($nameadmin) ( Yes! / No! )");
}
end_frame();
print("");
stdfoot();
die();
}
$editadmin = (int)$_GET['editadmin'];
if($editadmin == 1) {
$id = (int)$_GET['id'];
$mod_name = trim(htmlspecialchars($_GET['mod_name']));
$mod_url = trim(htmlspecialchars($_GET['mod_url']));
$mod_info = trim(htmlspecialchars($_GET['mod_info']));
$query = "UPDATE adminpanel SET
name = ".sqlesc($mod_name).",
url = ".sqlesc($mod_url).",
info = ".sqlesc($mod_info)."
WHERE id=".sqlesc($id);
$sql = sql_query($query);
if($sql) {
echo("Only Sys.Admin is able to do it
$editadminid = (int)$_GET['editadminid'];
$name = trim(htmlspecialchars($_GET['name']));
$url = trim(htmlspecialchars($_GET['url']));
$info = trim(htmlspecialchars($_GET['info']));
if($editadminid > 0) {
echo("Only Sys.Admin is able to do it
///////////////////// Remove And Edit Options Moderator \\\\\\\\\\\\\\\\\\\\\\\\\\\\
$sureee = $_GET['sureee'];
if($sureee == "yes") {
$delmodid = (int)$_GET['delmodid'];
$query = "DELETE FROM modpanel WHERE id=" .sqlesc($delmodid) . " LIMIT 1";
$sql = sql_query($query);
echo("The option is successfully removed![ Back ]");
end_frame();
print("");
stdfoot();
die();
}
$delmodid = (int)$_GET['delmodid'];
$namemod = htmlspecialchars(trim($_GET['mod']));
if($delmodid > 0) {
echo("Only Sys.Admin is able to do it
");
if (get_user_class() >= UC_SYSOP) {
echo("You and in the truth wish to remove an option? ($namemod) ( Yes! / No! )");
}
end_frame();
print("");
stdfoot();
die();
}
$editmod = (int)$_GET['editmod'];
if($editmod == 1) {
$id = (int)$_GET['id'];
$mod_name = trim(htmlspecialchars($_GET['mod_name']));
$mod_url = trim(htmlspecialchars($_GET['mod_url']));
$mod_info = trim(htmlspecialchars($_GET['mod_info']));
$query = "UPDATE modpanel SET
name = ".sqlesc($mod_name).",
url = ".sqlesc($mod_url).",
info = ".sqlesc($mod_info)."
WHERE id=".sqlesc($id);
$sql = sql_query($query);
if($sql) {
echo("Only Sys.Admin is able to do it
$editmodid = (int)$_GET['editmodid'];
$name = trim(htmlspecialchars($_GET['name']));
$url = trim(htmlspecialchars($_GET['url']));
$info = trim(htmlspecialchars($_GET['info']));
if($editmodid > 0) {
echo("Only Sys.Admin is able to do it
");
end_frame();
end_frame();
stdfoot();
?>
And now the script checks only your class not your pincode and now i have no problems with staff panel :D \
hmmm strange...
i see you use "localhost".
if is windows is strange because it should work but if you use linux, make sure you chmod 0777 or 777 torrents folder.
Cr3tu
29th August 2008 09:47
Problem!
1 Attachment(s)
Help me .. when i instal xampp and i configure him i go to security i change the password etc. after go to php.admin and login i create a database,i make a folder in htdocs i copy the files in htdocs in that folder,after i copy the TS in htdocs .. and i must go to localhost .... but when i go it's this : "[1045] dbconn: mysql_pconnect: Access denied for user 'ODBC'@'localhost' (using password: NO)"
Can we find someone who can null ts special v4.3 ? :) :hi:
i dont see why people still devote CPU power to nulling this source to be honest
i mean if your silly enough to use it then your silly enough to pay for it in my opinion
if (file_exists(THIS_ROOT_PATH.'install.lock'))
{
step("Installation ERROR!","ERROR!","0");
die("
For security reasons, this installer is locked!Please (via FTP) remove the 'install/install.lock' file before continue.
");
}else {
version_check();
}
if ($action == 'n_step_1') {
step("Upgrading from TS v3.0 to ".TRACKER_VERSION,"UPGRADE-BEGIN","1",true);
print("
Before you attempt to upgrade, ensure you have a database backup and a copy of the files currently in use on your tracker. This is so you can revert back to your earlier version if you need to or something goes horribly wrong with the upgrade process.Click here to start upgrade.
");
}elseif ($action == 'n_step_2') {
step("Upgrading from TS v3.0 to ".TRACKER_VERSION,"UPGRADE-SQL","2",true);
$installtype = 'upgrade_v3';
include_once ('bigdump.php');
}elseif ($action == 'n_step_3') {
step("Upgrading from TS v3.0 to ".TRACKER_VERSION,"UPGRADE-FINISH","6",true);
readconfig ('MAIN');
lock($MAIN['BASEURL']);
exit;
}elseif ($action == 'p_step_1') {
step("Upgrading from TS v1.3.9 to ".TRACKER_VERSION,"UPGRADE-BEGIN","1",true);
print("
Before you attempt to upgrade, ensure you have a database backup and a copy of the files currently in use on your tracker. This is so you can revert back to your earlier version if you need to or something goes horribly wrong with the upgrade process.Click here to start upgrade.
");
}elseif ($action == 'p_step_2'){
step("Upgrading from TS v1.3.9 to ".TRACKER_VERSION,"UPGRADE-SQL","2",true);
$installtype = 'upgrade_v139';
include_once ('bigdump.php');
}elseif ($action == 'p_step_3'){
step("Upgrading from TS v1.3.9 to ".TRACKER_VERSION,"UPGRADE-ADMIN","3",true);
readconfig('DATABASE');
dbconn();
//MYBB ADMIN INSERT
if ($_POST['insert_admin'] == 'yes') {
if (!mkglobal("wantusername:wantpassword:passagain:email:id"))
die('Error, Please try again!');
$email = htmlspecialchars(trim($email));
$email = safe_email($email);
if (!check_email($email))
bark("Invalid email address!");
if (empty($wantusername) || empty($wantpassword) || empty($email) || empty($id))
bark("Don't leave any fields blank.");
if (!validemail($email))
bark("That doesn't look like a valid email address.");
//INSERT STAFF DETAILS
$filename = $rootpath.'config/STAFFNAMES';
$somecontent = $wantusername;
$filename2 = $rootpath.'config/STAFFIDS';
$somecontent2 = $id;
if (is_writable($filename)) {
if (!$handle = fopen($filename, 'w')) {
stdmsg ("Error","Cannot open file ($filename)");
exit;
}
if (fwrite($handle, $somecontent) === FALSE) {
stdmsg ("Error","Cannot write to file ($filename)");
exit;
}
fclose($handle);
} else {
stdmsg ("Error","The file $filename is not writable!");
exit;
}
if (is_writable($filename2)) {
if (!$handle2 = fopen($filename2, 'w')) {
stdmsg ("Error","Cannot open file ($filename2)");
exit;
}
if (fwrite($handle2, $somecontent2) === FALSE) {
stdmsg ("Error","Cannot write to file ($filename2)");
exit;
}
fclose($handle2);
} else {
stdmsg ("Error","The file $filename2 is not writable!");
exit;
}
//INSERT STAFF DETAILS
Print("Admin added, please click here to go next step!");
//MYBB ADMIN INSERT
}else
{
print ("");
exit;
}
}elseif ($action == 'p_step_4') {
step("Upgrading from TS v.1.3.9 to ".TRACKER_VERSION,"UPGRADE-PINCODE","4",true);
if ($_POST['u_pincode_save'] == 'yes') {
$newpincode = trim($_POST['pincode']);
$newpincode2 = trim($_POST['pincode2']);
if ($newpincode == '' OR $newpincode2 == '')
die('Invalid PINCODE!');
elseif ($newpincode != $newpincode2)
die('The pincodes didn\'t match! Must\'ve typoed. Try again.');
readconfig('DATABASE,MAIN');
dbconn ();
$sechash = md5($MAIN['SITENAME']);
$pincode = md5(md5($sechash).md5($newpincode));
$res = mysql_query("SELECT pincode FROM pincode WHERE area=1") or sqlerr(__FILE__,__LINE__);
if (mysql_num_rows($res) > 0)
mysql_query ("DELETE FROM pincode WHERE area=1") or sqlerr(__FILE__,__LINE__);
mysql_query("INSERT INTO pincode SET pincode = ".sqlesc($pincode).", sechash = ".sqlesc($sechash).", area = 1") or sqlerr(__FILE__,__LINE__);
Print("PINCODE has been saved, please click here to go next step!");
}else {
print ("");
}
exit;
}elseif ($action == 'p_step_5') {
step("Upgrading from TS v1.3.9 to ".TRACKER_VERSION,"UPGRADE-SETUP","5",true);
readconfig('DATABASE,MAIN,SECURITY,EXTRA');
dbconn ();
//MYBB SETUP
mysql_query("UPDATE ".TABLE_PREFIX."settings SET value='".$MAIN['SITENAME']." Forums' WHERE name='bbname'") or sqlerr(__FILE__, __LINE__);
mysql_query("UPDATE ".TABLE_PREFIX."settings SET value='".$MAIN['BASEURL']."/community' WHERE name='bburl'") or sqlerr(__FILE__, __LINE__);
mysql_query("UPDATE ".TABLE_PREFIX."settings SET value='".$MAIN['SITENAME']."' WHERE name='homename'") or sqlerr(__FILE__, __LINE__);
mysql_query("UPDATE ".TABLE_PREFIX."settings SET value='".$MAIN['BASEURL']."' WHERE name='homeurl'") or sqlerr(__FILE__, __LINE__);
mysql_query("UPDATE ".TABLE_PREFIX."settings SET value='' WHERE name='cookiedomain'") or sqlerr(__FILE__, __LINE__);
mysql_query("UPDATE ".TABLE_PREFIX."settings SET value='/' WHERE name='cookiepath'") or sqlerr(__FILE__, __LINE__);
mysql_query("UPDATE ".TABLE_PREFIX."settings SET value='".$MAIN['SITEEMAIL']."' WHERE name='adminemail'") or sqlerr(__FILE__, __LINE__);
mysql_query("UPDATE ".TABLE_PREFIX."settings SET value='mailto:".$MAIN['SITEEMAIL']."' WHERE name='contactlink'") or sqlerr(__FILE__, __LINE__);
write_settings();
//MYBB SETUP
rebuild_announce_settings();
$mysql_host = $DATABASE['mysql_host'];
$mysql_user = $DATABASE['mysql_user'];
$mysql_pass = $DATABASE['mysql_pass'];
$mysql_db = $DATABASE['mysql_db'];
$table_prefix = TABLE_PREFIX;
$configdata = "
/**
* Daatabase configuration
*/
/**
* Admin CP directory
* For security reasons, it is recommended you
* rename your Admin CP directory. You then need
* to adjust the value below to point to the
* new directory.
*/
\$config['admin_dir'] = 'admin';
/**
* Hide all Admin CP links
* If you wish to hide all Admin CP links
* on the front end of the board after
* renaming your Admin CP directory, set this
* to 1.
*/
\$config['hide_admin_links'] = 0;
/**
* Data-cache configuration
* The data cache is a temporary cache
* of the most commonly accessed data in MyBB.
* By default, the database is used to store this data.
*
* If you wish to use the file system (inc/cache directory)
* you can change the value below to 'files' from 'db'.
*/
\$config['cache_store'] = 'db';
/**
* Super Administrators
* A comma separated list of user IDs who cannot
* be edited, deleted or banned in the Admin CP.
* The administrator permissions for these users
* cannot be altered either.
*/
Print("Database/Forum/Announce system has been succussfully upgraded, please click here to go next step!");
}elseif ($action == 'p_step_6') {
step("Upgrading from TS v1.3.9 to ".TRACKER_VERSION,"UPGRADE-FINISH","6",true);
readconfig ('MAIN');
lock($MAIN['BASEURL']);
exit;
}elseif ($action == 'u_step_1') {
step("Upgrading from TS v2.5 to ".TRACKER_VERSION,"UPGRADE-BEGIN","1",true);
print("
Before you attempt to upgrade, ensure you have a database backup and a copy of the files currently in use on your tracker. This is so you can revert back to your earlier version if you need to or something goes horribly wrong with the upgrade process.Click here to start upgrade.
");
}elseif ($action == 'u_step_2'){
step("Upgrading from TS v2.5 to ".TRACKER_VERSION,"UPGRADE-SQL","2",true);
$installtype = 'upgrade_v25';
include_once ('bigdump.php');
}elseif ($action == 'u_step_3'){
step("Upgrading from TS v2.5 to ".TRACKER_VERSION,"UPGRADE-ADMIN","3",true);
readconfig('DATABASE');
dbconn();
//MYBB ADMIN INSERT
if ($_POST['insert_admin'] == 'yes') {
if (!mkglobal("wantusername:wantpassword:passagain:email:id"))
die('Error, Please try again!');
$email = htmlspecialchars(trim($email));
$email = safe_email($email);
if (!check_email($email))
bark("Invalid email address!");
if (empty($wantusername) || empty($wantpassword) || empty($email) || empty($id))
bark("Don't leave any fields blank.");
if (!validemail($email))
bark("That doesn't look like a valid email address.");
//INSERT STAFF DETAILS
$filename = $rootpath.'config/STAFFNAMES';
$somecontent = $wantusername;
$filename2 = $rootpath.'config/STAFFIDS';
$somecontent2 = $id;
if (is_writable($filename)) {
if (!$handle = fopen($filename, 'w')) {
stdmsg ("Error","Cannot open file ($filename)");
exit;
}
if (fwrite($handle, $somecontent) === FALSE) {
stdmsg ("Error","Cannot write to file ($filename)");
exit;
}
fclose($handle);
} else {
stdmsg ("Error","The file $filename is not writable!");
exit;
}
if (is_writable($filename2)) {
if (!$handle2 = fopen($filename2, 'w')) {
stdmsg ("Error","Cannot open file ($filename2)");
exit;
}
if (fwrite($handle2, $somecontent2) === FALSE) {
stdmsg ("Error","Cannot write to file ($filename2)");
exit;
}
fclose($handle2);
} else {
stdmsg ("Error","The file $filename2 is not writable!");
exit;
}
//INSERT STAFF DETAILS
Print("Admin added, please click here to go next step!");
//MYBB ADMIN INSERT
}else
{
print ("");
exit;
}
}elseif ($action == 'u_step_4') {
step("Upgrading from TS v2.5 to ".TRACKER_VERSION,"UPGRADE-PINCODE","4",true);
if ($_POST['u_pincode_save'] == 'yes') {
$newpincode = trim($_POST['pincode']);
$newpincode2 = trim($_POST['pincode2']);
if ($newpincode == '' OR $newpincode2 == '')
die('Invalid PINCODE!');
elseif ($newpincode != $newpincode2)
die('The pincodes didn\'t match! Must\'ve typoed. Try again.');
readconfig('DATABASE,MAIN');
dbconn ();
$sechash = md5($MAIN['SITENAME']);
$pincode = md5(md5($sechash).md5($newpincode));
$res = mysql_query("SELECT pincode FROM pincode WHERE area=1") or sqlerr(__FILE__,__LINE__);
if (mysql_num_rows($res) > 0)
mysql_query ("DELETE FROM pincode WHERE area=1") or sqlerr(__FILE__,__LINE__);
mysql_query("INSERT INTO pincode SET pincode = ".sqlesc($pincode).", sechash = ".sqlesc($sechash).", area = 1") or sqlerr(__FILE__,__LINE__);
Print("PINCODE has been saved, please click here to go next step!");
}else {
print ("");
}
exit;
}elseif ($action == 'u_step_5') {
step("Upgrading from TS v2.5 to ".TRACKER_VERSION,"UPGRADE-SETUP","5",true);
readconfig('DATABASE,MAIN,SECURITY,EXTRA');
dbconn ();
//MYBB SETUP
mysql_query("UPDATE ".TABLE_PREFIX."settings SET value='".$MAIN['SITENAME']." Forums' WHERE name='bbname'") or sqlerr(__FILE__, __LINE__);
mysql_query("UPDATE ".TABLE_PREFIX."settings SET value='".$MAIN['BASEURL']."/community' WHERE name='bburl'") or sqlerr(__FILE__, __LINE__);
mysql_query("UPDATE ".TABLE_PREFIX."settings SET value='".$MAIN['SITENAME']."' WHERE name='homename'") or sqlerr(__FILE__, __LINE__);
mysql_query("UPDATE ".TABLE_PREFIX."settings SET value='".$MAIN['BASEURL']."' WHERE name='homeurl'") or sqlerr(__FILE__, __LINE__);
mysql_query("UPDATE ".TABLE_PREFIX."settings SET value='' WHERE name='cookiedomain'") or sqlerr(__FILE__, __LINE__);
mysql_query("UPDATE ".TABLE_PREFIX."settings SET value='/' WHERE name='cookiepath'") or sqlerr(__FILE__, __LINE__);
mysql_query("UPDATE ".TABLE_PREFIX."settings SET value='".$MAIN['SITEEMAIL']."' WHERE name='adminemail'") or sqlerr(__FILE__, __LINE__);
mysql_query("UPDATE ".TABLE_PREFIX."settings SET value='mailto:".$MAIN['SITEEMAIL']."' WHERE name='contactlink'") or sqlerr(__FILE__, __LINE__);
write_settings();
//MYBB SETUP
rebuild_announce_settings();
$mysql_host = $DATABASE['mysql_host'];
$mysql_user = $DATABASE['mysql_user'];
$mysql_pass = $DATABASE['mysql_pass'];
$mysql_db = $DATABASE['mysql_db'];
$table_prefix = TABLE_PREFIX;
$configdata = "
/**
* Daatabase configuration
*/
/**
* Admin CP directory
* For security reasons, it is recommended you
* rename your Admin CP directory. You then need
* to adjust the value below to point to the
* new directory.
*/
\$config['admin_dir'] = 'admin';
/**
* Hide all Admin CP links
* If you wish to hide all Admin CP links
* on the front end of the board after
* renaming your Admin CP directory, set this
* to 1.
*/
\$config['hide_admin_links'] = 0;
/**
* Data-cache configuration
* The data cache is a temporary cache
* of the most commonly accessed data in MyBB.
* By default, the database is used to store this data.
*
* If you wish to use the file system (inc/cache directory)
* you can change the value below to 'files' from 'db'.
*/
\$config['cache_store'] = 'db';
/**
* Super Administrators
* A comma separated list of user IDs who cannot
* be edited, deleted or banned in the Admin CP.
* The administrator permissions for these users
* cannot be altered either.
*/
Print("Database/Forum/Announce system has been succussfully upgraded, please click here to go next step!");
}elseif ($action == 'u_step_6') {
step("Upgrading from TS v2.5 to ".TRACKER_VERSION,"UPGRADE-FINISH","6",true);
readconfig ('MAIN');
lock($MAIN['BASEURL']);
exit;
}elseif ($action == 'save_db'){
step("Database Setup (DONE!)","MYSQL Setup","2");
/**
* Admin CP directory
* For security reasons, it is recommended you
* rename your Admin CP directory. You then need
* to adjust the value below to point to the
* new directory.
*/
\$config['admin_dir'] = 'admin';
/**
* Hide all Admin CP links
* If you wish to hide all Admin CP links
* on the front end of the board after
* renaming your Admin CP directory, set this
* to 1.
*/
\$config['hide_admin_links'] = 0;
/**
* Data-cache configuration
* The data cache is a temporary cache
* of the most commonly accessed data in MyBB.
* By default, the database is used to store this data.
*
* If you wish to use the file system (inc/cache directory)
* you can change the value below to 'files' from 'db'.
*/
\$config['cache_store'] = 'db';
/**
* Super Administrators
* A comma separated list of user IDs who cannot
* be edited, deleted or banned in the Admin CP.
* The administrator permissions for these users
* cannot be altered either.
*/
\$config['super_admins'] = '1';
?>";
$file = fopen($rootpath.'community/inc/config.php', 'w');
fwrite($file, $configdata);
fclose($file);
Print("DATABASE Settings has been saved, please click here to go next step!");
}elseif ($action == 'savepincode'){
step("Setup PINCODE (DONE)","PINCODE","8");
$newpincode = trim($_POST['pincode']);
$newpincode2 = trim($_POST['pincode2']);
if ($newpincode == '' OR $newpincode2 == '')
die('Invalid PINCODE!');
elseif ($newpincode != $newpincode2)
die('The pincodes didn\'t match! Must\'ve typoed. Try again.');
readconfig('DATABASE,MAIN');
dbconn ();
$sechash = md5($MAIN['SITENAME']);
$pincode = md5(md5($sechash).md5($newpincode));
$res = mysql_query("SELECT pincode FROM pincode WHERE area=1") or sqlerr(__FILE__,__LINE__);
if (mysql_num_rows($res) > 0)
mysql_query ("DELETE FROM pincode WHERE area=1") or sqlerr(__FILE__,__LINE__);
mysql_query("INSERT INTO pincode SET pincode = ".sqlesc($pincode).", sechash = ".sqlesc($sechash).", area = 1") or sqlerr(__FILE__,__LINE__);
Print("PINCODE has been saved, please click here to go next step!");
WriteConfig('SECURITY', $SECURITY);
Print("SECURITY Settings has been saved, please click here to go next step!");
}elseif ($action == 'save_cleanup') {
step("CLEANUP Setup (DONE!)","CLEANUP","9");
GetVar(array('autoinvitetime','invite_timeout','oldlogintime','oldshoutstime','oldfundstime','oldregimgtime','inactiveusertime','parkedacctime','oldreportstime','oldtorrentstime','promote_gig_limit','promote_min_ratio','promote_min_reg_days','demote_min_ratio','leechwarn_min_ratio','leechwarn_gig_limit','leechwarn_length','leechwarn_remove_ratio'));
elseif ($action == 'step0') {
step("Welcome to the installation wizard for ".TRACKER_VERSION.".","Welcome Screen","0");
?>
Welcome to the installation wizard for =TRACKER_VERSION?>. This wizard will install and configure a copy of =TRACKER_VERSION?> on your server.
Now that you've uploaded =TRACKER_VERSION?> files the database and settings need to be created and imported. Below is an outline of what is going to be completed during installation.
Before we go any further, please ensure that all the files have been uploaded, and that the folder '/CONFIG/', '/TORRENTS/, '/CACHE/' has suitable permissions to allow this script to write to it ( 0777 should be sufficient ).
=TRACKER_VERSION?> requires PHP 4.1 or better and an MYSQL database.
You will also need the following information that your webhost can provide:
*nix or Windows server.
MYSQL 3.23 or greater. Note: This source tested on Mysql 4 and 5 (we recommend: Mysql 5)
PHP version 4.1 or greater. Note: This source tested on PHP 4,5,5.2 (we recommend: PHP 5)
The Apache webserver (version 1.3 or greater.) Note: This source tested on Apache 2 (we recommend: Apache2).
The ability to change directory permissions to 777 or to change ownership of directories to be owned by the webserver process.
.htaccess Support! (see httpd.conf for: AllowOverride all)
Short Open Tag support (see php.ini for: short_open_tag = On)
GD2 Support (see php.ini for: extension=php_gd2.dll)
Mod Rewrite Support (see httpd.conf for: LoadModule rewrite_module modules/mod_rewrite.so)
SMTP Server.
And make sure that you have setup +followmylinks for your tracker directory if your apache version not support turn this option on via .htaccess
After each step has successfully been completed, click Next or Continue button to move on to the next step.
print ("");
}elseif ($action == 'step7') {
step("Administrator Setup","Admin Setup","7");
readconfig('DATABASE,MAIN,SECURITY,EXTRA');
dbconn ();
//MYBB SETUP
mysql_query("UPDATE ".TABLE_PREFIX."settings SET value='".$MAIN['SITENAME']." Forums' WHERE name='bbname'") or sqlerr(__FILE__, __LINE__);
mysql_query("UPDATE ".TABLE_PREFIX."settings SET value='".$MAIN['BASEURL']."/community' WHERE name='bburl'") or sqlerr(__FILE__, __LINE__);
mysql_query("UPDATE ".TABLE_PREFIX."settings SET value='".$MAIN['SITENAME']."' WHERE name='homename'") or sqlerr(__FILE__, __LINE__);
mysql_query("UPDATE ".TABLE_PREFIX."settings SET value='".$MAIN['BASEURL']."' WHERE name='homeurl'") or sqlerr(__FILE__, __LINE__);
mysql_query("UPDATE ".TABLE_PREFIX."settings SET value='' WHERE name='cookiedomain'") or sqlerr(__FILE__, __LINE__);
mysql_query("UPDATE ".TABLE_PREFIX."settings SET value='/' WHERE name='cookiepath'") or sqlerr(__FILE__, __LINE__);
mysql_query("UPDATE ".TABLE_PREFIX."settings SET value='".$MAIN['SITEEMAIL']."' WHERE name='adminemail'") or sqlerr(__FILE__, __LINE__);
mysql_query("UPDATE ".TABLE_PREFIX."settings SET value='mailto:".$MAIN['SITEEMAIL']."' WHERE name='contactlink'") or sqlerr(__FILE__, __LINE__);
write_settings();
//MYBB SETUP
rebuild_announce_settings();
print ("
}
print("");
?>
this works fine for me.
Dingo38
8th February 2014 15:32
I would do as x360 says..I'm presuming looking at your parse error,your using php 5.3.I would imagine v3.1 was written in php 5.2.
BamBam0077
8th February 2014 17:55
Quote:
Originally Posted by Dingo38
(Post 43848)
I would do as x360 says..I'm presuming looking at your parse error,your using php 5.3.I would imagine v3.1 was written in php 5.2.
I use php version 5.4.7 installed fine for me :friend:
Dingo38
10th February 2014 02:45
Quote:
Originally Posted by BamBam0077
(Post 43852)
I use php version 5.4.7 installed fine for me :friend:
Ok,lets go a little deeper then..Line 210 on your index.php is
PHP Code:
\$config['dbtype'] = 'mysqli';
Possibly configuration isn't set correctly to start with.
BamBam0077
10th February 2014 10:56
my index.php works that I posted it. I never got any errors with my copy of TSSE 3.1 :ok: maybe his database doesn't support mysqli ?