Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
User Posts

Go to Profile

In second image $mysli_db = tt
That should not be tt but the same as $mysli_user
But I wouldn't use 2.08 its outdated
From image it looks like db name and db user should be velted....bett, you should not post details in images as well
you either need php 5+ or try installing either of the torrenttrader v3 ones
what version of torrenttrader have you tried installing? if it's version 2.08 it will not work on php7.3, you would need to install torrenttrader v3, either mysqli version or pdo version
Session Mod [TTv3] — 2020-05-02 16:46:31 in v3 Mods Completed
This mod is complete in that it does what it is intended to do  ?

The base mod has two session uid (user id) & pass (hashed password, id, ip, secret) again this is somewhere things can be added

Members can login with session which closes when browser close
[ATTACH type="full" alt="session.png"]5490[/ATTACH]

Members can click remember for session login cookie which last 1 month
[ATTACH type="full" alt="cookie.png"]5491[/ATTACH]

if anyone plays with this can you please share any work or examples

sql


create table sessions(
 id serial,
 sess_id text not null,
 _access integer,
 data text,
 primary key (id)
);


in account-login.php find


           $password = $_POST['password'];


add below


           $testing = $_POST['rememberme'];


find


           if (!$message){


replace that old code with this (just after show error)


           if (!$message){
               // Session Handler
               setsess($row["id"], $row["password"], $row["secret"]);
               if( isset($_POST['rememberme']) ){            
                   logincookie($row["id"], $row["password"], $row["secret"]);
                   setsess($row["id"], $row["password"], $row["secret"]);
               }
               header("Location: index.php");
              }else {
                 show_error_msg(T_("ACCESS_DENIED"), $message, 1);
              }


find


<tr><td align="center"><b><?php echo T_("PASSWORD"); ?>:</b> <input type="password" size="40" name="password" /></td></tr>


add below


       <tr><td align="center"><input type="checkbox" name="rememberme" value="rememberme" />&nbsp;Remember Me</td></tr>


in account-logout.php find


deconn();


add under


       // Remove cookies & sessions
       session_destroy();



in functions.php replace logincookie & logout cookie with

// Obtain / Create session Cookie Function
function logincookie($id, $password, $secret, $updatedb = 1, $expires = 0x7fffffff)
{
   // get sess_id
   $sid = session_id();
   // store only sess_id
   setcookie("PHPSESSID", $sid, time()+ 30*30*60*60, "/"); // one month
   // maybe add session in cleanup
   if ($updatedb) {
       SQL_Query_exec("UPDATE users SET last_login = '".get_date_time()."' WHERE id = $id");
   }
}

// Cookie Destruction function
function logoutcookie()
{
   // get sess_id
   $sid = session_id();
   // reset cookie to session
   setcookie("PHPSESSID", $sid, "0", "/");
}

function setsess($id, $password, $secret)
{
   // encrypt pass
   $hash = $id . $secret . $password . getip() . $secret;
   // set session handler
   $_SESSION['uid'] = $id;
   $_SESSION['pass'] = $hash;
}


find


function dbconn($autoclean = false){


add under

   // Session Handler
   require "classes/Session.php";

[/code]

now the userlogin function for auth

find
    //Check The Cookie and get CURUSER details
   if (strlen($_COOKIE["pass"]) != 40 || !is_numeric($_COOKIE["uid"])) {
       logoutcookie();
       return;
   }

   //Get User Details And Permissions
   $res = SQL_Query_exec("SELECT * FROM users INNER JOIN groups ON users.class=groups.group_id WHERE id=$_COOKIE[uid] AND users.enabled='yes' AND users.status = 'confirmed'");
   $row = mysqli_fetch_assoc($res);

   if (!$row || sha1($row["id"].$row["secret"].$row["password"].$ip.$row["secret"]) != $_COOKIE["pass"]) {
       logoutcookie();
       return;
   }


replace with

   // Check The Cookies and Sessions details
   if (!$_SESSION["pass"] || !is_numeric($_SESSION["uid"])) {     // todo
       logoutcookie();
       return;
   }

   //Get User Details And Permissions
   $res = SQL_Query_exec("SELECT * FROM users INNER JOIN groups ON users.class=groups.group_id WHERE id=$_SESSION[uid] AND users.enabled='yes' AND users.status = 'confirmed'");
   $row = mysqli_fetch_assoc($res);

   $hash = $row["id"] . $row["secret"] . $row["password"] . $ip . $row["secret"];
   if (!$row || !$_SESSION['pass'] == $hash){
           logoutcookie();
       return;

   } else {
   // success - need else to match hash & session above
   }


Session.php  (the class)

<?php
 class Session {
   private $pdo;

   public function connect() {
     global $site_config;
     // create a db connection
     $pdo = new PDO('mysql:host='.$site_config['mysql_host'].';dbname='.$site_config['mysql_db'], $site_config['mysql_user'], $site_config['mysql_pass']);
       return $pdo;
   }

   public function _open() {
     $this->pdo = Session::connect();
     if ($this->pdo) {
       return true;
     }
     else {
       return false;
     }
   } // end function _open()

   public function _close() {
     $this->pdo = null;
     return true;
   } // end function _close()

   public function _read($sess_id) {
     if (!$this->pdo) {
       $this->pdo = Session::connect();
     }
     $sql = "select data from sessions where sess_id=:sess_id";
     $statement = $this->pdo->prepare($sql);
     $statement->execute(array(':sess_id' => $sess_id));
     $num = $statement->rowCount();
     if ($num == 1) {
       $row = $statement->fetch(PDO::FETCH_ASSOC);
       $data = $row["data"];
       return $data;
     }
     else {
       return '';  //  return empty string if no data returned
     }
   } // end function _read()

   public function _write($sess_id,$data) {
     $access = time();
     $sql = "select * from sessions where sess_id=:sess_id";
     $statement = $this->pdo->prepare($sql);
     $statement->execute(array(':sess_id' => $sess_id));
     $num = $statement->rowCount();
     if ($num === 0) {
       $sql = "insert into sessions (sess_id, _access, data) values ".
         "(:sess_id,:access,:data)";
       $statement2 = $this->pdo->prepare($sql);
       $myArray = array();
       $myArray[':sess_id'] = $sess_id;
       $myArray[':access'] = $access;
       $myArray[':data'] = $data;
       $statement2->execute($myArray);
       if ($statement2 === false) {
         return false;
       }
       else {
         // new data stored
         return true;
       }
     } // end case of inserting new session data
     else {
       $sql = "update sessions set _access = :access, " .
         "data = :data where sess_id = :sess_id";
       $statement2 = $this->pdo->prepare($sql);
       $myArray = array();
       $myArray[':sess_id'] = $sess_id;
       $myArray[':access'] = $access;
       $myArray[':data'] = $data;
       $statement2->execute($myArray);
       if ($statement2 === false) {
         return false;
       }
       else {
         // data updated
         return true;
       }
     } // end case of updating existing record
   } // end function _write()

   public function _destroy($sess_id) {
     $sql= "delete from sessions where sess_id=:id";
     $statement = $this->pdo->prepare($sql);
     $statement->execute(array(':id' => $sess_id));
     if ($statement === true) {
       return true;
     }
     else {
       return false;
     }
   } // end function _destroy()

   public function _gc($max) {
     $old = time() - $max;
     $sql = "delete from sessions where _access < :old";
     $statement = $this->pdo->prepare($sql);
     $statement->execute(array(':old' => $old));
     if ($statement === true) {
       return true;
     }
     else {
       return false;
     }
   } // end function _gc
 }
 $sess = new Session();
 session_set_save_handler(
   array($sess,'_open'),
   array($sess,'_close'),
   array($sess,'_read'),
   array($sess,'_write'),
   array($sess,'_destroy'),
   array($sess,'_gc')
   );
 register_shutdown_function('session_write_close');
 /*
 // change php.ini
 ini_set('session.cookie_lifetime', 60 * 60 * 24 * 90); // 3months
 ini_set('session.gc_maxlifetime', 60 * 60 * 24 * 90); // 3 months
 */
 // start
 session_start();
?>


LAST PART   add to cleanup.php before optimise tables you can add this any where login, logout 09/05/20

// DELETE OLD SESSION ENTRIES
   $ts = gmtime() - $site_config["session_time"];
   SQL_Query_exec("DELETE FROM sessions WHERE _access > FROM_UNIXTIME($ts)");


in config

$site_config["session_time"] = 1800; // default above 30 mins
MVC Update (PDO) — 2020-04-30 21:01:39 in M-BiTsy Support
thanks ill use that how would you go about implementing that
the function setsess can include all of them and the remember me token would insert them all into database

quick test
function setsess($id, $password)
{
   session_start();
   $_SESSION['uid'] = $id;
   $_SESSION['pass'] = $password;
   $_SESSION['ip'] = getip();
   $_SESSION['time'] = gmtime();
   $_SESSION['useragent'] = '0';
   $_SESSION['anonymous'] = '1';
   $_SESSION['nopermission'] = '0';
}


[ATTACH type="full"]5474[/ATTACH]
MVC Update (PDO) — 2020-04-29 16:24:43 in M-BiTsy Support
Took a bit longer than expected removing the current cookies but replaced cookies (uid & pass) with sessions (uid & pass)
There is a remember me button with a new cookie (token)  if you can think of any improvements everything is working 100% the logout on all devices is a nice bonus

html add
<input type="checkbox" name="rememberme" value="rememberme" />&nbsp;Remember Me


in functions
replace cookie functions with
<?php
// Obtain / Create Cookie Function
function logincookie($id, $password, $secret, $updatedb = 1, $expires = 0x7fffffff)
{
   global $pdo;
   // Retrieving Cookie Information
   $hash = $id . $secret . $password . getip() . $secret;

   // Cookie Information Encryption
   $hash = password_hash($hash, PASSWORD_BCRYPT);
   // Declaration And Sending Cookie
   setcookie("token", $hash, $expires, "/");
   if ($updatedb) {
       $stmt = $pdo->run("UPDATE users SET last_login=? WHERE id=?", [get_date_time(), $id]);
       $token = $pdo->run("UPDATE users SET token=? WHERE id=?", [$hash, $id]);
   }

}
// Cookie Destruction function
function logoutcookie()
{
   session_start();
   // Declaration And Sending Cookie
   // As Set to NULL ==> Destruction
   setcookie("token", null, time(), "/");

   // Destroy Sessions
   unset($_SESSION['uid']);
  unset($_SESSION['pass']);
//    session_destroy();
}

function setsess($id, $password)
{
   session_start();
   $_SESSION['uid'] = $id;
   $_SESSION['pass'] = $password;
}


find    unset($GLOBALS["CURUSER"]);

under add (this is where improvement could be made)
    // Check The Cookies and Sessions details
   if (isset($_COOKIE['token'])) {
$res1 = $pdo->run("SELECT id FROM users WHERE token=?",[$_COOKIE['token']]);
$row = $res1->fetch(PDO::FETCH_ASSOC);
$id = $row['id'];
$_SESSION["uid"] = $id;
   }

   if (!isset($_SESSION['uid'])) {
       logoutcookie();
       return;
   }

   //Get User Details And Permissions
   $res = $pdo->run("SELECT * FROM users INNER JOIN groups ON users.class=groups.group_id WHERE id=$_SESSION[uid] AND users.enabled='yes' AND users.status = 'confirmed'");


And finally the account login
    public function login(){
       session_start();
       dbconn();
       global $site_config, $pdo;
       // Check for POST
       if($_SERVER['REQUEST_METHOD'] == 'POST'){
           // Process form
           // Sanitize POST data
           $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);
           // Init data
           $username = $_POST['username'];
           $password = $_POST['password'];
           $testing = $_POST['rememberme'];
           // called model method/function
       $row =    DB::run("SELECT id, password, secret, status, enabled FROM users WHERE username =? ", [$username])->fetch();
       //    echo $row;
           // Validate Input
       // Verify user password and set $_SESSION
if (password_verify($password, $row['password'])) {

setsess($row["id"], $row['password']);

if( isset($_POST['rememberme']) ){
   logincookie($row["id"], $row["password"], $row["secret"]);
   setsess($row["id"], $row['password']);
}
             
                header("Location: ".TTURL."/index.php");
              }else {
                 echo 'Wrong username or password';
                 header("Location: ".TTURL."/account/login");
              }

       }

       stdhead(T_("LOGIN"));
       begin_frame(T_("LOGIN"));
               // Members Only
               if ($site_config["MEMBERSONLY"]) {
                   $message = T_("MEMBERS_ONLY");
                   print("<center><b>" . $message . "</b></center>\n");
               }
       // add view
       $data = [];
       // load view
       $this->view('account/login', $data);
       end_frame();
       stdfoot();
}
Here m8 shadows did this before look for a time function in the torrenttable function in functions.php
[URL unfurl="true"]https://www.torrenttrader.xyz/index.php?threads/solved-change-timestamp-of-torrents.9776/[/url]
MVC Update (PDO) — 2020-04-25 07:54:49 in M-BiTsy Support
That can be done I'm redoing account controller now with sessions
I have login, logout, recover etc all in one controller just pulling models and views out
MVC Update (PDO) — 2020-04-24 17:22:53 in M-BiTsy Support
dont have much experience with sessions so would this be secure [USER=20311]@shadows[/USER] [USER=20335]@mostvotedplaya[/USER]
seems to work fine and the session user_key is encrytpted
remove this
    //Check The Cookie and get CURUSER details
   if (strlen($_COOKIE["pass"]) != 60 || !is_numeric($_COOKIE["uid"])) {
       logoutcookie();
       return;
   }


with this
    if (!is_numeric($_COOKIE['uid']) || (int) $_COOKIE['uid'] < 1 || !isset($_COOKIE['pass']) ) {
       logoutcookie();
       return;
   }
session_start()
   if(isset($_COOKIE['uid']) || isset($_COOKIE['pass'])) {

       $_SESSION['user_id'] = $_COOKIE['uid'];
       $_SESSION['user_key'] = $_COOKIE['pass'];
   }

echo $_SESSION['user_id'];
echo $_SESSION['user_key'];


to test in staff.php
replace
loggedinonly();


with
if (!(isset($_SESSION['user_key']) && $_SESSION['user_key'] != '')) {

header ("Location: /account/login");

}


we would add destroy session to logout, would it be safe to use session to call model
    public function getUserById($id){
     $row = $this->db->run("SELECT id, password, secret, status, enabled FROM users WHERE username =? ", [$id])->fetch();
     return $row;

$id = $_SESSION['user_id'];
$res = $this->userModel-> getUserById($id)

   }
MVC Update (PDO) — 2020-04-19 14:50:17 in M-BiTsy Support
Just splitting controllers up left but its fully functional and will have a release page in a day or two
[URL unfurl="true"]https://github.com/M-jay84/Torrent-Trader-MVC-PDO-OOP[/url]
MVC Update (PDO) — 2020-04-19 11:45:08 in M-BiTsy Support
there is 2 db classes both the same except ones a static the other is not this has been considered before, thats the long term plan m8 but its there now so ill go through them
the static dbclass.php (this was for putting everything together)
DB::run  (everything/everywhere works)

the new core Database.php (this does what you say)
its in constructor for models (called from class itself)

in functions or anywhere we can call it
$PDO = new Database
$PDO->run

And there is a new global in dbconn global $PDO = new Database;
global $PDO;
$PDO->run
MVC Update (PDO) — 2020-04-18 13:31:45 in M-BiTsy Support
Too early to add this to github but its what ive added to assist with breaking controllers down
This doesn't effect anything its just a starter template and a unit tester
to view go to SITEURL/atest & SITEURL/atest/one

I'll keep adding examples to it as I go
MVC Update (PDO) — 2020-04-18 12:35:20 in M-BiTsy Support
updated github with final backend & moved a few more root files to controllers exceptions, adminmodtaks
That just leaves controllers these are fully functional so no rush were good to go
MVC Update (PDO) — 2020-04-18 11:14:15 in M-BiTsy Support
Thought id share the last 3 phases
Moving the theme was not necessary this was a personal choice it was just stdhead, stdfoot and links in header to css & js  & in the theme admincp
Depending how much work this is to someone else if its not worth it you dont need to

But ill go through what i plan to do so you can see the end product and the goal posts dont keep moving, in github anything from moving the theme onwards is optional and its about options now and these options are available through git at any time

[color=rgb(250, 197, 28)]THE BACKEND (This is finished ready to add to github)[/color]
A classes folder has been added (dbclass, cache, BEcode, mail)  all classes will be here)

