Bravo List
Register
Go Back   > Bravo List > P2P > Forum > Downloads
Reply
  #31  
Old 24th March 2011, 13:32
obama5493 obama5493 is offline
Member
 
Join Date: Mar 2011
Canada
Posts: 1
Default
Quote:
Originally Posted by thedizzy View Post
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




_________________
cheat codes
game cheat codes
Reply With Quote
  #32  
Old 13th September 2011, 16:40
kraf kraf is offline
Member
 
Join Date: Sep 2011
P2P
Posts: 1
Default ...
why I'm that thing?

Click the image to open in full size.
Reply With Quote
  #33  
Old 8th February 2014, 06:46
fielong fielong is offline
Member
 
Join Date: Feb 2014
P2P
Posts: 1
Default KINDLY HELP
I'm not getting set up here when I type localhost / install
it appears

arse error: syntax error, unexpected '$config' (T_VARIABLE), expecting identifier (T_STRING) in C:\wamp\www\tc\install\index.php on line 210
Reply With Quote
  #34  
Old 8th February 2014, 10:20
x360zone's Avatar
x360zone x360zone is offline
Senior Member
 
Join Date: Jul 2011
United Kingdom
Posts: 915
Default hi
also why use the old script and not use the latest on here v5.6?
__________________

7.5 tsse
future tracker source & hosting, vps
trackers installs + Themes
http://www.foxyhosting.co.uk
http://www.downmy.top testing zone
offshore vps & cpanel hosting & Shoutcast & VPN
STOP cyberbullying
any setups tracker installs vps hosting vps setups themes mods hit me up
over the last three months ive become a snake breeder,pythons,hogs,boa,corn,rat,king,carpet and what joy it is


Reply With Quote
  #35  
Old 8th February 2014, 13:05
BamBam0077 BamBam0077 is offline
Banned
 
Join Date: Jul 2013
P2P
Posts: 410
Talking
try this index.php

Code:
<?php
# IMPORTANT: DO NOT EDIT THIS FILE!!!
define ('IN_INSTALL', true);
define ('THIS_ROOT_PATH', './');
define ('ROOT_PATH', './../');
define ('INSTALL_VERSION', 'v.3.4');
define ('TRACKER_VERSION', 'TS Special Edition v.3.1'); // DO NOT CHANGE !
define ('TABLE_PREFIX', 'community_');
define ('MYBB_ADMINISTRATOR', 4);
define ('TIMENOW', time());
define ('BIGDUMP_VERSION','0.24b');
define ('DATA_CHUNK_LENGTH',16384);
define ('MAX_QUERY_LINES',30000);
@error_reporting(E_ALL & ~E_NOTICE);
@ini_set('error_reporting', E_ALL & ~E_NOTICE);
@ini_set('display_errors', '0');
@ini_set('display_startup_errors', '0');
@ini_set('ignore_repeated_errors', '1');
@set_magic_quotes_runtime(0);
@ignore_user_abort(1);
if (function_exists('set_time_limit') AND get_cfg_var('safe_mode') == 0)
{
        @set_time_limit(0);
}
@ini_set('auto_detect_line_endings', true);
define('INSTALL_URL', 'http://'.$_SERVER['HTTP_HOST']);
$rootpath = ROOT_PATH;
$shorthost =  $_SERVER["HTTP_HOST"];
$sh = preg_replace('/www./', '', $shorthost);

require_once(THIS_ROOT_PATH.'functions.php');
$action = isset($_POST['action']) ? htmlspecialchars($_POST['action']) : (isset($_GET['action']) ? htmlspecialchars($_GET['action']) : 'step0');
$allowed_actions = array('n_step_1','n_step_2','n_step_3','p_step_1','p_step_2','p_step_3','p_step_4','p_step_5','p_step_6','u_step_1','u_step_2','u_step_3','u_step_4','u_step_5','u_step_6','step0','step1','step2','step3','step4','step5','step6','step7','step8','step9','step10','save_db','save_main','save_admin','save_smtp','save_security','savepincode','save_cleanup');
if (!in_array($action, $allowed_actions))
        $action = 'step0';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title><?=TRACKER_VERSION ?> INSTALLATION <?=INSTALL_VERSION ?></title>
<link rel="stylesheet" href="default.css" type="text/css">
</head>
<body>
<?
if (file_exists(THIS_ROOT_PATH.'install.lock'))
{
        step("Installation ERROR!","ERROR!","0");
        die("<center><font color=red><b>For security reasons, this installer is locked!</font></b><br><br>Please (via FTP) remove the 'install/install.lock' file before continue.</center>");  
}else {
        version_check();
}
if ($action == 'n_step_1') {
        step("Upgrading from TS v3.0 to ".TRACKER_VERSION,"UPGRADE-BEGIN","1",true);
        print("<div class=alert>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.<br><br>Click <a href=index.php?action=n_step_2>here</a> to start upgrade.</div>");
}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("<div class=alert>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.<br><br>Click <a href=index.php?action=p_step_2>here</a> to start upgrade.</div>");
}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.");

                if (!validusername($wantusername))
                bark("Invalid username.");              
                $now = time();
                $salt = random_str_c();
                $loginkey = generate_loginkey();
                $saltedpw = md5(md5($salt).md5($wantpassword));
                $usergroup = MYBB_ADMINISTRATOR;
                $ip = getip();
                $timezone = '+1';
                $enabledst = 'yes';
                mysql_query("INSERT INTO ".TABLE_PREFIX."users (uid, username, password, salt, loginkey, email, usergroup, regdate, lastactive, lastvisit, allownotices, hideemail, emailnotify, receivepms, pmpopup, pmnotify, remember, showsigs, showavatars, showquickreply, invisible, style, daysprune, regip, showcodebuttons, tpp, ppp, referrer, timezone, dst) VALUES (".sqlesc($id).", ".sqlesc($wantusername).", ".sqlesc($saltedpw).", ".sqlesc($salt).", ".sqlesc($loginkey).", ".sqlesc($email).", '$usergroup', ".sqlesc($now).", ".sqlesc($now).", ".sqlesc($now).", 'yes', 'no', 'no', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'no', '0', '0', ".sqlesc($ip).", '1', '0', '0', '0', ".sqlesc($timezone).", ".sqlesc($enabledst).")") or sqlerr(__FILE__, __LINE__);          

                //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 <a href=index.php?action=p_step_4>here</a> to go next step!");

        //MYBB ADMIN INSERT
        }else
        {               
                print ("<form method='post' action='".$_SERVER["SCRIPT_NAME"]."'><input type='hidden' name='action' value='p_step_3'><input type='hidden' name='insert_admin' value='yes'>");
                tr("Enter your name","<input type=text size=40 name=wantusername /> Please enter name of staffleader on your tracker, This will be become forum administrator automaticly.", 1);
                tr("Enter your id", "<input type=text size=40 name=id /> Please enter id of staffleader of your tracker.", 1);
                tr("Enter your password","<input type=password size=40 name=wantpassword /> Please enter your password for forum.", 1);
                tr("RE-Enter your password","<input type=password size=40 name=passagain /> Please enter your password for forum.", 1);
                tr("Enter your email","<input type=text size=40 name=email /> Please enter your email for forum.", 1);

                tr("Insert Forum Admin","<input type='submit' name='save' value='INSERT [PRESS ONLY ONCE]'>\n", 1);     
                print ("</form>");
                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 <a href=index.php?action=p_step_5>here</a> to go next step!");
        }else {
        print ("<form method='post' action='".$_SERVER["SCRIPT_NAME"]."'><input type='hidden' name='action' value='p_step_4'><input type='hidden' name='u_pincode_save' value='yes'>");
        print("<tr><td align=right><b>Enter your new pincode:</b></td><td><input type=text name=pincode id='specialboxn'></td></tr>");
        print("<tr><td align=right><b>RE-Enter your new pincode:</b></td><td><input type=text name=pincode2 id='specialboxn'></td></tr>");
        tr("Save settings","<input type='submit' name='save' value='SAVE PINCODE AND GO NEXT STEP [PRESS ONLY ONCE]'>\n", 1);
        print ("</form>");
        }
        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 = "<?php
