Bravo List
Register
Go Back   > Bravo List > Source Code > Active Trackers > Torrent Trader
Reply
  #11  
Old 11th May 2016, 06:30
BamBam0077 BamBam0077 is offline
Banned
 
Join Date: Jul 2013
P2P
Posts: 410
Default
Quote:
You do know that nothing after
PHP Code:
return $site_mysqli;

is going to work rite?
Do you have any advice on how to get it work? I am a novice with this sorry.

This better:
Code:
 $site_mysqli = new mysqli('localhost', 'root', 'Password', 'trader');  

  if($site_mysqli->connect_errno > 0) {
      
     die('Unable to connect to database ['.$site_mysqli->connect_error.']'); 
  }
     //return $site_mysqli; 
     mysqli_close($site_mysqli); 
     
 userlogin();

  if ($autoclean) {
     register_shutdown_function("autoclean"); 
  }
Quote:
Me personally think it best to start with clean tt 2.0.8 no mods and redo the backend to use mysqli then from there integrate smarty template system and from there making a fully working admincp with an better clean up i can probably give an hand for mysqli stuff at some point but for next few months or over summer i bit busy
I have not added in any mods wanted to update the base then add mods later on but your right about the admincp she needs a overhaul you know for a basic control panel she doesn't look too bad, I wanted to try to keep that in tact. I mean you could update it too be a fancy backend but sometimes that becomes cluttered and people hate that I would assume, though a bootstrap backend with a admin login would be sweet. Thanks for offering your help

P.S Your rewrite engine could you tech me how that works I guess you could say I am a novice, thanks again bro

Last edited by BamBam0077; 11th May 2016 at 07:41.
Reply With Quote
  #12  
Old 11th May 2016, 10:46
l3on l3on is offline
Coder
 
Join Date: Jul 2012
Posts: 154
Default
PHP Code:
function dbconnect(){
    global 
$DB_host;
    global 
$DB_user;
    global 
$DB_pass;
    global 
$DB_name;
    global 
$DB_port;
    
$dbClass = new MysqliDb($DB_host,$DB_user,$DB_pass,$DB_name);
    return 
$dbClass;

put above in function.php

and for config.php use below code

PHP Code:
  $DB_host "localhost";
  
$DB_user "user";
  
$DB_pass "yourpassword";
  
$DB_name "databasename";
  
$DB_port 3306;
  
  
$db = new Mysqli($DB_host,$DB_user,$DB_pass,$DB_name);
  if(
$MySQLi_CON->connect_errno) {
    die(
"ERROR : -> ".$MySQLi_CON->connect_error);

you welcome

you may also need to include this file MysqliDb.php witch is the class file here link https://github.com/joshcam/PHP-MySQLi-Database-Class
Reply With Quote
  #13  
Old 11th May 2016, 11:32
BamBam0077 BamBam0077 is offline
Banned
 
Join Date: Jul 2013
P2P
Posts: 410
Default
Thanks bro will run a test and get back to you.

running into a 504 Gateway Time-Out .

Last edited by BamBam0077; 11th May 2016 at 16:07.
Reply With Quote
  #14  
Old 11th May 2016, 23:15
l3on l3on is offline
Coder
 
Join Date: Jul 2012
Posts: 154
Default
erm i guess i could come give an hand this weekend with changing mysql code to mysqli im no pro at it but i can do it so it be a game of hit and miss
Reply With Quote
Reply

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



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