The helpers folder


The functions have been taken from everywhere except admincp & announce and the functions have been split into little specific files
The cookie helper
<?php
// Obtain / Create Cookie Function
function logincookie($id, $password, $secret, $updatedb = 1, $expires = 0x7fffffff)
{
   // Retrieving Cookie Information
   $hash = $id . $secret . $password . getip() . $secret;
   // Cookie Information Encryption
   $hash = password_hash($hash, PASSWORD_BCRYPT);
   // Declaration And Sending Cookie
   setcookie("pass", $hash, $expires, "/");
   setcookie("uid", $id, $expires, "/");

   if ($updatedb) {
       $stmt = DB::run("UPDATE users SET last_login=? WHERE id=?", [get_date_time(), $id]);
   }

}
// Cookie Destruction function
function logoutcookie()
{
   // Declaration And Sending Cookie
   // As Set to NULL ==> Destruction
   setcookie("pass", null, time(), "/");
   setcookie("uid", null, time(), "/");
}


All cookie functions in there, all torrent functions in torrents etc again this is personal choice it makes no difference and some will say its slower
but the difference in speed is the smallest of fractions, its to make life easier for myself and updating much easier in future.
there is a mods helper for any new functions for mods so mod functions will be separate,
The files have different names so can be added over time or in 6 months but its about preference but id recommend including modded functions separate from now