/**
 * Daatabase configuration
 */

\$config['dbtype'] = 'mysqli';
\$config['hostname'] = '{$mysql_host}';
\$config['username'] = '{$mysql_user}';
\$config['password'] = '{$mysql_pass}';
\$config['database'] = '{$mysql_db}';
\$config['table_prefix'] = '{$table_prefix}';

/**
 * 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/Forum/Announce system has been succussfully upgraded, please click <a href=index.php?action=p_step_6>here</a> 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("<div class=alert>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.<br><br>Click <a href=index.php?action=u_step_2>here</a> to start upgrade.</div>");
}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.");

                if (!validusername($wantusername))
                bark("Invalid username.");              
                $now = time();
                $salt = random_str_c();
                $loginkey = generate_loginkey();
                $saltedpw = md5(md5($salt).md5($wantpassword));
                $usergroup = MYBB_ADMINISTRATOR;
                $ip = getip();
                $timezone = '+1';
                $enabledst = 'yes';
                mysql_query("INSERT INTO ".TABLE_PREFIX."users (uid, username, password, salt, loginkey, email, usergroup, regdate, lastactive, lastvisit, allownotices, hideemail, emailnotify, receivepms, pmpopup, pmnotify, remember, showsigs, showavatars, showquickreply, invisible, style, daysprune, regip, showcodebuttons, tpp, ppp, referrer, timezone, dst) VALUES (".sqlesc($id).", ".sqlesc($wantusername).", ".sqlesc($saltedpw).", ".sqlesc($salt).", ".sqlesc($loginkey).", ".sqlesc($email).", '$usergroup', ".sqlesc($now).", ".sqlesc($now).", ".sqlesc($now).", 'yes', 'no', 'no', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'no', '0', '0', ".sqlesc($ip).", '1', '0', '0', '0', ".sqlesc($timezone).", ".sqlesc($enabledst).")") or sqlerr(__FILE__, __LINE__);

                //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 <a href=index.php?action=u_step_4>here</a> to go next step!");
        //MYBB ADMIN INSERT
        }else
        {               
                print ("<form method='post' action='".$_SERVER["SCRIPT_NAME"]."'><input type='hidden' name='action' value='u_step_3'><input type='hidden' name='insert_admin' value='yes'>");
                tr("Enter your name","<input type=text size=40 name=wantusername /> Please enter name of staffleader on your tracker, This will be become forum administrator automaticly.", 1);
                tr("Enter your id", "<input type=text size=40 name=id /> Please enter id of staffleader of your tracker.", 1);
                tr("Enter your password","<input type=password size=40 name=wantpassword /> Please enter your password for forum.", 1);
                tr("RE-Enter your password","<input type=password size=40 name=passagain /> Please enter your password for forum.", 1);
                tr("Enter your email","<input type=text size=40 name=email /> Please enter your email for forum.", 1);

                tr("Insert Forum Admin","<input type='submit' name='save' value='INSERT [PRESS ONLY ONCE]'>\n", 1);     
                print ("</form>");
                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 <a href=index.php?action=u_step_5>here</a> to go next step!");
        }else {
        print ("<form method='post' action='".$_SERVER["SCRIPT_NAME"]."'><input type='hidden' name='action' value='u_step_4'><input type='hidden' name='u_pincode_save' value='yes'>");
        print("<tr><td align=right><b>Enter your new pincode:</b></td><td><input type=text name=pincode id='specialboxn'></td></tr>");
        print("<tr><td align=right><b>RE-Enter your new pincode:</b></td><td><input type=text name=pincode2 id='specialboxn'></td></tr>");
        tr("Save settings","<input type='submit' name='save' value='SAVE PINCODE AND GO NEXT STEP [PRESS ONLY ONCE]'>\n", 1);
        print ("</form>");
        }
        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 = "<?php
/**
 * Daatabase configuration
 */

\$config['dbtype'] = 'mysqli';
\$config['hostname'] = '{$mysql_host}';
\$config['username'] = '{$mysql_user}';
\$config['password'] = '{$mysql_pass}';
\$config['database'] = '{$mysql_db}';
\$config['table_prefix'] = '{$table_prefix}';

/**
 * 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/Forum/Announce system has been succussfully upgraded, please click <a href=index.php?action=u_step_6>here</a> 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");

        GetVar(array('mysql_host','mysql_user','mysql_pass','mysql_db'));
        $DATABASE['mysql_host'] = $mysql_host;
        $DATABASE['mysql_user'] = $mysql_user;
        $DATABASE['mysql_pass'] = $mysql_pass;
        $DATABASE['mysql_db']   = $mysql_db;    
        
        WriteConfig('DATABASE', $DATABASE);
        $table_prefix = TABLE_PREFIX;
        $configdata = "<?php
/**
 * Daatabase configuration
 */

\$config['dbtype'] = 'mysqli';
\$config['hostname'] = '{$mysql_host}';
\$config['username'] = '{$mysql_user}';
\$config['password'] = '{$mysql_pass}';
\$config['database'] = '{$mysql_db}';
\$config['table_prefix'] = '{$table_prefix}';

