C:\$Recycle.Bin\S-1-5-21-3967099092-2644009230-141905953-500\$RD9NVG6\ftp\includes\database.inc.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php

//   -------------------------------------------------------------------------------
//  |                  net2ftp: a web based FTP client                              |
//  |              Copyright (c) 2003-2006 by David Gartner                         |
//  |                                                                               |
//  | This program is free software; you can redistribute it and/or                 |
//  | modify it under the terms of the GNU General Public License                   |
//  | as published by the Free Software Foundation; either version 2                |
//  | of the License, or (at your option) any later version.                        |
//  |                                                                               |
//   -------------------------------------------------------------------------------


// **************************************************************************************
// **************************************************************************************
// **                                                                                  **
// **                                                                                  **

function connect2db() {

// --------------
// This function logs user accesses to the site
// --------------

// -------------------------------------------------------------------------
// Global variables
// -------------------------------------------------------------------------
    
global $net2ftp_settings;

    
$mydb mysql_connect($net2ftp_settings["dbserver"], $net2ftp_settings["dbusername"], $net2ftp_settings["dbpassword"]);
    if (
$mydb == false) { 
        
setErrorVars(false__("Unable to connect to the MySQL database. Please check your MySQL database settings in net2ftp's configuration file settings.inc.php."), debug_backtrace(), __FILE____LINE__);
        return 
false;
    }

    
$result2 mysql_select_db($net2ftp_settings["dbname"]);
    if (
$result2 == false) { 
        
setErrorVars(false__("Unable to select the MySQL database. Please check your MySQL database settings in net2ftp's configuration file settings.inc.php."), debug_backtrace(), __FILE____LINE__);
        return 
false;
    }

    return 
$mydb;

// End connect2db

// **                                                                                  **
// **                                                                                  **
// **************************************************************************************
// **************************************************************************************

?>