Been thinking of renaming functions so the helper is in the name but i have left it for now like
show_error_message = show_general_error_message in general_helper.php
this will probably be last thing i do

[color=rgb(250, 197, 28)]The Models & Views[/color]
This just leaves these 2 now every things moved, any old TT page should have its own controller then updating is just file for file
for mods we save the mod controller, mod helper & mod view & mod model so mods can be separated

while the controllers are there to see over time the plan is to remove from the controllers the frontend where possible into views & all queries will be called from the model
on github theres a example of the finished accountlogin

Again this isnt something that needs to be done the controllers work as they are but its something to be aware of if you want to stay close to the project
The approach behind this is to have a place for everything, make updating easier and moderniser structure a little bit
MVC Update (PDO) — 2020-04-17 19:31:00 in M-BiTsy Support
Thank you I've enjoyed playing with the script.
Got another theme for it somewhere got too many folders on my pc lol
There will be odd update over next few days
Going make most of this free time
I was cleaning my git and removed my old projects like v3 modded, the mvc pdo one i re-did so i could make the comments a little better and so the changes i made are clearer for anyone wanting to update their own you can go through the git for guidance.

Its now finished i was going to post it yesterday but STORRENTS2020 had already posted his, so it seemed silly posting both on same day. The project is still going  (y)
It is mvc now, i think its worth it with all the scripts ive seen of TT they all so messy, mvc makes it easy in the longer run you dont need a large package like sympthnoy or laravel to do it