/**
 * 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 <a href=index.php?action=step3>here</a> 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 <a href=index.php?action=step9>here</a> to go next step!");

}elseif ($action == 'save_main') {
        step("Basic Tracker Setup (DONE!)","Tracker Setup","3");
        GetVar(array('site_online','max_torrent_size','announce_interval','signup_timeout','minvotes','max_dead_torrent_time','maxusers','torrent_dir','announce_urls','BASEURL','DEFAULTBASEURL','MEMBERSONLY','PEERLIMIT','SITEEMAIL','SITENAME','autoclean_interval','pic_base_url','table_cat','reportemail','invitesystem','registration','showpolls','showstats','showlastxtorrents','showlastxforumposts','showtrackerload','showwhatsgoinon','showshoutbox','waitsystem','maxdlsystem','cache','verification','invite_count','boardclosed','maxchar'));

        $MAIN['site_online'] = $site_online;
        $MAIN['max_torrent_size'] = $max_torrent_size;
        $MAIN['announce_interval'] = $announce_interval;
        $MAIN['signup_timeout'] = $signup_timeout;
        $MAIN['minvotes'] = $minvotes;
        $MAIN['max_dead_torrent_time'] = $max_dead_torrent_time;
        $MAIN['maxusers'] = $maxusers;
        $MAIN['torrent_dir'] = $torrent_dir;
        $MAIN['announce_urls'] = $announce_urls;
        $MAIN['BASEURL'] = $BASEURL;
        $MAIN['DEFAULTBASEURL'] = $DEFAULTBASEURL;
        $MAIN['MEMBERSONLY'] = $MEMBERSONLY;
        $MAIN['PEERLIMIT'] = $PEERLIMIT;
        $MAIN['SITEEMAIL'] = $SITEEMAIL;
        $MAIN['SITENAME'] = $SITENAME;
        $MAIN['autoclean_interval'] = $autoclean_interval;
        $MAIN['pic_base_url'] = $pic_base_url;
        $MAIN['table_cat'] = $table_cat;
        $MAIN['reportemail'] = $reportemail;
        $MAIN['invitesystem'] = $invitesystem;
        $MAIN['registration'] = $registration;
        $MAIN['showpolls'] = $showpolls;
        $MAIN['showstats'] = $showstats;                
        $MAIN['showlastxtorrents'] = $showlastxtorrents;        
        $MAIN['showlastxforumposts'] = $showlastxforumposts;
        $MAIN['showtrackerload'] = $showtrackerload;
        $MAIN['showwhatsgoinon'] = $showwhatsgoinon;
        $MAIN['showshoutbox'] = $showshoutbox;
        $MAIN['waitsystem'] = $waitsystem;
        $MAIN['maxdlsystem'] = $maxdlsystem;
        $MAIN['bitbucket'] = $bitbucket;
        $MAIN['cache'] = $cache;        
        $MAIN['verification'] = $verification;
        $MAIN['invite_count'] = $invite_count;          
        $MAIN['attachment_dir'] = $attachment_dir;
        $MAIN['maxchar'] = $maxchar;

        WriteConfig('MAIN', $MAIN);
        Print("MAIN Settings has been saved, please click <a href=index.php?action=step4>here</a> to go next step!");
        
}elseif ($action == 'save_smtp') {
        step("SMTP Setup (DONE!)","SMTP","5");
        GetVar('smtptype');
        if ($smtptype == 'default'){            
                $SMTP['smtptype']                       = $smtptype;
        }
        elseif ($smtptype == 'advanced') {
                GetVar(array('smtp_host','smtp_port','smtp_from'));
                $SMTP['smtptype']                       = $smtptype;
                $SMTP['smtp_host']                      = $smtp_host;
                $SMTP['smtp_port']                      = $smtp_port;
                if (strtoupper(substr(PHP_OS,0,3)=='WIN'))
                        $SMTP['smtp_from']              = $smtp_from;   
        }
        elseif ($smtptype == 'external'){
                GetVar(array('smtpaddress','smtpport','accountname','accountpassword'));
                $SMTP['smtptype']                                       = $smtptype;
                $SMTP['smtpaddress']                            = $smtpaddress;
                $SMTP['smtpport']                                       = $smtpport;
                $SMTP['accountname']                            = $accountname;
                $SMTP['accountpassword']                        = $accountpassword;
        }
        WriteConfig('SMTP', $SMTP);
        Print("SMTP Settings has been saved, please click <a href=index.php?action=step6>here</a> to go next step!");
}elseif ($action == 'save_security') {
        step("SECURITY Setup (DONE!)","Security","4");
        GetVar(array('securelogin','iv','maxip','maxloginattempts','disablerightclick','privatetrackerpatch','bannedclientdetect','securehash'));
        $SECURITY['securelogin'] = $securelogin;
        $SECURITY['iv'] = $iv;
        $SECURITY['maxip'] = $maxip;
        $SECURITY['maxloginattempts'] = $maxloginattempts;
        $SECURITY['disablerightclick'] = $disablerightclick;
        $SECURITY['privatetrackerpatch'] = $privatetrackerpatch;
        $SECURITY['bannedclientdetect'] = $bannedclientdetect;
        $SECURITY['securehash'] = $securehash;

        WriteConfig('SECURITY', $SECURITY);
        Print("SECURITY Settings has been saved, please click <a href=index.php?action=step5>here</a> 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'));
        
        $CLEANUP['autoinvitetime'] = $autoinvitetime;
        $CLEANUP['invite_timeout'] = $invite_timeout;
        $CLEANUP['oldlogintime'] = $oldlogintime;
        $CLEANUP['oldshoutstime'] = $oldshoutstime;
        $CLEANUP['oldfundstime'] = $oldfundstime;
        $CLEANUP['oldregimgtime'] = $oldregimgtime;
        $CLEANUP['inactiveusertime'] = $inactiveusertime;
        $CLEANUP['parkedacctime'] = $parkedacctime;     
        $CLEANUP['oldreportstime'] = $oldreportstime;
        $CLEANUP['oldtorrentstime'] = $oldtorrentstime;
        $CLEANUP['promote_gig_limit'] = $promote_gig_limit;
        $CLEANUP['promote_min_ratio'] = $promote_min_ratio;
        $CLEANUP['promote_min_reg_days'] = $promote_min_reg_days;
        $CLEANUP['demote_min_ratio'] = $demote_min_ratio;
        $CLEANUP['leechwarn_min_ratio'] = $leechwarn_min_ratio;
        $CLEANUP['leechwarn_gig_limit'] = $leechwarn_gig_limit;
        $CLEANUP['leechwarn_length'] = $leechwarn_length;
        $CLEANUP['leechwarn_remove_ratio'] = $leechwarn_remove_ratio;

        WriteConfig('CLEANUP', $CLEANUP);
        Print("CLEANUP Settings has been saved, please click <a href=index.php?action=step10>here</a> to go next step!");
}elseif ($action == 'save_admin') {
        define ("UC_STAFFLEADER", 7);
        readconfig('DATABASE');
        dbconn ();
        step("Administrator Setup (DONE!)","Admin Setup","7");
        if (!mkglobal("wantusername:wantpassword:passagain:email:hintanswer:passhint"))
                die('Error, Please try again!');
        $email = htmlspecialchars(trim($email));
        $email = safe_email($email);
        if (!check_email($email))
                bark("Invalid email address!");
        $country = $_POST["country"];
                int_check($country);    
        $gender =  htmlspecialchars(trim($_POST["gender"])); 
        $allowed_genders = array("Male","Female","male","female");
        if (!in_array($gender, $allowed_genders, true))
                bark("Invalid Gender!");
        if (empty($wantusername) || empty($wantpassword) || empty($email) || empty($country) || empty($gender) || empty($hintanswer) || empty($passhint))
                bark("Don't leave any fields blank.");

        $hintanswer     = trim ( htmlspecialchars ( $hintanswer ) ) ;
        $passhint               = trim ( htmlspecialchars ( $passhint ) ) ;

        if (strlen($hintanswer) < 6)
                bark("Sorry, Hintanswer is too short (min is 6 chars)");

        if (strlen($wantusername) > 12)
                bark("Sorry, username is too long (max is 12 chars)");

        if ($wantpassword != $passagain)
                bark("The passwords didn't match! Must've typoed. Try again.");

        if (strlen($wantpassword) < 6)
                bark("Sorry, password is too short (min is 6 chars)");

        if (strlen($wantpassword) > 40)
                bark("Sorry, password is too long (max is 40 chars)");

        if ($wantpassword == $wantusername)
                bark("Sorry, password cannot be same as user name.");

        if (!validemail($email))
                bark("That doesn't look like a valid email address.");

        if (!validusername($wantusername))
                bark("Invalid username.");
        $a = (@mysql_fetch_row(@mysql_query("select count(*) from users where email='$email'"))) or sqlerr(__FILE__, __LINE__);
        if ($a[0] != 0)
        bark("The e-mail address ".htmlspecialchars($email)." is already in use.");
        $res = mysql_query("SELECT COUNT(*) FROM users") or sqlerr(__FILE__, __LINE__);
        $arr = mysql_fetch_row($res);
        $secret = mksecret();
        $wantpasshash = md5($secret . $wantpassword . $secret);
        $editsecret = (!$arr[0]?"":mksecret());
        $ret = mysql_query("INSERT INTO users (username, passhash, secret, editsecret, email, country, gender, hintanswer, passhint, status, ". (!$arr[0]?"class, ":"") ."added) VALUES (" .
                implode(",", array_map("sqlesc", array($wantusername, $wantpasshash, $secret, $editsecret, $email, $country, $gender, $hintanswer, $passhint, (!$arr[0]?'confirmed':'pending')))).
                ", ". (!$arr[0]?UC_STAFFLEADER.", ":""). "'". get_date_time() ."')") or sqlerr(__FILE__, __LINE__);
        if (!$ret) {
        if (mysql_errno() == 1062)
                bark("Username already exists!");
        bark("borked");
        }else{
                //MYBB ADMIN INSERT
                $id = mysql_insert_id();                
                $now = time();
                $salt = random_str_c();
                $loginkey = generate_loginkey();
                $saltedpw = md5(md5($salt).md5($wantpassword));
                $usergroup = MYBB_ADMINISTRATOR;
                $ip = getip();
                $timezone = '+1';
                $enabledst = 'yes';
                mysql_query("INSERT INTO ".TABLE_PREFIX."users (uid, username, password, salt, loginkey, email, usergroup, regdate, lastactive, lastvisit, allownotices, hideemail, emailnotify, receivepms, pmpopup, pmnotify, remember, showsigs, showavatars, showquickreply, invisible, style, daysprune, regip, showcodebuttons, tpp, ppp, referrer, timezone, dst) VALUES ('$id', ".sqlesc($wantusername).", ".sqlesc($saltedpw).", ".sqlesc($salt).", ".sqlesc($loginkey).", ".sqlesc($email).", '$usergroup', ".sqlesc($now).", ".sqlesc($now).", ".sqlesc($now).", 'yes', 'no', 'no', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'no', '0', '0', ".sqlesc($ip).", '1', '0', '0', '0', ".sqlesc($timezone).", ".sqlesc($enabledst).")") or sqlerr(__FILE__, __LINE__);
                //MYBB ADMIN INSERT

                //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 has been added, please click <a href=index.php?action=step8>here</a> to go next step!");
        }
        
}elseif ($action == 'step9') {
        step("Setup CLEANUP","CLEANUP","9");
        print ("<form method='post' action='".$_SERVER["SCRIPT_NAME"]."'><input type='hidden' name='action' value='save_cleanup'>");

        echo '<tr><td colspan="2" class="subheader" align="center">LIMITATIONS: Timeouts</td></tr>';
        tr("Automatic Invite Time (days)", "<input type='text' name='autoinvitetime' value='28' id='specialboxes'> Give x Invites every X days if usergroup have this feature.\n", 1);
        tr("Invite Timeout?","<input type='text' name='invite_timeout' id='specialboxes' value='2'> Delete invite code after X days who didnt respond the invite request", 1);  
        tr("Delete old login attempts", "<input type='text' name='oldlogintime' value='1' id='specialboxes'> Delete failed login attempts every X days.\n", 1);
        tr("Delete old shouts", "<input type='text' name='oldshoutstime' value='7' id='specialboxes'> Delete old shouts every X days.\n", 1);
        tr("Delete old funds", "<input type='text' name='oldfundstime' value='28' id='specialboxes'> Delete old funds every X days.\n", 1);
        tr("Delete old regimages.", "<input type='text' name='oldregimgtime' value='1' id='specialboxes'> Delete old image verification codes every X days.\n", 1);
        tr("Delete Inactive users", "<input type='text' name='inactiveusertime' value='90' id='specialboxes'> Delete inactive users every X days.\n", 1);
        tr("Delete Parked users", "<input type='text' name='parkedacctime' value='128' id='specialboxes'> Delete inactive parked accounts every X days.\n", 1);
        tr("Delete old reports", "<input type='text' name='oldreportstime' value='7' id='specialboxes'> Delete answered reports every X days.\n", 1);
        tr("Delete old torrents", "<input type='text' name='oldtorrentstime' value='60' id='specialboxes'> Delete torrents older than X days.\n", 1);   

        echo '<tr><td colspan="2" class="subheader" align="center">LIMITATIONS: Promote and Demote Users</td></tr>';
        tr("Promote Users GIG Limit", "<input type='text' name='promote_gig_limit' value='25' id='specialboxes'> Min. GIG Limit for promote.\n", 1);
        tr("Promote Users RATIO Limit", "<input type='text' name='promote_min_ratio' value='1.05' id='specialboxes'> Min. RATIO Limit for promote.\n", 1);
        tr("Promote Users DAYS Limit", "<input type='text' name='promote_min_reg_days' value='28' id='specialboxes'> Min. DAYS Limit for promote.\n", 1);
        tr("Demote Users RATIO Limit", "<input type='text' name='demote_min_ratio' value='0.95' id='specialboxes'> Min. RATIO Limit for Demote.\n", 1);
        
        echo '<tr><td colspan="2" class="subheader" align="center">LIMITATIONS: Automatic Warning and Banning</td></tr>';
        tr("Warn User MIN. Ratio", "<input type='text' name='leechwarn_min_ratio' value='0.5' id='specialboxes'> Min. Ratio for LeechWarning.\n", 1);
        tr("Warn User GIG Limit", "<input type='text' name='leechwarn_gig_limit' value='5' id='specialboxes'> Min. GIG Limit for LeechWarning.\n", 1);
        tr("Warning Length", "<input type='text' name='leechwarn_length' value='2' id='specialboxes'> LeechWarning Length (weeks)\n", 1);
        tr("Remove Warning Min. Ratio", "<input type='text' name='leechwarn_remove_ratio' value='0.8' id='specialboxes'> Min. Ratio Limit to Remove LeechWarning\n", 1);                

        tr("Save settings","<input type='submit' name='save' value='SAVE CLEANUP AND GO NEXT STEP [PRESS ONLY ONCE]'>\n", 1);
        print ("</form>");
}elseif ($action == 'step8') {
        step("Setup PINCODE","PINCODE","8");
        print ("<form method='post' action='".$_SERVER["SCRIPT_NAME"]."'><input type='hidden' name='action' value='savepincode'>");
        print("<tr><td align=right><b>Enter your new pincode:</b></td><td><input type=text name=pincode id='specialboxn'></td></tr>");
        print("<tr><td align=right><b>RE-Enter your new pincode:</b></td><td><input type=text name=pincode2 id='specialboxn'></td></tr>");
        tr("Save settings","<input type='submit' name='save' value='SAVE PINCODE AND GO NEXT STEP [PRESS ONLY ONCE]'>\n", 1);
        print ("</form>");
}elseif ($action == 'step10') {
                step("Finish the Installation","Finish","10");
                lock();
                exit;
}
elseif ($action == 'step6') {
        step("SQL Dump. Powered by BigDump ver. 0.24b from 2006-06-25","Sql","6");
        $installtype = 'fresh';
        include_once ('bigdump.php');
}

elseif ($action == 'step0') {
        step("Welcome to the installation wizard for ".TRACKER_VERSION.".","Welcome Screen","0");
?>

                        <div class=alert2><p>Welcome to the installation wizard for <?=TRACKER_VERSION?>. This wizard will install and configure a copy of <?=TRACKER_VERSION?> on your server.</p>
                        <p>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.</p>
                        <ul>
                                <li>Step1: Requirements checked,</li>
                                <li>Step2: Configuration of database engine,</li>
                                <li>Step3: Basic tracker (main) settings configured,</li>
                                <li>Step4: Basic tracker (security) settings configured,</li>
                                <li>Step5: Basic tracker (smtp) settings configured,</li>
                                <li>Step6: SQL Import,</li>
                                <li>Step7: Administrator Setup,</li>
                                <li>Step8: PINCODE Setup,</li>
                                <li>Step9: Basic tracker (cleanup) settings configured,</li>
                                <li>Step10: Finish and Lock installation!</li>
                        </ul></div>             
                        <div class=alert>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.</div>
<div class=alert2>
<b>You will also need the following information that your webhost can provide:</b>
<ul>
<li>*nix or Windows server.</li>
<li>MYSQL 3.23 or greater. Note: This source tested on Mysql 4 and 5 (we recommend: Mysql 5)</li>
<li>PHP version 4.1 or greater. Note: This source tested on PHP 4,5,5.2 (we recommend: PHP 5)</li>
<li>The Apache webserver (version 1.3 or greater.) Note: This source tested on Apache 2 (we recommend: Apache2).</li>
<li>The ability to change directory permissions to 777 or to change ownership of directories to be owned by the webserver process.</li>
<li>.htaccess Support! (see httpd.conf for:  AllowOverride all)</li>
<li>Short Open Tag support (see php.ini for: short_open_tag = On)</li>
<li>GD2 Support (see php.ini for: extension=php_gd2.dll)</li>
<li>Mod Rewrite Support (see httpd.conf for: LoadModule rewrite_module modules/mod_rewrite.so)</li>
<li>SMTP Server.</li></ul>
And make sure that you have setup +followmylinks for your tracker directory if your apache version not support turn this option on via .htaccess<br>
After each step has successfully been completed, click Next or Continue button to move on to the next step.</div>
<div class=alert>
<form method='get' action='index.php'>
<div align=center>Please select installation type: 
<select name='action'>
<option value='step1'>Fresh Install</option>
<option value='n_step_1'>Upgrade from v3.0 to <?=TRACKER_VERSION;?></option>
<option value='u_step_1'>Upgrade from v2.5 to <?=TRACKER_VERSION;?></option>
<option value='p_step_1'>Upgrade from v1.3.9 to <?=TRACKER_VERSION;?></option>
</select>
<input type=submit value='START'></form>
</div>
</tr></td></div></table>
<?
}

elseif ($action == 'step1') {
                step("Requirements Check","Req.Check","1");
        include_once ('reqcheck.php');
}

elseif ($action == 'step2') {   
        step("Database Setup","MYSQL Setup","2");
        print ("<form method='post' action='".$_SERVER["SCRIPT_NAME"]."'><input type='hidden' name='action' value='save_db'>");

        tr("Mysql Host? ","<input type='text' size='45' name=mysql_host value='".($DATABASE["mysql_host"] ? $DATABASE["mysql_host"] : "localhost")."'> Please enter your mysql host name.\n", 1);
        tr("Mysql User? ","<input type='text' size='45' name=mysql_user value='".($DATABASE["mysql_user"] ? $DATABASE["mysql_user"] : "root")."'> Please enter your mysql user name.\n", 1);
        tr("Mysql Password? ","<input type='password' size='45' name=mysql_pass value=''> Please enter your mysql password.\n", 1);
        tr("Mysql Database Name? ","<input type='text' size='45' name=mysql_db value='".($DATABASE["mysql_db"] ? $DATABASE["mysql_db"] : "torrent")."'> Please enter database name of your tracker.\n", 1);

        tr("Save settings","<input type='submit' name='save' value='SAVE DATABASE SETTINGS AND GO NEXT STEP [PRESS ONLY ONCE]'>\n", 1);
        print ("</form>");

}elseif ($action == 'step3') {
        Readconfig('MAIN');     
        step("Basic Tracker Setup","Tracker Setup","3");        
        print ("<form method='post' action='".$_SERVER["SCRIPT_NAME"]."'><input type='hidden' name='action' value='save_main'>");
        
        echo '<tr><td colspan="2" class="subheader" align="center">TRACKER/BOARD Online/Offline</td></tr>';
        tr("Tracker Online? ", "yes <INPUT type='radio' name='site_online'" . ($MAIN["site_online"] == "yes" ? " checked" : " checked") . " value='yes'> no <INPUT type='radio' name='site_online'" . ($MAIN["site_online"] == "no" ? " checked" : "") . " value='no'><br />Want to turn off your Tracker while performing updates or other types of maintenance?<br /><b>Please Note</b>: Staff Leader will still be able to see the tracker.\n", 1);
        tr("Forum Closed? ", "yes <INPUT type='radio' name='boardclosed' value='yes'> no <INPUT type='radio' name='boardclosed' value='no' CHECKED> <br />Want to turn off Forums while performing updates or other types of maintenance?<br /><b>Please Note</b>: Administrators will still be able to see the Forums.\n", 1);

        echo '<tr><td colspan="2" class="subheader" align="center">General TRACKER Configuration</td></tr>';
        tr("Members Only? ", "yes <INPUT type='radio' name=MEMBERSONLY" . ($MAIN["MEMBERSONLY"] == "yes" ? " checked" : " checked") . " value='yes'> no <INPUT type='radio' name='MEMBERSONLY'" . ($MAIN["MEMBERSONLY"] == "no" ? " checked" : "") . " value='no'>\n<br />Disable guest downloads.", 1);
        tr("Invites System Enabled? ", "on <INPUT type='radio' name=invitesystem" . ($MAIN["invitesystem"] == "on" ? " checked" : "") . " value='on'> off <INPUT type='radio' name='invitesystem'" . ($MAIN["invitesystem"] == "off" ? " checked" : " checked") . " value='off'>\n<br />Allow Registrations via Invite System.", 1);
        tr("Registration System Enabled? ", "on <INPUT type='radio' name=registration" . ($MAIN["registration"] == "on" ? " checked" : " checked") . " value='on'> off <INPUT type='radio' name='registration'" . ($MAIN["registration"] == "off" ? " checked" : "") . " value='off'>\n<br />Allow Registrations (not need invite code)", 1);
        tr("Verification type?","Email <INPUT type='radio' name='verification'" . ($MAIN["verification"] == "email" ? " checked" : " checked") . " value='email'> Admin <INPUT type='radio' name='verification'" . ($MAIN["verification"] == "admin" ? " checked" : "") . " value='admin'> Automaticly <INPUT type='radio' name='verification'" . ($MAIN["verification"] == "automatic" ? " checked" : "") . " value='automatic'><br /><b>EMAIL:</b> Sent confirmation email.<br /><b>ADMIN</b>: Manual activate by Staff.<br /><b>AUTOMATIC</b>: Automaticly activate after registration by system.</p>\n", 1);
        tr("Wait System Enabled?","yes <INPUT type='radio' name='waitsystem'" . ($MAIN["waitsystem"] == "yes" ? " checked" : "") . " value='yes'> no <INPUT type='radio' name='waitsystem'" . ($MAIN["waitsystem"] == "no" ? " checked" : " checked") . " value='no'>\n Enable or Disable wait system (see <a href=$BASEURL/faq.php#46>faq</a>)", 1);
        tr("Max. Concurrent Download Enabled?","yes <INPUT type='radio' name='maxdlsystem'" . ($MAIN["maxdlsystem"] == "yes" ? " checked" : "") . " value='yes'> no <INPUT type='radio' name='maxdlsystem'" . ($MAIN["maxdlsystem"] == "no" ? " checked" : " checked") . " value='no'>\n Enable or Disable Maximum concurrent downloads (AKA Max Slots) (see <a href=$BASEURL/faq.php#66>faq</a>)", 1);

        echo '<tr><td colspan="2" class="subheader" align="center">Enable/Disable Extra Features on Index Page</td></tr>';
        tr("Show Polls?", "yes <INPUT type='radio' name=showpolls" . ($MAIN["showpolls"] == "yes" ? " checked" : " checked") . " value='yes'> no <INPUT type='radio' name='showpolls'" . ($MAIN["showpolls"] == "no" ? " checked" : "") . " value='no'> Staff only <INPUT type='radio' name='showpolls'" . ($MAIN["showpolls"] == "staffonly" ? " checked" : "") . " value='staffonly'>\n<br />Show POLL system on main page.", 1);
        tr("Show Stats?","yes <INPUT type='radio' name=showstats" . ($MAIN["showstats"] == "yes" ? " checked" : " checked") . " value='yes'> no <INPUT type='radio' name='showstats'" . ($MAIN["showstats"] == "no" ? " checked" : "") . " value='no'>Staff only <INPUT type='radio' name='showstats'" . ($MAIN["showstats"] == "staffonly" ? " checked" : "") . " value='staffonly'>\n<br />Show STATS system on main page.", 1);      
        tr("Show Last 5 Torrents?","yes <INPUT type='radio' name='showlastxtorrents'" . ($MAIN["showlastxtorrents"] == "yes" ? " checked" : "") . " value='yes'> no <INPUT type='radio' name='showlastxtorrents'" . ($MAIN["showlastxtorrents"] == "no" ? " checked" : "") . " value='no'>Staff only <INPUT type='radio' name='showlastxtorrents'" . ($MAIN["showlastxtorrents"] == "staffonly" ? " checked" : "") . " value='staffonly' checked>\n<br />Show Last x Torrents on main page.", 1);
        tr("Show Latest 5 Forum Topics?","yes <INPUT type='radio' name='showlastxforumposts'" . ($MAIN["showlastxforumposts"] == "yes" ? " checked" : "") . " value='yes'> no <INPUT type='radio' name='showlastxforumposts'" . ($MAIN["showlastxforumposts"] == "no" ? " checked" : "") . " value='no'>Staff only <INPUT type='radio' name='showlastxforumposts'" . ($MAIN["showlastxforumposts"] == "staffonly" ? " checked" : " checked") . " value='staffonly'>\n<br />Show Latest 5 Forum Topics on main page.", 1);
        tr("Show Server Load?","yes <INPUT type='radio' name='showtrackerload'" . ($MAIN["showtrackerload"] == "yes" ? " checked" : "") . " value='yes'> no <INPUT type='radio' name='showtrackerload'" . ($MAIN["showtrackerload"] == "no" ? " checked" : " checked") . " value='no'>Staff only <INPUT type='radio' name='showtrackerload'" . ($MAIN["showtrackerload"] == "staffonly" ? " checked" : "") . " value='staffonly'>\n<br />Show Server Load on main page.", 1);
        tr("Show Whats Goin On Box (on main page)?","yes <INPUT type='radio' name='showwhatsgoinon'" . ($MAIN["showwhatsgoinon"] == "yes" ? " checked" : " ") . " value='yes'> no <INPUT type='radio' name='showwhatsgoinon'" . ($MAIN["showwhatsgoinon"] == "no" ? " checked" : "") . " value='no'>Staff only <INPUT type='radio' name='showwhatsgoinon'" . ($MAIN["showwhatsgoinon"] == "staffonly" ? " checked" : " checked") . " value='staffonly'>\n<br />Show Whats Goin On Box on main page.", 1);
        tr("Show Shoutbox?","yes <INPUT type='radio' name='showshoutbox'" . ($MAIN["showshoutbox"] == "yes" ? " checked" : " checked") . " value='yes'> no <INPUT type='radio' name='showshoutbox'" . ($MAIN["showshoutbox"] == "no" ? " checked" : "") . " value='no'>Staff only <INPUT type='radio' name='showshoutbox'" . ($MAIN["showshoutbox"] == "staffonly" ? " checked" : "") . " value='staffonly'>\n<br />Show shoutbox on main page.", 1);

        echo '<tr><td colspan="2" class="subheader" align="center">General Tracker Settings</td></tr>';
        tr("Announce URL? ","<input type='text' size=60 id='specialboxg' name=announce_urls value='".($MAIN["announce_urls"] ? $MAIN["announce_urls"] : "http://" . $_SERVER["HTTP_HOST"]."/announce.php")."'> <br />It should be: http://" . $_SERVER["HTTP_HOST"]."/announce.php\n", 1);
        tr("Base URL? ","<input type='text' size=60 id='specialboxg' name=BASEURL value='".($MAIN["BASEURL"] ? $MAIN["BASEURL"] : "http://" . $_SERVER["HTTP_HOST"]."")."'> <br /It should be: http://" . $_SERVER["HTTP_HOST"]." <b><u>NO</u> a trailing slash (/) at the end!</b>\n", 1);
        tr("Default Base URL? ","<input type='text' size=60 id='specialboxg' name=DEFAULTBASEURL value='".($MAIN["DEFAULTBASEURL"] ? $MAIN["DEFAULTBASEURL"] : "http://" . $_SERVER["HTTP_HOST"])."'> <br /It should be: http://" . $_SERVER["HTTP_HOST"]." <b><u>NO</u> trailing slash (/) at the end!</b>\n", 1);
        tr("Site EMAIL? ","<input type='text' size=60 id='specialboxg' name=SITEEMAIL value='".($MAIN["SITEEMAIL"] ? $MAIN["SITEEMAIL"] : "noreply@".$sh)."'> <br />Website Email address\n", 1);
        tr("Report EMAIL? ","<input type='text' size=60 id='specialboxg' name=reportemail value='".($MAIN["reportemail"] ? $MAIN["reportemail"] : "report@".$sh)."'> <br />Report Email address\n", 1);
        tr("Site Name? ","<input type='text' size=60 id='specialboxg' name=SITENAME value='".($MAIN["SITENAME"] ? $MAIN["SITENAME"]: $sh)."'> <br />Website Name.\n", 1);

        echo '<tr><td colspan="2" class="subheader" align="center">General Settings Of Tracker Directories</td></tr>';
        tr("Torrent Directory? ","<input type='text' id='specialboxn' name=torrent_dir value='".($MAIN["torrent_dir"] ? $MAIN["torrent_dir"] : "torrents")."'> <br />Default: torrents <b><u>NO</u> a trailing slash (/) at the end!</b>\n", 1);
        tr("Picture Directory? ","<input type='text' id='specialboxn' name=pic_base_url value='".($MAIN["pic_base_url"] ? $MAIN["pic_base_url"] : "pic/")."'> <br />Default: pic/ <b><u>ADD</u> a trailing slash (/) at the end!</b>\n", 1);
        tr("Category Directory? ","<input type='text' id='specialboxn' name=table_cat value='".($MAIN["table_cat"] ? $MAIN["table_cat"] : "categories")."'> <br />Default: categories <b><u>NO</u> a trailing slash (/) at the end!</b>\n", 1);
        tr("Cache Directory? ","<input type='text' id='specialboxn' name=cache value='".($MAIN["cache"] ? $MAIN["cache"] : "cache")."'> <br />Default: cache <b><u>NO</u> a trailing slash (/) at the end!</b>\n", 1);

        echo '<tr><td colspan="2" class="subheader" align="center">General Tracker Limitations</td></tr>';
        tr("Initial Number of Invites?","<input type='text' name=invite_count id='specialboxes' value=2> How many invites should each user be given upon registration?", 1);
        tr("Max. characters Limit? ","<input type='text' id='specialboxes' name=maxchar value='".($MAIN["maxchar"] ? $MAIN["maxchar"] : "225" )."'> Max. characters limit for Signature and Info.\n", 1);
        tr("Max. Torrent Size? ","<input type='text' id='specialboxes' name='max_torrent_size' value='".($MAIN["max_torrent_size"] ? $MAIN["max_torrent_size"] : 10*1024*1024)."'> Default: ".(10*1024*1024)." (10 gb)\n", 1);
        tr("Announce Interval? ","<input type='text' id='specialboxes' name=announce_interval value='".($MAIN["announce_interval"] ? $MAIN["announce_interval"] : "1800")."'> Default: 1800 (60 * 30)\n", 1);
        tr("Auto Clean Interval? ","<input type='text' id='specialboxes' name=autoclean_interval value='".($MAIN["autoclean_interval"] ? $MAIN["autoclean_interval"] : "900")."'> Default: 900\n", 1);
        tr("Signup Timeout? ","<input type='text' id='specialboxes' name=signup_timeout value='".($MAIN["signup_timeout"] ? $MAIN["signup_timeout"] : "259200")."'> Default: 259200  (86400 * 3)\n", 1);
        tr("Peer Limit? ","<input type='text' id='specialboxes' name=PEERLIMIT value='".($MAIN["PEERLIMIT"] ? $MAIN["PEERLIMIT"] : "50000")."'> Default: 50000\n", 1);
        tr("Min. Votes? ","<input type='text' id='specialboxes' name=minvotes value='".($MAIN["minvotes"] ? $MAIN["minvotes"] : "1")."'> Default: 1\n", 1);
        tr("Max. Dead Torrent Time ? ","<input type='text' id='specialboxes' name=max_dead_torrent_time value='".($MAIN["max_dead_torrent_time"] ? $MAIN["max_dead_torrent_time"] : "21600")."'> Default: 21600  (6 * 3600)\n", 1);
        tr("Max. Users? ","<input type='text' id='specialboxes' name=maxusers value='".($MAIN["maxusers"] ? $MAIN["maxusers"] : "2500" )."'> Disable registration whenever this limit will be reached.\n", 1);

        tr("Save settings","<input type='submit' name='save_main' value='SAVE MAIN SETTINGS AND GO NEXT STEP [PRESS ONLY ONCE]'>\n", 1);
        print ("</form>");
}elseif ($action == 'step4') {  
        step("SECURITY Setup","Security","4");
        readconfig('SECURITY');
        print ("<form method='post' action='".$_SERVER["SCRIPT_NAME"]."'><input type='hidden' name='action' value='save_security'>");

        echo '<tr><td colspan="2" class="subheader" align="center">General Security Settings</td></tr>';
        tr("Secure Login enable?","yes <INPUT type='radio' name='securelogin'" . ($SECURITY["securelogin"] == "yes" ? " checked" : " checked") . " value='yes'> no <INPUT type='radio' name='securelogin'" . ($SECURITY["securelogin"] == "no" ? " checked" : "") . " value='no'> Optional (selectable by users) <INPUT type='radio' name='securelogin'" . ($SECURITY["securelogin"] == "op" ? " checked" : "") . " value='op'>\n", 1);
        tr("Private Tracker Patch Enabled?","yes <INPUT type='radio' name='privatetrackerpatch'" . ($SECURITY["privatetrackerpatch"] == "yes" ? " checked" : " checked") . " value='yes'> no <INPUT type='radio' name='privatetrackerpatch'" . ($SECURITY["privatetrackerpatch"] == "no" ? " checked" : "") . " value='no'>\n NOTE: Re-download is necessary for seed after upload a torrent.", 1);     
        tr("Banned Client Detection Enabled?","yes <INPUT type='radio' name='bannedclientdetect'" . ($SECURITY["bannedclientdetect"] == "yes" ? " checked" : " checked") . " value='yes'> no <INPUT type='radio' name='bannedclientdetect'" . ($SECURITY["bannedclientdetect"] == "no" ? " checked" : "") . " value='no'>\n Disable downloads if a banned client detected.. (e.g. Bitcomet, Utorrent < v1.6, Browser Clients, ABC and so far.", 1);
        tr("Image Verification enable?","yes <INPUT type='radio' name='iv'" . ($SECURITY["iv"] == "yes" ? " checked" : " checked") . " value='yes'> no <INPUT type='radio' name='iv'" . ($SECURITY["iv"] == "no" ? " checked" : "") . " value='no'>\n Require users to enter a Visual Verify Code to register/login/recover?", 1);
        tr("Disable right mouse click?","yes <INPUT type='radio' name='disablerightclick'" . ($SECURITY["disablerightclick"] == "yes" ? " checked" : " checked") . " value='yes'> no <INPUT type='radio' name='disablerightclick'" . ($SECURITY["disablerightclick"] == "no" ? " checked" : "") . " value='no'>\n Use it to stop surfers from easily saving your web page, viewing its source, or lifting images off your site when using either IE 4+ or NS 4+.", 1);
        tr("Max. IPs? ","<input type='text' id='specialboxes' name=maxip value='" . ($SECURITY["maxip"] ? $SECURITY["maxip"] : "1")."'> Disable registration with same IP Address.\n", 1);
        tr("Max. Login Attempts? ","<input type='text' id='specialboxes' name=maxloginattempts value='" . ($SECURITY["maxloginattempts"] ? $SECURITY["maxloginattempts"] : "7")."'> Disable/Ban IP address who exceed this limit.\n", 1);
        tr("Secure Hash","<input type='text' id='specialboxg' name=securehash size=60 value='" . ($SECURITY["securehash"] ? $SECURITY["securehash"] : "pRoTeCt mE aGaINSt HaCKErS (c) 2006 by xaM")."'><br />Please enter a secure word that only known by you.<br />Whenever you change this, all users must re-login.\n", 1);
        
        tr("Save settings","<input type='submit' name='save_security' value='SAVE SECURITY SETTINGS AND GO NEXT STEP [PRESS ONLY ONCE]'>\n", 1);
        print ("</form>");
}elseif ($action == 'step5') {  
        step("SMTP Setup","SMTP","5");
        readconfig('SMTP');
?>
<script src="../scripts/usableforms.js"></script>
<body onload="prepareForm()">
<table><tbody id="waitingRoom" 
      style="display: none"></tbody></table>
<form method='post' action='index.php'>
<input type='hidden' name='action' value='save_smtp'> 
<table width=100%><tbody>
<tr>
  <td class="smtptype" align="right">Please select type of PHP Mail function?</td>
  <td>
    <input type="radio" name="smtptype" value="default"
      show="default" /> <font color=green>DEFAULT</font> (Use default PHP MAIL Function.)<br />
    <input type="radio" name="smtptype" value="advanced"
      show="advanced" /> <font color=blue>ADVANCED</font> (Use default PHP Mail Function with EXTRA headers, This function to help avoid spam-filters.)<br />
      <input type="radio" name="smtptype" value="external"
      show="external" /> <font color=red>EXTERNAL</font> (Use an external PHP Mail Script.)<br />
    
  </td>
</tr>
<tr relation="default">
<?
  tr("Save settings","<input type='submit' name='save' value='Save SMTP Settings [PRESS ONLY ONCE]'>\n", 1,"default");
?>
</tr>
<tr relation="advanced">
<?
tr("SMTP Host? ","<input type='text' size='45' name=smtp_host value='".($smtp_host ? $smtp_host : "localhost")."'> Default: Localhost\n", 1,"advanced");
tr("SMTP Port? ","<input type='text' size='45' name=smtp_port value='".($smtp_port ? $smtp_port : "25")."'> Default: 25\n", 1,"advanced");
if (strtoupper(substr(PHP_OS,0,3)=='WIN'))
        tr("SMTP sendmail from? ","<input type='text' size='45' name=smtp_from value='".($smtp_from ? $smtp_from : "noreply@$sh")."'> Default: noreply@$sh\n", 1,"advanced");   
else
        print("<tr relation=\"advanced\"><td class=\"heading\" valign=\"top\" align=\"right\">Sendmail Path?</td><td valign=\"top\" align=left>Please setup your sendmail_path by editing php.ini</tr></td>");
tr("Save settings","<input type='submit' name='save' value='Save SMTP Settings [PRESS ONLY ONCE]'> <b><u>WARNING:</u> Don't leave any fields blank!</b>\n", 1,"advanced");
?>
</tr>
<tr relation="external">
<?
print("<tr relation=\"external\"><td align=right>Outgoing mail (SMTP) address:</td><td><input type=text name=smtpaddress size=40 ".($smtpaddress ? "value=\"$smtpaddress\"" : "")."> <b>hint:</b> smtp.yourisp.com</td></tr>");
print("<tr relation=\"external\"><td align=right>Outgoing mail (SMTP) port:</td><td><input type=text name=smtpport size=40 ".($smtpport ? "value=\"$smtpport\"" : "")."> <b>hint:</b> 80</td></tr>");
print("<tr relation=\"external\"><td align=right>Account Name:</td><td><input type=text name=accountname size=40 ".($accountname ? "value=\"$accountname\"" : "")."> <b>hint:</b> yourname@yourisp.com</td></tr>");
print("<tr relation=\"external\"><td align=right>Account Password:</td><td><input type=password name=accountpassword size=40 ".($accountpassword ? "value=\"$accountpassword\"" : "")."> <b>hint:</b> your password goes here</td></tr>");
tr("Save settings","<input type='submit' name='save' value='Save SMTP Settings [PRESS ONLY ONCE]'>  <b><u>WARNING:</u> Don't leave any fields blank!</b>\n", 1,"external");
?>
</tr>
</tbody></table></td>
</tr>
</form>
<?
        print ("<script language=\"JavaScript\">
function openWindow() {
popupWin=window.open('$BASEURL/mailtest.php','mailtest','width=750,height=450,top=300,left=300')
}
</script>");
        print ("<tr><td colspan=2>How can I test php mail? Its simple easy: Click <a href=\"javascript:openWindow();\">here</a>.</tr></td>"); 
        
        print ("</form>");
}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 ("<form method='post' action='".$_SERVER["SCRIPT_NAME"]."'><input type='hidden' name='action' value='save_admin'>");
        ?>
        <tr><td class=rowhead>Desired username:</td><td align=left><input type="text" size="40" name="wantusername" /><br>
<font class=small>Allowed Characters: (a-z), (A-Z), (0-9)</font></td></tr>
<tr><td class=rowhead>Pick a password:</td><td align=left><input type="password" size="40" name="wantpassword" /></td></tr>
<tr><td class=rowhead>Enter password again:</td><td align=left><input type="password" size="40" name="passagain" /></td></tr>
<?
$question = array(
'1' => 'What is your name of first school?',
'2' => 'What is your pet\'s name?',
'3' => 'What is your mothers maiden name?'
);

print("<tr><td class=rowhead>Question:</td><td><select name=passhint>");
foreach ($question as $v => $q){
print("<option value=\"$v\">$q</option>");
}
print("</select></td></tr>");
?>
<tr><td class=rowhead>Enter hint answer:</td><td align=left><input type="text" size="40" name="hintanswer" /><br>
<font class=small>This answer will be used to reset your password in case you forget it.<br> Make sure its something you will not forget!
</font></td></tr>
<tr><td class=rowhead>Email address:</td><td align=left><input type="text" size="40" name="email" />
<? $countries = "<option value=72>---- None selected ----</option>n";
$ct_r = mysql_query("SELECT id,name FROM countries ORDER BY name") or sqlerr(__FILE__, __LINE__);
while ($ct_a = mysql_fetch_array($ct_r))
$countries .= "<option value=$ct_a[id]" . ($CURUSER["country"] == $ct_a['id'] ? " selected" : "") . ">$ct_a[name]</option>n";
tr("Country", "<select name=country>n$countries</select>", 1); ?>
<tr><td class=rowhead>Gender</td><td align=left>
<input type=radio name=gender value=Male>Male <input type=radio name=gender value=Female>Female </td></tr>
<tr><td colspan="2" align="center"><font color=red><b>All Fields are required!</b><p></font><input type=submit value="Sign up! (PRESS ONLY ONCE)" style='height: 25px'></td></tr></form>
<?
}
print("</table></body></html>");
?>
this works fine for me.
Reply With Quote
  #36  
Old 8th February 2014, 15:32
Dingo38 Dingo38 is offline
Senior Member
 
Join Date: Oct 2013
P2P
Posts: 35
Default
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.
Reply With Quote
  #37  
Old 8th February 2014, 17:55
BamBam0077 BamBam0077 is offline
Banned
 
Join Date: Jul 2013
P2P
Posts: 410
Default
Quote:
Originally Posted by Dingo38 View Post
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
Reply With Quote
  #38  
Old 10th February 2014, 02:45
Dingo38 Dingo38 is offline
Senior Member
 
Join Date: Oct 2013
P2P
Posts: 35
Default
Quote:
Originally Posted by BamBam0077 View Post
I use php version 5.4.7 installed fine for me
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.
Reply With Quote
  #39  
Old 10th February 2014, 10:56
BamBam0077 BamBam0077 is offline
Banned
 
Join Date: Jul 2013
P2P
Posts: 410
Default
my index.php works that I posted it. I never got any errors with my copy of TSSE 3.1 maybe his database doesn't support mysqli ?
Reply With Quote
Reply

Tags
nulled , shares , template , v31

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
TS SE v4.3 Nulled dribbel Template Shares 4 27th January 2010 10:20
TS 3.1 nulled Buu Template Shares 2 2nd May 2009 12:23
TS SE v5.0 Nulled YOUTUBE dribbel Template Shares 2 25th June 2008 14:19
Nulled Mika Template Shares 5 21st June 2008 15:23
TS SE 5.0 Nulled or Not Nulled ? Explorer Template Shares 2 2nd June 2008 19:21



All times are GMT +2. The time now is 22:15. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.