Just need to clean controllers up but that doesn't effect the release it will be just small updates (adding 2 files will do one controller)
This gives me a bit of time, the weathers getting nicer here so im out more and at the same time allows members to use it and give me feedback.

Ill add it back sometime today but wont post it on the site for a few days id encourage members to try STORRENTS2020 copy if they can, even if its just to give him feed back

heres the login/logout (yes the account-login.php & account-logout.php are in the same file)
This is the one i did on the project for the controller git example

header.php (example of calling logout)
// call controller/method
echo " [<a href='/users/logout'><font color='#fff'>".T_("LOGOUT")."</font></a>] ";
     


views/user/login.php (just the html)
<form method="post" action="users/login">
 <table border="0" cellpadding="3" align="center">
       <tr><td align="center"><b><?php echo T_("USERNAME"); ?>:</b> <input type="text" size="40" name="username" /></td></tr>
       <tr><td align="center"><b><?php echo T_("PASSWORD"); ?>:</b> <input type="password" size="40" name="password" /></td></tr>
       <tr><td colspan="2" align="center"><input type="submit" value="<?php echo T_("LOGIN"); ?>" /><br /><br /><i><?php echo T_("COOKIES"); ?></i></td></tr>
   </table>

</form>
<p align="center"><a href="accountsignup"><?php echo T_("SIGNUP"); ?></a> | <a href="accountrecover"><?php echo T_("RECOVER_ACCOUNT"); ?></a></p>


User model
<?php
 class User {
   private $db;

   public function __construct(){
     $this->db = new Database;
   }
   // Get User by ID
   public function getUserByUsername($username){
     $row = $this->db->run("SELECT id, password, secret, status, enabled FROM users WHERE username =? ", [$username])->fetch();
     return $row;
   }

 }


then the controller with login/logout methods/functions
[color=rgb(250, 197, 28)]if you look at the old tt logout & login files you can see how easy it is to move the root php files to controller methods/functions[/color]
?php
class Users extends Controller
{
   // autoload model with constructor
   public function __construct()
   {
       $this->userModel = $this->model('User');
   }

   public function login()
   {
       dbconn();
       // add globals
       global $site_config, $CURUSER;

       $username = $_POST['username'] ?? false;
       $user_password = $_POST['password'] ?? false;
       $message = '';

       if ($username && $user_password) {

           $password = $user_password;
           // called model method/function
           $row = $this->userModel->getUserByUsername($username);

           if (!$row || !password_verify($password, $row["password"])) {
               $message = T_("LOGIN_INCORRECT");
           } elseif ($row["status"] == "pending") {
               $message = T_("ACCOUNT_PENDING");
           } elseif ($row["enabled"] == "no") {
               $message = T_("ACCOUNT_DISABLED");
           }

           if (!$message) {

               logincookie($row["id"], $row["password"], $row["secret"]);
               if (!empty($_POST)) {
                   header("Refresh: 0; url=index.php");
                   die();
               }
           } else {
               show_error_msg(T_("ACCESS_DENIED"), $message, 1);
           }
       }

       logoutcookie();

       stdhead(T_("LOGIN"));

       begin_frame(T_("LOGIN"));

       if ($site_config["MEMBERSONLY"]) {
           $message = T_("MEMBERS_ONLY");
           print("<center><b>" . $message . "</b></center>\n");
       }

       // add view
       $data = [
         //  we can add data to view 'posts' => $posts
         ];
         // load view
         $this->view('account/login', $data);

       end_frame();
       stdfoot();
   }
 
   public function logout()
   {
       dbconn();
       logoutcookie();
       header("Location: /index.php");
   }
}
TTv3 Modded — 2020-04-13 22:10:26 in v3 Download
Ive removed this from github i no longer use it but ive updated the first post & attached the file for anyone that wants to look at it
Because i dont use it, it wont be updated and it causes errors on php7.4 & newer mariadb and the structure is slightly different
The code is based on v3 so general support is offered but i wont able be to test this version.
managed to finally remove globals heres what i have

user model
<?php
 class User {
   private $db;

   public function __construct(){
     $this->db = new Database;
   }

   // get current user
   public function setCurrentUser(){
     $row = $this->db->run("SELECT * FROM users INNER JOIN groups ON users.class=groups.group_id WHERE token=? AND users.enabled='yes' AND users.status = 'confirmed'", [$_COOKIE['pass']])->fetch(PDO::FETCH_OBJ);

     return $row;
   }

 }


home controller
<?php
 class Home extends Controller {
   
   public function __construct(){
     $this->userModel = $this->model('User');
   }
   
   public function index(){

dbconn(true);
stdhead(T_("HOME"));

// replaces global $CURUSER;
$curuser = $this->userModel->setCurrentUser();

//check
if (file_exists("check.php") && $curuser->class == 6){


and the token is generated on login
/*
   //Get User Details And Permissions
   $res = DB::run("SELECT * FROM users INNER JOIN groups ON users.class=groups.group_id WHERE id=$_COOKIE[uid] AND users.enabled='yes' AND users.status = 'confirmed'");
   $row = $res->fetch(PDO::FETCH_ASSOC);
*/

   // set token
   if(isset($_COOKIE['pass'])) {
       DB::run("UPDATE users SET token=? WHERE id=?", [$_COOKIE['pass'], $_COOKIE['uid']]);
   }

   // replace curuser with model method
   $res = DB::run("SELECT * FROM users INNER JOIN groups ON users.class=groups.group_id WHERE token=? AND users.enabled='yes' AND users.status = 'confirmed'", [$_COOKIE['pass']]);
   $row = $res->fetch(PDO::FETCH_ASSOC);
The issue I have at minute is I have to pass the globals around in the class controllers ($site_config i use define but that was another)
  class Home extends Controller {
 
   public function __construct(){  
   }
 
   public function index(){
       global $CURUSER;


if i remove the global $curuser in dbconn function i need to collect curuser through the user model
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728